From: jerome Date: Thu, 28 Aug 2008 05:13:13 +0000 (+0000) Subject: MDL-13766: refactor all libary functions, they now all start with repository_ X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=49a1ce19575d0a396e51c071fbbdaf15fee89397;p=moodle.git MDL-13766: refactor all libary functions, they now all start with repository_ --- diff --git a/lib/form/filepicker.php b/lib/form/filepicker.php index 95c772dee8..9a51ef5f79 100644 --- a/lib/form/filepicker.php +++ b/lib/form/filepicker.php @@ -56,7 +56,7 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_button } else { $ctx = $COURSE->context; } - $ret = get_repository_client($ctx); + $ret = repository_get_client($ctx); $suffix = $ret['suffix']; $str = $this->_getTabs(); $str .= ''; diff --git a/lib/weblib.php b/lib/weblib.php index d2673addd1..ab7ae009ff 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -4888,7 +4888,7 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v } else { $ctx = $COURSE->context; } - $ret = get_repository_client($ctx); + $ret = repository_get_client($ctx); $str .= $ret['css'].$ret['js']; $suffix = $ret['suffix']; $str .= '
'; diff --git a/repository/ajax.php b/repository/ajax.php index 2e1eb752d5..7ce1bceae7 100644 --- a/repository/ajax.php +++ b/repository/ajax.php @@ -35,7 +35,7 @@ if(!empty($_GET['create'])) { picker. \*******************************************************/ -$ret = get_repository_client(); +$ret = repository_get_client(); ?> diff --git a/repository/lib.php b/repository/lib.php index 6e45c7d9a9..d467c6778f 100644 --- a/repository/lib.php +++ b/repository/lib.php @@ -538,7 +538,7 @@ function repository_static_function($plugin, $function) { * @param string filepath in file area * @return array information of file in file pool */ -function move_to_filepool($path, $name, $itemid, $filearea = 'user_draft', $filepath = '/') { +function repository_move_to_filepool($path, $name, $itemid, $filearea = 'user_draft', $filepath = '/') { global $DB, $CFG, $USER; $context = get_context_instance(CONTEXT_USER, $USER->id); $entry = new object(); @@ -575,7 +575,7 @@ function move_to_filepool($path, $name, $itemid, $filearea = 'user_draft', $file * @param object context * @return array */ -function get_repository_client($context){ +function repository_get_client($context){ global $CFG, $USER; $suffix = uniqid(); $strsaveas = get_string('saveas', 'repository').': '; diff --git a/repository/ws.php b/repository/ws.php index 89fa573ca9..52683b44e3 100644 --- a/repository/ws.php +++ b/repository/ws.php @@ -71,7 +71,7 @@ if ($action == 'list' || $action == 'search') { $path = $repo->get_file($file, $title); $itemid = (int)substr(hexdec(uniqid()), 0, 9)+rand(1,100); try { - $info = move_to_filepool($path, $title, $itemid); + $info = repository_move_to_filepool($path, $title, $itemid); if($env == 'form'){ echo json_encode($info['id']); } elseif($env == 'editor') {