From 33e2a2d283c03a4e4bc3c97ec8754a24a280629e Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 24 Apr 2008 19:39:03 +0200 Subject: [PATCH] [svn r15067] Fixed CSS picker in Administrator view. Add dokeos_classic as default in current setting. --- main/admin/settings.php | 16 ++++----- main/admin/style_preview.php | 36 +++++++++++++------ main/chat/chat.php | 8 ++--- main/css/medical/default.css | 6 ++-- main/css/public_admin/default.css | 8 +++-- main/inc/header.inc.php | 11 +++--- main/install/dokeos_main.sql | 2 +- main/install/migrate-db-1.8.4-1.8.5-pre.sql | 3 +- .../openoffice_text_document.class.php | 2 +- 9 files changed, 58 insertions(+), 34 deletions(-) diff --git a/main/admin/settings.php b/main/admin/settings.php index b45506faa4..8a448b1c70 100644 --- a/main/admin/settings.php +++ b/main/admin/settings.php @@ -1,5 +1,5 @@ '.' AND $file <> '..' AND is_dir(api_get_path(SYS_PLUGIN_PATH).$file)) @@ -255,7 +255,7 @@ function handle_plugins() $possibleplugins[] = $file; } } - closedir($handle); + @closedir($handle); /* for each of the possible plugin dirs we check if a file plugin.php (that contains all the needed information about this plugin) can be found in the dir. @@ -384,7 +384,7 @@ function handle_stylesheets() echo '
'; echo '
'; - if ($handle = opendir(api_get_path(SYS_PATH).'main/css/')) + if ($handle = @opendir(api_get_path(SYS_PATH).'main/css/')) { $counter=1; while (false !== ($style_dir = readdir($handle))) @@ -398,7 +398,7 @@ function handle_stylesheets() { if ($style_dir != '.' && $style_dir != '..') { - if ($currentstyle == $style_dir OR ($style_dir == 'default' AND !$currentstyle)) + if ($currentstyle == $style_dir OR ($style_dir == 'dokeos_classic' AND !$currentstyle)) { $selected = 'checked="checked"'; } @@ -406,9 +406,9 @@ function handle_stylesheets() { $selected = ''; } - + $show_name=ucwords(str_replace('_',' ', $style_dir)); echo ""; - echo ''.$style_dir.''; + echo ''.$show_name.''; //echo ''; @@ -417,7 +417,7 @@ function handle_stylesheets() } } } - closedir($handle); + @closedir($handle); } echo '
'; } diff --git a/main/admin/style_preview.php b/main/admin/style_preview.php index 419dc45bfc..fa47376c27 100644 --- a/main/admin/style_preview.php +++ b/main/admin/style_preview.php @@ -2,30 +2,44 @@ include_once('../inc/global.inc.php'); if (isset($_GET['style']) AND $_GET['style']<>'') { - $htmlHeadXtra[] = ''; + $style=Security::remove_XSS($_GET['style']); + //$htmlHeadXtra[] = ''; + echo ''; +} +else +{ + $currentstyle = api_get_setting('stylesheets'); + echo ''; } -Display::display_header($tool_name); -?> - + +//Display::display_header($tool_name); +include(api_get_path(INCLUDE_PATH).'banner.inc.php'); + +?> +

tool title

This is the introduction text.

-
editdelete
+
+ editdelete
Normal Message
Error Message
-
+
+ -
+
+ + - - - + + + @@ -134,7 +148,7 @@ Display::display_header($tool_name);
« 2006»<< 2006>>
Mon
-