mirror of
https://github.com/moodle/moodle.git
synced 2025-05-02 14:28:30 +02:00
"MDL-21103, check if repository plugin existed"
This commit is contained in:
parent
6926df754e
commit
062d21cd71
@ -659,6 +659,9 @@ abstract class repository {
|
|||||||
$repositories = array();
|
$repositories = array();
|
||||||
$ft = new file_type_to_ext();
|
$ft = new file_type_to_ext();
|
||||||
foreach ($records as $record) {
|
foreach ($records as $record) {
|
||||||
|
if (!file_exists($CFG->dirroot . '/repository/'. $record->repositorytype.'/repository.class.php')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
require_once($CFG->dirroot . '/repository/'. $record->repositorytype.'/repository.class.php');
|
require_once($CFG->dirroot . '/repository/'. $record->repositorytype.'/repository.class.php');
|
||||||
$options['visible'] = $record->visible;
|
$options['visible'] = $record->visible;
|
||||||
$options['name'] = $record->name;
|
$options['name'] = $record->name;
|
||||||
@ -1774,12 +1777,12 @@ function repository_head_setup() {
|
|||||||
$PAGE->requires->yui_lib('button')->in_head();
|
$PAGE->requires->yui_lib('button')->in_head();
|
||||||
$PAGE->requires->yui_lib('selector')->in_head();
|
$PAGE->requires->yui_lib('selector')->in_head();
|
||||||
|
|
||||||
//TODO: remove the ->in_head() once we refactor the inline script tags in repo code
|
|
||||||
$PAGE->requires->js('repository/repository.src.js')->in_head();
|
|
||||||
|
|
||||||
//TODO: remove following after we moe the content of file
|
//TODO: remove following after we moe the content of file
|
||||||
// proper place (==themes)
|
// proper place (==themes)
|
||||||
$PAGE->requires->css('repository/repository.css');
|
$PAGE->requires->css('repository/repository.css');
|
||||||
|
|
||||||
|
//TODO: remove the ->in_head() once we refactor the inline script tags in repo code
|
||||||
|
$PAGE->requires->js('repository/repository.src.js')->in_head();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user