ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

Avoid deeply nested control flow statements.
Open

                            if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) {
                                $results[$i]['link'] = "modules/" . $moddir . "/" . $results[$i]['link'];
                            }
Severity: Major
Found in htdocs/search.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if (!copy($src, $dest)) {
                            $error[] = sprintf(_FAILSAVEIMG, $image_id[$i]);
                        }
    Severity: Major
    Found in htdocs/modules/system/admin/images/main.php - About 45 mins to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      this.show = function(id) { var el = new Element(id); document.getElementById(id).className = (el.level == 1 ? "button-active" : "item-active"); if (el.level > 1 && this.arrow2) { document.getElementById(id + "-arrow").src = this.arrow2;}
      Severity: Minor
      Found in htdocs/include/icms_rtl.js and 1 other location - About 45 mins to fix
      htdocs/include/icms_rtl.js on lines 60..60

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 50.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      this.hide = function(id) { var el = new Element(id); document.getElementById(id).className = (el.level == 1 ? "button" : "item"); if (el.level > 1 && this.arrow2) { document.getElementById(id + "-arrow").src = this.arrow1;}
      Severity: Minor
      Found in htdocs/include/icms_rtl.js and 1 other location - About 45 mins to fix
      htdocs/include/icms_rtl.js on lines 64..64

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 50.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      Form.Observer = Class.create(Abstract.TimedObserver, {
          getValue: function() {
              return Form.serialize(this.element);
          }
      });
      Severity: Minor
      Found in htdocs/install/prototype.js and 1 other location - About 40 mins to fix
      htdocs/install/prototype.js on lines 6679..6683

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 49.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      Form.EventObserver = Class.create(Abstract.EventObserver, {
          getValue: function() {
              return Form.serialize(this.element);
          }
      });
      Severity: Minor
      Found in htdocs/install/prototype.js and 1 other location - About 40 mins to fix
      htdocs/install/prototype.js on lines 6626..6630

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 49.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  } elseif (function_exists('icms_module_update_'.$ModName)) {
                      $func = 'icms_module_update_'.$ModName;
                      if (!$func($module, $prev_version, $prev_dbversion)) {
                          $msgs[] = sprintf(_MD_AM_FAIL_EXEC, '<strong>' . $func . '</strong>');
                      } else {
      Severity: Minor
      Found in htdocs/install/modulesadmin.php and 1 other location - About 40 mins to fix
      htdocs/install/modulesadmin.php on lines 881..895

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

          if (!empty($user_reg_more) && is_numeric($user_reg_more)) {
              $f_user_reg_more = (int) trim($user_reg_more);
              $time = time() - (60 * 60 * 24 * $f_user_reg_more);
              if ($time > 0) {
                  $criteria->add(new icms_db_criteria_Item('user_regdate', $time, '<'));
      Severity: Major
      Found in htdocs/modules/system/admin/findusers/main.php and 2 other locations - About 40 mins to fix
      htdocs/modules/system/admin/findusers/main.php on lines 374..380
      htdocs/modules/system/admin/findusers/main.php on lines 381..387

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  if (gethostbyname($host) != $host) {
                      $this->protector->message .= "DENY by $rbl_name\n";
                      $uid = is_object(icms::$user) ? icms::$user->getVar('uid') : 0;
                      $this->protector->output_log('RBL SPAM', $uid, false, 128);
                      die(_MD_PROTECTOR_DENYBYRBL);
      htdocs/install/modules/protector/trust_path/modules/protector/filters_byconfig/postcommon_post_deny_by_rbl.php on lines 22..27

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

              if (!$table->fieldExists('enc_type')) {
                  $sql = "ALTER TABLE `" . $GLOBALS['xoopsDB']->prefix('users') . "` ADD enc_type tinyint(2) unsigned NOT NULL default '0'";
                  if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
                      icms_debug('An error occurred while executing "' . $sql . '" - ' . $GLOBALS['xoopsDB']->error());
                      return false;
      Severity: Major
      Found in upgrade/upd-icms-1.0-to-1.1/index.php and 4 other locations - About 40 mins to fix
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 268..274
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 275..281
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 282..288
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 290..296

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

              if (!$table->fieldExists('pass_expired')) {
                  $sql = "ALTER TABLE `" . $GLOBALS['xoopsDB']->prefix('users') . "` ADD pass_expired tinyint(1) NOT NULL default '0'";
                  if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
                      icms_debug('An error occurred while executing "' . $sql . '" - ' . $GLOBALS['xoopsDB']->error());
                      return false;
      Severity: Major
      Found in upgrade/upd-icms-1.0-to-1.1/index.php and 4 other locations - About 40 mins to fix
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 268..274
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 275..281
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 282..288
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 297..303

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

              if (!$table->fieldExists('openid')) {
                  $sql = "ALTER TABLE `" . $GLOBALS['xoopsDB']->prefix('users') . "` ADD openid varchar(255) NOT NULL default ''";
                  if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
                      icms_debug('An error occurred while executing "' . $sql . '" - ' . $GLOBALS['xoopsDB']->error());
                      return false;
      Severity: Major
      Found in upgrade/upd-icms-1.0-to-1.1/index.php and 4 other locations - About 40 mins to fix
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 275..281
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 282..288
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 290..296
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 297..303

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

          if (!empty($user_lastlog_less) && is_numeric($user_lastlog_less)) {
              $f_user_lastlog_less = (int) trim($user_lastlog_less);
              $time = time() - (60 * 60 * 24 * $f_user_lastlog_less);
              if ($time > 0) {
                  $criteria->add(new icms_db_criteria_Item('last_login', $time, '>'));
      Severity: Major
      Found in htdocs/modules/system/admin/findusers/main.php and 2 other locations - About 40 mins to fix
      htdocs/modules/system/admin/findusers/main.php on lines 374..380
      htdocs/modules/system/admin/findusers/main.php on lines 388..394

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  if (gethostbyname($host) != $host) {
                      $this->protector->message .= "DENY by $rbl\n";
                      $uid = is_object(icms::$user) ? icms::$user->getVar('uid') : 0;
                      $this->protector->output_log('RBL SPAM', $uid, false, 128);
                      die(_MD_PROTECTOR_DENYBYRBL);
      htdocs/install/modules/protector/trust_path/modules/protector/filters_byconfig/postcommon_post_deny_by_httpbl.php on lines 20..25

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

              if (!$table->fieldExists('salt')) {
                  $sql = "ALTER TABLE `" . $GLOBALS['xoopsDB']->prefix('users') . "` ADD salt varchar(255) NOT NULL default ''";
                  if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
                      icms_debug('An error occurred while executing "' . $sql . '" - ' . $GLOBALS['xoopsDB']->error());
                      return false;
      Severity: Major
      Found in upgrade/upd-icms-1.0-to-1.1/index.php and 4 other locations - About 40 mins to fix
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 268..274
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 282..288
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 290..296
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 297..303

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

          if (!empty($user_lastlog_more) && is_numeric($user_lastlog_more)) {
              $f_user_lastlog_more = (int) trim($user_lastlog_more);
              $time = time() - (60 * 60 * 24 * $f_user_lastlog_more);
              if ($time > 0) {
                  $criteria->add(new icms_db_criteria_Item('last_login', $time, '<'));
      Severity: Major
      Found in htdocs/modules/system/admin/findusers/main.php and 2 other locations - About 40 mins to fix
      htdocs/modules/system/admin/findusers/main.php on lines 381..387
      htdocs/modules/system/admin/findusers/main.php on lines 388..394

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

              if (!$table->fieldExists('user_viewoid')) {
                  $sql = "ALTER TABLE `" . $GLOBALS['xoopsDB']->prefix('users') . "` ADD user_viewoid tinyint(1) unsigned NOT NULL default '0'";
                  if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
                      icms_debug('An error occurred while executing "' . $sql . '" - ' . $GLOBALS['xoopsDB']->error());
                      return false;
      Severity: Major
      Found in upgrade/upd-icms-1.0-to-1.1/index.php and 4 other locations - About 40 mins to fix
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 268..274
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 275..281
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 290..296
      upgrade/upd-icms-1.0-to-1.1/index.php on lines 297..303

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  if (function_exists('xoops_module_update_'.$ModName)) {
                      $func = 'xoops_module_update_'.$ModName;
                      if (!$func($module, $prev_version, $prev_dbversion)) {
                          $msgs[] = sprintf(_MD_AM_FAIL_EXEC, '<strong>' . $func . '</strong>');
                      } else {
      Severity: Minor
      Found in htdocs/install/modulesadmin.php and 1 other location - About 40 mins to fix
      htdocs/install/modulesadmin.php on lines 888..895

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 94.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Consider simplifying this complex logical expression.
      Open

              if (/\d/.test(value) && element && element.runtimeStyle && !(isPercentage && isViewport)) {
                  var style = element.style.left, rStyle = element.runtimeStyle.left;
                  element.runtimeStyle.left = element.currentStyle.left;
                  element.style.left = value || 0;
                  value = element.style.pixelLeft;
      Severity: Major
      Found in htdocs/install/prototype.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                if ( support.matchesSelector && documentIsHTML &&
                    ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
                    ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
        
                    try {
        Severity: Major
        Found in htdocs/install/prototype.js - About 40 mins to fix
          Severity
          Category
          Status
          Source
          Language