e107inc/e107

View on GitHub

Showing 571 of 6,973 total issues

Consider simplifying this complex logical expression.
Open

        if(($ForcedCheck != false ) || ($syscache == false && $this->UserCacheActive) || ($syscache == true && $this->SystemCacheActive) && !e107::getParser()->checkHighlighting())
        {
            $cache_file = (isset($this) && $this instanceof ecache ? $this->cache_fname($CacheTag, $syscache) : self::cache_fname($CacheTag, $syscache));

            if(file_exists($cache_file))
Severity: Major
Found in e107_handlers/cache_handler.php - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                    if($this->VerifyResultLines($connection,"220")>0
                    && $this->PutLine($connection,"HELO $localhost")
                    && $this->VerifyResultLines($connection,"250")>0
                    && $this->PutLine($connection,"MAIL FROM: <$localuser@$localhost>")
                    && $this->VerifyResultLines($connection,"250")>0
    Severity: Major
    Found in e107_handlers/mail_validation_class.php - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                  if(($file != '.') && ($file != '..') && !in_array($file, $this->dirFilter) && !in_array($file, $omit) && is_dir($path . '/' . $file) && ($fmask == '' || preg_match("#" . $fmask . "#", $file)))
                  {
                      $ret[] = $file;
                  }
      Severity: Major
      Found in e107_handlers/file_class.php - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                                    if (!array_key_exists(strtolower($fext),$this->allowed_types) )
                                    {
                                        if ($file == 'index.html' || $file == "null.txt")
                                        {
                                            if (filesize($dir.'/'.$file))
        Severity: Major
        Found in e107_admin/admin.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if ($imageWidth > $allowedWidth)
                              {
                                  $sBadImage = IMALAN_40." ($imageWidth)";
                              }
          Severity: Major
          Found in e107_admin/image.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        if(!empty($sublinkArray))
                                        {
                                            $this->eLinkList['sub_'.$row['link_id']] = $sublinkArray;
                                        }
            Severity: Major
            Found in e107_handlers/sitelinks_class.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if (e107::callMethod($cls, 'bounce', $bounceInfo) === false)
                                              {
                                                  e107::getLog()->add($plug . ' bounce process failed', $bounceInfo, E_LOG_FATAL, 'BOUNCE', LOG_TO_ROLLING);
                                              }
              Severity: Major
              Found in e107_handlers/mail_manager_class.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                    if (preg_match("#\<object\s*?mime\=[\"\']image\/.*?\>(.*?)\<\/object\>#si", $match[1][$a], $fmatch))
                                                    {
                                                        $e_file = $fmatch[1];
                //                              echo "xep-0038 file: ".$e_file."<br />";
                                                        // Pull out all match strings - need to pick out any language definitions for posterity
                Severity: Major
                Found in e107_admin/emoticon.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if (UH_DEBUG)
                                          {
                                              e107::getLog()->addEvent(10, __FILE__."|".__FUNCTION__."@".__LINE__, "DEBUG", "Upload Handler test", "Move {$tempfilename} to {$uploadfile} ", FALSE, LOG_TO_ROLLING);
                                          }
                  Severity: Major
                  Found in e107_handlers/upload_handler.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if($sql->gen("DESCRIBE " . MPREFIX . "{$table_list}"))
                                        {
                                            while($row3 = $sql->fetch())
                                            {
                                                $field_name = $row3['Field'];
                    Severity: Major
                    Found in e107_admin/users_extended.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if($sql->gen("DESCRIBE " . MPREFIX . $table_list))
                                          {
                                              while($row3 = $sql->fetch())
                                              {
                                                  $field_name = $row3['Field'];
                      Severity: Major
                      Found in e107_admin/users_extended.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ($nid != $udata['user_baseclasslist'])
                                                {
                                                    if (US_DEBUG)
                                                    {
                                                        e107::getLog()->addEvent(10, debug_backtrace(), "DEBUG", "Usersettings test", "Write back classes; old list: {$udata['user_class']}; new list: ".$nid, false, LOG_TO_ROLLING);
                        Severity: Major
                        Found in usersettings.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if($sql->gen("DESCRIBE " . MPREFIX . "{$table_list}"))
                                              {
                                                  while($row3 = $sql->fetch())
                                                  {
                                                      $field_name = $row3['Field'];
                          Severity: Major
                          Found in e107_admin/users_extended.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if ($imageHeight > $allowedHeight)
                                                {
                                                    if (strlen($sBadImage))
                                                    {
                                                        $sBadImage .= ', ';
                            Severity: Major
                            Found in e107_admin/image.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                  if ($key === array_key_last($authMethod)) { 
                                                                      return $this->invalidLogin($username,LOGIN_ABORT);
                                                                  }
                              Severity: Major
                              Found in e107_handlers/login.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                    while ($i > 0) { $unmatch_stack[] = array_shift($code_stack); $i--; }    // Get required code to top of stack
                                Severity: Major
                                Found in e107_handlers/bbcode_handler.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                      if ($stacktext != '')
                                                                      { // Stack the text we've accumulated so far
                                                                          array_unshift($code_stack,array('type' => 'text','code' => $stacktext));
                                                                          $stacktext = '';
                                                                      }
                                  Severity: Major
                                  Found in e107_handlers/bbcode_handler.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if($rule->allowVars)
                                                                {
                                                                    foreach ($rule->allowVars as $key) 
                                                                    {
                                                                        if(isset($_GET[$key]) && !$request->isRequestParam($key))
                                    Severity: Major
                                    Found in e107_handlers/application.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                          if (($code_stack[$i]['type'] == 'bbcode') && ($code_stack[$i]['code'] == $bbword) && ($code_stack[0]['numbers'] == $matches[3]))
                                                                          {
                                                                              $found = TRUE;
                                                                              break;
                                                                          }
                                      Severity: Major
                                      Found in e107_handlers/bbcode_handler.php - About 45 mins to fix

                                        Method form_textarea has 9 arguments (exceeds 7 allowed). Consider refactoring.
                                        Open

                                            public function form_textarea($form_name, $form_columns, $form_rows, $form_value, $form_js = '', $form_style = '', $form_wrap = '', $form_readonly = '', $form_tooltip = '') {
                                        Severity: Major
                                        Found in e107_handlers/form_handler.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language