Database queries should use parameter binding 34

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 ($sql->getRows() == 0) {
  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. $sql->setQuery('INSERT INTO `' . $REX['TABLE_PREFIX'] . '679_type_effects` (type_id, effect, parameters, prior, updatedate, updateuser, createdate, createuser) VALUES (' . $lastId . ", 'resize','a:8:{s:15:\"rex_effect_crop\";a:6:{s:21:\"rex_effect_crop_width\";s:0:\"\";s:22:\"rex_effect_crop_height\";s:0:\"\";s:28:\"rex_effect_crop_offset_width\";s:0:\"\";s:29:\"rex_effect_crop_offset_height\";s:0:\"\";s:20:\"rex_effect_crop_hpos\";s:6:\"center\";s:20:\"rex_effect_crop_vpos\";s:6:\"middle\";}s:22:\"rex_effect_filter_blur\";a:3:{s:29:\"rex_effect_filter_blur_amount\";s:2:\"80\";s:29:\"rex_effect_filter_blur_radius\";s:1:\"8\";s:32:\"rex_effect_filter_blur_threshold\";s:1:\"3\";}s:25:\"rex_effect_filter_sharpen\";a:3:{s:32:\"rex_effect_filter_sharpen_amount\";s:2:\"80\";s:32:\"rex_effect_filter_sharpen_radius\";s:3:\"0.5\";s:35:\"rex_effect_filter_sharpen_threshold\";s:1:\"3\";}s:15:\"rex_effect_flip\";a:1:{s:20:\"rex_effect_flip_flip\";s:1:\"X\";}s:23:\"rex_effect_insert_image\";a:5:{s:34:\"rex_effect_insert_image_brandimage\";s:0:\"\";s:28:\"rex_effect_insert_image_hpos\";s:4:\"left\";s:28:\"rex_effect_insert_image_vpos\";s:3:\"top\";s:33:\"rex_effect_insert_image_padding_x\";s:3:\"-10\";s:33:\"rex_effect_insert_image_padding_y\";s:3:\"-10\";}s:17:\"rex_effect_mirror\";a:5:{s:24:\"rex_effect_mirror_height\";s:0:\"\";s:33:\"rex_effect_mirror_set_transparent\";s:7:\"colored\";s:22:\"rex_effect_mirror_bg_r\";s:0:\"\";s:22:\"rex_effect_mirror_bg_g\";s:0:\"\";s:22:\"rex_effect_mirror_bg_b\";s:0:\"\";}s:17:\"rex_effect_resize\";a:4:{s:23:\"rex_effect_resize_width\";s:3:\"500\";s:24:\"rex_effect_resize_height\";s:0:\"\";s:23:\"rex_effect_resize_style\";s:7:\"maximum\";s:31:\"rex_effect_resize_allow_enlarge\";s:7:\"enlarge\";}s:20:\"rex_effect_workspace\";a:8:{s:26:\"rex_effect_workspace_width\";s:0:\"\";s:27:\"rex_effect_workspace_height\";s:0:\"\";s:25:\"rex_effect_workspace_hpos\";s:4:\"left\";s:25:\"rex_effect_workspace_vpos\";s:3:\"top\";s:36:\"rex_effect_workspace_set_transparent\";s:7:\"colored\";s:25:\"rex_effect_workspace_bg_r\";s:0:\"\";s:25:\"rex_effect_workspace_bg_g\";s:0:\"\";s:25:\"rex_effect_workspace_bg_b\";s:0:\"\";}}',1," . time() . ",'admin'," . time() . ",'admin')");
  2. $sql->setQuery('INSERT INTO `' . $REX['TABLE_PREFIX'] . '679_type_effects` (type_id, effect, parameters, prior, updatedate, updateuser, createdate, createuser) VALUES (' . $lastId . ", 'filter_sharpen','a:8:{s:15:\"rex_effect_crop\";a:6:{s:21:\"rex_effect_crop_width\";s:0:\"\";s:22:\"rex_effect_crop_height\";s:0:\"\";s:28:\"rex_effect_crop_offset_width\";s:0:\"\";s:29:\"rex_effect_crop_offset_height\";s:0:\"\";s:20:\"rex_effect_crop_hpos\";s:6:\"center\";s:20:\"rex_effect_crop_vpos\";s:6:\"middle\";}s:22:\"rex_effect_filter_blur\";a:3:{s:29:\"rex_effect_filter_blur_amount\";s:2:\"80\";s:29:\"rex_effect_filter_blur_radius\";s:1:\"8\";s:32:\"rex_effect_filter_blur_threshold\";s:1:\"3\";}s:25:\"rex_effect_filter_sharpen\";a:3:{s:32:\"rex_effect_filter_sharpen_amount\";s:2:\"80\";s:32:\"rex_effect_filter_sharpen_radius\";s:3:\"0.5\";s:35:\"rex_effect_filter_sharpen_threshold\";s:1:\"3\";}s:15:\"rex_effect_flip\";a:1:{s:20:\"rex_effect_flip_flip\";s:1:\"X\";}s:23:\"rex_effect_insert_image\";a:5:{s:34:\"rex_effect_insert_image_brandimage\";s:0:\"\";s:28:\"rex_effect_insert_image_hpos\";s:4:\"left\";s:28:\"rex_effect_insert_image_vpos\";s:3:\"top\";s:33:\"rex_effect_insert_image_padding_x\";s:3:\"-10\";s:33:\"rex_effect_insert_image_padding_y\";s:3:\"-10\";}s:17:\"rex_effect_mirror\";a:5:{s:24:\"rex_effect_mirror_height\";s:0:\"\";s:33:\"rex_effect_mirror_set_transparent\";s:7:\"colored\";s:22:\"rex_effect_mirror_bg_r\";s:0:\"\";s:22:\"rex_effect_mirror_bg_g\";s:0:\"\";s:22:\"rex_effect_mirror_bg_b\";s:0:\"\";}s:17:\"rex_effect_resize\";a:4:{s:23:\"rex_effect_resize_width\";s:0:\"\";s:24:\"rex_effect_resize_height\";s:0:\"\";s:23:\"rex_effect_resize_style\";s:7:\"maximum\";s:31:\"rex_effect_resize_allow_enlarge\";s:7:\"enlarge\";}s:20:\"rex_effect_workspace\";a:8:{s:26:\"rex_effect_workspace_width\";s:0:\"\";s:27:\"rex_effect_workspace_height\";s:0:\"\";s:25:\"rex_effect_workspace_hpos\";s:4:\"left\";s:25:\"rex_effect_workspace_vpos\";s:3:\"top\";s:36:\"rex_effect_workspace_set_transparent\";s:7:\"colored\";s:25:\"rex_effect_workspace_bg_r\";s:0:\"\";s:25:\"rex_effect_workspace_bg_g\";s:0:\"\";s:25:\"rex_effect_workspace_bg_b\";s:0:\"\";}}',2," . time() . ",'admin'," . time() . ",'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 ($sql->getRows() == 0) {
  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 ($sql->getRows() == 1) {
  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 ($sql->getRows() == 1) {
  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 ($sql->getRows() == 1) {
  6. $imageTypeId = $sql->getValue('id');
  7. // imagetype
  1. if ($sql->getRows() == 1) {
  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 ($sql->getRows() == 1) {
  7. $imageTypeId = $sql->getValue('id');
  8. // imagetype
  1. if ($sql->getRows() == 1) {
  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 ($options[1] != 0) {
  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 ($options[1] != 0) {
  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 ($nbPhoto != 0) {
  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 ($nbPhoto != 0) {
  1. */
  2. public function &getObjects(CriteriaElement $criteria = null, $id_as_key = false, $as_object = true)
  3. {
  4. $ret = array();
  5. $limit = $start = 0;
  6. $sql = 'SELECT * FROM ' . $this->table;

    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 (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  8. $sql .= ' ' . $criteria->renderWhere();
  9. if ($criteria->getSort() != '') {
  10. $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
  11. }
  1. $limit = $start = 0;
  2. $sql = 'SELECT * FROM ' . $this->table;
  3. if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  4. $sql .= ' ' . $criteria->renderWhere();
  5. if ($criteria->getSort() != '') {
  6. $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();

    If provided by the user, the value of $criteria->getSort() 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. }
  8. $limit = $criteria->getLimit();
  9. $start = $criteria->getStart();
  10. }
  11. $result = $this->db->query($sql, $limit, $start);
  1. if ($criteria->getSort() == '') {
  2. $criteria->setSort($this->identifierName);
  3. }
  4. $sql = 'SELECT ' . $this->keyName;

    If provided by the user, the value of $this->keyName 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 (!empty($this->identifierName)) {
  6. $sql .= ', ' . $this->identifierName;
  7. }
  8. $sql .= ' FROM ' . $this->table;
  9. if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  1. $sql = 'SELECT ' . $this->keyName;
  2. if (!empty($this->identifierName)) {
  3. $sql .= ', ' . $this->identifierName;
  4. }
  5. $sql .= ' FROM ' . $this->table;

    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
  6. if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  7. $sql .= ' ' . $criteria->renderWhere();
  8. if ($criteria->getSort() != '') {
  9. $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
  10. }
  1. }
  2. $sql .= ' FROM ' . $this->table;
  3. if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  4. $sql .= ' ' . $criteria->renderWhere();
  5. if ($criteria->getSort() != '') {
  6. $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();

    If provided by the user, the value of $criteria->getSort() 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. }
  8. $limit = $criteria->getLimit();
  9. $start = $criteria->getStart();
  10. }
  11. $result = $this->db->query($sql, $limit, $start);
  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 . 'COUNT(*) 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 (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  8. $sql .= ' ' . $criteria->renderWhere();
  9. if ($criteria->groupby != '') {
  10. $sql .= $criteria->getGroupby();
  11. }
  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. $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq');
  2. }
  3. }
  4. $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($cleanvars)) . ') VALUES (' . implode(',', array_values($cleanvars)) . ')';
  5. } else {
  6. $sql = 'UPDATE ' . $this->table . ' SET';

    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. foreach ($cleanvars as $key => $value) {
  8. if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) {
  9. continue;
  10. }
  11. if (isset($notfirst)) {
  1. $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]);
  2. }
  3. } else {
  4. $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName);
  5. }
  6. $sql .= ' WHERE ' . $whereclause;

    If provided by the user, the value of $whereclause 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. }
  8. if (false != $force) {
  9. $result = $this->db->queryF($sql);
  10. } else {
  11. $result = $this->db->query($sql);
  1. } elseif (is_array($fieldvalue)) {
  2. $set_clause .= $this->db->quoteString(implode(',', $fieldvalue));
  3. } else {
  4. $set_clause .= $this->db->quoteString($fieldvalue);
  5. }
  6. $sql = 'UPDATE ' . $this->table . ' SET ' . $set_clause;

    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 (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  8. $sql .= ' ' . $criteria->renderWhere();
  9. }
  10. if (false != $force) {
  11. $result = $this->db->queryF($sql);
  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 (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  8. $sql .= ' ' . $criteria->renderWhere();
  9. }
  10. if (false != $force) {
  11. $result = $this->db->queryF($sql);
  1. */
  2. public function deleteAll(CriteriaElement $criteria = null)
  3. {
  4. if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  5. $sql = 'DELETE FROM ' . $this->table;

    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
  6. $sql .= ' ' . $criteria->renderWhere();
  7. if (!$this->db->query($sql)) {
  8. return false;
  9. }
  10. $rows = $this->db->getAffectedRows();
  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 (isset($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 (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  8. $sql .= ' ' . $criteria->renderWhere();
  9. if ($criteria->groupby != '') {
  10. $sql .= $criteria->getGroupby();
  11. }
  1. */
  2. public function getAvg($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 (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
  7. $sql .= ' ' . $criteria->renderWhere();
  8. }
  9. $result = $this->db->query($sql);
  10. if (!$result) {
  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 = array();
  8. while ($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 = array();
  8. while ($myrow = $this->db->fetchArray($result)) {
  9. $ret[] = $myrow['photo_id'];
  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. $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. $gpermHandler = xoops_getHandler('groupperm');
  8. while ($cat = $db->fetchArray($result)) {
  9. $gpermHandler->addRight('public_displayed', $cat['cat_id'], XOOPS_GROUP_ADMIN, $module_id);

PHP debug statements found 2

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

  1. public function insert(XoopsObject $obj, $force = false, $checkObject = true)
  2. {
  3. if ($checkObject != false) {
  4. if (!is_object($obj)) {
  5. var_dump($obj);

    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
  6. return false;
  7. }
  8. //if (!is_a($obj, $this->className)) {
  9. //$obj->setErrors(get_class($obj) . ' Differs from ' . $this->className);
  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

  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. * Get the error mode from an error object.

Global variable or function should never be used 188

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

  1. * @param $options
  2. * @return array
  3. */
  4. // Manage photo blocks
  5. 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
  6. {
  7. global $xoopsConfig;
  8. $photoHandler = xoops_getModuleHandler('publicphoto', 'extgallery');
  1. */
  2. // Manage photo blocks
  3. function extgalleryPhotoShow($options)
  4. {
  5. 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
  6. $photoHandler = xoops_getModuleHandler('publicphoto', 'extgallery');
  7. $param = array('limit' => $options[0]);
  8. $direction = $options[1];
  1. $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
  2. break;
  3. }
  4. if ($jquery === 'true' && $ajaxeffect !== 'none') {
  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
  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. for ($i = 0; $i < $num; ++$i) {
  11. if ($i) {
  1. /**
  2. * @param $options
  3. *
  4. * @return string
  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. $block = '';
  10. if ($options[1] != 0) {
  11. $cat = array_slice($options, 1); //Get information about categories to display
  1. *
  2. * @return string
  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. $block = '';
  8. if ($options[1] != 0) {
  9. $cat = array_slice($options, 1); //Get information about categories to display
  10. $catauth = implodeArray2Dextgallery(',', $cat); //Creation of categories list to use - separated by a coma
  11. }
  1. *
  2. * @return string
  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. $block = '';
  8. if ($options[1] != 0) {
  9. $cat = array_slice($options, 1); //Get information about categories to display
  10. $catauth = implodeArray2Dextgallery(',', $cat); //Creation of categories list to use - separated by a coma
  11. }
  1. /**
  2. * @param $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. $photoHandler = xoops_getModuleHandler('publicphoto', 'extgallery');
  9. $param = array('limit' => $options[0]);
  10. $photoHandlertype = $options[1];
  11. $jquery = $options[2];
  1. $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
  2. break;
  3. }
  4. if ($jquery === 'true') {
  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 $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. global $xoopsUser;
  9. $catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
  1. *
  2. * @return string
  3. */
  4. function extgalleryBlockEdit($options)
  5. {
  6. global $xoopsUser;

    $xoopsUser 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. $catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
  8. $form = _MB_EXTGALLERY_PHOTO_NUMBER . " : <input name=\"options[]\" size=\"5\" maxlength=\"255\" value=\"" . $options[0] . "\" type=\"text\" /><br />";
  1. /**
  2. * @param $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. global $xoopsUser;
  9. $catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
  1. *
  2. * @return string
  3. */
  4. function extgalleryAjaxEdit($options)
  5. {
  6. global $xoopsUser;

    $xoopsUser 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. $catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
  8. $form = _MB_EXTGALLERY_PHOTO_NUMBER . " : <input name=\"options[]\" size=\"5\" maxlength=\"255\" value=\"" . $options[0] . "\" type=\"text\" /><br />";
  1. /**
  2. * @param $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. global $xoopsUser;
  9. $catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
  1. *
  2. * @return string
  3. */
  4. function extgalleryTopSubmitterEdit($options)
  5. {
  6. global $xoopsUser;

    $xoopsUser 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. $catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
  8. $form = _MB_EXTGALLERY_USER_NUMBER . " : <input name=\"options[]\" size=\"5\" maxlength=\"255\" value=\"" . $options[0] . "\" type=\"text\" /><br />";
  1. /**
  2. * @param $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. $photoHandler = xoops_getModuleHandler('publicphoto', 'extgallery');
  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. $photoHandler = xoops_getModuleHandler('publicphoto', 'extgallery');
  8. $param = array('limit' => $options[0]);
  9. $date = $options[1];
  1. /**
  2. * @param $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. global $xoopsUser;
  9. $catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
  10. $form = _MB_EXTGALLERY_PHOTO_NUMBER . " : <input name=\"options[]\" size=\"5\" maxlength=\"255\" value=\"" . $options[0] . "\" type=\"text\" /><br />";
  11. //==================================
  1. *
  2. * @return string
  3. */
  4. function extgalleryListEdit($options)
  5. {
  6. global $xoopsUser;

    $xoopsUser 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. $catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
  8. $form = _MB_EXTGALLERY_PHOTO_NUMBER . " : <input name=\"options[]\" size=\"5\" maxlength=\"255\" value=\"" . $options[0] . "\" type=\"text\" /><br />";
  9. //==================================
  10. $y2Checked = '';
  11. $n2Checked = '';
  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
  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 = array();
  8. $borders[] = array('borderWidth' => $xoopsModuleConfig['inner_border_size'], 'borderColor' => $xoopsModuleConfig['inner_border_color']);
  9. $borders[] = array('borderWidth' => $xoopsModuleConfig['outer_border_size'], 'borderColor' => $xoopsModuleConfig['outer_border_color']);
  10. $imageTransform->addBorders($borders);
  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
  1. * @param null $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') && $xoopsModuleConfig['graphic_lib'] === 'IM') {
  9. define('IMAGE_TRANSFORM_IM_PATH', $xoopsModuleConfig['graphic_lib_path']);
  10. }
  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') && $xoopsModuleConfig['graphic_lib'] === 'IM') {
  9. define('IMAGE_TRANSFORM_IM_PATH', $xoopsModuleConfig['graphic_lib_path']);
  10. }
  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') && $xoopsModuleConfig['graphic_lib'] === 'IM') {
  9. define('IMAGE_TRANSFORM_IM_PATH', $xoopsModuleConfig['graphic_lib_path']);
  10. }
  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 = '';
  1. */
  2. public function addLocalPhoto($catId, $dirtyPhotoName, $photoTitle = '', $photoDesc = '', $photoExtra = '', $photoTag = '')
  3. {
  4. include_once XOOPS_ROOT_PATH . '/modules/extgallery/class/pear/Image/Transform.php';
  5. global $xoopsUser, $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 = ExtgalleryPublicPermHandler::getHandler();
  7. // Replace all bad file name character
  8. $photoName = $this->_makeFileName($dirtyPhotoName);
  9. rename($this->_getUploadPhotoPath() . $dirtyPhotoName, $this->_getUploadPhotoPath() . $photoName);
  1. */
  2. public function addLocalPhoto($catId, $dirtyPhotoName, $photoTitle = '', $photoDesc = '', $photoExtra = '', $photoTag = '')
  3. {
  4. include_once XOOPS_ROOT_PATH . '/modules/extgallery/class/pear/Image/Transform.php';
  5. global $xoopsUser, $xoopsModuleConfig;

    $xoopsUser 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 = ExtgalleryPublicPermHandler::getHandler();
  7. // Replace all bad file name character
  8. $photoName = $this->_makeFileName($dirtyPhotoName);
  9. rename($this->_getUploadPhotoPath() . $dirtyPhotoName, $this->_getUploadPhotoPath() . $photoName);
  1. * @param $xoopsModule
  2. * @param null $oldVersion
  3. * @return bool
  4. */
  5. function xoops_module_update_extgallery(&$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
  6. {
  7. $catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
  8. $catHandler->rebuild();
  9. if ($oldVersion < 101) {
  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();
  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);
  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);
  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. /**
  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
  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. }
  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. }
  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. /**
  1. }
  2. if (PEAR_ZE2) {
  3. include_once 'PEAR5.php';
  4. }
  5. if (!function_exists('_PEAR_call_destructors()')) {
  6. 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
  7. {
  8. global $_PEAR_destructor_object_list;
  9. if (is_array($_PEAR_destructor_object_list) && count($_PEAR_destructor_object_list)) {
  10. reset($_PEAR_destructor_object_list);
  11. if (PEAR_ZE2) {
  1. include_once 'PEAR5.php';
  2. }
  3. if (!function_exists('_PEAR_call_destructors()')) {
  4. function _PEAR_call_destructors()
  5. {
  6. 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
  7. if (is_array($_PEAR_destructor_object_list) && count($_PEAR_destructor_object_list)) {
  8. reset($_PEAR_destructor_object_list);
  9. if (PEAR_ZE2) {
  10. $destructLifoExists = PEAR5::getStaticProperty('PEAR', 'destructlifo');
  11. } else {
  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="' . __('Select slideshow to insert into post', 'metaslider') . '"><span class="wp-media-buttons-icon" style="background: url(' . METASLIDER_ASSETS_URL . '/metaslider/matchalabs.png); background-repeat: no-repeat; background-position: left bottom;"></span> ' . __('Add slider', 'metaslider') . '</a>';
  9. }
  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');
  10. ?>
  1. // --------------------------------------------------------------------------------
  2. /**
  3. * @param int $p_error_code
  4. * @param string $p_error_string
  5. */
  6. function PclErrorLog($p_error_code = 0, $p_error_string = '')

    PclErrorLog() 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 $g_pcl_error_string;
  9. global $g_pcl_error_code;
  10. $g_pcl_error_code = $p_error_code;
  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. /**
  2. * @param $p_file
  3. * @param $p_line
  4. * @param string $p_error_string
  5. */
  6. function PclErrorFatal($p_file, $p_line, $p_error_string = '')

    PclErrorFatal() 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 $g_pcl_error_string;
  9. global $g_pcl_error_code;
  10. $v_message = '<html><body>';
  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><font color=red bgcolor=white><b>PclError Library has detected a fatal error on file '$p_file', line $p_line</b></font></p>";
  10. $v_message .= "<p align=center><font color=red bgcolor=white><b>$p_error_string</b></font></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><font color=red bgcolor=white><b>PclError Library has detected a fatal error on file '$p_file', line $p_line</b></font></p>";
  9. $v_message .= "<p align=center><font color=red bgcolor=white><b>$p_error_string</b></font></p>";
  10. $v_message .= '</body></html>';
  1. // --------------------------------------------------------------------------------
  2. // Function : PclErrorReset()
  3. // Description :
  4. // Parameters :
  5. // --------------------------------------------------------------------------------
  6. function PclErrorReset()

    PclErrorReset() 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 $g_pcl_error_string;
  9. global $g_pcl_error_code;
  10. $g_pcl_error_code = 1;
  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. }
  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. }
  1. // Parameters :
  2. // --------------------------------------------------------------------------------
  3. /**
  4. * @return int
  5. */
  6. function PclErrorCode()

    PclErrorCode() 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 $g_pcl_error_string;
  9. global $g_pcl_error_code;
  10. return $g_pcl_error_code;
  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. }
  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. // --------------------------------------------------------------------------------
  1. // Parameters :
  2. // --------------------------------------------------------------------------------
  3. /**
  4. * @return string
  5. */
  6. function PclErrorString()

    PclErrorString() 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 $g_pcl_error_string;
  9. global $g_pcl_error_code;
  10. return ($g_pcl_error_string . " [code $g_pcl_error_code]");
  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. }
  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. // --------------------------------------------------------------------------------
  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 = array();
  9. if ($SortbyOrderby === 'photo_date DESC') {
  10. $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
  11. }
  1. include_once $GLOBALS['xoops']->path('www/include/cp_header.php');
  2. include_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');
  3. xoops_load('XoopsRequest');
  4. global $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
  5. //$moduleDirName = $GLOBALS['xoopsModule']->getVar('dirname');
  6. //if functions.php file exist
  7. //require_once dirname(__DIR__) . '/include/functions.php';
  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. /**
  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. }
  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?>");
  9. }
  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?>");
  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?>");
  10. }
  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 Mamba
  7. {
  8. $s = stat($dir);
  9. $space = $s[7];
  10. if (is_dir($dir)) {
  11. $dh = opendir($dir);
  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);
  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 = array(
  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.4.0');
  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 (compareVersion(getModuleVersion(), getLastModuleVersion()) != -1) {
  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 (compareVersion(substr(XOOPS_VERSION, 6), _MU_MODULE_XOOPS_VERSION_SUPPORTED) != -1) {
  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 (compareVersion(substr(XOOPS_VERSION, 6), $moduleInfos['xoopsVersionNeeded']) != -1) {
  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. }
  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="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 = array();
  8. $rep = XOOPS_ROOT_PATH . '/modules/extgallery/assets/images/';
  9. $dir = opendir($rep);
  10. while ($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(XOOPS_ROOT_PATH . '/modules/extgallery/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 ($curLocale === 'de_de') {
  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 ($options['autoPlay'] === 'true') {
  9. $options['manualAdvance'] = 'false';
  10. } else {
  11. $options['manualAdvance'] = 'true';
  1. /**
  2. * @param $options
  3. *
  4. * @return string
  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. include_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
  1. /**
  2. * @param $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. include_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
  9. return tag_block_cloud_edit($options);
  10. }
  1. /**
  2. * @param $options
  3. *
  4. * @return 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 $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. include_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
  9. return tag_block_top_edit($options);
  10. }
  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_add_dir
  2. * @param string $p_remove_dir
  3. *
  4. * @return int
  5. */
  6. function PclTarCreate($p_tarname, $p_filelist = '', $p_mode = '', $p_add_dir = '', $p_remove_dir = '')

    PclTarCreate() 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. TrFctStart(__FILE__, __LINE__, 'PclTarCreate', "tar=$p_tarname, file='$p_filelist', mode=$p_mode, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
  9. $v_result = 1;
  10. // ----- Look for default mode
  1. * @param $p_tarname
  2. * @param $p_filelist
  3. *
  4. * @return int
  5. */
  6. function PclTarAdd($p_tarname, $p_filelist)

    PclTarAdd() 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. TrFctStart(__FILE__, __LINE__, 'PclTarAdd', "tar=$p_tarname, file=$p_filelist");
  9. $v_result = 1;
  10. $v_list_detail = array();
  1. * @param string $p_remove_dir
  2. * @param string $p_mode
  3. *
  4. * @return array|int
  5. */
  6. function PclTarAddList($p_tarname, $p_filelist, $p_add_dir = '', $p_remove_dir = '', $p_mode = '')

    PclTarAddList() 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. TrFctStart(__FILE__, __LINE__, 'PclTarAddList', "tar=$p_tarname, file=$p_filelist, p_add_dir='$p_add_dir', p_remove_dir='$p_remove_dir', mode=$p_mode");
  9. $v_result = 1;
  10. $p_list_detail = array();
  1. * @param $p_tarname
  2. * @param string $p_mode
  3. *
  4. * @return array|int
  5. */
  6. function PclTarList($p_tarname, $p_mode = '')

    PclTarList() 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. TrFctStart(__FILE__, __LINE__, 'PclTarList', "tar=$p_tarname, mode='$p_mode'");
  9. $v_result = 1;
  10. // ----- Extract the tar format from the extension
  1. * @param string $p_remove_path
  2. * @param string $p_mode
  3. *
  4. * @return int
  5. */
  6. function PclTarExtract($p_tarname, $p_path = './', $p_remove_path = '', $p_mode = '')

    PclTarExtract() 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. TrFctStart(__FILE__, __LINE__, 'PclTarExtract', "tar='$p_tarname', path='$p_path', remove_path='$p_remove_path', mode='$p_mode'");
  9. $v_result = 1;
  10. // ----- Extract the tar format from the extension
  1. * @param string $p_remove_path
  2. * @param string $p_mode
  3. *
  4. * @return int
  5. */
  6. function PclTarExtractList($p_tarname, $p_filelist, $p_path = './', $p_remove_path = '', $p_mode = '')

    PclTarExtractList() 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. TrFctStart(__FILE__, __LINE__, 'PclTarExtractList', "tar=$p_tarname, list, path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
  9. $v_result = 1;
  10. // ----- Extract the tar format from the extension
  1. * @param string $p_remove_path
  2. * @param string $p_mode
  3. *
  4. * @return int
  5. */
  6. function PclTarExtractIndex($p_tarname, $p_index, $p_path = './', $p_remove_path = '', $p_mode = '')

    PclTarExtractIndex() 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. TrFctStart(__FILE__, __LINE__, 'PclTarExtractIndex', "tar=$p_tarname, index='$p_index', path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
  9. $v_result = 1;
  10. // ----- Extract the tar format from the extension
  1. * @param $p_filelist
  2. * @param string $p_mode
  3. *
  4. * @return int
  5. */
  6. function PclTarDelete($p_tarname, $p_filelist, $p_mode = '')

    PclTarDelete() 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. TrFctStart(__FILE__, __LINE__, 'PclTarDelete', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
  9. $v_result = 1;
  10. // ----- Extract the tar format from the extension
  1. * @param string $p_add_dir
  2. * @param string $p_remove_dir
  3. *
  4. * @return int
  5. */
  6. function PclTarUpdate($p_tarname, $p_filelist, $p_mode = '', $p_add_dir = '', $p_remove_dir = '')

    PclTarUpdate() 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. TrFctStart(__FILE__, __LINE__, 'PclTarUpdate', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
  9. $v_result = 1;
  10. // ----- Extract the tar format from the extension
  1. * @param string $p_mode
  2. * @param string $p_mode_add
  3. *
  4. * @return int
  5. */
  6. function PclTarMerge($p_tarname, $p_tarname_add, $p_mode = '', $p_mode_add = '')

    PclTarMerge() 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. TrFctStart(__FILE__, __LINE__, 'PclTarMerge', "tar='$p_tarname', tar_add='$p_tarname_add', mode='$p_mode', mode_add='$p_mode_add'");
  9. $v_result = 1;
  10. // ----- Check the parameters
  1. * @param string $p_add_dir
  2. * @param string $p_remove_dir
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleCreate($p_tarname, $p_list, $p_mode, $p_add_dir = '', $p_remove_dir = '')

    PclTarHandleCreate() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleCreate', "tar=$p_tarname, list, mode=$p_mode, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
  9. $v_result = 1;
  10. $v_list_detail = array();
  1. * @param $p_add_dir
  2. * @param $p_remove_dir
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleAppend($p_tarname, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)

    PclTarHandleAppend() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleAppend', "tar=$p_tarname, list, mode=$p_mode");
  9. $v_result = 1;
  10. // ----- Check the parameters
  1. * @param $p_add_dir
  2. * @param $p_remove_dir
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleAddList($p_tar, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)

    PclTarHandleAddList() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleAddList', "tar='$p_tar', list, mode='$p_mode', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
  9. $v_result = 1;
  10. $v_header = array();
  1. * @param $p_add_dir
  2. * @param $p_remove_dir
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleAddFile($p_tar, $p_filename, $p_mode, &$p_header, $p_add_dir, $p_remove_dir)

    PclTarHandleAddFile() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleAddFile', "tar='$p_tar', filename='$p_filename', p_mode='$p_mode', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
  9. $v_result = 1;
  10. // ----- Check the parameters
  1. * @param $p_header
  2. * @param $p_stored_filename
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleHeader($p_tar, $p_filename, $p_mode, &$p_header, $p_stored_filename)

    PclTarHandleHeader() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleHeader', "tar=$p_tar, file='$p_filename', mode='$p_mode', stored_filename='$p_stored_filename'");
  9. $v_result = 1;
  10. // ----- Check the parameters
  1. * @param $p_tar
  2. * @param $p_mode
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleFooter($p_tar, $p_mode)

    PclTarHandleFooter() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleFooter', "tar='$p_tar', p_mode=$p_mode");
  9. $v_result = 1;
  10. // ----- Write the last 0 filled block for end of archive
  1. * @param $p_tar_mode
  2. * @param $p_remove_path
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleExtract($p_tarname, $p_file_list, &$p_list_detail, $p_mode, $p_path, $p_tar_mode, $p_remove_path)

    PclTarHandleExtract() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtract', "archive='$p_tarname', list, mode=$p_mode, path=$p_path, tar_mode=$p_tar_mode, remove_path='$p_remove_path'");
  9. $v_result = 1;
  10. $v_nb = 0;
  11. $v_extract_all = true;
  1. * @param $p_remove_path
  2. * @param $p_tar_mode
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleExtractByIndexList($p_tarname, $p_index_string, &$p_list_detail, $p_path, $p_remove_path, $p_tar_mode)

    PclTarHandleExtractByIndexList() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractByIndexList', "archive='$p_tarname', index_string='$p_index_string', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
  9. $v_result = 1;
  10. $v_nb = 0;
  1. * @param $p_remove_path
  2. * @param $p_tar_mode
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleExtractByIndex($p_tar, &$p_index_current, $p_index_start, $p_index_stop, &$p_list_detail, $p_path, $p_remove_path, $p_tar_mode)

    PclTarHandleExtractByIndex() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractByIndex', "archive_descr='$p_tar', index_current=$p_index_current, index_start='$p_index_start', index_stop='$p_index_stop', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
  9. $v_result = 1;
  10. $v_nb = 0;
  1. * @param $p_remove_path
  2. * @param $p_tar_mode
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleExtractFile($p_tar, &$v_header, $p_path, $p_remove_path, $p_tar_mode)

    PclTarHandleExtractFile() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractFile', "archive_descr='$p_tar', path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
  9. $v_result = 1;
  10. // TBC : I should replace all $v_tar by $p_tar in this function ....
  1. * @param $p_list_detail
  2. * @param $p_tar_mode
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleDelete($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode)

    PclTarHandleDelete() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleDelete', "archive='$p_tarname', list, tar_mode=$p_tar_mode");
  9. $v_result = 1;
  10. $v_nb = 0;
  1. * @param $p_add_dir
  2. * @param $p_remove_dir
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleUpdate($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode, $p_add_dir, $p_remove_dir)

    PclTarHandleUpdate() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleUpdate', "archive='$p_tarname', list, tar_mode=$p_tar_mode");
  9. $v_result = 1;
  10. $v_nb = 0;
  11. $v_found_list = array();
  1. * @param $v_binary_data
  2. * @param $v_header
  3. *
  4. * @return int
  5. */
  6. function PclTarHandleReadHeader($v_binary_data, &$v_header)

    PclTarHandleReadHeader() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleReadHeader', '');
  9. $v_result = 1;
  10. // ----- Read the 512 bytes header
  1. /**
  2. * @param $p_dir
  3. *
  4. * @return int
  5. */
  6. function PclTarHandlerDirCheck($p_dir)

    PclTarHandlerDirCheck() 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. $v_result = 1;
  9. TrFctStart(__FILE__, __LINE__, 'PclTarHandlerDirCheck', "$p_dir");
  1. /**
  2. * @param $p_tarname
  3. *
  4. * @return string
  5. */
  6. function PclTarHandleExtension($p_tarname)

    PclTarHandleExtension() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtension', "tar=$p_tarname");
  9. // ----- Look for file extension
  10. if ((substr($p_tarname, -7) === '.tar.gz') || (substr($p_tarname, -4) === '.tgz')) {
  1. /**
  2. * @param $p_dir
  3. *
  4. * @return string
  5. */
  6. function PclTarHandlePathReduction($p_dir)

    PclTarHandlePathReduction() 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. TrFctStart(__FILE__, __LINE__, 'PclTarHandlePathReduction', "dir='$p_dir'");
  9. $v_result = '';
  10. // ----- Look for not empty path
  1. /**
  2. * @param int $p_level
  3. * @param string $p_mode
  4. * @param string $p_filename
  5. */
  6. function TrOn($p_level = 1, $p_mode = 'memory', $p_filename = 'trace.txt')

    TrOn() 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 $g_pcl_trace_level;
  9. global $g_pcl_trace_mode;
  10. global $g_pcl_trace_filename;
  11. global $g_pcl_trace_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
  1. // The trace level (0 for disable).
  2. // --------------------------------------------------------------------------------
  3. /**
  4. * @return int
  5. */
  6. function IsTrOn()

    IsTrOn() 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 $g_pcl_trace_level;
  9. return $g_pcl_trace_level;
  10. }
  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. // --------------------------------------------------------------------------------
  1. // --------------------------------------------------------------------------------
  2. // Function : TrOff()
  3. // Description :
  4. // Parameters :
  5. // --------------------------------------------------------------------------------
  6. function TrOff()

    TrOff() 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 $g_pcl_trace_level;
  9. global $g_pcl_trace_mode;
  10. global $g_pcl_trace_filename;
  11. global $g_pcl_trace_name;
  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;
  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
  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';
  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);
  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);
  1. * @param $p_line
  2. * @param $p_name
  3. * @param string $p_param
  4. * @param string $p_message
  5. */
  6. function TrFctStart($p_file, $p_line, $p_name, $p_param = '', $p_message = '')

    TrFctStart() 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 $g_pcl_trace_level;
  9. global $g_pcl_trace_mode;
  10. global $g_pcl_trace_filename;
  11. global $g_pcl_trace_name;
  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;
  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;
  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
  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) {
  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;
  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. }
  1. * @param $p_file
  2. * @param $p_line
  3. * @param int $p_return
  4. * @param string $p_message
  5. */
  6. function TrFctEnd($p_file, $p_line, $p_return = 1, $p_message = '')

    TrFctEnd() 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 $g_pcl_trace_level;
  9. global $g_pcl_trace_mode;
  10. global $g_pcl_trace_filename;
  11. global $g_pcl_trace_name;
  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;
  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;
  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
  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) {
  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;
  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. }
  1. * @param $p_file
  2. * @param $p_line
  3. * @param $p_level
  4. * @param string $p_message
  5. */
  6. function TrFctMessage($p_file, $p_line, $p_level, $p_message = '')

    TrFctMessage() 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 $g_pcl_trace_level;
  9. global $g_pcl_trace_mode;
  10. global $g_pcl_trace_filename;
  11. global $g_pcl_trace_name;
  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;
  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;
  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
  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) {
  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;
  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. }
  1. * @param $p_file
  2. * @param $p_line
  3. * @param $p_level
  4. * @param string $p_message
  5. */
  6. function TrMessage($p_file, $p_line, $p_level, $p_message = '')

    TrMessage() 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 $g_pcl_trace_level;
  9. global $g_pcl_trace_mode;
  10. global $g_pcl_trace_filename;
  11. global $g_pcl_trace_name;
  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;
  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;
  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