mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
"REPOSITORY, UPGRADE/MDL-18354, upgrade/install repository plugins using moodle hook"
This commit is contained in:
parent
f13ffcd556
commit
8763ab760b
8 changed files with 48 additions and 0 deletions
12
repository/upload/db/install.php
Normal file
12
repository/upload/db/install.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
function xmldb_repository_upload_install() {
|
||||
global $CFG;
|
||||
$result = true;
|
||||
require_once($CFG->dirroot.'/repository/lib.php');
|
||||
$upload_plugin = new repository_type('upload', array(), true);
|
||||
if (!$id = $upload_plugin->create(true)) {
|
||||
$result = false;
|
||||
}
|
||||
return $result;
|
||||
}
|
9
repository/upload/db/upgrade.php
Normal file
9
repository/upload/db/upgrade.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
function xmldb_repository_upload_upgrade($oldversion) {
|
||||
$result = true;
|
||||
/**
|
||||
if ($result && $oldversion < 2009031000) {
|
||||
}
|
||||
*/
|
||||
return $result;
|
||||
}
|
2
repository/upload/version.php
Normal file
2
repository/upload/version.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
$plugin->version = 2009031000;
|
Loading…
Add table
Add a link
Reference in a new issue