Database queries should use parameter binding 27

More information: https://insight.symfony.com/what-we-analyse/doctrine.database_query_contains_string_and_variable_concatenation

  1. $sql = new rex_sql();
  2. //$sql->debugsql = true;
  3. // add single image imagetype
  4. $sql->setQuery('SELECT * FROM `' . $REX['TABLE_PREFIX'] . "679_types` WHERE name LIKE 'magnific_popup_image_thumb'");

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. if (0 == $sql->getRows()) {
  6. // imagetype
  7. $sql->setQuery('INSERT INTO `' . $REX['TABLE_PREFIX'] . "679_types` (status, name, description) VALUES (0, 'magnific_popup_image_thumb', 'Magnific Popup Einzelbild Vorschaubild')");
  1. . time()
  2. . ",'admin')");
  3. }
  4. // add gallery image imagetype
  5. $sql->setQuery('SELECT * FROM `' . $REX['TABLE_PREFIX'] . "679_types` WHERE name LIKE 'magnific_popup_gallery_thumb'");

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  6. if (0 == $sql->getRows()) {
  7. // imagetype
  8. $sql->setQuery('INSERT INTO `' . $REX['TABLE_PREFIX'] . "679_types` (status, name, description) VALUES (0, 'magnific_popup_gallery_thumb', 'Magnific Popup Galerie Vorschaubild')");
  1. // Ist Modul schon vorhanden ?
  2. $searchtext = 'module: magnific_popup_gallery_out';
  3. $gm = rex_sql::factory();
  4. $gm->setQuery('SELECT * FROM ' . $REX['TABLE_PREFIX'] . 'module WHERE ausgabe LIKE %' . $searchtext . '%');

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. $module_id = 0;
  6. $module_name = '';
  7. foreach ($gm->getArray() as $module) {
  1. // Ist Modul schon vorhanden ?
  2. $searchtext = 'module: magnific_popup_image_out';
  3. $gm = rex_sql::factory();
  4. $gm->setQuery('SELECT * FROM ' . $REX['TABLE_PREFIX'] . 'module WHERE ausgabe LIKE "%' . $searchtext . '%"');

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. $module_id = 0;
  6. $module_name = '';
  7. foreach ($gm->getArray() as $module) {
  1. }
  2. // retrieve links to imagetypes
  3. $sql = new rex_sql();
  4. //$sql->debugsql = true;
  5. $sql->setQuery('SELECT id FROM `' . $REX['TABLE_PREFIX'] . "679_types` WHERE name LIKE 'magnific_popup_image_thumb'");

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  6. if (1 == $sql->getRows()) {
  7. $imageManagerLinkImage = 'index.php?page=image_manager&subpage=effects&type_id=' . $sql->getValue('id');
  8. } else {
  9. $imageManagerLinkImage = 'index.php?page=image_manager&subpage=types';
  1. $imageManagerLinkImage = 'index.php?page=image_manager&subpage=effects&type_id=' . $sql->getValue('id');
  2. } else {
  3. $imageManagerLinkImage = 'index.php?page=image_manager&subpage=types';
  4. }
  5. $sql->setQuery('SELECT id FROM `' . $REX['TABLE_PREFIX'] . "679_types` WHERE name LIKE 'magnific_popup_gallery_thumb'");

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  6. if (1 == $sql->getRows()) {
  7. $imageManagerLinkGallery = 'index.php?page=image_manager&subpage=effects&type_id=' . $sql->getValue('id');
  8. } else {
  9. $imageManagerLinkGallery = 'index.php?page=image_manager&subpage=types';
  1. $sql = new rex_sql();
  2. //$sql->debugsql = true;
  3. // remove single image imagetype
  4. $sql->setQuery('SELECT id FROM `' . $REX['TABLE_PREFIX'] . "679_types` WHERE name LIKE 'magnific_popup_image_thumb'");

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. if (1 == $sql->getRows()) {
  6. $imageTypeId = $sql->getValue('id');
  7. // imagetype
  1. if (1 == $sql->getRows()) {
  2. $imageTypeId = $sql->getValue('id');
  3. // imagetype
  4. $sql->setQuery('DELETE FROM `' . $REX['TABLE_PREFIX'] . '679_types` WHERE id = ' . $imageTypeId);

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. // effects
  6. $sql->setQuery('DELETE FROM `' . $REX['TABLE_PREFIX'] . '679_type_effects` WHERE type_id = ' . $imageTypeId);
  7. }
  1. // imagetype
  2. $sql->setQuery('DELETE FROM `' . $REX['TABLE_PREFIX'] . '679_types` WHERE id = ' . $imageTypeId);
  3. // effects
  4. $sql->setQuery('DELETE FROM `' . $REX['TABLE_PREFIX'] . '679_type_effects` WHERE type_id = ' . $imageTypeId);

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. }
  6. // add gallery image imagetype
  7. $sql->setQuery('SELECT id FROM `' . $REX['TABLE_PREFIX'] . "679_types` WHERE name LIKE 'magnific_popup_gallery_thumb'");
  1. // effects
  2. $sql->setQuery('DELETE FROM `' . $REX['TABLE_PREFIX'] . '679_type_effects` WHERE type_id = ' . $imageTypeId);
  3. }
  4. // add gallery image imagetype
  5. $sql->setQuery('SELECT id FROM `' . $REX['TABLE_PREFIX'] . "679_types` WHERE name LIKE 'magnific_popup_gallery_thumb'");

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  6. if (1 == $sql->getRows()) {
  7. $imageTypeId = $sql->getValue('id');
  8. // imagetype
  1. if (1 == $sql->getRows()) {
  2. $imageTypeId = $sql->getValue('id');
  3. // imagetype
  4. $sql->setQuery('DELETE FROM `' . $REX['TABLE_PREFIX'] . '679_types` WHERE id = ' . $imageTypeId);

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. // effects
  6. $sql->setQuery('DELETE FROM `' . $REX['TABLE_PREFIX'] . '679_type_effects` WHERE type_id = ' . $imageTypeId);
  7. }
  1. // imagetype
  2. $sql->setQuery('DELETE FROM `' . $REX['TABLE_PREFIX'] . '679_types` WHERE id = ' . $imageTypeId);
  3. // effects
  4. $sql->setQuery('DELETE FROM `' . $REX['TABLE_PREFIX'] . '679_type_effects` WHERE type_id = ' . $imageTypeId);

    If provided by the user, the value of $REX['TABLE_PREFIX'] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. }
  6. // done!
  7. $REX['ADDON']['install']['magnific_popup'] = false;
  1. $block = [];
  2. if (0 != $options[1]) {
  3. $cat = array_slice($options, 1); //Get information about categories to display
  4. $catauth = implodeArray2Dextgallery(',', $cat); //Creation of categories list to use - separated by a coma
  5. }
  6. $sql = 'SELECT uid, count(photo_id) AS countphoto FROM ' . $xoopsDB->prefix('extgallery_publicphoto');

    If provided by the user, the value of $xoopsDB->prefix('extgallery_publicphoto') may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  7. $sql .= ' WHERE (uid>0)';
  8. if (0 != $options[1]) {
  9. $sql .= ' AND cat_id IN (' . $catauth . ')';
  10. }
  11. $sql .= ' GROUP BY uid ORDER BY countphoto DESC';
  1. // Update all parent of this album
  2. $upNbAlbum = '';
  3. if (0 != $nbPhoto) {
  4. $upNbAlbum = 'cat_nb_album = cat_nb_album + 1, ';
  5. }
  6. $sql = 'UPDATE `%s` SET ' . $upNbAlbum . 'cat_nb_photo = cat_nb_photo + %d WHERE nleft < %d AND nright > %d;';

    If provided by the user, the value of $upNbAlbum may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  7. $query = sprintf($sql, $this->table, $nbPhoto, $row['nleft'], $row['nright']);
  8. $this->db->queryF($query);
  9. // Update this album if needed
  10. if (0 != $nbPhoto) {
  1. }
  2. $sql .= " FROM `{$this->handler->table}`";
  3. if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
  4. $sql .= ' ' . $criteria->renderWhere();
  5. if ($sort = $criteria->getSort()) {
  6. $sql .= ' ORDER BY ' . $sort . ' ' . $criteria->getOrder();

    If provided by the user, the value of $sort may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Mamba
  7. }
  8. $limit = $criteria->getLimit();
  9. $start = $criteria->getStart();
  10. }
  11. $result = $this->handler->db->query($sql, $limit, $start);
  1. }
  2. $whereclause = implode(' AND ', $clause);
  3. } else {
  4. $whereclause = $this->keyName . ' = ' . $id;
  5. }
  6. $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause;

    If provided by the user, the value of $this->table may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  7. if (false !== $force) {
  8. $result = $this->db->queryF($sql);
  9. } else {
  10. $result = $this->db->query($sql);
  11. }
  1. *
  2. * @return bool
  3. */
  4. public function updateFieldValue($fieldname, $fieldvalue, $criteria = null, $force = true)
  5. {
  6. $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldvalue;

    If provided by the user, the value of $this->table may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  7. if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) {
  8. $sql .= ' ' . $criteria->renderWhere();
  9. }
  10. $result = false !== $force ? $this->db->queryF($sql) : $this->db->query($sql);
  11. if (!$result) {
  1. *
  2. * @return bool
  3. */
  4. public function updateCounter($fieldname, $criteria, $op = '+')
  5. {
  6. $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldname . $op . '1';

    If provided by the user, the value of $this->table may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  7. $sql .= ' ' . $criteria->renderWhere();
  8. $result = $this->db->queryF($sql);
  9. if (!$result) {
  10. return false;
  11. }
  1. if ('' != $criteria->groupby) {
  2. $groupby = true;
  3. $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
  4. }
  5. }
  6. $sql = 'SELECT ' . $field . "SUM($sum) FROM " . $this->table;

    If provided by the user, the value of $field may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  7. if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) {
  8. $sql .= ' ' . $criteria->renderWhere();
  9. if ('' != $criteria->groupby) {
  10. $sql .= $criteria->getGroupby();
  11. }
  1. if ('' != $criteria->groupby) {
  2. $groupby = true;
  3. $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
  4. }
  5. }
  6. $sql = 'SELECT ' . $field . "MAX($max) FROM " . $this->table;

    If provided by the user, the value of $field may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  7. if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) {
  8. $sql .= ' ' . $criteria->renderWhere();
  9. if ('' != $criteria->groupby) {
  10. $sql .= $criteria->getGroupby();
  11. }
  1. */
  2. public function getAvg(\CriteriaElement $criteria = null, $avg = '*')
  3. {
  4. $field = '';
  5. $sql = 'SELECT ' . $field . "AVG($avg) FROM " . $this->table;

    If provided by the user, the value of $field may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  6. if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) {
  7. $sql .= ' ' . $criteria->renderWhere();
  8. }
  9. $result = $this->db->query($sql);
  10. if (!$result) {
in class/PhotoHandler.php, line 195
  1. {
  2. $criteria = new \CriteriaCompo();
  3. $criteria->add(new \Criteria('cat_id', $catId));
  4. $criteria->add(new \Criteria('photo_approved', 1));
  5. $sql = 'SELECT photo_id FROM ' . $this->db->prefix('extgallery_publicphoto') . ' ' . $criteria->renderWhere() . ' ORDER BY photo_weight, photo_id ASC;';

    If provided by the user, the value of $this->db->prefix('extgallery_publicphoto') may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  6. $result = $this->db->query($sql);
  7. $ret = [];
  8. while (false !== ($myrow = $this->db->fetchArray($result))) {
  9. $ret[] = $myrow['photo_id'];
  1. {
  2. $criteria = new \CriteriaCompo();
  3. $criteria->add(new \Criteria('uid', $userId));
  4. $criteria->add(new \Criteria('photo_approved', 1));
  5. $sql = 'SELECT photo_id FROM ' . $this->db->prefix('extgallery_publicphoto') . ' ' . $criteria->renderWhere() . ' ORDER BY photo_date, photo_id DESC;';

    If provided by the user, the value of $this->db->prefix('extgallery_publicphoto') may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  6. $result = $this->db->query($sql);
  7. $ret = [];
  8. while (false !== ($myrow = $this->db->fetchArray($result))) {
  9. $ret[] = $myrow['photo_id'];
in include/oninstall.php, line 241
  1. }
  2. }
  3. */
  4. //delete .html entries from the tpl table
  5. $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";

    If provided by the user, the value of $GLOBALS['xoopsDB']->prefix('tplfile') may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  6. $GLOBALS['xoopsDB']->queryF($sql);
  7. return true;
  8. }
in include/onupdate.php, line 119
  1. $sql = 'ALTER TABLE `' . $db->prefix($moduleDirName . '_publicphoto') . '` CHANGE `photo_desc` `photo_desc` TEXT;';
  2. $db->query($sql);
  3. // Set display parmission for all XOOPS base Groups
  4. $sql = 'SELECT cat_id FROM `' . $db->prefix($moduleDirName . '_publiccat') . '`;';

    If provided by the user, the value of $db->prefix($moduleDirName . '_publiccat') may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. $result = $db->query($sql);
  6. $moduleId = $module->getVar('mid');
  7. /** @var XoopsGroupPermHandler $gpermHandler */
  8. $gpermHandler = xoops_getHandler('groupperm');
  9. while (false !== ($cat = $db->fetchArray($result))) {
in include/onupdate.php, line 229
  1. }
  2. //---------------------
  3. //delete .html entries from the tpl table
  4. $sql = 'DELETE FROM ' . $xoopsDB->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . '\' AND `tpl_file` LIKE \'%.html%\'';

    If provided by the user, the value of $xoopsDB->prefix('tplfile') may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. $xoopsDB->queryF($sql);
  6. // Load class XoopsFile ====================
  7. xoops_load('XoopsFile');
  1. $sql = 'ALTER TABLE `' . $db->prefix('extgallery_publicphoto') . '` CHANGE `photo_desc` `photo_desc` TEXT;';
  2. $db->query($sql);
  3. // Set display parmission for all XOOPS base Groups
  4. $sql = 'SELECT cat_id FROM `' . $db->prefix('extgallery_publiccat') . '`;';

    If provided by the user, the value of $db->prefix('extgallery_publiccat') may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by mambax7
  5. $result = $db->query($sql);
  6. $module_id = $xoopsModule->getVar('mid');
  7. /** @var XoopsGroupPermHandler $gpermHandler */
  8. $gpermHandler = xoops_getHandler('groupperm');
  9. while (false !== ($cat = $db->fetchArray($result))) {

PHP debug statements found

More information: https://insight.symfony.com/what-we-analyse/php.debug_statements

  1. if (is_admin()) {
  2. echo '<div id="message" class="error">';
  3. echo '<p><strong>ERROR</strong> ' . $image->get_error_message() . " Check <a href='http://codex.wordpress.org/Changing_File_Permissions' target='_blank'>file permissions</a></p>";
  4. echo "<button class='toggle'>Show Details</button>";
  5. echo "<div class='message' style='display: none;'><br >Slide ID: {$this->id}<pre>";
  6. var_dump($image);

    var_dump() should only be used for debug, and not committed to the source code repository.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by mambax7
  7. echo '</pre></div>';
  8. echo '</div>';
  9. }
  10. return $this->url;

eval() should never be used

More information: https://insight.symfony.com/what-we-analyse/php.use_php_eval_function

in class/pear/PEAR.php, line 936
  1. call_user_func($this->callback, $this);
  2. }
  3. if ($this->mode & PEAR_ERROR_EXCEPTION) {
  4. trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions", E_USER_WARNING);
  5. eval('$e = new Exception($this->message, $this->code);throw($e);');

    eval() is very dangerous because it allows execution of arbitrary PHP code. Avoid using it, especially when including user input.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. }
  7. }
  8. /**
  9. * Only here for backwards compatibility.

Global variable or function should never be used 155

More information: https://insight.symfony.com/what-we-analyse/php.use_global_variable_or_function

  1. // Manage photo blocks
  2. /**
  3. * @param array $options
  4. * @return array
  5. */
  6. function extgalleryPhotoShow($options)

    extgalleryPhotoShow() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. global $xoopsConfig;
  9. $photos = [];
  10. /** @var Extgallery\PhotoHandler $photoHandler */
  1. * @param array $options
  2. * @return array
  3. */
  4. function extgalleryPhotoShow($options)
  5. {
  6. global $xoopsConfig;

    $xoopsConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. $photos = [];
  8. /** @var Extgallery\PhotoHandler $photoHandler */
  9. $photoHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
  1. $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
  2. break;
  3. }
  4. if ('true' === $jquery && 'none' !== $ajaxeffect) {
  5. global $xoTheme;

    $xoTheme adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js');
  7. switch ($ajaxeffect) {
  8. case 'lightbox':
  9. $xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.lightbox.js');
  1. * @param $sep
  2. * @param array $array
  3. *
  4. * @return string
  5. */
  6. function implodeArray2Dextgallery($sep, $array)

    implodeArray2Dextgallery() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $num = count($array);
  9. $str = '';
  10. foreach ($array as $i => $iValue) {
  11. if ($i) {
  1. /**
  2. * @param array $options
  3. *
  4. * @return string|array
  5. */
  6. function extgalleryTopSubmitterShow($options)

    extgalleryTopSubmitterShow() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. global $xoopsDB, $xoopsConfig;
  9. $catauth = '';
  10. $block = [];
  11. if (0 != $options[1]) {
  1. *
  2. * @return string|array
  3. */
  4. function extgalleryTopSubmitterShow($options)
  5. {
  6. global $xoopsDB, $xoopsConfig;

    $xoopsDB adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by Mamba
  7. $catauth = '';
  8. $block = [];
  9. if (0 != $options[1]) {
  10. $cat = array_slice($options, 1); //Get information about categories to display
  11. $catauth = implodeArray2Dextgallery(',', $cat); //Creation of categories list to use - separated by a coma
  1. *
  2. * @return string|array
  3. */
  4. function extgalleryTopSubmitterShow($options)
  5. {
  6. global $xoopsDB, $xoopsConfig;

    $xoopsConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by Mamba
  7. $catauth = '';
  8. $block = [];
  9. if (0 != $options[1]) {
  10. $cat = array_slice($options, 1); //Get information about categories to display
  11. $catauth = implodeArray2Dextgallery(',', $cat); //Creation of categories list to use - separated by a coma
  1. /**
  2. * @param array $options
  3. *
  4. * @return array
  5. */
  6. function extgalleryAjax($options)

    extgalleryAjax() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $photos = [];
  9. /** @var Extgallery\PhotoHandler $photoHandler */
  10. $photoHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
  11. $param = ['limit' => $options[0]];
  1. $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
  2. break;
  3. }
  4. if ('true' === $jquery) {
  5. global $xoTheme;

    $xoTheme adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js');
  7. switch ($ajaxeffect) {
  8. case 'galleryview':
  9. $xoTheme->addScript('browse.php?modules/extgallery/assets/js/galleryview/galleryview.js');
  1. /**
  2. * @param array $options
  3. *
  4. * @return string
  5. */
  6. function extgalleryBlockEdit($options)

    extgalleryBlockEdit() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. /** @var Extgallery\Category $catHandler */
  9. $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
  1. /**
  2. * @param array $options
  3. *
  4. * @return string
  5. */
  6. function extgalleryAjaxEdit($options)

    extgalleryAjaxEdit() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
  9. $form = _MB_EXTGALLERY_PHOTO_NUMBER . ' : <input name="options[]" size="5" maxlength="255" value="' . $options[0] . '" type="text"><br>';
  1. /**
  2. * @param array $options
  3. *
  4. * @return string
  5. */
  6. function extgalleryTopSubmitterEdit($options)

    extgalleryTopSubmitterEdit() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
  9. $form = _MB_EXTGALLERY_USER_NUMBER . ' : <input name="options[]" size="5" maxlength="255" value="' . $options[0] . '" type="text"><br>';
  1. /**
  2. * @param array $options
  3. *
  4. * @return array
  5. */
  6. function extgalleryList($options)

    extgalleryList() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. global $xoopsConfig;
  9. /** @var Extgallery\PhotoHandler $photoHandler */
  10. $photoHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
  1. *
  2. * @return array
  3. */
  4. function extgalleryList($options)
  5. {
  6. global $xoopsConfig;

    $xoopsConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. /** @var Extgallery\PhotoHandler $photoHandler */
  8. $photoHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
  9. $param = ['limit' => $options[0]];
  10. $date = $options[1];
  1. /**
  2. * @param array $options
  3. *
  4. * @return string
  5. */
  6. function extgalleryListEdit($options)

    extgalleryListEdit() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
  9. $form = _MB_EXTGALLERY_PHOTO_NUMBER . ' : <input name="options[]" size="5" maxlength="255" value="' . $options[0] . '" type="text"><br>';
  10. //==================================
  11. $y2Checked = '';
in class/PhotoHandler.php, line 391
  1. {
  2. if (!function_exists('imagettfbbox')) {
  3. return;
  4. }
  5. global $xoopsModuleConfig;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. /* Text position param
  7. /
  8. / 0 : orig
  9. / -1 : opposit
in class/PhotoHandler.php, line 449
  1. /**
  2. * @param $imageTransform
  3. */
  4. public function _makeBorder(&$imageTransform)
  5. {
  6. global $xoopsModuleConfig;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. $borders = [];
  8. $borders[] = [
  9. 'borderWidth' => $xoopsModuleConfig['inner_border_size'],
  10. 'borderColor' => $xoopsModuleConfig['inner_border_color']
in class/PhotoHandler.php, line 476
  1. /**
  2. * @param $photoName
  3. */
  4. public function _largePhotoTreatment($photoName)
  5. {
  6. global $xoopsModuleConfig;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // Check if must save large photo
  8. if ($xoopsModuleConfig['save_large']) {
  9. // Define Graphical library path
in class/PhotoHandler.php, line 519
  1. * @param null|string $filePath
  2. * @param null $mediumFilePath
  3. */
  4. public function _mediumPhotoTreatment($photoName, $filePath = null, $mediumFilePath = null)
  5. {
  6. global $xoopsModuleConfig;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // Define Graphical library path
  8. if (!defined('IMAGE_TRANSFORM_IM_PATH') && 'imagick' === $xoopsModuleConfig['graphic_lib']) {
  9. define('IMAGE_TRANSFORM_IM_PATH', $xoopsModuleConfig['graphic_lib_path']);
  10. }
in class/PhotoHandler.php, line 569
  1. /**
  2. * @param $photoName
  3. */
  4. public function _makeThumb($photoName)
  5. {
  6. global $xoopsModuleConfig;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // Define Graphical library path
  8. if (!defined('IMAGE_TRANSFORM_IM_PATH') && 'imagick' === $xoopsModuleConfig['graphic_lib']) {
  9. define('IMAGE_TRANSFORM_IM_PATH', $xoopsModuleConfig['graphic_lib_path']);
  10. }
in class/PhotoHandler.php, line 604
  1. *
  2. * @return array
  3. */
  4. public function _getImageDimension($photoName)
  5. {
  6. global $xoopsModuleConfig;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // Define Graphical library path
  8. if (!defined('IMAGE_TRANSFORM_IM_PATH') && 'imagick' === $xoopsModuleConfig['graphic_lib']) {
  9. define('IMAGE_TRANSFORM_IM_PATH', $xoopsModuleConfig['graphic_lib_path']);
  10. }
in class/PhotoHandler.php, line 635
  1. *
  2. * @return string
  3. */
  4. public function getAutoDescription($photoName)
  5. {
  6. global $xoopsModuleConfig;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. //DNPROSSI
  8. /*if ($xoopsModuleConfig['enable_longdesc']) {
  9. $newphotoname = '';
  10. $newnewphotoname = '';
in class/PhotoHandler.php, line 861
  1. $photoExtra = '',
  2. $photoTag = ''
  3. ) {
  4. require_once XOOPS_ROOT_PATH . '/modules/extgallery/class/pear/Image/Transform.php';
  5. global $xoopsModuleConfig;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. $permHandler = Extgallery\PublicPermHandler::getInstance();
  7. // Replace all bad file name character
  8. $photoName = $this->makeFileName($dirtyPhotoName);
  9. rename($this->getUploadPhotoPath() . $dirtyPhotoName, $this->getUploadPhotoPath() . $photoName);
in include/oninstall.php, line 28
  1. * Prepares system prior to attempting to install module
  2. * @param XoopsModule $module {@link XoopsModule}
  3. *
  4. * @return bool true if ready to install, false if not
  5. */
  6. function xoops_module_pre_install_extgallery(\XoopsModule $module)

    xoops_module_pre_install_extgallery() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. // include __DIR__ . '/../preloads/autoloader.php';
  9. include __DIR__ . '/common.php';
  10. /** @var Extgallery\Utility $utility */
  11. $utility = new Extgallery\Utility();
in include/oninstall.php, line 58
  1. * @param XoopsModule $module
  2. * @return bool true if installation successful, false if not
  3. * @internal param XoopsModule $module <a href='psi_element://XoopsModule'>XoopsModule</a>
  4. *
  5. */
  6. function xoops_module_install_extgallery(\XoopsModule $module)

    xoops_module_install_extgallery() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $module_id = $module->getVar('mid');
  9. /** @var XoopsGroupPermHandler $gpermHandler */
  10. $gpermHandler = xoops_getHandler('groupperm');
  11. /** @var XoopsModuleHandler $moduleHandler */
in include/onupdate.php, line 29
  1. /**
  2. * @param string $tablename
  3. *
  4. * @return bool
  5. */
  6. function tableExists($tablename)

    tableExists() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $result = $GLOBALS['xoopsDB']->queryF("SHOW TABLES LIKE '$tablename'");
  9. return $GLOBALS['xoopsDB']->getRowsNum($result) > 0;
  10. }
in include/onupdate.php, line 43
  1. * Prepares system prior to attempting to install module
  2. * @param XoopsModule $module {@link XoopsModule}
  3. *
  4. * @return bool true if ready to install, false if not
  5. */
  6. function xoops_module_pre_update_extgallery(\XoopsModule $module)

    xoops_module_pre_update_extgallery() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. /** @var Extgallery\Helper $helper */
  9. /** @var Extgallery\Utility $utility */
  10. $moduleDirName = basename(dirname(__DIR__));
  11. $helper = Extgallery\Helper::getInstance();
in include/onupdate.php, line 72
  1. /**
  2. * @param \XoopsModule $module
  3. * @param null $previousVersion
  4. * @return bool
  5. */
  6. function xoops_module_update_extgallery(\XoopsModule $module, $previousVersion = null)

    xoops_module_update_extgallery() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. global $xoopsDB;
  9. $moduleDirName = basename(dirname(__DIR__));
  10. $capsDirName = strtoupper($moduleDirName);
in include/onupdate.php, line 74
  1. * @param null $previousVersion
  2. * @return bool
  3. */
  4. function xoops_module_update_extgallery(\XoopsModule $module, $previousVersion = null)
  5. {
  6. global $xoopsDB;

    $xoopsDB adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. $moduleDirName = basename(dirname(__DIR__));
  8. $capsDirName = strtoupper($moduleDirName);
  9. /** @var Extgallery\Helper $helper */
  1. /**
  2. * @param \XoopsModule $xoopsModule
  3. * @param null $oldVersion
  4. * @return bool
  5. */
  6. function xoops_module_update_extgallery(\XoopsModule $xoopsModule, $oldVersion = null)

    xoops_module_update_extgallery() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
  9. $catHandler->rebuild();
  10. if ($oldVersion < 101) {
in class/pear/PEAR.php, line 46
  1. define('OS_WINDOWS', false);
  2. define('OS_UNIX', true);
  3. define('PEAR_OS', 'Unix'); // blatant assumption
  4. }
  5. $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;

    $_PEAR_default_error_mode adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. $GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
  7. $GLOBALS['_PEAR_destructor_object_list'] = array();
  8. $GLOBALS['_PEAR_shutdown_funcs'] = array();
  9. $GLOBALS['_PEAR_error_handler_stack'] = array();
in class/pear/PEAR.php, line 47
  1. define('OS_UNIX', true);
  2. define('PEAR_OS', 'Unix'); // blatant assumption
  3. }
  4. $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
  5. $GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;

    $_PEAR_default_error_options adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. $GLOBALS['_PEAR_destructor_object_list'] = array();
  7. $GLOBALS['_PEAR_shutdown_funcs'] = array();
  8. $GLOBALS['_PEAR_error_handler_stack'] = array();
  9. @ini_set('track_errors', true);
in class/pear/PEAR.php, line 48
  1. define('PEAR_OS', 'Unix'); // blatant assumption
  2. }
  3. $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
  4. $GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
  5. $GLOBALS['_PEAR_destructor_object_list'] = array();

    $_PEAR_destructor_object_list adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. $GLOBALS['_PEAR_shutdown_funcs'] = array();
  7. $GLOBALS['_PEAR_error_handler_stack'] = array();
  8. @ini_set('track_errors', true);
in class/pear/PEAR.php, line 49
  1. }
  2. $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
  3. $GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
  4. $GLOBALS['_PEAR_destructor_object_list'] = array();
  5. $GLOBALS['_PEAR_shutdown_funcs'] = array();

    $_PEAR_shutdown_funcs adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. $GLOBALS['_PEAR_error_handler_stack'] = array();
  7. @ini_set('track_errors', true);
  8. /**
in class/pear/PEAR.php, line 50
  1. $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
  2. $GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
  3. $GLOBALS['_PEAR_destructor_object_list'] = array();
  4. $GLOBALS['_PEAR_shutdown_funcs'] = array();
  5. $GLOBALS['_PEAR_error_handler_stack'] = array();

    $_PEAR_error_handler_stack adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. @ini_set('track_errors', true);
  7. /**
  8. * Base class for other PEAR classes. Provides rudimentary
in class/pear/PEAR.php, line 172
  1. }
  2. while ($classname && strcasecmp($classname, "pear")) {
  3. $destructor = "_$classname";
  4. if (method_exists($this, $destructor)) {
  5. global $_PEAR_destructor_object_list;

    $_PEAR_destructor_object_list adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. $_PEAR_destructor_object_list[] = $this;
  7. if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
  8. register_shutdown_function("_PEAR_call_destructors");
  9. $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
  10. }
in class/pear/PEAR.php, line 176
  1. if (method_exists($this, $destructor)) {
  2. global $_PEAR_destructor_object_list;
  3. $_PEAR_destructor_object_list[] = $this;
  4. if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
  5. register_shutdown_function("_PEAR_call_destructors");
  6. $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;

    $_PEAR_SHUTDOWN_REGISTERED adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. }
  8. break;
  9. } else {
  10. $classname = get_parent_class($classname);
  11. }
in class/pear/PEAR.php, line 283
  1. {
  2. // if we are called statically, there is a potential
  3. // that no shutdown func is registered. Bug #6445
  4. if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
  5. register_shutdown_function("_PEAR_call_destructors");
  6. $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;

    $_PEAR_SHUTDOWN_REGISTERED adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. }
  8. $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
  9. }
  10. /**
in class/pear/PEAR.php, line 777
  1. return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);
  2. }
  3. }
  4. function _PEAR_call_destructors()

    _PEAR_call_destructors() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  5. {
  6. global $_PEAR_destructor_object_list;
  7. if (is_array($_PEAR_destructor_object_list) &&
  8. sizeof($_PEAR_destructor_object_list)) {
  9. reset($_PEAR_destructor_object_list);
in class/pear/PEAR.php, line 779
  1. }
  2. }
  3. function _PEAR_call_destructors()
  4. {
  5. global $_PEAR_destructor_object_list;

    $_PEAR_destructor_object_list adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. if (is_array($_PEAR_destructor_object_list) &&
  7. sizeof($_PEAR_destructor_object_list)) {
  8. reset($_PEAR_destructor_object_list);
  9. $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo');
  1. * @access public
  2. * @static
  3. */
  4. public static function readPHPArgv()
  5. {
  6. global $argv;

    $argv adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. is_array($args = $argv) or is_array($args = $_SERVER['argv']) or is_array($args = $GLOBALS['HTTP_SERVER_VARS']['argv']) or self::exception('noargs');
  8. return $args;
  9. }
  1. }
  2. }
  3. add_action('widgets_init', 'register_metaslider_widget');
  4. function register_metaslider_widget()

    register_metaslider_widget() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  5. {
  6. register_widget('MetaSlider_Widget');
  7. }
  8. ?>
  1. * @param $context
  2. * @return string
  3. */
  4. public function insert_metaslider_button($context)
  5. {
  6. global $pagenow;

    $pagenow adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. if (in_array($pagenow, array('post.php', 'page.php', 'post-new.php', 'post-edit.php'))) {
  8. $context .= '<a href="#TB_inline?&inlineId=choose-meta-slider" class="thickbox button" title="'
  9. . __('Select slideshow to insert into post', 'metaslider')
  10. . '"><span class="wp-media-buttons-icon" style="background: url('
  1. /**
  2. * Append the 'Choose Meta Slider' thickbox content to the bottom of selected admin pages
  3. */
  4. public function admin_footer()
  5. {
  6. global $pagenow;

    $pagenow adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // Only run in post/page creation and edit screens
  8. if (in_array($pagenow, array('post.php', 'page.php', 'post-new.php', 'post-edit.php'))) {
  9. $sliders = $this->all_meta_sliders('title'); ?>
  1. */
  2. public function render()
  3. {
  4. if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) {
  5. require_once $GLOBALS['xoops']->path('class/theme.php');
  6. $GLOBALS['xoTheme'] = new \xos_opal_Theme();

    $xoTheme adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. }
  8. require_once $GLOBALS['xoops']->path('class/template.php');
  9. $breadcrumbTpl = new \XoopsTpl();
  10. $breadcrumbTpl->assign('breadcrumb', $this->bread);
  1. * @param int $p_error_code
  2. * @param string $p_error_string
  3. */
  4. function PclErrorLog($p_error_code = 0, $p_error_string = '')
  5. {
  6. global $g_pcl_error_string;

    $g_pcl_error_string adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_error_code;
  8. $g_pcl_error_code = $p_error_code;
  9. $g_pcl_error_string = $p_error_string;
  10. }
  1. * @param string $p_error_string
  2. */
  3. function PclErrorLog($p_error_code = 0, $p_error_string = '')
  4. {
  5. global $g_pcl_error_string;
  6. global $g_pcl_error_code;

    $g_pcl_error_code adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. $g_pcl_error_code = $p_error_code;
  8. $g_pcl_error_string = $p_error_string;
  9. }
  1. * @param $p_line
  2. * @param string $p_error_string
  3. */
  4. function PclErrorFatal($p_file, $p_line, $p_error_string = '')
  5. {
  6. global $g_pcl_error_string;

    $g_pcl_error_string adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_error_code;
  8. $v_message = '<html><body>';
  9. $v_message .= "<p align=center><span bgcolor=white style='color: #ff0000; font-weight: bold;'>PclError Library has detected a fatal error on file '$p_file', line $p_line</span></p>";
  10. $v_message .= "<p align=center><span bgcolor=white style='color: #ff0000; font-weight: bold;'>$p_error_string</span></p>";
  1. * @param string $p_error_string
  2. */
  3. function PclErrorFatal($p_file, $p_line, $p_error_string = '')
  4. {
  5. global $g_pcl_error_string;
  6. global $g_pcl_error_code;

    $g_pcl_error_code adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. $v_message = '<html><body>';
  8. $v_message .= "<p align=center><span bgcolor=white style='color: #ff0000; font-weight: bold;'>PclError Library has detected a fatal error on file '$p_file', line $p_line</span></p>";
  9. $v_message .= "<p align=center><span bgcolor=white style='color: #ff0000; font-weight: bold;'>$p_error_string</span></p>";
  10. $v_message .= '</body></html>';
in class/pclerror.lib.php, line 104
  1. // Description :
  2. // Parameters :
  3. // --------------------------------------------------------------------------------
  4. function PclErrorReset()
  5. {
  6. global $g_pcl_error_string;

    $g_pcl_error_string adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_error_code;
  8. $g_pcl_error_code = 1;
  9. $g_pcl_error_string = '';
  10. }
in class/pclerror.lib.php, line 105
  1. // Parameters :
  2. // --------------------------------------------------------------------------------
  3. function PclErrorReset()
  4. {
  5. global $g_pcl_error_string;
  6. global $g_pcl_error_code;

    $g_pcl_error_code adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. $g_pcl_error_code = 1;
  8. $g_pcl_error_string = '';
  9. }
in class/pclerror.lib.php, line 123
  1. /**
  2. * @return int
  3. */
  4. function PclErrorCode()
  5. {
  6. global $g_pcl_error_string;

    $g_pcl_error_string adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_error_code;
  8. return $g_pcl_error_code;
  9. }
in class/pclerror.lib.php, line 124
  1. * @return int
  2. */
  3. function PclErrorCode()
  4. {
  5. global $g_pcl_error_string;
  6. global $g_pcl_error_code;

    $g_pcl_error_code adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. return $g_pcl_error_code;
  8. }
  9. // --------------------------------------------------------------------------------
in class/pclerror.lib.php, line 141
  1. /**
  2. * @return string
  3. */
  4. function PclErrorString()
  5. {
  6. global $g_pcl_error_string;

    $g_pcl_error_string adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_error_code;
  8. return ($g_pcl_error_string . " [code $g_pcl_error_code]");
  9. }
in class/pclerror.lib.php, line 142
  1. * @return string
  2. */
  3. function PclErrorString()
  4. {
  5. global $g_pcl_error_string;
  6. global $g_pcl_error_code;

    $g_pcl_error_code adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. return ($g_pcl_error_string . " [code $g_pcl_error_code]");
  8. }
  9. // --------------------------------------------------------------------------------
in public-album.php, line 65
  1. /**
  2. * @param $SortbyOrderby
  3. *
  4. * @return array|string
  5. */
  6. function convertorderbytrans($SortbyOrderby)

    convertorderbytrans() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $orderbyTrans = [];
  9. if ('photo_date DESC' === $SortbyOrderby) {
  10. $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
  11. }
in admin/extension.php, line 26
  1. xoops_cp_header();
  2. /**
  3. * @return bool
  4. */
  5. function extensionInstalled()

    extensionInstalled() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. return file_exists(XOOPS_ROOT_PATH . '/class/textsanitizer/gallery/gallery.php');
  8. }
  9. /**
in admin/extension.php, line 34
  1. }
  2. /**
  3. * @return mixed
  4. */
  5. function extensionActivated()

    extensionActivated() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. $conf = include XOOPS_ROOT_PATH . '/class/textsanitizer/config.custom.php';
  8. return $conf['extensions']['gallery'];
  9. }
in admin/extension.php, line 41
  1. $conf = include XOOPS_ROOT_PATH . '/class/textsanitizer/config.custom.php';
  2. return $conf['extensions']['gallery'];
  3. }
  4. function activateExtension()

    activateExtension() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  5. {
  6. $conf = include XOOPS_ROOT_PATH . '/class/textsanitizer/config.custom.php';
  7. $conf['extensions']['gallery'] = 1;
  8. file_put_contents(XOOPS_ROOT_PATH . '/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = " . var_export($conf, true) . "\r?>", LOCK_EX);
  9. }
in admin/extension.php, line 48
  1. $conf = include XOOPS_ROOT_PATH . '/class/textsanitizer/config.custom.php';
  2. $conf['extensions']['gallery'] = 1;
  3. file_put_contents(XOOPS_ROOT_PATH . '/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = " . var_export($conf, true) . "\r?>", LOCK_EX);
  4. }
  5. function desactivateExtension()

    desactivateExtension() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. $conf = include XOOPS_ROOT_PATH . '/class/textsanitizer/config.custom.php';
  8. $conf['extensions']['gallery'] = 0;
  9. file_put_contents(XOOPS_ROOT_PATH . '/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = " . var_export($conf, true) . "\r?>", LOCK_EX);
  10. }
in admin/main.php, line 123
  1. /**
  2. * @param $dir
  3. *
  4. * @return mixed
  5. */
  6. function dskspace($dir)

    dskspace() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $s = stat($dir);
  9. $space = $s[7];
  10. if (is_dir($dir)) {
  11. $dh = opendir($dir);
in admin/main.php, line 143
  1. }
  2. /**
  3. * @return array
  4. */
  5. function imageMagickSupportType()

    imageMagickSupportType() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. global $xoopsModuleConfig;
  8. $cmd = $xoopsModuleConfig['graphic_lib_path'] . 'convert -list format';
  9. exec($cmd, $data);
in admin/main.php, line 145
  1. /**
  2. * @return array
  3. */
  4. function imageMagickSupportType()
  5. {
  6. global $xoopsModuleConfig;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. $cmd = $xoopsModuleConfig['graphic_lib_path'] . 'convert -list format';
  8. exec($cmd, $data);
  9. $ret = [
in admin/main.php, line 179
  1. /**
  2. * @param $path
  3. *
  4. * @return bool
  5. */
  6. function is__writable($path)

    is__writable() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. //will work in despite of Windows ACLs bug
  9. //NOTE: use a trailing slash for folders!!!
  10. //see http://bugs.php.net/bug.php?id=27609
  11. //see http://bugs.php.net/bug.php?id=30931
  1. define('_MU_MODULE_XOOPS_VERSION_SUPPORTED', '2.5.9');
  2. /**
  3. * @return array|bool
  4. */
  5. function moduleLastVersionInfo()

    moduleLastVersionInfo() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. static $result;
  8. if (isset($result)) {
  9. return $result;
  1. }
  2. /**
  3. * @return mixed
  4. */
  5. function getLastModuleVersion()

    getLastModuleVersion() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. $moduleInfos = moduleLastVersionInfo();
  8. return $moduleInfos['version'];
  9. }
  1. }
  2. /**
  3. * @return string
  4. */
  5. function getModuleVersion()

    getModuleVersion() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. $version = $GLOBALS['xoopsModule']->getVar('version');
  8. return substr($version, 0, 1) . '.' . substr($version, 1, 1) . '.' . substr($version, 2);
  9. }
  1. }
  2. /**
  3. * @return bool
  4. */
  5. function isModuleUpToDate()

    isModuleUpToDate() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. if (-1 != compareVersion(getModuleVersion(), getLastModuleVersion())) {
  8. return true;
  9. } else {
  10. return false;
  1. * @param $v1
  2. * @param $v2
  3. *
  4. * @return int
  5. */
  6. function compareVersion($v1, $v2)

    compareVersion() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $v1 = explode('.', $v1);
  9. $v2 = explode('.', $v2);
  10. if ($v1[0] > $v2[0]) {
  1. }
  2. /**
  3. * @return bool
  4. */
  5. function isXoopsVersionSupportInstalledModuleVersion()

    isXoopsVersionSupportInstalledModuleVersion() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. if (-1 != compareVersion(substr(XOOPS_VERSION, 6), _MU_MODULE_XOOPS_VERSION_SUPPORTED)) {
  8. return true;
  9. } else {
  10. return false;
  1. }
  2. /**
  3. * @return bool
  4. */
  5. function isXoopsVersionSupportLastModuleVersion()

    isXoopsVersionSupportLastModuleVersion() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. $moduleInfos = moduleLastVersionInfo();
  8. if (-1 != compareVersion(substr(XOOPS_VERSION, 6), $moduleInfos['xoopsVersionNeeded'])) {
  9. return true;
  1. }
  2. /**
  3. * @return mixed
  4. */
  5. function getChangelog()

    getChangelog() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. $moduleInfos = moduleLastVersionInfo();
  8. return $moduleInfos['versionChangelog'];
  9. }
in admin/perm-quota.php, line 87
  1. * @param $array
  2. * @param $v
  3. *
  4. * @return string
  5. */
  6. function getChecked($array, $v)

    getChecked() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. if (in_array($v, $array)) {
  9. return ' checked';
  10. } else {
  11. return '';
  1. }
  2. /**
  3. * @return array
  4. */
  5. function getImageTest()

    getImageTest() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. $ret = [];
  8. $rep = __DIR__ . '/../assets/images/';
  9. $dir = opendir($rep);
  10. while (false !== ($f = readdir($dir))) {
  1. }
  2. return $ret;
  3. }
  4. function deleteImageTest()

    deleteImageTest() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  5. {
  6. $files = getImageTest();
  7. foreach ($files as $file) {
  8. unlink(__DIR__ . '/../assets/images/' . $file);
  9. }
  1. */
  2. /**
  3. * Define supported URI schemes that get a special thumbnail.
  4. */
  5. function hook_magnific_popup_thumbnail_schemes()

    hook_magnific_popup_thumbnail_schemes() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. // Specify that "youtube://" URIs should get the special thumbnail image style
  8. // "magnific_popup_yt_preview_wplay".
  9. $thumbnail_schemes = array(
  10. 'youtube' => 'magnific_popup_yt_preview_wplay'
  1. }
  2. /**
  3. * Define supported File Entity URI schemes that get special iframe parameters.
  4. */
  5. function hook_magnific_popup_iframe_patterns()

    hook_magnific_popup_iframe_patterns() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. $iframe_patterns = array(
  8. 'youtube' => array(
  9. 'index' => 'youtube.com/',
  10. 'id' => 'v=',
  1. * @param $params
  2. * @return mixed
  3. */
  4. public static function includeMagnificPopup($params)
  5. {
  6. global $REX;

    $REX adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. $insert = PHP_EOL;
  8. $insert .= "\t" . '<!-- BEGIN AddOn Magnific Popup -->' . PHP_EOL;
  9. $insert .= "\t" . '<link rel="stylesheet" type="text/css" href="' . $REX['HTDOCS_PATH'] . 'files/addons/magnific_popup/magnific-popup.css" media="screen" >' . PHP_EOL;
  10. $insert .= "\t" . '<link rel="stylesheet" type="text/css" href="' . $REX['HTDOCS_PATH'] . 'files/addons/magnific_popup/custom.css" media="screen" >' . PHP_EOL;
  1. * @param array $replace
  2. * @return mixed|string
  3. */
  4. public static function getHtmlFromMDFile($mdFile, $search = array(), $replace = array())
  5. {
  6. global $REX;

    $REX adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. $curLocale = strtolower($REX['LANG']);
  8. if ('de_de' === $curLocale) {
  9. $file = $REX['INCLUDE_PATH'] . '/addons/magnific_popup/' . $mdFile;
  1. * @param $settings
  2. * @return
  3. */
  4. public function set_autoplay_parameter($options, $slider_id, $settings)
  5. {
  6. global $wp_filter;

    $wp_filter adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. if (isset($options['autoPlay'])) {
  8. if ('true' === $options['autoPlay']) {
  9. $options['manualAdvance'] = 'false';
  10. } else {
  11. $options['manualAdvance'] = 'true';
  1. /**
  2. * @param array $options
  3. *
  4. * @return bool|array
  5. */
  6. function extgallery_tag_block_cloud_show($options)

    extgallery_tag_block_cloud_show() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $module_dirname = basename(dirname(__DIR__));
  9. // tags support
  10. if (xoops_isActiveModule('tag')) {
  11. require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
  1. /**
  2. * @param array $options
  3. *
  4. * @return string
  5. */
  6. function extgallery_tag_block_cloud_edit($options)

    extgallery_tag_block_cloud_edit() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
  9. return tag_block_cloud_edit($options);
  10. }
  1. /**
  2. * @param array $options
  3. *
  4. * @return bool|array
  5. */
  6. function extgallery_tag_block_top_show($options)

    extgallery_tag_block_top_show() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $module_dirname = basename(dirname(__DIR__));
  9. // tags support
  10. if (xoops_isActiveModule('tag')) {
  1. /**
  2. * @param array $options
  3. *
  4. * @return string
  5. */
  6. function extgallery_tag_block_top_edit($options)

    extgallery_tag_block_top_edit() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
  9. return tag_block_top_edit($options);
  10. }
in class/Mailer.php, line 120
  1. *
  2. * @return mixed|string
  3. */
  4. public function loadTemplate($name)
  5. {
  6. global $xoopsConfig;

    $xoopsConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. if (file_exists(XOOPS_ROOT_PATH . '/modules/extgallery/language/' . $xoopsConfig['language'] . '/mail_template/' . $name)) {
  8. $path = XOOPS_ROOT_PATH . '/modules/extgallery/language/' . $xoopsConfig['language'] . '/mail_template/' . $name;
  9. } else {
  10. $path = XOOPS_ROOT_PATH . '/modules/extgallery/language/english/mail_template/' . $name;
  1. * @param string $p_mode
  2. * @param string $p_filename
  3. */
  4. function TrOn($p_level = 1, $p_mode = 'memory', $p_filename = 'trace.txt')
  5. {
  6. global $g_pcl_trace_level;

    $g_pcl_trace_level adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_mode;
  8. global $g_pcl_trace_filename;
  9. global $g_pcl_trace_name;
  10. global $g_pcl_trace_index;
  11. global $g_pcl_trace_entries;
  1. * @param string $p_filename
  2. */
  3. function TrOn($p_level = 1, $p_mode = 'memory', $p_filename = 'trace.txt')
  4. {
  5. global $g_pcl_trace_level;
  6. global $g_pcl_trace_mode;

    $g_pcl_trace_mode adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_filename;
  8. global $g_pcl_trace_name;
  9. global $g_pcl_trace_index;
  10. global $g_pcl_trace_entries;
  1. */
  2. function TrOn($p_level = 1, $p_mode = 'memory', $p_filename = 'trace.txt')
  3. {
  4. global $g_pcl_trace_level;
  5. global $g_pcl_trace_mode;
  6. global $g_pcl_trace_filename;

    $g_pcl_trace_filename adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_name;
  8. global $g_pcl_trace_index;
  9. global $g_pcl_trace_entries;
  10. // ----- Enable trace mode
  1. function TrOn($p_level = 1, $p_mode = 'memory', $p_filename = 'trace.txt')
  2. {
  3. global $g_pcl_trace_level;
  4. global $g_pcl_trace_mode;
  5. global $g_pcl_trace_filename;
  6. global $g_pcl_trace_name;

    $g_pcl_trace_name adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_index;
  8. global $g_pcl_trace_entries;
  9. // ----- Enable trace mode
  10. $g_pcl_trace_level = $p_level;
  1. {
  2. global $g_pcl_trace_level;
  3. global $g_pcl_trace_mode;
  4. global $g_pcl_trace_filename;
  5. global $g_pcl_trace_name;
  6. global $g_pcl_trace_index;

    $g_pcl_trace_index adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_entries;
  8. // ----- Enable trace mode
  9. $g_pcl_trace_level = $p_level;
  1. global $g_pcl_trace_level;
  2. global $g_pcl_trace_mode;
  3. global $g_pcl_trace_filename;
  4. global $g_pcl_trace_name;
  5. global $g_pcl_trace_index;
  6. global $g_pcl_trace_entries;

    $g_pcl_trace_entries adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // ----- Enable trace mode
  8. $g_pcl_trace_level = $p_level;
  9. // ----- Memorize mode and filename
in class/pcltrace.lib.php, line 113
  1. /**
  2. * @return int
  3. */
  4. function IsTrOn()
  5. {
  6. global $g_pcl_trace_level;

    $g_pcl_trace_level adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. return $g_pcl_trace_level;
  8. }
  9. // --------------------------------------------------------------------------------
in class/pcltrace.lib.php, line 127
  1. // Description :
  2. // Parameters :
  3. // --------------------------------------------------------------------------------
  4. function TrOff()
  5. {
  6. global $g_pcl_trace_level;

    $g_pcl_trace_level adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_mode;
  8. global $g_pcl_trace_filename;
  9. global $g_pcl_trace_name;
  10. global $g_pcl_trace_index;
in class/pcltrace.lib.php, line 128
  1. // Parameters :
  2. // --------------------------------------------------------------------------------
  3. function TrOff()
  4. {
  5. global $g_pcl_trace_level;
  6. global $g_pcl_trace_mode;

    $g_pcl_trace_mode adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_filename;
  8. global $g_pcl_trace_name;
  9. global $g_pcl_trace_index;
  10. // ----- Clean
in class/pcltrace.lib.php, line 129
  1. // --------------------------------------------------------------------------------
  2. function TrOff()
  3. {
  4. global $g_pcl_trace_level;
  5. global $g_pcl_trace_mode;
  6. global $g_pcl_trace_filename;

    $g_pcl_trace_filename adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_name;
  8. global $g_pcl_trace_index;
  9. // ----- Clean
  10. $g_pcl_trace_mode = 'memory';
in class/pcltrace.lib.php, line 130
  1. function TrOff()
  2. {
  3. global $g_pcl_trace_level;
  4. global $g_pcl_trace_mode;
  5. global $g_pcl_trace_filename;
  6. global $g_pcl_trace_name;

    $g_pcl_trace_name adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_index;
  8. // ----- Clean
  9. $g_pcl_trace_mode = 'memory';
  10. unset($g_pcl_trace_entries, $g_pcl_trace_name, $g_pcl_trace_index);
in class/pcltrace.lib.php, line 131
  1. {
  2. global $g_pcl_trace_level;
  3. global $g_pcl_trace_mode;
  4. global $g_pcl_trace_filename;
  5. global $g_pcl_trace_name;
  6. global $g_pcl_trace_index;

    $g_pcl_trace_index adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // ----- Clean
  8. $g_pcl_trace_mode = 'memory';
  9. unset($g_pcl_trace_entries, $g_pcl_trace_name, $g_pcl_trace_index);
in class/pcltrace.lib.php, line 160
  1. * @param string $p_param
  2. * @param string $p_message
  3. */
  4. function TrFctStart($p_file, $p_line, $p_name, $p_param = '', $p_message = '')
  5. {
  6. global $g_pcl_trace_level;

    $g_pcl_trace_level adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_mode;
  8. global $g_pcl_trace_filename;
  9. global $g_pcl_trace_name;
  10. global $g_pcl_trace_index;
  11. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 161
  1. * @param string $p_message
  2. */
  3. function TrFctStart($p_file, $p_line, $p_name, $p_param = '', $p_message = '')
  4. {
  5. global $g_pcl_trace_level;
  6. global $g_pcl_trace_mode;

    $g_pcl_trace_mode adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_filename;
  8. global $g_pcl_trace_name;
  9. global $g_pcl_trace_index;
  10. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 162
  1. */
  2. function TrFctStart($p_file, $p_line, $p_name, $p_param = '', $p_message = '')
  3. {
  4. global $g_pcl_trace_level;
  5. global $g_pcl_trace_mode;
  6. global $g_pcl_trace_filename;

    $g_pcl_trace_filename adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_name;
  8. global $g_pcl_trace_index;
  9. global $g_pcl_trace_entries;
  10. // ----- Look for disabled trace
in class/pcltrace.lib.php, line 163
  1. function TrFctStart($p_file, $p_line, $p_name, $p_param = '', $p_message = '')
  2. {
  3. global $g_pcl_trace_level;
  4. global $g_pcl_trace_mode;
  5. global $g_pcl_trace_filename;
  6. global $g_pcl_trace_name;

    $g_pcl_trace_name adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_index;
  8. global $g_pcl_trace_entries;
  9. // ----- Look for disabled trace
  10. if ($g_pcl_trace_level < 1) {
in class/pcltrace.lib.php, line 164
  1. {
  2. global $g_pcl_trace_level;
  3. global $g_pcl_trace_mode;
  4. global $g_pcl_trace_filename;
  5. global $g_pcl_trace_name;
  6. global $g_pcl_trace_index;

    $g_pcl_trace_index adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_entries;
  8. // ----- Look for disabled trace
  9. if ($g_pcl_trace_level < 1) {
  10. return;
in class/pcltrace.lib.php, line 165
  1. global $g_pcl_trace_level;
  2. global $g_pcl_trace_mode;
  3. global $g_pcl_trace_filename;
  4. global $g_pcl_trace_name;
  5. global $g_pcl_trace_index;
  6. global $g_pcl_trace_entries;

    $g_pcl_trace_entries adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // ----- Look for disabled trace
  8. if ($g_pcl_trace_level < 1) {
  9. return;
  10. }
in class/pcltrace.lib.php, line 226
  1. * @param int $p_return
  2. * @param string $p_message
  3. */
  4. function TrFctEnd($p_file, $p_line, $p_return = 1, $p_message = '')
  5. {
  6. global $g_pcl_trace_level;

    $g_pcl_trace_level adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_mode;
  8. global $g_pcl_trace_filename;
  9. global $g_pcl_trace_name;
  10. global $g_pcl_trace_index;
  11. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 227
  1. * @param string $p_message
  2. */
  3. function TrFctEnd($p_file, $p_line, $p_return = 1, $p_message = '')
  4. {
  5. global $g_pcl_trace_level;
  6. global $g_pcl_trace_mode;

    $g_pcl_trace_mode adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_filename;
  8. global $g_pcl_trace_name;
  9. global $g_pcl_trace_index;
  10. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 228
  1. */
  2. function TrFctEnd($p_file, $p_line, $p_return = 1, $p_message = '')
  3. {
  4. global $g_pcl_trace_level;
  5. global $g_pcl_trace_mode;
  6. global $g_pcl_trace_filename;

    $g_pcl_trace_filename adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_name;
  8. global $g_pcl_trace_index;
  9. global $g_pcl_trace_entries;
  10. // ----- Look for disabled trace
in class/pcltrace.lib.php, line 229
  1. function TrFctEnd($p_file, $p_line, $p_return = 1, $p_message = '')
  2. {
  3. global $g_pcl_trace_level;
  4. global $g_pcl_trace_mode;
  5. global $g_pcl_trace_filename;
  6. global $g_pcl_trace_name;

    $g_pcl_trace_name adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_index;
  8. global $g_pcl_trace_entries;
  9. // ----- Look for disabled trace
  10. if ($g_pcl_trace_level < 1) {
in class/pcltrace.lib.php, line 230
  1. {
  2. global $g_pcl_trace_level;
  3. global $g_pcl_trace_mode;
  4. global $g_pcl_trace_filename;
  5. global $g_pcl_trace_name;
  6. global $g_pcl_trace_index;

    $g_pcl_trace_index adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_entries;
  8. // ----- Look for disabled trace
  9. if ($g_pcl_trace_level < 1) {
  10. return;
in class/pcltrace.lib.php, line 231
  1. global $g_pcl_trace_level;
  2. global $g_pcl_trace_mode;
  3. global $g_pcl_trace_filename;
  4. global $g_pcl_trace_name;
  5. global $g_pcl_trace_index;
  6. global $g_pcl_trace_entries;

    $g_pcl_trace_entries adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // ----- Look for disabled trace
  8. if ($g_pcl_trace_level < 1) {
  9. return;
  10. }
in class/pcltrace.lib.php, line 292
  1. * @param $p_level
  2. * @param string $p_message
  3. */
  4. function TrFctMessage($p_file, $p_line, $p_level, $p_message = '')
  5. {
  6. global $g_pcl_trace_level;

    $g_pcl_trace_level adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_mode;
  8. global $g_pcl_trace_filename;
  9. global $g_pcl_trace_name;
  10. global $g_pcl_trace_index;
  11. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 293
  1. * @param string $p_message
  2. */
  3. function TrFctMessage($p_file, $p_line, $p_level, $p_message = '')
  4. {
  5. global $g_pcl_trace_level;
  6. global $g_pcl_trace_mode;

    $g_pcl_trace_mode adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_filename;
  8. global $g_pcl_trace_name;
  9. global $g_pcl_trace_index;
  10. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 294
  1. */
  2. function TrFctMessage($p_file, $p_line, $p_level, $p_message = '')
  3. {
  4. global $g_pcl_trace_level;
  5. global $g_pcl_trace_mode;
  6. global $g_pcl_trace_filename;

    $g_pcl_trace_filename adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_name;
  8. global $g_pcl_trace_index;
  9. global $g_pcl_trace_entries;
  10. // ----- Look for disabled trace
in class/pcltrace.lib.php, line 295
  1. function TrFctMessage($p_file, $p_line, $p_level, $p_message = '')
  2. {
  3. global $g_pcl_trace_level;
  4. global $g_pcl_trace_mode;
  5. global $g_pcl_trace_filename;
  6. global $g_pcl_trace_name;

    $g_pcl_trace_name adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_index;
  8. global $g_pcl_trace_entries;
  9. // ----- Look for disabled trace
  10. if ($g_pcl_trace_level < $p_level) {
in class/pcltrace.lib.php, line 296
  1. {
  2. global $g_pcl_trace_level;
  3. global $g_pcl_trace_mode;
  4. global $g_pcl_trace_filename;
  5. global $g_pcl_trace_name;
  6. global $g_pcl_trace_index;

    $g_pcl_trace_index adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_entries;
  8. // ----- Look for disabled trace
  9. if ($g_pcl_trace_level < $p_level) {
  10. return;
in class/pcltrace.lib.php, line 297
  1. global $g_pcl_trace_level;
  2. global $g_pcl_trace_mode;
  3. global $g_pcl_trace_filename;
  4. global $g_pcl_trace_name;
  5. global $g_pcl_trace_index;
  6. global $g_pcl_trace_entries;

    $g_pcl_trace_entries adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // ----- Look for disabled trace
  8. if ($g_pcl_trace_level < $p_level) {
  9. return;
  10. }
in class/pcltrace.lib.php, line 333
  1. * @param $p_level
  2. * @param string $p_message
  3. */
  4. function TrMessage($p_file, $p_line, $p_level, $p_message = '')
  5. {
  6. global $g_pcl_trace_level;

    $g_pcl_trace_level adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_mode;
  8. global $g_pcl_trace_filename;
  9. global $g_pcl_trace_name;
  10. global $g_pcl_trace_index;
  11. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 334
  1. * @param string $p_message
  2. */
  3. function TrMessage($p_file, $p_line, $p_level, $p_message = '')
  4. {
  5. global $g_pcl_trace_level;
  6. global $g_pcl_trace_mode;

    $g_pcl_trace_mode adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_filename;
  8. global $g_pcl_trace_name;
  9. global $g_pcl_trace_index;
  10. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 335
  1. */
  2. function TrMessage($p_file, $p_line, $p_level, $p_message = '')
  3. {
  4. global $g_pcl_trace_level;
  5. global $g_pcl_trace_mode;
  6. global $g_pcl_trace_filename;

    $g_pcl_trace_filename adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_name;
  8. global $g_pcl_trace_index;
  9. global $g_pcl_trace_entries;
  10. // ----- Look for disabled trace
in class/pcltrace.lib.php, line 336
  1. function TrMessage($p_file, $p_line, $p_level, $p_message = '')
  2. {
  3. global $g_pcl_trace_level;
  4. global $g_pcl_trace_mode;
  5. global $g_pcl_trace_filename;
  6. global $g_pcl_trace_name;

    $g_pcl_trace_name adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_index;
  8. global $g_pcl_trace_entries;
  9. // ----- Look for disabled trace
  10. if ($g_pcl_trace_level < $p_level) {
in class/pcltrace.lib.php, line 337
  1. {
  2. global $g_pcl_trace_level;
  3. global $g_pcl_trace_mode;
  4. global $g_pcl_trace_filename;
  5. global $g_pcl_trace_name;
  6. global $g_pcl_trace_index;

    $g_pcl_trace_index adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_entries;
  8. // ----- Look for disabled trace
  9. if ($g_pcl_trace_level < $p_level) {
  10. return;
in class/pcltrace.lib.php, line 338
  1. global $g_pcl_trace_level;
  2. global $g_pcl_trace_mode;
  3. global $g_pcl_trace_filename;
  4. global $g_pcl_trace_name;
  5. global $g_pcl_trace_index;
  6. global $g_pcl_trace_entries;

    $g_pcl_trace_entries adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // ----- Look for disabled trace
  8. if ($g_pcl_trace_level < $p_level) {
  9. return;
  10. }
in class/pcltrace.lib.php, line 368
  1. // Description :
  2. // Parameters :
  3. // --------------------------------------------------------------------------------
  4. function TrDisplay()
  5. {
  6. global $g_pcl_trace_level;

    $g_pcl_trace_level adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_mode;
  8. global $g_pcl_trace_filename;
  9. global $g_pcl_trace_name;
  10. global $g_pcl_trace_index;
  11. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 369
  1. // Parameters :
  2. // --------------------------------------------------------------------------------
  3. function TrDisplay()
  4. {
  5. global $g_pcl_trace_level;
  6. global $g_pcl_trace_mode;

    $g_pcl_trace_mode adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_filename;
  8. global $g_pcl_trace_name;
  9. global $g_pcl_trace_index;
  10. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 370
  1. // --------------------------------------------------------------------------------
  2. function TrDisplay()
  3. {
  4. global $g_pcl_trace_level;
  5. global $g_pcl_trace_mode;
  6. global $g_pcl_trace_filename;

    $g_pcl_trace_filename adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_name;
  8. global $g_pcl_trace_index;
  9. global $g_pcl_trace_entries;
  10. // ----- Look for disabled trace
in class/pcltrace.lib.php, line 371
  1. function TrDisplay()
  2. {
  3. global $g_pcl_trace_level;
  4. global $g_pcl_trace_mode;
  5. global $g_pcl_trace_filename;
  6. global $g_pcl_trace_name;

    $g_pcl_trace_name adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_index;
  8. global $g_pcl_trace_entries;
  9. // ----- Look for disabled trace
  10. if (($g_pcl_trace_level <= 0) || ('memory' !== $g_pcl_trace_mode)) {
in class/pcltrace.lib.php, line 372
  1. {
  2. global $g_pcl_trace_level;
  3. global $g_pcl_trace_mode;
  4. global $g_pcl_trace_filename;
  5. global $g_pcl_trace_name;
  6. global $g_pcl_trace_index;

    $g_pcl_trace_index adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_entries;
  8. // ----- Look for disabled trace
  9. if (($g_pcl_trace_level <= 0) || ('memory' !== $g_pcl_trace_mode)) {
  10. return;
in class/pcltrace.lib.php, line 373
  1. global $g_pcl_trace_level;
  2. global $g_pcl_trace_mode;
  3. global $g_pcl_trace_filename;
  4. global $g_pcl_trace_name;
  5. global $g_pcl_trace_index;
  6. global $g_pcl_trace_entries;

    $g_pcl_trace_entries adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. // ----- Look for disabled trace
  8. if (($g_pcl_trace_level <= 0) || ('memory' !== $g_pcl_trace_mode)) {
  9. return;
  10. }
in class/pcltrace.lib.php, line 471
  1. /**
  2. * @param $p_entry
  3. */
  4. function PclTraceAction($p_entry)
  5. {
  6. global $g_pcl_trace_level;

    $g_pcl_trace_level adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_mode;
  8. global $g_pcl_trace_filename;
  9. global $g_pcl_trace_name;
  10. global $g_pcl_trace_index;
  11. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 472
  1. * @param $p_entry
  2. */
  3. function PclTraceAction($p_entry)
  4. {
  5. global $g_pcl_trace_level;
  6. global $g_pcl_trace_mode;

    $g_pcl_trace_mode adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_filename;
  8. global $g_pcl_trace_name;
  9. global $g_pcl_trace_index;
  10. global $g_pcl_trace_entries;
in class/pcltrace.lib.php, line 473
  1. */
  2. function PclTraceAction($p_entry)
  3. {
  4. global $g_pcl_trace_level;
  5. global $g_pcl_trace_mode;
  6. global $g_pcl_trace_filename;

    $g_pcl_trace_filename adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_name;
  8. global $g_pcl_trace_index;
  9. global $g_pcl_trace_entries;
  10. if ('normal' === $g_pcl_trace_mode) {
in class/pcltrace.lib.php, line 474
  1. function PclTraceAction($p_entry)
  2. {
  3. global $g_pcl_trace_level;
  4. global $g_pcl_trace_mode;
  5. global $g_pcl_trace_filename;
  6. global $g_pcl_trace_name;

    $g_pcl_trace_name adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_index;
  8. global $g_pcl_trace_entries;
  9. if ('normal' === $g_pcl_trace_mode) {
  10. for ($i = 0; $i < $p_entry['index']; ++$i) {
in class/pcltrace.lib.php, line 475
  1. {
  2. global $g_pcl_trace_level;
  3. global $g_pcl_trace_mode;
  4. global $g_pcl_trace_filename;
  5. global $g_pcl_trace_name;
  6. global $g_pcl_trace_index;

    $g_pcl_trace_index adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. global $g_pcl_trace_entries;
  8. if ('normal' === $g_pcl_trace_mode) {
  9. for ($i = 0; $i < $p_entry['index']; ++$i) {
  10. echo '---';
in class/pcltrace.lib.php, line 476
  1. global $g_pcl_trace_level;
  2. global $g_pcl_trace_mode;
  3. global $g_pcl_trace_filename;
  4. global $g_pcl_trace_name;
  5. global $g_pcl_trace_index;
  6. global $g_pcl_trace_entries;

    $g_pcl_trace_entries adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. if ('normal' === $g_pcl_trace_mode) {
  8. for ($i = 0; $i < $p_entry['index']; ++$i) {
  9. echo '---';
  10. }
  1. /**
  2. * @param $type
  3. *
  4. * @return string
  5. */
  6. function image_type_to_mime_type($type)

    image_type_to_mime_type() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. switch ($type) {
  9. case IMAGETYPE_GIF:
  10. return 'image/gif';
in class/pear/System.php, line 22
  1. * base class
  2. */
  3. require_once 'PEAR.php';
  4. require_once 'Console/Getopt.php';
  5. $GLOBALS['_System_temp_files'] = array();

    $_System_temp_files adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by Mamba
  6. /**
  7. * System offers cross platform compatible system functions
  8. *
  9. * Static functions for different operations. Should work under
in class/pear/System.php, line 451
  1. {
  2. if (count($GLOBALS['_System_temp_files'])) {
  3. $delete = $GLOBALS['_System_temp_files'];
  4. array_unshift($delete, '-r');
  5. System::rm($delete);
  6. $GLOBALS['_System_temp_files'] = array();

    $_System_temp_files adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by Mamba
  7. }
  8. }
  9. /**
  10. * Get the path of the temporal directory set in the system
  1. *
  2. * @return bool
  3. */
  4. function extgallery_tag_iteminfo(&$items)

    extgallery_tag_iteminfo() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  5. {
  6. if (empty($items) || !is_array($items)) {
  7. return false;
  8. }
  1. }
  2. /**
  3. * @param $mid
  4. */
  5. function extgallery_tag_synchronization($mid)

    extgallery_tag_synchronization() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. global $XoopsDB;
  8. /** @var Extgallery\PublicPhotoHandler $itemHandler */
  9. $itemHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
  10. /** @var \XoopsModules\Tag\LinkHandler $linkHandler */
  1. /**
  2. * @param $mid
  3. */
  4. function extgallery_tag_synchronization($mid)
  5. {
  6. global $XoopsDB;

    $XoopsDB adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. /** @var Extgallery\PublicPhotoHandler $itemHandler */
  8. $itemHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
  9. /** @var \XoopsModules\Tag\LinkHandler $linkHandler */
  10. $linkHandler = \XoopsModules\Tag\Helper::getInstance()->getHandler('Link'); //@var \XoopsModules\Tag\Handler $tagHandler
in class/Utility.php, line 25
  1. * @param $option
  2. * @return bool|mixed
  3. */
  4. public static function getModuleOption($option)
  5. {
  6. global $xoopsModuleConfig, $xoopsModule;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. static $tbloptions = [];
  8. if (is_array($tbloptions) && array_key_exists($option, $tbloptions)) {
  9. return $tbloptions[$option];
  10. }
in class/Utility.php, line 25
  1. * @param $option
  2. * @return bool|mixed
  3. */
  4. public static function getModuleOption($option)
  5. {
  6. global $xoopsModuleConfig, $xoopsModule;

    $xoopsModule adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. static $tbloptions = [];
  8. if (is_array($tbloptions) && array_key_exists($option, $tbloptions)) {
  9. return $tbloptions[$option];
  10. }
  1. /**
  2. * @param $photoId
  3. * @param $nbCom
  4. */
  5. function extgalleryComUpdate($photoId, $nbCom)

    extgalleryComUpdate() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. /** @var Extgallery\PhotoHandler $photoHandler */
  8. $photoHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
  9. $photoHandler->modifyPhoto($photoId, ['photo_comment' => $nbCom]);
  10. }
in include/common.php, line 90
  1. // MyTextSanitizer object
  2. $myts = \MyTextSanitizer::getInstance();
  3. if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof \XoopsTpl)) {
  4. require_once $GLOBALS['xoops']->path('class/template.php');
  5. $GLOBALS['xoopsTpl'] = new \XoopsTpl();

    $xoopsTpl adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. }
  7. $GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL . '/modules/' . $moduleDirName);
  8. // Local icons path
  9. if (is_object($helper->getModule())) {
in include/config.php, line 21
  1. * @since
  2. * @author XOOPS Development Team
  3. */
  4. function getConfig()

    getConfig() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  5. {
  6. $moduleDirName = basename(dirname(__DIR__));
  7. $moduleDirNameUpper = strtoupper($moduleDirName);
  8. return (object)[
  9. 'name' => strtoupper($moduleDirName) . ' Module Configurator',
  1. * @package ExtGallery
  2. * @param $option
  3. * @return bool
  4. */
  5. function gal_getmoduleoption($option)

    gal_getmoduleoption() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. global $xoopsModuleConfig, $xoopsModule;
  8. static $tbloptions = [];
  9. if (is_array($tbloptions) && array_key_exists($option, $tbloptions)) {
  10. return $tbloptions[$option];
  1. * @return bool
  2. */
  3. function gal_getmoduleoption($option)
  4. {
  5. global $xoopsModuleConfig, $xoopsModule;

    $xoopsModule adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. static $tbloptions = [];
  7. if (is_array($tbloptions) && array_key_exists($option, $tbloptions)) {
  8. return $tbloptions[$option];
  9. }
  1. * @return bool
  2. */
  3. function gal_getmoduleoption($option)
  4. {
  5. global $xoopsModuleConfig, $xoopsModule;

    $xoopsModuleConfig adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. static $tbloptions = [];
  7. if (is_array($tbloptions) && array_key_exists($option, $tbloptions)) {
  8. return $tbloptions[$option];
  9. }
  1. * @param $height
  2. * @param $supplemental
  3. *
  4. * @return bool|\XoopsFormEditor
  5. */
  6. function gal_getWysiwygForm($caption, $name, $value, $rows, $cols, $width, $height, $supplemental)

    gal_getWysiwygForm() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $editor_option = strtolower(gal_getmoduleoption('form_options'));
  9. $editor = false;
  10. $editor_configs = [];
  11. $editor_configs['name'] = $name;
  1. * @package ExtGallery
  2. * @param $module
  3. * @return bool
  4. */
  5. function xoops_module_pre_install_extgallery(\XoopsModule $module)

    xoops_module_pre_install_extgallery() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. // Check if this XOOPS version is supported
  8. $minSupportedVersion = explode('.', '2.5.0');
  9. $currentVersion = explode('.', substr(XOOPS_VERSION, 6));
  1. /**
  2. * @param XoopsModule $module
  3. *
  4. * @return bool
  5. */
  6. function xoops_module_install_extgallery(\XoopsModule $module)

    xoops_module_install_extgallery() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $module_id = $module->getVar('mid');
  9. /** @var XoopsGroupPermHandler $gpermHandler */
  10. $gpermHandler = xoops_getHandler('groupperm');
  11. /** @var XoopsModuleHandler $moduleHandler */
  1. * @param $category
  2. * @param $item_id
  3. *
  4. * @return mixed
  5. */
  6. function extgalleryNotifyIteminfo($category, $item_id)

    extgalleryNotifyIteminfo() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by Mamba
  7. {
  8. /** @var Extgallery\PublicPhotoHandler $photoHandler */
  9. /** @var Extgallery\Photo $photo */
  10. $photoHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
  1. * @param XoopsModule $module {@link XoopsModule}
  2. *
  3. * @return bool true if ready to uninstall, false if not
  4. */
  5. function xoops_module_pre_uninstall_extgallery(\XoopsModule $module)

    xoops_module_pre_uninstall_extgallery() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  6. {
  7. // Do some synchronization
  8. return true;
  9. }
  1. * Performs tasks required during uninstallation of the module
  2. * @param XoopsModule $module {@link XoopsModule}
  3. *
  4. * @return bool true if uninstallation successful, false if not
  5. */
  6. function xoops_module_uninstall_extgallery(\XoopsModule $module)

    xoops_module_uninstall_extgallery() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. // return true;
  9. $moduleDirName = basename(dirname(__DIR__));
  10. $moduleDirNameUpper = strtoupper($moduleDirName);
  1. * @param $offset
  2. * @param $userid
  3. *
  4. * @return mixed
  5. */
  6. function extgallerySearch($queryarray, $andor, $limit, $offset, $userid)

    extgallerySearch() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. /** @var Extgallery\PublicPhotoHandler $photoHandler */
  9. $photoHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
  10. return $photoHandler->getSearchedPhoto($queryarray, $andor, $limit, $offset, $userid);
in public-useralbum.php, line 67
  1. /**
  2. * @param $SortbyOrderby
  3. *
  4. * @return array|string
  5. */
  6. function convertorderbytrans($SortbyOrderby)

    convertorderbytrans() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by mambax7
  7. {
  8. $orderbyTrans = [];
  9. if ('photo_date DESC' === $SortbyOrderby) {
  10. $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
  11. }

exit() and die() functions should be avoided 33

More information: https://insight.symfony.com/what-we-analyse/php.use_exit_function

  1. return null;
  2. }
  3. public function hasValidParent()
  4. {
  5. exit('hasValidParent() method must be defined on sub classes');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  6. }
  7. /**
  8. * @param $cat
  9. *
  1. }
  2. }
  3. public function deleteFile()
  4. {
  5. exit('deleteFile() method must be defined on sub classes');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  6. }
  7. /**
  8. * @param $photoId
  9. *
in class/PhotoHandler.php, line 379
  1. return $this->updateCounter('photo_ecard', $criteria);
  2. }
  3. public function getAllSize()
  4. {
  5. exit('getAllSize() method must be defined on sub classes');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  6. }
  7. /**
  8. * @param $imageTransform
  9. */
in class/PhotoHandler.php, line 468
  1. }
  2. }
  3. public function getUploadPhotoPath()
  4. {
  5. exit('getUploadPhotoPath() method must be defined on sub classes');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  6. }
  7. /**
  8. * @param $photoName
  9. */
in include/onupdate.php, line 21
  1. * @author XOOPS Development Team
  2. */
  3. if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)
  4. || !$GLOBALS['xoopsUser']->IsAdmin()) {
  5. exit('Restricted access' . PHP_EOL);

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  6. }
  7. /**
  8. * @param string $tablename
  9. *
in class/pear/PEAR.php, line 927
  1. }
  2. } else {
  3. $format = $options;
  4. }
  5. printf($format, $msg);
  6. exit($code);

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  7. }
  8. if ($this->mode & PEAR_ERROR_CALLBACK && is_callable($this->callback)) {
  9. call_user_func($this->callback, $this);
  10. }
  1. <?php defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  2. $this->inc('form_setup_html.php');
  1. <?php defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  2. /**
  3. * Class MagnificPopupBlockController
  4. */
  5. class MagnificPopupBlockController extends BlockController
  1. <?php defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  2. $this->inc('form_setup_html.php');
  1. <?php
  2. defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  3. // Load TinyMCE
  4. Loader::element('editor_config');
  5. // load asset library (for photos)
  6. $al = Loader::helper('concrete/asset_library');
  1. <?php defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  2. $v = View::GetInstance();
  3. $page = Page::getCurrentPage();
  4. $custom = $customAnim;
  5. if ('custom-anim' === $dialogType) {
  1. <?php
  2. defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  3. $page = Page::getCurrentPage();
  4. $v = View::GetInstance();
  5. $ih = Loader::helper('image');
  1. <?php defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  2. $v = View::GetInstance();
  3. $page = Page::getCurrentPage();
  4. ?>
  5. <a id="mag-modal-<?php echo $bID; ?>" href="#magnific_modal-<?php echo $bID; ?>"><?php echo $modalLink; ?></a>
  1. <?php defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  2. // for edit mode clash fixes
  3. $page = Page::getCurrentPage();
  4. // v is view. used in switch to place script in footer
  5. $v = View::GetInstance();
  1. <?php defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  2. $v = View::GetInstance(); ?>
  3. <div id="<?php echo $magnific_type . '-' . $bID ?>" class="<?php echo $magnific_type . '-gallery' . ' ' . $cssFrameworkClass; ?>">
  4. <?php
  5. $defaultDelay = 700;
  1. <?php defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  2. $page = Page::getCurrentPage();
  3. $v = View::GetInstance();
  4. $image = Loader::helper('image');
  5. $po = $controller->getPictureObject();
  1. <?php defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  2. $image = Loader::helper('image');
  3. /*
  4. included files are located in the /includes directory
  5. */
  6. switch ($magnific_type) {
  1. <?php defined('C5_EXECUTE') || die('Access denied.');

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mambax7
  2. /**
  3. * Class MagnificPopupPackage
  4. */
  5. class MagnificPopupPackage