From 057e5e9d1da2dedcbb51bc5a1630c775b6702f53 Mon Sep 17 00:00:00 2001 From: mcfly Date: Thu, 4 Dec 2008 21:05:05 +0000 Subject: [PATCH] Small changes --- class2.php | 11 ++++--- e107_themes/templates/header_default.php | 41 ++++++++++++------------ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/class2.php b/class2.php index 40acc9c7c..bb128724c 100644 --- a/class2.php +++ b/class2.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/class2.php,v $ -| $Revision: 1.83 $ -| $Date: 2008-12-03 15:05:52 $ +| $Revision: 1.84 $ +| $Date: 2008-12-04 21:05:05 $ | $Author: mcfly_e107 $ +----------------------------------------------------------------------------+ */ @@ -638,8 +638,9 @@ $e107->override = new override; $override = &$e107->override; e107_require_once(e_HANDLER.'userclass_class.php'); -$e107->e_userclass = new user_class; -$e_userclass = &$e107->e_userclass; +$e107->e_userclass = new e_userclass; +$e107->user_class = new user_class; +$e_userclass = &$e107->user_class; if(isset($pref['notify']) && $pref['notify'] == true) { @@ -1288,7 +1289,7 @@ function get_user_data($uid, $extra = '') //=========================================================== // Now look up the 'inherited' user classes - $var['user_class'] = $e107->e_userclass->get_all_user_classes($var['user_class']); + $var['user_class'] = $e107->user_class->get_all_user_classes($var['user_class']); //=========================================================== diff --git a/e107_themes/templates/header_default.php b/e107_themes/templates/header_default.php index a810813f0..9f36ac589 100644 --- a/e107_themes/templates/header_default.php +++ b/e107_themes/templates/header_default.php @@ -6,16 +6,17 @@ | Released under the terms and conditions of the GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_themes/templates/header_default.php,v $ -| $Revision: 1.25 $ -| $Date: 2008-11-21 11:12:06 $ -| $Author: secretr $ +| $Revision: 1.26 $ +| $Date: 2008-12-04 21:05:05 $ +| $Author: mcfly_e107 $ +-----------------------------------------------------------------------------------------------+ */ if (!defined('e107_INIT')) { exit; } define("USER_AREA",TRUE); define("ADMIN_AREA",FALSE); -$sql->db_Mark_Time('(Header Top)'); +$e107 = e107::getInstance(); +$e107->sql->db_Mark_Time('(Header Top)'); // // *** Code sequence for headers *** @@ -72,7 +73,7 @@ if (!function_exists("parseheader")) { // send the charset to the browser - overrides spurious server settings with the lan pack settings. // Would like to set the MIME type appropriately - but it broke other things -//if (stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml")) +//if (stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml")) // header("Content-type: application/xhtml+xml; charset=".CHARSET, true); //else header("Content-type: text/html; charset=".CHARSET, true); @@ -90,7 +91,7 @@ echo "\n"; } @@ -194,7 +195,7 @@ if (!isset($no_core_js) || !$no_core_js) */ // Send Plugin JS Files -if (isset($eplug_js) && $eplug_js) +if (isset($eplug_js) && $eplug_js) { echo "\n\n"; if(is_array($eplug_js)) @@ -212,11 +213,11 @@ if (isset($eplug_js) && $eplug_js) } // Send Theme JS Files -if (isset($theme_js_php) && $theme_js_php) +if (isset($theme_js_php) && $theme_js_php) { echo "\n"; -} -else +} +else { if (file_exists(THEME.'theme.js')) { echo "\n"; } if (is_readable(e_FILE.'user.js') && filesize(e_FILE.'user.js')) { echo "\n"; } @@ -224,7 +225,7 @@ else if (is_readable(e_FILE.'user.vbs') && filesize(e_FILE.'user.vbs')) { echo "\n"; } } -//XXX - CHAP JS +//XXX - CHAP JS if (!USER && ($pref['user_tracking'] == "session") && varset($pref['password_CHAP'],0)) { if ($pref['password_CHAP'] == 2) @@ -237,7 +238,7 @@ if (!USER && ($pref['user_tracking'] == "session") && varset($pref['password_CHA } -if((isset($pref['enable_png_image_fix']) && $pref['enable_png_image_fix'] == true) || (isset($sleight) && $sleight == true)) +if((isset($pref['enable_png_image_fix']) && $pref['enable_png_image_fix'] == true) || (isset($sleight) && $sleight == true)) { echo "\n\n"; } @@ -245,7 +246,7 @@ if((isset($pref['enable_png_image_fix']) && $pref['enable_png_image_fix'] == tru //IEpngfix - visible by IE6 only if((isset($pref['enable_png_image_fix']) && $pref['enable_png_image_fix'] == true) || (isset($sleight) && $sleight == true)) { /* - * The only problem is that the browser is REALLY, + * The only problem is that the browser is REALLY, * REALLY slow when it has to render more elements * try e.g. "div, img, td, input" (or just *) instead only img rule * However I hope it'll force IE6 users to switch to a modern browser... @@ -259,7 +260,7 @@ if((isset($pref['enable_png_image_fix']) && $pref['enable_png_image_fix'] == tru echo "\n"; } -//headerjs moved below +//headerjs moved below // Deprecated function finally removed //if(function_exists('core_head')){ echo core_head(); } @@ -338,7 +339,7 @@ if(function_exists('theme_head')){ // // FIXME H: Generate JS for image preloads -// +// if ($pref['image_preload']) { $ejs_listpics = ''; @@ -367,7 +368,7 @@ if (isset($script_text) && $script_text) { // // FIXME - I: Calculate JS onload() functions for the BODY tag -// +// // Fader menu global $eMenuActive, $eMenuArea; if(in_array('fader_menu', $eMenuActive)) $js_body_onload[] = 'changecontent(); '; @@ -384,7 +385,7 @@ if (count($js_body_onload)) $body_onload = " onload=\"".implode(" ",$js_body_onl // /* - * Fire Event e107:loaded + * Fire Event e107:loaded */ echo "\n"; echo " \n"; -$sql->db_Mark_Time("Main Page Body"); +$e107->sql->db_Mark_Time("Main Page Body"); // // K: (The rest is ignored for popups, which have no menus) @@ -504,7 +505,7 @@ if ($e107_popup != 1) { // Display Welcome Message when old method activated. - echo $tp->parseTemplate("{WMESSAGE=header}"); + echo $e107->tp->parseTemplate("{WMESSAGE=header}");