Browse Source

Fixing PHP warnings.

Julio Montoya 11 years ago
parent
commit
cf3175d864

+ 2 - 0
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php

@@ -12,6 +12,8 @@ $editor = isset($_GET['editor']) ? $_GET['editor'] : null;
 echo '<div id="content">';
 $count = 1;
 $thumbnailBaseUrl = CONFIG_URL_IMG_THUMBNAIL;
+global $is_user_in_group;
+$to_group_id = api_get_group_id();
 
 foreach ($fileList as $file) {
 

+ 3 - 1
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_get_file_listing.php

@@ -89,6 +89,8 @@ echo "};";
 echo 'numRows = '.sizeof($fileList).";\n";
 echo "files = {\n";
 $count = 1;
+global $is_user_in_group;
+$to_group_id = api_get_group_id();
 
 foreach ($fileList as $file) {
     //show group's directory only if I'm member. Or if I'm a teacher. TODO: check groups not necessary because the student dont have access to main folder documents (only to document/group or document/shared_folder). Teachers can access to all groups ?
@@ -160,4 +162,4 @@ switch ($view) {
     case 'detail':
     default:
         include_once(DIR_AJAX_ROOT.'_ajax_get_details_listing.php');
-}
+}

+ 6 - 2
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.manager.php

@@ -155,12 +155,16 @@ class manager
      * get the list of files and folders under this current fold
      * 	@return array
      */
-    function getFileList() {
+    function getFileList()
+    {
         $outputs = array();
         $files = array();
         $folders = array();
         $tem = array();
 
+        $to_group_id = api_get_group_id();
+        global $is_user_in_group;
+
         $dirHandler = @opendir($this->getCurrentFolderPath());
         if ($dirHandler) {
             while (false !== ($file = readdir($dirHandler))) {
@@ -386,4 +390,4 @@ class manager
 
 }
 
-?>
+?>

+ 1 - 0
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/function.base.php

@@ -1065,6 +1065,7 @@ function hideFolderName($folderName) {
 
     //show group's directory only if I'm member
     $show_doc_group = true;
+    global $is_user_in_group;
     if (preg_match("/$group_folder/", $folderName)) {
         $show_doc_group = false;
         if ($is_user_in_group) {