From e1a386d75957c75ea8d95dc43a4d52eb6a95239f Mon Sep 17 00:00:00 2001 From: Eric Marguin Date: Tue, 19 Dec 2006 15:48:35 +0100 Subject: [PATCH] [svn r10533] fix a little bug in news management --- index.php | 2 +- main/admin/configure_homepage.php | 46 +++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/index.php b/index.php index 4b31e81b25..725d308ccf 100644 --- a/index.php +++ b/index.php @@ -621,7 +621,7 @@ if (!$pageIncluded) echo ''; echo '
'; - + $user_selected_language = $_SESSION["_user"]["language"]; if(file_exists('home/home_news_'.$user_selected_language.'.html')) { include ('home/home_news_'.$user_selected_language.'.html'); diff --git a/main/admin/configure_homepage.php b/main/admin/configure_homepage.php index 59a1a8dbbc..a665edfa60 100644 --- a/main/admin/configure_homepage.php +++ b/main/admin/configure_homepage.php @@ -1,4 +1,4 @@ -$enreg) BasePath = api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ; + $oFCKeditor->Height = '400'; + $oFCKeditor->Width = '100%'; + $oFCKeditor->Value = isset($_POST['link_html'])?$_POST['link_html']:$link_html; + $oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js"; + $oFCKeditor->ToolbarSet = "Small"; + + echo $oFCKeditor->CreateHtml(); + ?> @@ -599,17 +612,17 @@ elseif($action == 'edit_top' || $action == 'edit_news') else { $name="home_news"; - - if(!file_exists("../../home/home_news_".$_SESSION["user_language_choice"].".html")){ + $user_selected_language = $_SESSION["_user"]["language"]; + if(!file_exists("../../home/home_news_".$user_selected_language.".html")){ $platform_language=api_get_setting("platformLanguage"); $open='../../home/home_news_'.$platform_language.'.html'; } else{ - $open='../../home/home_news_'.$_SESSION["user_language_choice"].'.html'; + $open='../../home/home_news_'.$user_selected_language.'.html'; } if(isset($_SESSION["user_language_choice"])){ - $language=$_SESSION["user_language_choice"]; + $language=$user_selected_language; } else{ $language=api_get_setting("platformLanguage"); @@ -655,14 +668,14 @@ if($action == 'edit_news'){ BasePath = api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ; $oFCKeditor->Height = '400'; $oFCKeditor->Width = '100%'; $oFCKeditor->Value = $open; $oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js"; - $oFCKeditor->ToolbarSet = "Middle"; + $oFCKeditor->ToolbarSet = "Small"; echo $oFCKeditor->CreateHtml(); ?> @@ -744,7 +757,22 @@ else