Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a8dd032
)
"MDL-13766, check if plugin file existed before displayed in admin page"
author
Dongsheng Cai
<unoter@gmail.com>
Thu, 1 Apr 2010 06:09:53 +0000
(06:09 +0000)
committer
Dongsheng Cai
<unoter@gmail.com>
Thu, 1 Apr 2010 06:09:53 +0000
(06:09 +0000)
repository/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/repository/lib.php
b/repository/lib.php
index
5f75ee3
..
7dcf4ce
100644
(file)
--- a/
repository/lib.php
+++ b/
repository/lib.php
@@
-514,7
+514,7
@@
abstract class repository {
* @return array Repository types
*/
public static function get_types($visible=null) {
* @return array Repository types
*/
public static function get_types($visible=null) {
- global $DB;
+ global $DB
, $CFG
;
$types = array();
$params = null;
$types = array();
$params = null;
@@
-523,7
+523,9
@@
abstract class repository {
}
if ($records = $DB->get_records('repository',$params,'sortorder')) {
foreach($records as $type) {
}
if ($records = $DB->get_records('repository',$params,'sortorder')) {
foreach($records as $type) {
- $types[] = new repository_type($type->type, (array)get_config($type->type), $type->visible, $type->sortorder);
+ if (file_exists($CFG->dirroot . '/repository/'. $type->type .'/repository.class.php')) {
+ $types[] = new repository_type($type->type, (array)get_config($type->type), $type->visible, $type->sortorder);
+ }
}
}
}
}