]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13766, self::static_func doesn't work well on php 5.2.6, change to another way...
authordongsheng <dongsheng>
Fri, 15 Aug 2008 02:22:24 +0000 (02:22 +0000)
committerdongsheng <dongsheng>
Fri, 15 Aug 2008 02:22:24 +0000 (02:22 +0000)
repository/lib.php

index ea91e1754bea2818d424432d927d85c2e60f4cc4..f2f66b05111ff643fd74bf05dba091b78a506743 100644 (file)
@@ -199,15 +199,15 @@ abstract class repository {
         $params = (array)$params;
         require_once($CFG->dirroot . '/repository/'. $type . '/repository.class.php');
         $classname = 'repository_' . $type;
-        if (self::has_admin_config()) {
-            $configs = self::get_option_names();
+        $record = new stdclass;
+        if (call_user_func($classname . '::has_admin_config')) {
+            $configs = call_user_func($classname . '::get_option_names');
             $options = array();
             foreach ($configs as $config) {
                 $options[$config] = $params[$config];
             }
-            $record->data1     = serialize($options);
+            $record->data1 = serialize($options);
         }
-        $record = new stdclass;
         $record->repositoryname = $params['name'];
         $record->repositorytype = $type;
         $record->timecreated  = time();