[svn r19048] displays the names of students and improvement in names with spaces

skala
Juan Carlos Raña 16 years ago
parent 4d4d9070a7
commit 22c2850d51
  1. 4
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_details_listing.php
  2. 4
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php
  3. 4
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajaxfilemanager.php
  4. 12
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.manager.php
  5. 10
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/function.base.php

@ -27,7 +27,7 @@
//Juan Carlos Raña
//hidden files and folders deleted by Dokeos. Hidde folders css, hotpotatoes, chat_files
$deleted_by_dokeos='_DELETED_';
$deleted_by_dokeos=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
$css_folder_dokeos='css';
$hotpotatoes_folder_dokeos='HotPotatoes_files';
$chat_files_dokeos='chat_files';
@ -49,7 +49,7 @@
}
//show icon sharedfolder
$shared_folder='shared_folder';
$shared_folder='shared folder'; //'shared folder' not 'shared_folder' because in $file['name'] _ is replaced with blank see class.manager.php
///Second step: hiding as the case
//Juan Carlos Raña

@ -10,7 +10,7 @@
//Juan Carlos Raña
//hidden files and folders deleted by Dokeos. Hidde folders css, hotpotatoes, chat
$deleted_by_dokeos='_DELETED_';
$deleted_by_dokeos=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
$css_folder_dokeos='css';
$hotpotatoes_folder_dokeos='HotPotatoes_files';
$chat_files_dokeos='chat_files';
@ -31,7 +31,7 @@
}
//show icon sharedfolder
$shared_folder='shared_folder';
$shared_folder='shared folder'; //'shared folder' not 'shared_folder' because in $file['name'] _ is replaced with blank see class.manager.php
///Second step: hiding as the case
//Juan Carlos Raña

@ -451,11 +451,11 @@ $(document).ready(
foreach(getFolderListing(CONFIG_SYS_ROOT_PATH) as $k=>$v)
{
if(hideFilename($k))
if(hideFolderName($k))
{
//shows only those permitted by Dokeos
?>
<option value="<?php echo $v; ?>" <?php echo (removeTrailingSlash(backslashToSlash(($folderInfo['path']))) == removeTrailingSlash(backslashToSlash(($v)))?' selected="selected"':''); ?>><?php echo hideFileName(shortenFileName($k, 30)); // shows only those permitted by Dokeos
<option value="<?php echo $v; ?>" <?php echo (removeTrailingSlash(backslashToSlash(($folderInfo['path']))) == removeTrailingSlash(backslashToSlash(($v)))?' selected="selected"':''); ?>><?php echo hideFolderName(shortenFileName($k, 30)); // shows only those permitted by Dokeos
?></option>
<?php
}

@ -90,7 +90,17 @@ class manager
$folderInfo = $file->getFileInfo();
if(sizeof($folderInfo))
{
$this->currentFolderInfo['name']=str_replace('_',' ',basename($this->currentFolderPath));////for Dokeos. Prevent long directory name
//for Dokeos in a name folder, replace num user by lastname and firstname
if(ereg('sf_user_', basename($this->currentFolderPath)))
{
$userinfo=Database::get_user_info_from_id(substr(basename($this->currentFolderPath), 8));
$this->currentFolderInfo['name']=$userinfo['lastname'].', '.$userinfo['firstname'];
}
else
{
$this->currentFolderInfo['name']=str_replace('_',' ',basename($this->currentFolderPath));//for Dokeos. Prevent long directory name
}
$this->currentFolderInfo['subdir']=0;
$this->currentFolderInfo['file']=0;
$this->currentFolderInfo['ctime']=$folderInfo['ctime'];

@ -837,11 +837,11 @@ function getRootPath() {
/**
* check if a folder is allowed to shown on the search 'look in' list
* @param string $fileName
* @param string $folderName
* @return string
* @author Juan Carlos Raña Trabado
*/
function hideFileName($fileName)
function hideFolderName($folderName)
{
//hidden files and folders deleted by Dokeos. Hidde folders css, hotpotatoes, chat
$deleted_by_dokeos='_DELETED_';
@ -855,7 +855,7 @@ function getRootPath() {
//show group's directory only if I'm member
$show_doc_group=true;
if(ereg($group_folder, $fileName))
if(ereg($group_folder, $folderName))
{
$show_doc_group=false;
if($is_user_in_group)
@ -864,9 +864,9 @@ function getRootPath() {
}
}
if(!ereg($deleted_by_dokeos, $fileName) && !ereg($css_folder_dokeos, $fileName) && !ereg($hotpotatoes_folder_dokeos, $fileName) && !ereg($chat_files_dokeos, $fileName) && !ereg($thumbs_folder, $fileName) && $show_doc_group==true)
if(!ereg($deleted_by_dokeos, $folderName) && !ereg($css_folder_dokeos, $folderName) && !ereg($hotpotatoes_folder_dokeos, $folderName) && !ereg($chat_files_dokeos, $folderName) && !ereg($thumbs_folder, $folderName) && $show_doc_group==true)
{
return substr($fileName,strpos($fileName, '-'),strlen($fileName)); //hide the firsts numbers
return substr($folderName,strpos($folderName, '-'),strlen($folderName)); //hide the firsts numbers
}
}

Loading…
Cancel
Save