Эх сурвалжийг харах

[svn r17523] different location for the files sent by the platform administrator from my profile or from edit the portal main page

Juan Carlos Raña 16 жил өмнө
parent
commit
cf0854f8eb

+ 2 - 1
main/admin/configure_homepage.php

@@ -1,4 +1,4 @@
-<?php // $Id: configure_homepage.php 17509 2009-01-02 21:12:11Z herodoto $
+<?php // $Id: configure_homepage.php 17523 2009-01-03 20:59:49Z herodoto $
 /*
 ===== =========================================================================
 	Dokeos - elearning and course management software
@@ -31,6 +31,7 @@ $cidReset=true;
 include('../inc/global.inc.php');
 
 $this_section=SECTION_PLATFORM_ADMIN;
+$_SESSION['this_section']=$this_section;
 
 api_protect_admin_script();
 require_once(api_get_path(LIBRARY_PATH).'WCAG/WCAG_rendering.php');

+ 3 - 1
main/auth/profile.php

@@ -1,4 +1,4 @@
-<?php // $Id: profile.php 17479 2008-12-29 20:24:11Z cfasanando $
+<?php // $Id: profile.php 17523 2009-01-03 20:59:49Z herodoto $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -46,6 +46,8 @@ require ('../inc/global.inc.php');
 require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
 $this_section = SECTION_MYPROFILE;
  
+$_SESSION['this_section']=$this_section;
+
 api_block_anonymous_users();
 
 $htmlHeadXtra[] = '<script type="text/javascript">

+ 11 - 1
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php

@@ -94,8 +94,18 @@
 		}
 	}
 	else
-	{		
+	{	
+		if (api_is_platform_admin() && $_SESSION['this_section']=='platform_admin')
+		{
+			//home page portal
+			$PathDokeosAjaxFileManager='../../../../../../../home/default_platform_document/';
+		}
+		else
+		{		
+			//my profile
 			$PathDokeosAjaxFileManager='../../../../../../../main/upload/users/'.api_get_user_id().'/';	
+		}
+
 	}
 	
 	define('CONFIG_SYS_DEFAULT_PATH', $PathDokeosAjaxFileManager);

+ 11 - 0
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.php

@@ -33,6 +33,17 @@
 	{ 
 		mkdir(api_get_path(SYS_PATH).'main/upload/users/'.api_get_user_id().'/', 0777);
 	}
+	
+	if(api_is_platform_admin())
+	{	
+		$homepage_folder = api_get_path(SYS_PATH).'home/default_platform_document/';
+		if (!file_exists($homepage_folder))
+		{
+			mkdir(api_get_path(SYS_PATH).'home/default_platform_document/', 0777);
+		}
+		
+	}	
+	
 		
 	if($_course['id'])
 	{