From: dongsheng Date: Fri, 15 Aug 2008 02:22:24 +0000 (+0000) Subject: MDL-13766, self::static_func doesn't work well on php 5.2.6, change to another way... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5108bf415f4f9d7cc3888505b572f8cdcc1044bb;p=moodle.git MDL-13766, self::static_func doesn't work well on php 5.2.6, change to another way to do this --- diff --git a/repository/lib.php b/repository/lib.php index ea91e1754b..f2f66b0511 100644 --- a/repository/lib.php +++ b/repository/lib.php @@ -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();