Removed deprecated variable from all files

skala
Yannick Warnier 14 years ago
parent 2409e20513
commit e456fea017
  1. 1
      main/inc/lib/banner.lib.php
  2. 4
      main/inc/lib/display.lib.php
  3. 2
      main/inc/lib/template.lib.php
  4. 7
      main/install/configuration.dist.php
  5. 10
      main/user/user_add.php
  6. 2
      tests/main/inc/banner.inc.test.php
  7. 2
      tests/main/inc/banner.lib.test.php
  8. 2
      tests/main/inc/lib/display.lib.test.php
  9. 3
      user_portal.php

@ -104,7 +104,6 @@ function get_tabs() {
// Platform administration
if (api_is_platform_admin(true)) {
//$navigation['platform_admin']['url'] = $rootAdminWeb;
$navigation['platform_admin']['url'] = api_get_path(WEB_CODE_PATH).'admin/';
$navigation['platform_admin']['title'] = get_lang('PlatformAdmin');
}

@ -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, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF;
global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $text_dir, $plugins, $_user, $_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, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF, $language_interface;
global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $text_dir, $plugins, $_user, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF, $language_interface;
global $menu_navigation;
require api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
}

@ -129,7 +129,7 @@ class Template extends Smarty {
$nameTools = $this->title;
global $_plugins, $lp_theme_css, $mycoursetheme, $user_theme, $platform_theme;
global $httpHeadXtra, $htmlHeadXtra, $_course, $_user, $text_dir, $plugins, $_user,
$rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF;
$_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF;
global $menu_navigation;
global $_configuration, $show_learn_path;

@ -80,12 +80,7 @@ $_configuration['course_folder'] = "courses/";
// @todo this shouldn't be here.
// Directory of the admin-area
$rootAdminAppend = "admin/";
// Do not change the following values
// @todo should be moved to api_get_path
$rootAdminSys = $clarolineRepositorySys.$rootAdminAppend;
$rootAdminWeb = $clarolineRepositoryWeb.$rootAdminAppend;
$_configuration['admin_append_path'] = "admin/";
// directory to store archived courses
$archiveDirName = "archive";

@ -360,13 +360,5 @@ else
IMPORT XML/CSV USER LIST
==========================*/
if($is_platformAdmin)
{
echo "<a href=\"".$rootAdminWeb."importUserList.php\">".get_lang('UserMany')."</a>";
} // if is_platformAdmin
else
{
echo "<p>".get_lang('IfYouWantToAddManyUsers')."</p>";
}
echo "<p>".get_lang('IfYouWantToAddManyUsers')."</p>";
Display::display_footer();

@ -6,7 +6,7 @@ class TestBanner extends UnitTestCase{
$this->UnitTestCase('Banners library - main/inc/banner.inc.test.php');
}
public function testGetTabs(){
global $_course, $rootAdminWeb, $_user;
global $_course, $_user;
ob_start();
require_once(api_get_path(SYS_CODE_PATH).'inc/banner.inc.php');
ob_end_clean();

@ -7,7 +7,7 @@ class TestBanner extends UnitTestCase{
}
public function testGetTabs(){
global $_course, $rootAdminWeb, $_user;
global $_course, $_user;
$res = get_tabs();
$this->assertTrue(is_array($res));
$this->assertTrue($res);

@ -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, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF, $language_interface;
global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $text_dir, $plugins, $_user, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF, $language_interface;
global $menu_navigation;
ob_start();
$res=Display::display_reduced_header();

@ -13,7 +13,6 @@
* @todo Shouldn't the SCRIPTVAL_ and CONFVAL_ constant be moved to the config page? Has anybody any idea what the are used for?
* If these are really configuration settings then we can add those to the dokeos config settings.
* @todo move display_courses and some other functions to a more appripriate place course.lib.php or user.lib.php
* @todo use api_get_path instead of $rootAdminWeb
* @todo check for duplication of functions with index.php (user_portal.php is orginally a copy of index.php)
* @todo display_digest, shouldn't this be removed and be made into an extension?
*/
@ -244,4 +243,4 @@ if (api_is_platform_admin() || api_is_drh()) {
$controller->tpl->display_two_col_template();
// Deleting the session_id.
api_session_unregister('session_id');
api_session_unregister('session_id');

Loading…
Cancel
Save