Ignore:
Timestamp:
May 2, 2016, 12:09:23 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated to moodle 3.0.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • moodle/trunk/fuentes/admin/index.php

    r136 r1331  
    5555define('NO_OUTPUT_BUFFERING', true);
    5656
     57if (isset($_POST['upgradekey'])) {
     58    // Before you start reporting issues about the collision attacks against
     59    // SHA-1, you should understand that we are not actually attempting to do
     60    // any cryptography here. This is hashed purely so that the key is not
     61    // that apparent in the address bar itself. Anyone who catches the HTTP
     62    // traffic can immediately use it as a valid admin key.
     63    header('Location: index.php?cache=0&upgradekeyhash='.sha1($_POST['upgradekey']));
     64    die();
     65}
     66
    5767if ((isset($_GET['cache']) and $_GET['cache'] === '0')
    5868        or (isset($_POST['cache']) and $_POST['cache'] === '0')
     
    8999require_once($CFG->libdir.'/upgradelib.php');  // general upgrade/install related functions
    90100
    91 $id             = optional_param('id', '', PARAM_TEXT);
    92 $confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
    93 $confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL);
    94 $confirmplugins = optional_param('confirmplugincheck', 0, PARAM_BOOL);
    95 $showallplugins = optional_param('showallplugins', 0, PARAM_BOOL);
    96 $agreelicense   = optional_param('agreelicense', 0, PARAM_BOOL);
    97 $fetchupdates   = optional_param('fetchupdates', 0, PARAM_BOOL);
    98 $newaddonreq    = optional_param('installaddonrequest', null, PARAM_RAW);
     101$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL); // Core upgrade confirmed?
     102$confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL); // Core release info and server checks confirmed?
     103$confirmplugins = optional_param('confirmplugincheck', 0, PARAM_BOOL); // Plugins check page confirmed?
     104$showallplugins = optional_param('showallplugins', 0, PARAM_BOOL); // Show all plugins on the plugins check page?
     105$agreelicense = optional_param('agreelicense', 0, PARAM_BOOL); // GPL license confirmed for installation?
     106$fetchupdates = optional_param('fetchupdates', 0, PARAM_BOOL); // Should check for available updates?
     107$newaddonreq = optional_param('installaddonrequest', null, PARAM_RAW); // Plugin installation requested at moodle.org/plugins.
     108$upgradekeyhash = optional_param('upgradekeyhash', null, PARAM_ALPHANUM); // Hash of provided upgrade key.
     109$installdep = optional_param('installdep', null, PARAM_COMPONENT); // Install given missing dependency (required plugin).
     110$installdepx = optional_param('installdepx', false, PARAM_BOOL); // Install all missing dependencies.
     111$confirminstalldep = optional_param('confirminstalldep', false, PARAM_BOOL); // Installing dependencies confirmed.
     112$abortinstall = optional_param('abortinstall', null, PARAM_COMPONENT); // Cancel installation of the given new plugin.
     113$abortinstallx = optional_param('abortinstallx', null, PARAM_BOOL); // Cancel installation of all new plugins.
     114$confirmabortinstall = optional_param('confirmabortinstall', false, PARAM_BOOL); // Installation cancel confirmed.
     115$abortupgrade = optional_param('abortupgrade', null, PARAM_COMPONENT); // Cancel upgrade of the given existing plugin.
     116$abortupgradex = optional_param('abortupgradex', null, PARAM_BOOL); // Cancel upgrade of all upgradable plugins.
     117$confirmabortupgrade = optional_param('confirmabortupgrade', false, PARAM_BOOL); // Upgrade cancel confirmed.
     118$installupdate = optional_param('installupdate', null, PARAM_COMPONENT); // Install given available update.
     119$installupdateversion = optional_param('installupdateversion', null, PARAM_INT); // Version of the available update to install.
     120$installupdatex = optional_param('installupdatex', false, PARAM_BOOL); // Install all available plugin updates.
     121$confirminstallupdate = optional_param('confirminstallupdate', false, PARAM_BOOL); // Available update(s) install confirmed?
     122
     123if (!empty($CFG->disableupdateautodeploy)) {
     124    // Invalidate all requests to install plugins via the admin UI.
     125    $newaddonreq = null;
     126    $installdep = null;
     127    $installdepx = false;
     128    $abortupgrade = null;
     129    $abortupgradex = null;
     130    $installupdate = null;
     131    $installupdateversion = null;
     132    $installupdatex = false;
     133}
    99134
    100135// Set up PAGE.
    101136$url = new moodle_url('/admin/index.php');
    102137$url->param('cache', $cache);
     138if (isset($upgradekeyhash)) {
     139    $url->param('upgradekeyhash', $upgradekeyhash);
     140}
    103141$PAGE->set_url($url);
    104142unset($url);
    105143
    106144// Are we returning from an add-on installation request at moodle.org/plugins?
    107 if ($newaddonreq and !$cache and empty($CFG->disableonclickaddoninstall)) {
     145if ($newaddonreq and !$cache and empty($CFG->disableupdateautodeploy)) {
    108146    $target = new moodle_url('/admin/tool/installaddon/index.php', array(
    109147        'installaddonrequest' => $newaddonreq,
     
    176214        $PAGE->set_cacheable(false);
    177215
    178         /** @var core_admin_renderer $output */
    179216        $output = $PAGE->get_renderer('core', 'admin');
    180217        echo $output->install_licence_page();
     
    191228        $PAGE->set_cacheable(false);
    192229
    193         /** @var core_admin_renderer $output */
    194230        $output = $PAGE->get_renderer('core', 'admin');
    195231        echo $output->install_environment_page($maturity, $envstatus, $environment_results, $release);
     
    205241
    206242        $output = $PAGE->get_renderer('core', 'admin');
    207         $url = new moodle_url('/admin/index.php', array('agreelicense' => 1, 'confirmrelease' => 1, 'lang' => $CFG->lang));
     243        $url = new moodle_url($PAGE->url, array('agreelicense' => 1, 'confirmrelease' => 1, 'lang' => $CFG->lang));
    208244        echo $output->unsatisfied_dependencies_page($version, $failed, $url);
    209245        die();
     
    255291if ($CFG->version != $DB->get_field('config', 'value', array('name'=>'version'))) {
    256292    purge_all_caches();
    257     redirect(new moodle_url('/admin/index.php'), 'Config cache inconsistency detected, resetting caches...');
     293    redirect(new moodle_url($PAGE->url), 'Config cache inconsistency detected, resetting caches...');
    258294}
    259295
    260296if (!$cache and $version > $CFG->version) {  // upgrade
     297
     298    $PAGE->set_url(new moodle_url($PAGE->url, array(
     299        'confirmupgrade' => $confirmupgrade,
     300        'confirmrelease' => $confirmrelease,
     301        'confirmplugincheck' => $confirmplugins,
     302    )));
     303
     304    check_upgrade_key($upgradekeyhash);
    261305
    262306    // Warning about upgrading a test site.
     
    275319    purge_all_caches();
    276320
    277     /** @var core_admin_renderer $output */
    278321    $output = $PAGE->get_renderer('core', 'admin');
    279322
     
    320363        $PAGE->set_cacheable(false);
    321364
    322         $reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0));
    323 
     365        $pluginman = core_plugin_manager::instance();
     366
     367        // Check for available updates.
    324368        if ($fetchupdates) {
    325369            // No sesskey support guaranteed here, because sessions might not work yet.
     
    328372                $updateschecker->fetch();
    329373            }
    330             redirect($reloadurl);
    331         }
    332 
    333         $deployer = \core\update\deployer::instance();
    334         if ($deployer->enabled()) {
    335             $deployer->initialize($reloadurl, $reloadurl);
    336 
    337             $deploydata = $deployer->submitted_data();
    338             if (!empty($deploydata)) {
    339                 // No sesskey support guaranteed here, because sessions might not work yet.
    340                 echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
    341                 die();
     374            redirect($PAGE->url);
     375        }
     376
     377        // Cancel all plugin installations.
     378        if ($abortinstallx) {
     379            // No sesskey support guaranteed here, because sessions might not work yet.
     380            $abortables = $pluginman->list_cancellable_installations();
     381            if ($abortables) {
     382                if ($confirmabortinstall) {
     383                    foreach ($abortables as $plugin) {
     384                        $pluginman->cancel_plugin_installation($plugin->component);
     385                    }
     386                    redirect($PAGE->url);
     387                } else {
     388                    $continue = new moodle_url($PAGE->url, array('abortinstallx' => $abortinstallx, 'confirmabortinstall' => 1));
     389                    echo $output->upgrade_confirm_abort_install_page($abortables, $continue);
     390                    die();
     391                }
     392            }
     393            redirect($PAGE->url);
     394        }
     395
     396        // Cancel single plugin installation.
     397        if ($abortinstall) {
     398            // No sesskey support guaranteed here, because sessions might not work yet.
     399            if ($confirmabortinstall) {
     400                $pluginman->cancel_plugin_installation($abortinstall);
     401                redirect($PAGE->url);
     402            } else {
     403                $continue = new moodle_url($PAGE->url, array('abortinstall' => $abortinstall, 'confirmabortinstall' => 1));
     404                $abortable = $pluginman->get_plugin_info($abortinstall);
     405                if ($pluginman->can_cancel_plugin_installation($abortable)) {
     406                    echo $output->upgrade_confirm_abort_install_page(array($abortable), $continue);
     407                    die();
     408                }
     409                redirect($PAGE->url);
     410            }
     411        }
     412
     413        // Cancel all plugins upgrades (that is, restore archived versions).
     414        if ($abortupgradex) {
     415            // No sesskey support guaranteed here, because sessions might not work yet.
     416            $restorable = $pluginman->list_restorable_archives();
     417            if ($restorable) {
     418                upgrade_install_plugins($restorable, $confirmabortupgrade,
     419                    get_string('cancelupgradehead', 'core_plugin'),
     420                    new moodle_url($PAGE->url, array('abortupgradex' => 1, 'confirmabortupgrade' => 1))
     421                );
     422            }
     423            redirect($PAGE->url);
     424        }
     425
     426        // Cancel single plugin upgrade (that is, install the archived version).
     427        if ($abortupgrade) {
     428            // No sesskey support guaranteed here, because sessions might not work yet.
     429            $restorable = $pluginman->list_restorable_archives();
     430            if (isset($restorable[$abortupgrade])) {
     431                $restorable = array($restorable[$abortupgrade]);
     432                upgrade_install_plugins($restorable, $confirmabortupgrade,
     433                    get_string('cancelupgradehead', 'core_plugin'),
     434                    new moodle_url($PAGE->url, array('abortupgrade' => $abortupgrade, 'confirmabortupgrade' => 1))
     435                );
     436            }
     437            redirect($PAGE->url);
     438        }
     439
     440        // Install all available missing dependencies.
     441        if ($installdepx) {
     442            // No sesskey support guaranteed here, because sessions might not work yet.
     443            $installable = $pluginman->filter_installable($pluginman->missing_dependencies(true));
     444            upgrade_install_plugins($installable, $confirminstalldep,
     445                get_string('dependencyinstallhead', 'core_plugin'),
     446                new moodle_url($PAGE->url, array('installdepx' => 1, 'confirminstalldep' => 1))
     447            );
     448        }
     449
     450        // Install single available missing dependency.
     451        if ($installdep) {
     452            // No sesskey support guaranteed here, because sessions might not work yet.
     453            $installable = $pluginman->filter_installable($pluginman->missing_dependencies(true));
     454            if (!empty($installable[$installdep])) {
     455                $installable = array($installable[$installdep]);
     456                upgrade_install_plugins($installable, $confirminstalldep,
     457                    get_string('dependencyinstallhead', 'core_plugin'),
     458                    new moodle_url($PAGE->url, array('installdep' => $installdep, 'confirminstalldep' => 1))
     459                );
     460            }
     461        }
     462
     463        // Install all available updates.
     464        if ($installupdatex) {
     465            // No sesskey support guaranteed here, because sessions might not work yet.
     466            $installable = $pluginman->filter_installable($pluginman->available_updates());
     467            upgrade_install_plugins($installable, $confirminstallupdate,
     468                get_string('updateavailableinstallallhead', 'core_admin'),
     469                new moodle_url($PAGE->url, array('installupdatex' => 1, 'confirminstallupdate' => 1))
     470            );
     471        }
     472
     473        // Install single available update.
     474        if ($installupdate and $installupdateversion) {
     475            // No sesskey support guaranteed here, because sessions might not work yet.
     476            if ($pluginman->is_remote_plugin_installable($installupdate, $installupdateversion)) {
     477                $installable = array($pluginman->get_remote_plugin_info($installupdate, $installupdateversion, true));
     478                upgrade_install_plugins($installable, $confirminstallupdate,
     479                    get_string('updateavailableinstallallhead', 'core_admin'),
     480                    new moodle_url($PAGE->url, array('installupdate' => $installupdate,
     481                        'installupdateversion' => $installupdateversion, 'confirminstallupdate' => 1)
     482                    )
     483                );
    342484            }
    343485        }
    344486
    345487        echo $output->upgrade_plugin_check_page(core_plugin_manager::instance(), \core\update\checker::instance(),
    346                 $version, $showallplugins, $reloadurl,
    347                 new moodle_url('/admin/index.php', array('confirmupgrade'=>1, 'confirmrelease'=>1, 'confirmplugincheck'=>1, 'cache'=>0)));
     488                $version, $showallplugins, $PAGE->url, new moodle_url($PAGE->url, array('confirmplugincheck' => 1)));
    348489        die();
    349490
     
    352493        $failed = array();
    353494        if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
    354             $reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0));
    355             echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
     495            echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
    356496            die();
    357497        }
     
    376516
    377517if (!$cache and moodle_needs_upgrading()) {
     518
     519    $PAGE->set_url(new moodle_url($PAGE->url, array('confirmplugincheck' => $confirmplugins)));
     520
     521    check_upgrade_key($upgradekeyhash);
     522
    378523    if (!$PAGE->headerprinted) {
    379524        // means core upgrade or installation was not already done
     525
     526        $pluginman = core_plugin_manager::instance();
     527        $output = $PAGE->get_renderer('core', 'admin');
    380528
    381529        if (!$confirmplugins) {
     
    387535            $PAGE->set_cacheable(false);
    388536
     537            // Check for available updates.
    389538            if ($fetchupdates) {
    390539                require_sesskey();
     
    396545            }
    397546
    398             /** @var core_admin_renderer $output */
    399             $output = $PAGE->get_renderer('core', 'admin');
    400 
    401             $deployer = \core\update\deployer::instance();
    402             if ($deployer->enabled()) {
    403                 $deployer->initialize($PAGE->url, $PAGE->url);
    404 
    405                 $deploydata = $deployer->submitted_data();
    406                 if (!empty($deploydata)) {
    407                     require_sesskey();
    408                     echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
    409                     die();
     547            // Cancel all plugin installations.
     548            if ($abortinstallx) {
     549                require_sesskey();
     550                $abortables = $pluginman->list_cancellable_installations();
     551                if ($abortables) {
     552                    if ($confirmabortinstall) {
     553                        foreach ($abortables as $plugin) {
     554                            $pluginman->cancel_plugin_installation($plugin->component);
     555                        }
     556                        redirect($PAGE->url);
     557                    } else {
     558                        $continue = new moodle_url($PAGE->url, array('abortinstallx' => $abortinstallx,
     559                            'confirmabortinstall' => 1));
     560                        echo $output->upgrade_confirm_abort_install_page($abortables, $continue);
     561                        die();
     562                    }
     563                }
     564                redirect($PAGE->url);
     565            }
     566
     567            // Cancel single plugin installation.
     568            if ($abortinstall) {
     569                require_sesskey();
     570                if ($confirmabortinstall) {
     571                    $pluginman->cancel_plugin_installation($abortinstall);
     572                    redirect($PAGE->url);
     573                } else {
     574                    $continue = new moodle_url($PAGE->url, array('abortinstall' => $abortinstall, 'confirmabortinstall' => 1));
     575                    $abortable = $pluginman->get_plugin_info($abortinstall);
     576                    if ($pluginman->can_cancel_plugin_installation($abortable)) {
     577                        echo $output->upgrade_confirm_abort_install_page(array($abortable), $continue);
     578                        die();
     579                    }
     580                    redirect($PAGE->url);
     581                }
     582            }
     583
     584            // Cancel all plugins upgrades (that is, restore archived versions).
     585            if ($abortupgradex) {
     586                require_sesskey();
     587                $restorable = $pluginman->list_restorable_archives();
     588                if ($restorable) {
     589                    upgrade_install_plugins($restorable, $confirmabortupgrade,
     590                        get_string('cancelupgradehead', 'core_plugin'),
     591                        new moodle_url($PAGE->url, array('abortupgradex' => 1, 'confirmabortupgrade' => 1))
     592                    );
     593                }
     594                redirect($PAGE->url);
     595            }
     596
     597            // Cancel single plugin upgrade (that is, install the archived version).
     598            if ($abortupgrade) {
     599                require_sesskey();
     600                $restorable = $pluginman->list_restorable_archives();
     601                if (isset($restorable[$abortupgrade])) {
     602                    $restorable = array($restorable[$abortupgrade]);
     603                    upgrade_install_plugins($restorable, $confirmabortupgrade,
     604                        get_string('cancelupgradehead', 'core_plugin'),
     605                        new moodle_url($PAGE->url, array('abortupgrade' => $abortupgrade, 'confirmabortupgrade' => 1))
     606                    );
     607                }
     608                redirect($PAGE->url);
     609            }
     610
     611            // Install all available missing dependencies.
     612            if ($installdepx) {
     613                require_sesskey();
     614                $installable = $pluginman->filter_installable($pluginman->missing_dependencies(true));
     615                upgrade_install_plugins($installable, $confirminstalldep,
     616                    get_string('dependencyinstallhead', 'core_plugin'),
     617                    new moodle_url($PAGE->url, array('installdepx' => 1, 'confirminstalldep' => 1))
     618                );
     619            }
     620
     621            // Install single available missing dependency.
     622            if ($installdep) {
     623                require_sesskey();
     624                $installable = $pluginman->filter_installable($pluginman->missing_dependencies(true));
     625                if (!empty($installable[$installdep])) {
     626                    $installable = array($installable[$installdep]);
     627                    upgrade_install_plugins($installable, $confirminstalldep,
     628                        get_string('dependencyinstallhead', 'core_plugin'),
     629                        new moodle_url($PAGE->url, array('installdep' => $installdep, 'confirminstalldep' => 1))
     630                    );
     631                }
     632            }
     633
     634            // Install all available updates.
     635            if ($installupdatex) {
     636                require_sesskey();
     637                $installable = $pluginman->filter_installable($pluginman->available_updates());
     638                upgrade_install_plugins($installable, $confirminstallupdate,
     639                    get_string('updateavailableinstallallhead', 'core_admin'),
     640                    new moodle_url($PAGE->url, array('installupdatex' => 1, 'confirminstallupdate' => 1))
     641                );
     642            }
     643
     644            // Install single available update.
     645            if ($installupdate and $installupdateversion) {
     646                require_sesskey();
     647                if ($pluginman->is_remote_plugin_installable($installupdate, $installupdateversion)) {
     648                    $installable = array($pluginman->get_remote_plugin_info($installupdate, $installupdateversion, true));
     649                    upgrade_install_plugins($installable, $confirminstallupdate,
     650                        get_string('updateavailableinstallallhead', 'core_admin'),
     651                        new moodle_url($PAGE->url, array('installupdate' => $installupdate,
     652                            'installupdateversion' => $installupdateversion, 'confirminstallupdate' => 1)
     653                        )
     654                    );
    410655                }
    411656            }
    412657
    413658            // Show plugins info.
    414             echo $output->upgrade_plugin_check_page(core_plugin_manager::instance(), \core\update\checker::instance(),
     659            echo $output->upgrade_plugin_check_page($pluginman, \core\update\checker::instance(),
    415660                    $version, $showallplugins,
    416661                    new moodle_url($PAGE->url),
    417                     new moodle_url('/admin/index.php', array('confirmplugincheck'=>1, 'cache'=>0)));
     662                    new moodle_url($PAGE->url, array('confirmplugincheck' => 1, 'cache' => 0)));
    418663            die();
    419664        }
     
    421666        // Make sure plugin dependencies are always checked.
    422667        $failed = array();
    423         if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
    424             /** @var core_admin_renderer $output */
     668        if (!$pluginman->all_plugins_ok($version, $failed)) {
    425669            $output = $PAGE->get_renderer('core', 'admin');
    426             $reloadurl = new moodle_url('/admin/index.php', array('cache' => 0));
    427             echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
     670            echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
    428671            die();
    429672        }
     
    473716    if ($adminuser->password === 'adminsetuppending') {
    474717        // prevent installation hijacking
    475         //if ($adminuser->lastip !== getremoteaddr()) {
    476         //    print_error('installhijacked', 'admin');
    477         //}
     718        if ($adminuser->lastip !== getremoteaddr()) {
     719            print_error('installhijacked', 'admin');
     720        }
    478721        // login user and let him set password and admin details
    479722        $adminuser->newadminuser = 1;
     
    515758}
    516759$context = context_system::instance();
    517 require_capability('moodle/site:config', $context);
     760
     761if (!has_capability('moodle/site:config', $context)) {
     762    // Do not throw exception display an empty page with administration menu if visible for current user.
     763    $PAGE->set_title($SITE->fullname);
     764    $PAGE->set_heading($SITE->fullname);
     765    echo $OUTPUT->header();
     766    echo $OUTPUT->footer();
     767    exit;
     768}
    518769
    519770// check that site is properly customized
     
    523774    // remove settings that we want uninitialised
    524775    unset_config('registerauth');
     776    unset_config('timezone'); // Force admin to select timezone!
    525777    redirect('upgradesettings.php?return=site');
    526 }
    527 
    528 // Check if we are returning from moodle.org registration and if so, we mark that fact to remove reminders
    529 if (!empty($id) and $id == $CFG->siteidentifier) {
    530     set_config('registered', time());
    531778}
    532779
     
    562809$maintenancemode = !empty($CFG->maintenance_enabled);
    563810
    564 // Available updates for Moodle core
     811// Available updates for Moodle core.
    565812$updateschecker = \core\update\checker::instance();
    566813$availableupdates = array();
    567 $availableupdates['core'] = $updateschecker->get_update_info('core',
    568     array('minmaturity' => $CFG->updateminmaturity, 'notifybuilds' => $CFG->updatenotifybuilds));
    569 
    570 // Available updates for contributed plugins
    571 $pluginman = core_plugin_manager::instance();
    572 foreach ($pluginman->get_plugins() as $plugintype => $plugintypeinstances) {
    573     foreach ($plugintypeinstances as $pluginname => $plugininfo) {
    574         if (!empty($plugininfo->availableupdates)) {
    575             foreach ($plugininfo->availableupdates as $pluginavailableupdate) {
    576                 if ($pluginavailableupdate->version > $plugininfo->versiondisk) {
     814$availableupdatesfetch = null;
     815
     816if ($updateschecker->enabled()) {
     817    // Only compute the update information when it is going to be displayed to the user.
     818    $availableupdates['core'] = $updateschecker->get_update_info('core',
     819        array('minmaturity' => $CFG->updateminmaturity, 'notifybuilds' => $CFG->updatenotifybuilds));
     820
     821    // Available updates for contributed plugins
     822    $pluginman = core_plugin_manager::instance();
     823    foreach ($pluginman->get_plugins() as $plugintype => $plugintypeinstances) {
     824        foreach ($plugintypeinstances as $pluginname => $plugininfo) {
     825            $pluginavailableupdates = $plugininfo->available_updates();
     826            if (!empty($pluginavailableupdates)) {
     827                foreach ($pluginavailableupdates as $pluginavailableupdate) {
    577828                    if (!isset($availableupdates[$plugintype.'_'.$pluginname])) {
    578829                        $availableupdates[$plugintype.'_'.$pluginname] = array();
     
    583834        }
    584835    }
    585 }
    586 
    587 // The timestamp of the most recent check for available updates
    588 $availableupdatesfetch = $updateschecker->get_last_timefetched();
     836
     837    // The timestamp of the most recent check for available updates
     838    $availableupdatesfetch = $updateschecker->get_last_timefetched();
     839}
    589840
    590841$buggyiconvnomb = (!function_exists('mb_convert_encoding') and @iconv('UTF-8', 'UTF-8//IGNORE', '100'.chr(130).'€') !== '100€');
     
    596847admin_externalpage_setup('adminnotifications');
    597848
    598 /* @var core_admin_renderer $output */
    599849$output = $PAGE->get_renderer('core', 'admin');
    600850
Note: See TracChangeset for help on using the changeset viewer.