ImpressCMS/impresscms

View on GitHub

Showing 540 of 47,256 total issues

Method separateStringsInSQL has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function separateStringsInSQL($sql) {
        $sql = trim($sql);
        $sql_len = strlen($sql);
        $char = '';
        $string_start = '';

    Method b_system_comments_show has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function b_system_comments_show($options) {
        $block = array();
        include_once ICMS_ROOT_PATH . '/include/comment_constants.php';
        $comment_handler = icms::handler('icms_data_comment');
        $criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('com_status', XOOPS_COMMENT_ACTIVE));
    Severity: Minor
    Found in htdocs/modules/system/blocks/system_blocks.php - About 2 hrs to fix

      Function Str has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function Str(key, holder, stack) {
              var value = holder[key];
              if (Type(value) === OBJECT_TYPE && typeof value.toJSON === 'function') {
                  value = value.toJSON(key);
              }
      Severity: Minor
      Found in htdocs/install/prototype.js - About 1 hr to fix

        Method apply_config has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function apply_config()
            {
                $xoopsDB = $GLOBALS['xoopsDB'];
        
                $result = true;
        Severity: Minor
        Found in upgrade/cnt-2.2.x-to-2.0.x/index.php - About 1 hr to fix

          Method imanager_clone has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function imanager_clone() {
              global $target, $type;
          
              if (!icms::$security->check()) {
                  redirect_header('browser.php?op=list&target=' . $target . '&type=' . $type, 3, implode('<br />', icms::$security->getErrors()));
          Severity: Minor
          Found in htdocs/modules/system/admin/images/browser.php - About 1 hr to fix

            Method imanager_clone has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function imanager_clone() {
                if (!icms::$security->check()) {
                    redirect_header('admin.php?fct=images', 3, implode('<br />', icms::$security->getErrors()));
                }
            
            
            Severity: Minor
            Found in htdocs/modules/system/admin/images/main.php - About 1 hr to fix

              Function request has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  request: function(url) {
                      this.url = url;
                      this.method = this.options.method;
                      var params = Object.isString(this.options.parameters) ?
                          this.options.parameters :
              Severity: Minor
              Found in htdocs/install/prototype.js - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function setRequestHeaders has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  setRequestHeaders: function() {
                      var headers = {
                          'X-Requested-With': 'XMLHttpRequest',
                          'X-Prototype-Version': Prototype.Version,
                          'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
              Severity: Minor
              Found in htdocs/install/prototype.js - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function eliminate_dotdot has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  function eliminate_dotdot() {
                      if ($this->_done_dotdot)
                          return true;
                      else
                          $this->_done_dotdot = true;

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function purge has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  function purge($redirect_to_top = false) {
                      // clear all session values
                      if (isset($_SESSION)) foreach ($_SESSION as $key => $val) {
                          $_SESSION[$key] = '';
                          if (isset($GLOBALS[$key])) $GLOBALS[$key] = '';

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function execute has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  function execute($type) {
                      $ret = 0;
              
                      $filters = array ();
              
              

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function b_system_online_show has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function b_system_online_show() {
                  $online_handler = icms::handler('icms_core_Online');
                  mt_srand((double) microtime() * 1000000);
                  // set gc probabillity to 10% for now..
                  if (mt_rand(1, 100) < 11) {
              Severity: Minor
              Found in htdocs/modules/system/blocks/system_blocks.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  select = Sizzle.select = function( selector, context, results, seed ) {
                      var i, tokens, token, type, find,
                          compiled = typeof selector === "function" && selector,
                          match = !seed && tokenize( (selector = compiled.selector || selector) );
              
              
              Severity: Minor
              Found in htdocs/install/prototype.js - About 1 hr to fix

                Function superfish has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    $.fn.superfish = function(op){
                
                        var sf = $.fn.superfish,
                            c = sf.c,
                            $arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
                Severity: Minor
                Found in htdocs/themes/reflex/js/superfish.js - About 1 hr to fix

                  Method apply_auth_db has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function apply_auth_db() {
                          $db = $GLOBALS['xoopsDB'];
                  
                          $cat = getDbValue( $db, 'configcategory', 'confcat_id', "`confcat_name` ='_MD_AM_AUTHENTICATION'" );
                          if ($cat !== false && $cat != XOOPS_CONF_AUTH) {
                  Severity: Minor
                  Found in upgrade/upd-2.0.13-to-2.0.14/index.php - About 1 hr to fix

                    Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function tokenize( selector, parseOnly ) {
                            var matched, match, tokens, type,
                                soFar, groups, preFilters,
                                cached = tokenCache[ selector + " " ];
                    
                    
                    Severity: Minor
                    Found in htdocs/install/prototype.js - About 1 hr to fix

                      Method doRewrite has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function doRewrite() {
                              clearstatcache();
                              if (! $file = fopen($this->path,"r")) {
                                  $this->error = true;
                                  return false;
                      Severity: Minor
                      Found in htdocs/install/class/mainfilemanager.php - About 1 hr to fix

                        Method ext_date has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function ext_date($time)
                        {
                            icms_loadLanguageFile('core', 'calendar');
                            /*        $string = str_replace(
                                array(_CAL_AM, _CAL_PM, _CAL_AM_LONG, _CAL_PM_LONG, _CAL_SAT, _CAL_SUN, _CAL_MON, _CAL_TUE, _CAL_WED, _CAL_THU, _CAL_FRI, _CAL_SATURDAY, _CAL_SUNDAY, _CAL_MONDAY, _CAL_TUESDAY, _CAL_WEDNESDAY, _CAL_THURSDAY, _CAL_FRIDAY),
                        Severity: Minor
                        Found in htdocs/include/functions.php - About 1 hr to fix

                          Method b_system_bookmarks_show has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function b_system_bookmarks_show() {
                              global $icmsConfig;
                              $block = array();
                              icms_loadLanguageFile('core', 'notification');
                              // User must be logged in
                          Severity: Minor
                          Found in htdocs/modules/system/blocks/system_blocks.php - About 1 hr to fix

                            Method b_system_online_show has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function b_system_online_show() {
                                $online_handler = icms::handler('icms_core_Online');
                                mt_srand((double) microtime() * 1000000);
                                // set gc probabillity to 10% for now..
                                if (mt_rand(1, 100) < 11) {
                            Severity: Minor
                            Found in htdocs/modules/system/blocks/system_blocks.php - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language