e107inc/e107

View on GitHub

Showing 571 of 6,975 total issues

Avoid deeply nested control flow statements.
Open

                                if($tmp[0] == $mirror_id)
                                {
                                    $gaddress = trim($address);
                                    $requests++;
                                }
Severity: Major
Found in e107_plugins/download/request.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                if($tmp[0] == $mirror_id)
                                {
                                    $gaddress = trim($address);
                                    $requests++;
                                }
    Severity: Major
    Found in e107_plugins/download/request.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                      if(!class_exists($val. '_status'))
                                      {
                                          trigger_error('<strong>' .$val . '</strong> is using a deprecated e_status method method. See plugin: _blank/e_dashboard.php ', E_USER_DEPRECATED);
      
                                      //    $mes->addDebug("<strong>".$val ."</strong> using deprecated e_status method. See the chatbox plugin folder for a working example of the new one. ");
      Severity: Major
      Found in e107_core/shortcodes/batch/admin_shortcodes.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                while($rowplug = $sql->fetch())
                                {
                                    extract($rowplug);
                                    if(varset($rowplug[1]))
                                    {
        Severity: Major
        Found in e107_core/shortcodes/batch/admin_shortcodes.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                          if (check_class($news['news_class'])) 
                          {
                              list($xmonth, $xday) = explode(" ", date("n j", $news['news_datestamp']));
                              if (!$day_links[$xmonth][$xday]) 
                              {
          Severity: Major
          Found in e107_plugins/blogcalendar_menu/archive.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                         if (!$foundSome)
                                         {
                                             // $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
                                             
                                            $text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
            Severity: Major
            Found in e107_plugins/download/includes/admin.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                           if ($filesize <> $row['download_filesize']) {
                                              if (!$foundSome) {
                                                  // $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
                                                 $text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
                                                         <table class="table adminlist">';
              Severity: Major
              Found in e107_plugins/download/includes/admin.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                if(!$r) $r = 'n/a';
                Severity: Major
                Found in top.php - About 45 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if($style['linkdisplay'] != self::LINK_DISPLAY_OTHER)
                          {
                  
                              foreach($this->eLinkList['head_menu'] as $key => $link)
                              {
                  Severity: Major
                  Found in e107_handlers/sitelinks_class.php - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                                            if ($upload['name'] && ($upload['index'] == 'avatar') && $pref['avatar_upload'])
                                            {
                                                // avatar uploaded - give it a reference which identifies it as server-stored
                                                // Vetting routines will do resizing and so on
                                                $_POST['image'] = '-upload-'.$upload['name'];
                    Severity: Major
                    Found in usersettings.php - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                              if($table && !$where && is_bool($fields))
                              {
                                  // table is the query, fields used for multi
                                  if($fields) $mode = 'multi';
                                  else $mode = 'single';
                      Severity: Major
                      Found in e107_handlers/mysql_class.php - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if(preg_match("#\"(.*?)\".*?\"(.*)\"#",$line,$match) ||
                                    preg_match("#\'(.*?)\'.*?\"(.*)\"#",$line,$match) ||
                                    preg_match("#\"(.*?)\".*?\'(.*)\'#",$line,$match) ||
                                    preg_match("#\'(.*?)\'.*?\'(.*)\'#",$line,$match) ||
                                    preg_match("#\((.*?)\,.*?\"(.*)\"#",$line,$match) ||
                        Severity: Major
                        Found in e107_admin/language.php - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                              if(strpos(e_REQUEST_URI,$plugDir) !== false && !deftrue('e_ADMIN_UI') && !empty($_plugins) && !empty($_globalLans) && is_array($_plugins) && (count($_plugins) > 0))
                              {
                                  $_plugins = array_keys($_plugins);
                                  
                                  foreach ($_plugins as $_p) 
                          Severity: Major
                          Found in e107_admin/boot.php - About 40 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    if(isset($style['sublinkdisplay']) || isset($style['subindent']) || isset($style['sublinkclass']) || isset($style['sublinkstart']) || isset($style['sublinkend']) || isset($style['subpostlink']))
                                    {
                                        foreach($style as $key => $val)
                                        {
                                            $aSubStyle[$key] = vartrue($style["sub" . $key]) ? $style["sub" . $key] : $style[$key];
                            Severity: Major
                            Found in e107_handlers/sitelinks_class.php - About 40 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                              if(strpos($path,'_front.php')===false && strpos($path,'_admin.php')===false && strpos($path,'_global.php')===false && strpos($path,'_menu.php')===false && strpos($path,'_notify.php')===false && strpos($path,'_search.php')===false)
                                              {
                                                  return "<span class='text-error e-tip' title='File name should be either English_front.php, English_admin.php or English_global.php'>".$text."</span>";
                                              }
                              Severity: Major
                              Found in e107_admin/plugin.php - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                if ((USER || e_LOGIN != e_SELF || (empty($pref['user_reg']) && !e107::getUserProvider()->isSocialLoginEnabled())) && e_QUERY !== 'preview' && !getperms('0') ) // Disable page if user logged in, or some custom e_LOGIN value is used.
                                {
                                    $prev = e107::getRedirect()->getPreviousUrl();
                                
                                    if(!empty($prev))
                                Severity: Major
                                Found in login.php - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                               if ((in_array($key, $columnPref) || ($key === 'options' && isset($val['title'])) || (vartrue($val['forced']))) && !vartrue($val['nolist']))
                                              {
                                                  $cl = (vartrue($val['thclass'])) ? " class='".$val['thclass']."'" : '';
                                  
                                                  $aClass = ($key === $field) ? "sorted-" . $sorted : null;
                                  Severity: Major
                                  Found in e107_handlers/form_handler.php - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if(!empty($pref['session_save_method']) && ($pref['session_save_method'] === 'db') && !empty($pref['disallowMultiLogin']) && !empty($user_id))
                                            {
                                                // logout any existing user of this account.
                                                $mLog = '';
                                                if($sql->delete('session', "session_user = ".$user_id))
                                    Severity: Major
                                    Found in e107_handlers/login.php - About 40 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                              if($table && !$where && is_bool($fields))
                                              {
                                                  // table is the query, fields used for multi
                                                  if($fields)
                                                  {
                                      Severity: Major
                                      Found in e107_handlers/e_db_pdo_class.php - About 40 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                            if($skinText = self::renderSkin($theme, $mode, $pref))
                                                            {
                                                                $text .= $skinText;
                                                            }
                                                            elseif(!empty($theme['multipleStylesheets']) && $mode && !empty($theme['css']) && self::RENDER_SITEPREFS === $mode)
                                        Severity: Major
                                        Found in e107_handlers/theme_handler.php - About 40 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language