]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13766: refactor all libary functions, they now all start with repository_
authorjerome <jerome>
Thu, 28 Aug 2008 05:13:13 +0000 (05:13 +0000)
committerjerome <jerome>
Thu, 28 Aug 2008 05:13:13 +0000 (05:13 +0000)
lib/form/filepicker.php
lib/weblib.php
repository/ajax.php
repository/lib.php
repository/ws.php

index 95c772dee870139adb0d9cca78dc949f20bc02c9..9a51ef5f79590ae078f41e7c8e2f9a328749b25a 100644 (file)
@@ -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 .= '<input type="hidden" value="" name="'.$this->_attributes['name'].'" id="'.$this->_attributes['id'].'_'.$suffix.'" />';
index d2673addd143f8871e41e65febf1c345d1a2b413..ab7ae009ff1118628627f6b9ad72dc4a5349288b 100644 (file)
@@ -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 .= '<div class="textareaicons">';
index 2e1eb752d5d4c3bc43393b95f2900ed7183d67ad..7ce1bceae7b3836835626a59fed1e0e89533226c 100644 (file)
@@ -35,7 +35,7 @@ if(!empty($_GET['create'])) {
   picker.
 
 \*******************************************************/
-$ret = get_repository_client();
+$ret = repository_get_client();
 ?>
 </head>
 <body class=" yui-skin-sam">
index 6e45c7d9a90c65985a7ee9a85ca58057271872ea..d467c6778fda05a7ff69d521a2a35218b96e3614 100644 (file)
@@ -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').': ';
index 89fa573ca9cf29ded35674a1e51be07eb91c4ad0..52683b44e3400f46229e0941255ec37ba7020221 100644 (file)
@@ -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') {