[svn r18118] FS#2867 - FCKEditor: Platform administrators outside courses will use .../dokeos/home/default_platform_document/ repository.

skala
Ivan Tcholakov 17 years ago
parent 04053aa6d7
commit 69288159d3
  1. 3
      main/inc/lib/fckeditor/editor/filemanager/browser/default/connectors/php/io.php
  2. 4
      main/inc/lib/fckeditor/editor/plugins/ImageManager/config.inc.php
  3. 2
      main/inc/lib/fckeditor/editor/plugins/ImageManager/manager.php
  4. 10
      main/inc/lib/formvalidator/Element/html_editor.php

@ -64,10 +64,7 @@ function GetResourceTypeDirectory( $resourceType, $sCommand )
*/
function GetUrlFromPath( $resourceType, $folderPath, $sCommand )
{
global $currentCourseRepositoryWeb;
//return CombinePaths( GetResourceTypePath( $resourceType, $sCommand ), $folderPath ) ;
$resourceType =strtolower($resourceType);
//return $GLOBALS["UserFilesPath"] . $resourceType . $folderPath ;
return $resourceType . $folderPath;
}

@ -63,8 +63,8 @@ else
if (api_is_platform_admin() && $_SESSION['this_section'] == 'platform_admin')
{
// 3. Platform administration activities.
$IMConfig['base_dir'] = $_configuration['root_sys'].'main/default_course_document/';
$IMConfig['base_url'] = $_configuration['root_web'].'main/default_course_document/';
$IMConfig['base_dir'] = $_configuration['root_sys'].'home/default_platform_document/';
$IMConfig['base_url'] = $_configuration['root_web'].'home/default_platform_document/';
}
else
{

@ -12,11 +12,13 @@
$manager = new ImageManager($IMConfig);
$dirs = $manager->getDirs();
$var = explode('/',$_GET['base_url_alt']);
/*
// if the base_url_alt parameter there is a default_course_document we change the allow upload parameter
if (($var[count($var)-2] == 'default_course_document') && !api_is_platform_admin())
{
$IMConfig['allow_upload']=false;
}
*/
?>

@ -1,5 +1,5 @@
<?php
// $Id: html_editor.php 18026 2009-01-27 15:07:11Z ivantcholakov $
// $Id: html_editor.php 18118 2009-02-01 16:18:02Z ivantcholakov $
/*
==============================================================================
Dokeos - elearning and course management software
@ -200,22 +200,22 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
if (empty($this -> fck_editor->Config['CreateDocumentWebDir']))
{
$this -> fck_editor->Config['CreateDocumentWebDir'] = api_get_path(WEB_PATH).'main/default_course_document/';
$this -> fck_editor->Config['CreateDocumentWebDir'] = api_get_path(WEB_PATH).'home/default_platform_document/';
}
if (is_null($this -> fck_editor->Config['CreateDocumentDir']))
{
$this -> fck_editor->Config['CreateDocumentDir'] = api_get_path(WEB_PATH).'main/default_course_document/'; // This works, but it should be revised again.
$this -> fck_editor->Config['CreateDocumentDir'] = api_get_path(WEB_PATH).'home/default_platform_document/'; // A side-effect is in use here.
}
if (empty($this -> fck_editor->Config['BaseHref']))
{
$this -> fck_editor->Config['BaseHref'] = api_get_path(WEB_PATH).'main/default_course_document/';
$this -> fck_editor->Config['BaseHref'] = api_get_path(WEB_PATH).'home/default_platform_document/';
}
if (!$use_advanced_filemanager)
{
$upload_path = api_get_path(REL_PATH).'main/default_course_document/';
$upload_path = api_get_path(REL_PATH).'home/default_platform_document/';
}
}
else

Loading…
Cancel
Save