diff --git a/class2.php b/class2.php index da2824ef0..1117785a7 100644 --- a/class2.php +++ b/class2.php @@ -9,9 +9,9 @@ * General purpose file * * $Source: /cvs_backup/e107_0.8/class2.php,v $ -* $Revision: 1.108 $ -* $Date: 2009-07-16 02:55:18 $ -* $Author: e107coders $ +* $Revision: 1.109 $ +* $Date: 2009-07-18 10:17:56 $ +* $Author: marj_nl_fr $ * */ // @@ -963,31 +963,33 @@ $isPluginDir = strpos(e_SELF,'/'.$PLUGINS_DIRECTORY) !== FALSE; // True if we'r $e107Path = str_replace($e107->base_path, '', e_SELF); // Knock off the initial bits if ( (!$isPluginDir && strpos($e107Path, $ADMIN_DIRECTORY) === 0 ) // Core admin directory - || ($isPluginDir && (strpos(e_PAGE,'admin_') === 0 || strpos($e107Path, 'admin/') !== false)) // Plugin admin file or directory + || ($isPluginDir && (strpos(e_PAGE,'admin_') === 0 || strpos($e107Path, 'admin/') !== FALSE)) // Plugin admin file or directory || (varsettrue($eplug_admin)) // Admin forced ) { - $inAdminDir = true; + $inAdminDir = TRUE; + // Load admin phrases ASAP + include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php'); } if(!defined('THEME')) { - if ($inAdminDir && varsettrue($pref['admintheme'])&& (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === false)) + if ($inAdminDir && varsettrue($pref['admintheme'])&& (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE)) { /* if (strpos(e_SELF, "newspost.php") !== FALSE) { define("MAINTHEME", e_THEME.$pref['sitetheme']."/"); MAINTHEME no longer used in core distribution } */ - checkvalidtheme($pref['admintheme']); + checkvalidtheme($pref['admintheme']); } elseif (USERTHEME !== false && USERTHEME != 'USERTHEME' && !$inAdminDir) { - checkvalidtheme(USERTHEME); + checkvalidtheme(USERTHEME); } else { - checkvalidtheme($pref['sitetheme']); + checkvalidtheme($pref['sitetheme']); } diff --git a/e107_admin/auth.php b/e107_admin/auth.php index 05c6e4865..473902073 100644 --- a/e107_admin/auth.php +++ b/e107_admin/auth.php @@ -9,20 +9,23 @@ * Administration Area Authorization * * $Source: /cvs_backup/e107_0.8/e107_admin/auth.php,v $ - * $Revision: 1.8 $ - * $Date: 2009-07-07 06:50:55 $ - * $Author: e107coders $ + * $Revision: 1.9 $ + * $Date: 2009-07-18 10:17:56 $ + * $Author: marj_nl_fr $ */ if (!defined('e107_INIT')) { exit; } +/* done in class2 @include_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php"); @include_once(e_LANGUAGEDIR."English/admin/lan_admin.php"); +*/ if (ADMIN) { define("ADMIN_PAGE", true); //don't include it if it'a an AJAX call or not wanted - if(!e_AJAX_REQUEST && !defset('NO_HEADER')) require_once(e_ADMIN."header.php"); + if(!e_AJAX_REQUEST && !defset('NO_HEADER')) + require_once(e_ADMIN."header.php"); /* * FIXME - missing $style for tablerender * The Solution: parse_admin() without sending it to the browser if it's an ajax call diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 8a7a9a205..e0a286a68 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -9,9 +9,9 @@ * News Administration * * $Source: /cvs_backup/e107_0.8/e107_admin/newspost.php,v $ - * $Revision: 1.44 $ - * $Date: 2009-07-17 07:53:13 $ - * $Author: e107coders $ + * $Revision: 1.45 $ + * $Date: 2009-07-18 10:17:56 $ + * $Author: marj_nl_fr $ */ require_once("../class2.php"); @@ -29,7 +29,7 @@ $pst->form = "core-newspost-create-form"; // form id of the form that will have $pst->page = "newspost.php?create"; // display preset options on which page(s). $pst->id = "admin_newspost"; // ------------------------------ -require_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php"); // maybe this should be put in class2.php when 'admin' is detected. +// done in class2: require_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php"); // maybe this should be put in class2.php when 'admin' is detected. $newspost = new admin_newspost(e_QUERY, $pst); $gen = new convert(); @@ -546,7 +546,7 @@ class admin_newspost $temp['news_newdateheader'] = intval($_POST['news_newdateheader']); $temp['news_unstemplate'] = intval($_POST['news_unstemplate']); $temp['news_editauthor'] = intval($_POST['news_editauthor']); - + if ($admin_log->logArrayDiffs($temp, $pref, 'NEWS_06')) { save_prefs(); // Only save if changes @@ -1524,7 +1524,7 @@ class admin_newspost $frm = new e_form(true); echo $frm->filterValue($_POST['filtertype'],$this->_fields); } - + function show_news_prefs() { @@ -1730,7 +1730,7 @@ class admin_newspost - function showMaintenance() + function showMaintenance() { require_once(e_HANDLER."form_handler.php"); $frm = new e_form(true); //enable inner tabindex counter @@ -1745,7 +1745,7 @@ class admin_newspost