mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-17846 moved blocks code from /blocks/db/* to core
This commit is contained in:
parent
27bd819be5
commit
ab2eb65c88
10 changed files with 73 additions and 253 deletions
|
@ -998,16 +998,9 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
|||
}
|
||||
upgrade_plugins('qtype', 'question/type', ''); // Don't return anywhere
|
||||
|
||||
/// Upgrade blocks system if necessary
|
||||
/// first old *.php update and then the new upgrade.php script
|
||||
require_once("$CFG->dirroot/lib/blocklib.php");
|
||||
if ( $verbose > CLI_NO ) {
|
||||
print_heading(get_string('upgradingblocksdb','install'),'',1);
|
||||
}
|
||||
upgrade_blocks_db(''); // Don't return anywhere
|
||||
|
||||
/// Check all blocks and load (or upgrade them if necessary)
|
||||
/// first old *.php update and then the new upgrade.php script
|
||||
require_once("$CFG->dirroot/lib/blocklib.php");
|
||||
if ( $verbose > CLI_NO ) {
|
||||
print_heading(get_string('upgradingblocksplugin','install'),'',1);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
|
|||
$ADMIN->add('modules', new admin_category('blocksettings', get_string('blocks')));
|
||||
$ADMIN->add('blocksettings', new admin_page_manageblocks());
|
||||
$ADMIN->add('blocksettings', new admin_externalpage('stickyblocks', get_string('stickyblocks', 'admin'), "$CFG->wwwroot/$CFG->admin/stickyblocks.php"));
|
||||
if (!empty($CFG->blocks_version) and $blocks = $DB->get_records('block')) {
|
||||
if ($blocks = $DB->get_records('block')) {
|
||||
$blockbyname = array();
|
||||
|
||||
foreach ($blocks as $block) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue