e107inc/e107

View on GitHub
e107_admin/update_routines.php

Summary

Maintainability
D
2 days
Test Coverage
F
34%

Avoid too many return statements within this method.
Open

        if ($just_check) return update_needed('Rename dblog to admin_log');
Severity: Major
Found in e107_admin/update_routines.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            if ($just_check) return update_needed('Import '.count($dl_files).' Download File(s) and '.count($public_files).' Public File(s) into Media Manager');
    Severity: Major
    Found in e107_admin/update_routines.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  if ($just_check) return update_needed('Media-Manager is missing the video and audio categories and needs to be updated.');
      Severity: Major
      Found in e107_admin/update_routines.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    if ($just_check) return update_needed('Update IP address field '.$f.' in table '.$t);
        Severity: Major
        Found in e107_admin/update_routines.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return FALSE;
          Severity: Major
          Found in e107_admin/update_routines.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    if ($just_check) return update_needed('Rename rl_history to dblog');
            Severity: Major
            Found in e107_admin/update_routines.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      if ($just_check) return update_needed('Empty forum tables need to be removed.');
              Severity: Major
              Found in e107_admin/update_routines.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        if ($just_check) return update_needed('Comment table author field update');
                Severity: Major
                Found in e107_admin/update_routines.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                          if ($just_check) return update_needed('pref: forum_user_customtitle needs to be renamed');
                  Severity: Major
                  Found in e107_admin/update_routines.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            if ($just_check) return update_needed('Avatar paths require updating.');
                    Severity: Major
                    Found in e107_admin/update_routines.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              if ($just_check) return update_needed('Core search handlers need to be updated.');
                      Severity: Major
                      Found in e107_admin/update_routines.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                              if ($just_check) return update_needed();
                        Severity: Major
                        Found in e107_admin/update_routines.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                          return update_needed("Pref 'Class which can post < script > and similar tags' contains an invalid value"); // NO LAN.
                          Severity: Major
                          Found in e107_admin/update_routines.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                            if ($just_check) return update_needed('Menu path changed required:  '.$val['menu'].' ');
                            Severity: Major
                            Found in e107_admin/update_routines.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                        if ($just_check) return update_needed('Legacy shortcode conversion');
                              Severity: Major
                              Found in e107_admin/update_routines.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                        if ($just_check) return update_needed('Update plugin table');
                                Severity: Major
                                Found in e107_admin/update_routines.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                          if ($just_check) return update_needed('News keywords contain spaces between commas and needs to be updated. ');
                                  Severity: Major
                                  Found in e107_admin/update_routines.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            if ($just_check) return update_needed();
                                    Severity: Major
                                    Found in e107_admin/update_routines.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                              if ($just_check) return update_needed('Banner Table found, but plugin not installed. Needs to be refreshed.');    
                                      Severity: Major
                                      Found in e107_admin/update_routines.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                if ($just_check) return update_needed('Media-Manager Data needs to be updated.');
                                        Severity: Major
                                        Found in e107_admin/update_routines.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                  if ($just_check) return update_needed('Import Download Images into Media Manager');
                                          Severity: Major
                                          Found in e107_admin/update_routines.php - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                    if ($just_check) return update_needed('Change front page prefs');
                                            Severity: Major
                                            Found in e107_admin/update_routines.php - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                          return update_needed("Pages/Menus Table requires updating.");    
                                              Severity: Major
                                              Found in e107_admin/update_routines.php - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                        if ($just_check) return update_needed('Copy across saved emails');
                                                Severity: Major
                                                Found in e107_admin/update_routines.php - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                      return $just_check;
                                                  Severity: Major
                                                  Found in e107_admin/update_routines.php - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                        return $just_check;        // TRUE if no updates needed, FALSE if updates needed and completed
                                                    Severity: Major
                                                    Found in e107_admin/update_routines.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                      return update_needed("Plugin table 'user' value needs to be reset.");
                                                      Severity: Major
                                                      Found in e107_admin/update_routines.php - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                if ($just_check) return update_needed('change menu_path for online menu');
                                                        Severity: Major
                                                        Found in e107_admin/update_routines.php - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                  if ($just_check) return update_needed('Download Plugin needs to be installed.');    
                                                          Severity: Major
                                                          Found in e107_admin/update_routines.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                    if ($just_check) return update_needed('Add Media-Manager Categories and Import existing images.');
                                                            Severity: Major
                                                            Found in e107_admin/update_routines.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                      if ($just_check) return update_needed('Add icons to media-manager');
                                                              Severity: Major
                                                              Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                if ($just_check) return update_needed('Notify pref: '.$e.' outdated');
                                                                Severity: Major
                                                                Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                          if ($just_check) return update_needed('Core search handlers need to be updated.');
                                                                  Severity: Major
                                                                  Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                            if ($just_check) return update_needed('Core search handlers need to be updated.');
                                                                    Severity: Major
                                                                    Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                              return $just_check;
                                                                      Severity: Major
                                                                      Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                    if ($just_check) return update_needed("Delete table: ".$ot);
                                                                        Severity: Major
                                                                        Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                              if ($just_check) return TRUE;
                                                                          Severity: Major
                                                                          Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                    if ($just_check) return update_needed('plugin_releaseUrl is deprecated and needs to be removed. ');
                                                                            Severity: Major
                                                                            Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                      if ($just_check) return update_needed('Media-Manager Category Data needs to be updated.');
                                                                              Severity: Major
                                                                              Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                        if ($just_check) return update_needed("The Menu table needs to have some paths corrected in its data.");
                                                                                Severity: Major
                                                                                Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                              if ($just_check) return update_needed('Move user timezone info');
                                                                                  Severity: Major
                                                                                  Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                            if ($just_check) return update_needed('Remove obsolete prefs');
                                                                                    Severity: Major
                                                                                    Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                                  if ($just_check) return update_needed('Media-Manager Categories needs to be updated.');    
                                                                                      Severity: Major
                                                                                      Found in e107_admin/update_routines.php - About 30 mins to fix

                                                                                        Call to undeclared method \e_db::isTable
                                                                                        Open

                                                                                            if ($sql->isTable('rl_history') && !$sql->isTable('dblog'))
                                                                                        Severity: Critical
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Reference to undeclared property \e_db->mySQLtableList
                                                                                        Open

                                                                                            $sql->mySQLtableList = false; // clear the cached table list. 
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to undeclared method \e_db::isTable
                                                                                        Open

                                                                                              if ($sql->isTable($t))
                                                                                        Severity: Critical
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Argument 3 (logLevel) is 'info' but \e_admin_log::logMessage() takes bool|int|true defined at /code/e107_handlers/admin_log_class.php:670
                                                                                        Open

                                                                                                $admin_log->logMessage(LAN_UPDATE_14.$e107info['e107_version'], E_MESSAGE_NODISPLAY, E_MESSAGE_INFO);
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Argument #1 of this call to \str_replace is typically a literal or constant but isn't, but argument #3 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
                                                                                        Open

                                                                                            $root_media = str_replace(basename(e_MEDIA)."/","",e_MEDIA);
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to deprecated function \e107plugin::save_addon_prefs() defined at /code/e107_handlers/plugin_class.php:4889
                                                                                        Open

                                                                                                $ep->save_addon_prefs('update');
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to undeclared method \e_db::db_Field
                                                                                        Open

                                                                                                if ((!$sql->db_Field('comments','comment_author_id'))        // Check to see whether new fields already added - maybe data copy failed part way through
                                                                                        Severity: Critical
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to undeclared method \e_db::isTable
                                                                                        Open

                                                                                                if ($sql->isTable($ot))
                                                                                        Severity: Critical
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Argument 1 (no_cache) is 'getfile' but \e107_user_extended::parse_extended_xml() takes bool|false defined at /code/e107_handlers/user_extended_class.php:1527
                                                                                        Open

                                                                                            $tmp = $ue->parse_extended_xml('getfile');
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Argument 3 (logLevel) is 'info' but \e_admin_log::logMessage() takes bool|int|true defined at /code/e107_handlers/admin_log_class.php:670
                                                                                        Open

                                                                                                    $admin_log->logMessage($k.' => '.$v, E_MESSAGE_NODISPLAY, E_MESSAGE_INFO);
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to deprecated function \e107plugin::update_plugins_table() defined at /code/e107_handlers/plugin_class.php:1696
                                                                                        Open

                                                                                                $ep->update_plugins_table('update');
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Argument 1 (dir) is 'social' but \e107plugin::refresh() takes int defined at /code/e107_handlers/plugin_class.php:4587
                                                                                        Open

                                                                                                    e107::getPlugin()->refresh('social');
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to deprecated function \e107plugin::update_plugins_table() defined at /code/e107_handlers/plugin_class.php:1696
                                                                                        Open

                                                                                                $ep->update_plugins_table('update');
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to deprecated function \save_prefs() defined at /code/class2.php:1401
                                                                                        Open

                                                                                              save_prefs();
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Only variables can be passed by reference at argument 1 of \vartrue()
                                                                                        Open

                                                                                            if (vartrue($target->getLastErrorText()) && defset('E107_DEBUG_LEVEL') != 0)
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Suspicious array access to ?mixed
                                                                                        Open

                                                                                                    $name = !empty($val['@attributes']['lan']) ? $tp->toHTML($val['@attributes']['lan'],false,'TITLE') : $val['@attributes']['name'];
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Argument 2 (replace) is 0 but \str_replace() takes array|string
                                                                                        Open

                                                                                                $log->logMessage(str_replace('[x]', $i, LAN_UPDATE_28));
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to deprecated function \e107plugin::update_plugins_table() defined at /code/e107_handlers/plugin_class.php:1696
                                                                                        Open

                                                                                                $ep->update_plugins_table(); // scan for e_xxx changes and save to plugin table.
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to undeclared method \e_db::isTable
                                                                                        Open

                                                                                            if (!e107::isInstalled('banner') && $sql->isTable('banner'))
                                                                                        Severity: Critical
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to undeclared method \e_db::isTable
                                                                                        Open

                                                                                            if ($sql->isTable('dblog') && !$sql->isTable('admin_log'))
                                                                                        Severity: Critical
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to undeclared method \e_db::isTable
                                                                                        Open

                                                                                            if($sql->isTable('forum_t') && $sql->isEmpty('forum') && $sql->isEmpty('forum_t'))
                                                                                        Severity: Critical
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to undeclared method \e_db::db_Field
                                                                                        Open

                                                                                            if($sql->db_Field("core_media_cat","media_cat_nick"))
                                                                                        Severity: Critical
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Argument 3 (omit) is array{0:'_FT',1:'^thumbs\\.db$',2:'^Thumbs\\.db$',3:'.*\\._$',4:'^\\.htaccess$',5:'^\\.cvsignore$',6:'^\\.ftpquota$',7:'^index\\.html$',8:'^null\\.txt$',9:'\\.bak$',10:'^.tmp'} but \e_file::get_files() takes string defined at /code/e107_handlers/file_class.php:245
                                                                                        Open

                                                                                            $public_files = $fl->get_files(e_FILE.'public','',$publicFilter);
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Invalid offset "e107_version" of array type array{}
                                                                                        Open

                                                                                            $dbupdate['20x_to_latest'] = array('master'=>true, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.x', $e107info['e107_version'])), 'message'=> null, 'hide_when_complete'=>false);
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to undeclared method \e_db::db_Field
                                                                                        Open

                                                                                            if($sql->db_Field('comments','comment_author'))
                                                                                        Severity: Critical
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to undeclared method \e_db::db_Field
                                                                                        Open

                                                                                                if ($field_info = ($sql->db_Field($t, $f, '', TRUE)))
                                                                                        Severity: Critical
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        Call to deprecated function \e107plugin::save_addon_prefs() defined at /code/e107_handlers/plugin_class.php:4889
                                                                                        Open

                                                                                                $ep->save_addon_prefs(); // generate global e_xxx_list prefs from plugin table.
                                                                                        Severity: Minor
                                                                                        Found in e107_admin/update_routines.php by phan

                                                                                        There are no issues that match your filters.

                                                                                        Category
                                                                                        Status