ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

Consider simplifying this complex logical expression.
Open

                if ( matcher[ expando ] ) {
                    j = ++i;
                    for ( ; j < len; j++ ) {
                        if ( Expr.relative[ tokens[j].type ] ) {
                            break;
Severity: Major
Found in htdocs/install/prototype.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
                    (classNames && classNames.all(function(name) {
                        return !name.toString().blank() && cn.include(' ' + name + ' ');
                    }))))
                    elements.push(Element.extend(child));
    Severity: Major
    Found in htdocs/install/prototype.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

          if(defined('SID') && SID && (!isset($_COOKIE[session_name()]) || ($icmsConfig['use_mysession'] && $icmsConfig['session_name'] != '' && !isset($_COOKIE[$icmsConfig['session_name']]))))
          {
              if(!strstr($url, '?')) {$url .= '?' . SID;}
              else {$url .= '&amp;'.SID;}
          }
      Severity: Major
      Found in htdocs/include/functions.php - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

        if (!empty($_POST)) {
            if (isset($_POST['com_dopost'])) {
                $op = 'post';
            } elseif (isset($_POST['com_dopreview'])) {
                $op = 'preview';
        Severity: Major
        Found in htdocs/include/comment_post.php - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

              if ($edituser->getVar('uname') != $uname && $member_handler->getUserCount(new icms_db_criteria_Item('uname', $uname)) > 0 || $edituser->getVar('login_name') != $login_name && $member_handler->getUserCount(new icms_db_criteria_Item('login_name', $login_name)) > 0) {
                  icms_cp_header();
                  echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/users/images/users_big.png)">' . _MD_AM_USER . '</div><br />';
                  echo _AM_UNAME . ' ' . $uname . ' ' . _AM_ALREADY_EXISTS;
                  icms_cp_footer();
          Severity: Major
          Found in htdocs/modules/system/admin/users/users.php - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                                if ($password == $username || $password == icms_core_DataFilter::utf8_strrev($username, TRUE)
                                    || strripos($password, $username) === TRUE || $password == $login_name
                                    || $password == icms_core_Datafilter::utf8_strrev($login_name, TRUE)
                                    || strripos($password, $login_name) === TRUE
                                ) {
            Severity: Major
            Found in htdocs/modules/system/admin/users/main.php - About 40 mins to fix

              Each class must be in a file by itself
              Open

              class ProtectorFilterHandler {

              Each class must be in a file by itself
              Open

              class SystemBlocksadminHandler extends icms_view_block_Handler {

              Each class must be in a file by itself
              Open

              class SystemBlockspadminHandler extends icms_view_block_position_Handler {

              Each class must be in a file by itself
              Open

              class SystemCustomtagHandler extends icms_ipf_Handler {

              Each class must be in a file by itself
              Open

              class SystemAdsenseHandler extends icms_ipf_Handler {

              Each class must be in a file by itself
              Open

              class SystemAutotasksHandler extends icms_ipf_Handler {

              Each class must be in a file by itself
              Open

              class SystemPagesHandler extends icms_data_page_Handler {

              Each class must be in a file by itself
              Open

              class SystemMimetypeHandler extends icms_ipf_Handler {

              Each class must be in a file by itself
              Open

              class SystemUserrankHandler extends icms_ipf_Handler {

              Each class must be in a file by itself
              Open

              class SystemRatingHandler extends icms_ipf_Handler {

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

                  var IS_DONTENUM_BUGGY = (function(){
                      for (var p in { toString: 1 }) {
                          if (p === 'toString') return false;
                      }
                      return true;
              Severity: Minor
              Found in htdocs/install/prototype.js and 1 other location - About 40 mins to fix
              htdocs/install/prototype.js on lines 66..71

              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 48.

              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

                  var IS_DONTENUM_BUGGY = (function(){
                      for (var p in { toString: 1 }) {
                          if (p === 'toString') return false;
                      }
                      return true;
              Severity: Minor
              Found in htdocs/install/prototype.js and 1 other location - About 40 mins to fix
              htdocs/install/prototype.js on lines 170..175

              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 48.

              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

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

                      foreach ($_POST as $k => $v) {
                          if ($k == 'XOOPS_TOKEN_REQUEST') {
                              // regenerate token value
                              $hiddenform .= icms::$security->getTokenHTML() . "\n";
                          } else {
              Severity: Minor
              Found in htdocs/include/findusers.php and 1 other location - About 40 mins to fix
              htdocs/include/findusers.php on lines 436..443

              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 93.

              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

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

                      foreach ($_POST as $k => $v) {
                          if ($k == 'XOOPS_TOKEN_REQUEST') {
                              // regenerate token value
                              $hiddenform .= icms::$security->getTokenHTML() . "\n";
                          } else {
              Severity: Minor
              Found in htdocs/include/findusers.php and 1 other location - About 40 mins to fix
              htdocs/include/findusers.php on lines 528..535

              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 93.

              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

              Severity
              Category
              Status
              Source
              Language