Browse Source

Removed from all scripts

Yannick Warnier 13 years ago
parent
commit
2409e20513

+ 2 - 11
main/admin/calendar.php

@@ -108,18 +108,9 @@ $nameTools = get_lang('GlobalAgenda'); // language variable in trad4all.inc.php
 // showing the header if we are not in the learning path, if we are in
 // the learning path, we do not include the banner so we have to explicitly
 // include the stylesheet, which is normally done in the header
-/*if (empty($_GET['origin']) or $_GET['origin'] != 'learnpath')
-{*/
 Display::display_header($nameTools,'Agenda');
-/*}
-else
-{
-	echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$clarolineRepositoryWeb."css/default.css\"/>";
-}*/
 
-/* 
-  			SETTING SOME VARIABLES
-*/
+/* SETTING SOME VARIABLES */
 // Variable definitions
 // Defining the shorts for the days. We use camelcase because these are arrays of language variables
 $DaysShort = api_get_week_days_short();
@@ -296,4 +287,4 @@ echo "&nbsp;</td></tr></table>";
 // The footer is displayed only if we are not in the learnpath
 if ($_GET['origin'] != 'learnpath') {
 	Display::display_footer();
-}
+}

+ 1 - 2
main/blog/blog_admin.php

@@ -49,7 +49,6 @@ if (api_is_allowed_to_edit()) {
 		);
 		Display::display_header('');
 	} else {		
-		//echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$clarolineRepositoryWeb."css/default.css\"/>"; //@todo this line should be deprecated
 	}	
 	echo '<div class="actions">';
 	echo "<a href='".api_get_self()."?".api_get_cidreq()."&action=add'>",Display::return_icon('new_blog.png',get_lang('AddBlog'),'','32')."</a>";
@@ -124,4 +123,4 @@ if (api_is_allowed_to_edit()) {
 }
 
 // Display the footer
-Display::display_footer();
+Display::display_footer();

+ 1 - 1
main/calendar/agenda.php

@@ -122,7 +122,7 @@ if (isset($_GET['toolgroup']) && !empty($_GET['toolgroup'])){
 } elseif (empty($origin) or $origin != 'learnpath') {	
     Display::display_header($nameTools,'Agenda');
 } else {
-	echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$clarolineRepositoryWeb."css/default.css\"/>";
+	echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".api_get_path(WEB_CODE_PATH)."css/default.css\"/>";
 }
 
 /* 

+ 2 - 2
main/inc/lib/display.lib.php

@@ -425,7 +425,7 @@ class Display {
     public static function display_header($tool_name ='', $help = null) {
         $nameTools = $tool_name;
         global $_plugins, $lp_theme_css, $mycoursetheme, $user_theme, $platform_theme;
-        global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $clarolineRepositoryWeb, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF;
+        global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF;
         global $menu_navigation;        
 		global $htmlCSSXtra;
         require api_get_path(INCLUDE_PATH).'header.inc.php';
@@ -436,7 +436,7 @@ class Display {
      */
     public static function display_reduced_header () {
         global $_plugins, $lp_theme_css, $mycoursetheme, $user_theme, $platform_theme;
-        global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $clarolineRepositoryWeb, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF, $language_interface;
+        global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF, $language_interface;
         global $menu_navigation;
         require api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
     }

+ 0 - 1
main/inc/lib/social.lib.php

@@ -936,7 +936,6 @@ class SocialManager extends UserManager {
 	/**
 	 * Display productions in whoisonline
 	 * @param int $user_id User id
-	 * @todo use the correct api_get_path instead of $clarolineRepositoryWeb
 	 */
 	public static function display_productions($user_id) {
 		$sysdir_array = UserManager::get_user_picture_path_by_id($user_id, 'system', true);

+ 1 - 1
main/inc/lib/template.lib.php

@@ -128,7 +128,7 @@ class Template extends Smarty {
 	private function set_header_parameters($help = null) {
 		$nameTools = $this->title;
 		global $_plugins, $lp_theme_css, $mycoursetheme, $user_theme, $platform_theme;
-		global $httpHeadXtra, $htmlHeadXtra, $_course, $_user, $clarolineRepositoryWeb, $text_dir, $plugins, $_user, 
+		global $httpHeadXtra, $htmlHeadXtra, $_course, $_user, $text_dir, $plugins, $_user, 
 				$rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF;		
 		global $menu_navigation;
 		global $_configuration, $show_learn_path;

+ 0 - 2
main/install/configuration.dist.php

@@ -84,8 +84,6 @@ $rootAdminAppend        = "admin/";
 
 // Do not change the following values
 // @todo should be moved to api_get_path
-$_configuration['sys_code_path'] = $_configuration['root_sys'].$_configuration['code_append'];
-$clarolineRepositoryWeb = $_configuration['root_web'].$_configuration['code_append'];
 $rootAdminSys           = $clarolineRepositorySys.$rootAdminAppend;
 $rootAdminWeb           = $clarolineRepositoryWeb.$rootAdminAppend;
 

+ 1 - 1
main/metadata/playscormmdset.inc.php

@@ -173,7 +173,7 @@ else
     <link rel="stylesheet" href="<?php echo api_get_path(WEB_CODE_PATH); ?>css/default.css" type="text/css" media="screen,projection" />
     <style type="text/css" media="screen, projection">
     /*<![CDATA[*/
-    @import "<?php echo $clarolineRepositoryWeb ?>css/default.css";
+    @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/default.css";
     /*]]>*/
     </style>
     <?php

+ 1 - 1
tests/main/inc/lib/add_course.lib.inc.test.php

@@ -123,7 +123,7 @@ class TestAddCourse extends UnitTestCase {
     }
 
     function TestFillDbCourse(){
-        global $_configuration, $clarolineRepositoryWeb, $_user;
+        global $_configuration, $_user;
         $courseDbName = $_configuration['table_prefix'].$courseDbName.$_configuration['db_glue'];
         $courseRepository = (api_get_path(SYS_COURSE_PATH).$courseRepository . "/dropbox/.htaccess");
         $language = 'english';

+ 3 - 3
tests/main/inc/lib/display.lib.test.php

@@ -122,7 +122,7 @@ class TestDisplay extends UnitTestCase {
 	// [/var/www/chamilo/main/inc/reduced_header.inc.php line 30] - exception
 /*	public function testdisplay_reduced_header() {
 		global $_plugins,$lp_theme_css,$mycoursetheme,$user_theme,$platform_theme;
-		global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $clarolineRepositoryWeb, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF, $language_interface;
+		global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF, $language_interface;
 		global $menu_navigation;
 		ob_start();
 		$res=Display::display_reduced_header();
@@ -189,7 +189,7 @@ class TestDisplay extends UnitTestCase {
 	// [/var/www/chamilo/main/inc/header.inc.php line 31] - exception
 /*	public function testdisplay_header() {
 		global $_plugins,$lp_theme_css,$mycoursetheme,$user_theme,$platform_theme;
-		global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $clarolineRepositoryWeb, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF;
+		global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF;
 		global $menu_navigation;
 		$tool_name = '';
 		$help = NULL;
@@ -319,4 +319,4 @@ class TestDisplay extends UnitTestCase {
 	}
 
 }
-?>
+?>