mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-22992 cleaning repository upgrade path, please note core functions MUST NOT be called from the main upgrade script; the installation of plugins should be handled through each install.php
This commit is contained in:
parent
37a0892432
commit
1c5f926de9
2 changed files with 3 additions and 105 deletions
|
@ -1815,30 +1815,3 @@ function initialise_filepicker($args) {
|
|||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* The plugins should be enabled by defaulted once moodle installed
|
||||
*
|
||||
* @global object $OUTPUT
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function repository_setup_default_plugins() {
|
||||
global $OUTPUT;
|
||||
//if the plugin type has no multiple instance (e.g. has no instance option name)
|
||||
//repository_type::create will create an instance automatically
|
||||
$user_plugin = new repository_type('user', array(), true);
|
||||
$user_plugin->create(true);
|
||||
|
||||
$recent_plugin = new repository_type('recent', array(), true);
|
||||
$recent_plugin->create(true);
|
||||
|
||||
$upload_plugin = new repository_type('upload', array(), true);
|
||||
$upload_plugin->create(true);
|
||||
|
||||
$local_plugin = new repository_type('local', array(), true);
|
||||
$local_plugin->create(true);
|
||||
|
||||
echo $OUTPUT->notification(get_string('setupdefaultplugins', 'repository'), 'notifysuccess');
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue