You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2008-07-11 22:46:09
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7216 Modified Files: mx_functions_phpbb.php Log Message: Moving phpbb_auth to backends... Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** mx_functions_phpbb.php 10 Jul 2008 23:02:05 -0000 1.73 --- mx_functions_phpbb.php 11 Jul 2008 22:46:04 -0000 1.74 *************** *** 15,142 **** } - // - // First off, include common vanilla phpBB functions, from our shared dir - // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() - // - include($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); - include($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); - - // - // Switch - // - switch (PORTAL_BACKEND) - { - case 'internal': - case 'phpbb2': - include_once($phpbb_root_path . 'includes/functions.' . $phpEx); // In case we need old functions... - include_once($mx_root_path . 'includes/sessions/phpbb2/auth.' . $phpEx); - break; - case 'phpbb3': - include_once($mx_root_path . 'includes/sessions/phpbb3/auth.' . $phpEx); - break; - } - - /** - * Permission/Auth class - * - * @package MX-Publisher - * - */ - class phpbb_auth extends phpbb_auth_base - { - /** - * get_auth_forum - * - * @param unknown_type $mode - * @return unknown - */ - function get_auth_forum($mode = 'phpbb') - { - global $userdata, $mx_root_path, $phpEx; - - // - // Try to reuse auth_view query result. - // - $userdata_key = 'mx_get_auth_' . $mode . $userdata['user_id']; - if( !empty($userdata[$userdata_key]) ) - { - $auth_data_sql = $userdata[$userdata_key]; - return $auth_data_sql; - } - - // - // Now, this tries to optimize DB access involved in auth(), - // passing AUTH_LIST_ALL will load info for all forums at once. - // - if( $mode == 'kb' ) - { - if (file_exists($mx_root_path . 'modules/mx_kb/kb/includes/functions_auth.' . $phpEx)) - { - include_once($mx_root_path . 'modules/mx_kb/kb/includes/functions_auth.' . $phpEx); - $mx_kb_auth = new mx_kb_auth(); - $mx_kb_auth->auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); - $is_auth_ary = $mx_kb_auth->auth_user; - } - else - { - include_once($mx_root_path . 'modules/mx_kb/includes/functions_kb_auth.' . $phpEx); - $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); - } - } - else - { - switch (PORTAL_BACKEND) - { - case 'internal': - case 'phpbb2': - $is_auth_ary = $this->auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); - break; - case 'phpbb3': - $is_auth_ary = $this->acl_getf('f_read', false); - //die('get_forum_auth'.var_export($is_auth_ary)); - break; - } - } - - // - // Loop through the list of forums to retrieve the ids for - // those with AUTH_VIEW allowed. - // - $auth_data_sql = ''; - foreach( $is_auth_ary as $fid => $is_auth_row ) - { - switch (PORTAL_BACKEND) - { - case 'internal': - case 'phpbb2': - if( ($is_auth_row['auth_view']) ) - { - $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; - } - break; - case 'phpbb3': - if( ($is_auth_row['f_read']) ) - { - $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; - } - break; - } - } - - if( empty($auth_data_sql) ) - { - $auth_data_sql = -1; - } - - $userdata[$userdata_key] = $auth_data_sql; - return $auth_data_sql; - } - } - - // - // Init the phpbb_auth class - // - $phpbb_auth = new phpbb_auth(); - /** * function mx_acl_getfignore() --- 15,18 ---- |
|
From: Jon O. <jon...@us...> - 2008-07-11 22:01:27
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18968/sessions/internal Modified Files: core.php Log Message: Cleansed mx_functions_blockcp.php Minor fixes Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/core.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** core.php 11 Jul 2008 21:52:37 -0000 1.2 --- core.php 11 Jul 2008 22:00:18 -0000 1.3 *************** *** 437,440 **** --- 437,454 ---- } } + + /** + * Enter description here... + * + * @return unknown + */ + function generate_group_select_sql() + { + $sql = "SELECT group_id, group_name + FROM " . GROUPS_TABLE . " + WHERE group_single_user <> " . TRUE . " + ORDER BY group_name ASC"; + return $sql; + } } ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2008-07-11 22:01:27
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18968/sessions/phpbb2 Modified Files: core.php Log Message: Cleansed mx_functions_blockcp.php Minor fixes Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/core.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** core.php 11 Jul 2008 21:52:37 -0000 1.2 --- core.php 11 Jul 2008 22:00:23 -0000 1.3 *************** *** 474,477 **** --- 474,491 ---- } } + + /** + * Enter description here... + * + * @return unknown + */ + function generate_group_select_sql() + { + $sql = "SELECT group_id, group_name + FROM " . GROUPS_TABLE . " + WHERE group_single_user <> " . TRUE . " + ORDER BY group_name ASC"; + return $sql; + } } ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2008-07-11 22:01:11
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18968/sessions/phpbb3 Modified Files: core.php session.php Log Message: Cleansed mx_functions_blockcp.php Minor fixes Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** core.php 11 Jul 2008 21:52:37 -0000 1.2 --- core.php 11 Jul 2008 22:00:23 -0000 1.3 *************** *** 516,519 **** --- 516,533 ---- return $parsed_items; } + + /** + * Enter description here... + * + * @return unknown + */ + function generate_group_select_sql() + { + $sql = "SELECT group_id, group_name + FROM " . GROUPS_TABLE . " + WHERE group_name NOT IN ('BOTS', 'GUESTS') + ORDER BY group_name ASC"; + return $sql; + } } ?> \ No newline at end of file Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/session.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** session.php 11 Jul 2008 21:23:18 -0000 1.26 --- session.php 11 Jul 2008 22:00:24 -0000 1.27 *************** *** 1350,1354 **** FROM " . MX_THEMES_TABLE . " mxt, " . STYLES_TABLE . " bbt WHERE mxt.style_name = bbt.style_name ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND mxt.themes_id = " . (int) $this->style; if ( !($result = $db->sql_query($sql, 120)) ) --- 1350,1354 ---- FROM " . MX_THEMES_TABLE . " mxt, " . STYLES_TABLE . " bbt WHERE mxt.style_name = bbt.style_name ! AND mxt.portal_backend = 'phpbb3' AND mxt.themes_id = " . (int) $this->style; if ( !($result = $db->sql_query($sql, 120)) ) |
|
From: Jon O. <jon...@us...> - 2008-07-11 22:00:59
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18968 Modified Files: mx_functions_blockcp.php page_tail.php Log Message: Cleansed mx_functions_blockcp.php Minor fixes Index: mx_functions_blockcp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_blockcp.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** mx_functions_blockcp.php 9 Mar 2008 23:38:00 -0000 1.26 --- mx_functions_blockcp.php 11 Jul 2008 22:00:04 -0000 1.27 *************** *** 62,66 **** function _controlpanel( $id, $new_block = false ) { ! global $blockcptemplate, $lang, $db, $board_config, $theme, $phpEx, $mx_root_path, $s_hidden_fields, $userdata, $cookie_states, $module_nav_icon_url, $portalpage, $mx_request_vars, $images; $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0; --- 62,66 ---- function _controlpanel( $id, $new_block = false ) { ! global $blockcptemplate, $lang, $db, $board_config, $theme, $phpEx, $mx_root_path, $s_hidden_fields, $userdata, $cookie_states, $module_nav_icon_url, $portalpage, $mx_request_vars, $images, $mx_backend; $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0; *************** *** 472,491 **** // Get the list of phpBB usergroups // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> " . TRUE . " ! ORDER BY group_name ASC"; ! break; ! case 'phpbb3': ! $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_name NOT IN ('BOTS', 'GUESTS') ! ORDER BY group_name ASC"; ! break; ! } if( !($result = $db->sql_query($sql)) ) --- 472,476 ---- // Get the list of phpBB usergroups // ! $mx_backend->generate_group_select_sql(); if( !($result = $db->sql_query($sql)) ) Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** page_tail.php 11 Jul 2008 21:23:17 -0000 1.39 --- page_tail.php 11 Jul 2008 22:00:17 -0000 1.40 *************** *** 109,129 **** $mx_backend->page_tail('generate_backend_version'); - /* - switch (PORTAL_BACKEND) - { - case 'internal': - - case 'phpbb2': - - $current_phpbb_version = '2' . $board_config['version']; - break; - - case 'phpbb3': - - $current_phpbb_version = $board_config['version']; - break; - } - */ - $template->assign_vars(array( 'U_PORTAL_ROOT_PATH' => PORTAL_URL, --- 109,112 ---- |
|
From: Jon O. <jon...@us...> - 2008-07-11 21:52:41
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16006 Modified Files: template.php Log Message: Cleaned up template.php Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/template.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** template.php 21 Jun 2008 22:20:59 -0000 1.28 --- template.php 11 Jul 2008 21:52:38 -0000 1.29 *************** *** 164,181 **** $this->vars = &$this->_tpldata['.'][0]; // load configuration ! switch(PORTAL_BACKEND) ! { ! case 'internal': ! $edit_db = false; ! break; ! case 'phpbb2': ! case 'phpbb3': ! $edit_db = true; ! break; ! default: ! $edit_db = true; ! break; ! } ! $this->load_config($root, $edit_db); } --- 164,168 ---- $this->vars = &$this->_tpldata['.'][0]; // load configuration ! $this->load_config($root); } *************** *** 183,189 **** * Load mod configuration */ ! function load_config($root, $edit_db) { ! global $mx_cache, $board_config, $portal_config, $phpbb_root_path, $mx_root_path, $phpEx; // getting mod version from config and comparing with real data $ver = isset($board_config['xs_version']) ? $board_config['xs_version'] : ( isset($portal_config['xs_version']) ? $portal_config['xs_version'] : 0 ); --- 170,179 ---- * Load mod configuration */ ! function load_config($root) { ! global $mx_cache, $board_config, $portal_config, $phpbb_root_path, $mx_root_path, $phpEx, $mx_backend; ! ! $edit_db = $mx_backend->edit_db; ! // getting mod version from config and comparing with real data $ver = isset($board_config['xs_version']) ? $board_config['xs_version'] : ( isset($portal_config['xs_version']) ? $portal_config['xs_version'] : 0 ); *************** *** 272,290 **** for($i=0; $i<count($add); $i++) { ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! $sql = "ALTER TABLE " . PORTAL_TABLE . " ADD " . $add[$i] . " varchar(255) NOT NULL default ''"; ! $sql = "UPDATE " . PORTAL_TABLE . " SET " . $add[$i] . " = '" . str_replace('\\\'', '\'\'', addslashes($board_config[$add[$i]])) . "' WHERE portal_id = 1"; ! ! $portal_config[$add[$i]] = $board_config[$add[$i]]; ! $mx_cache->put( 'mxbb_config', $portal_config ); ! break; ! ! case 'phpbb2': ! case 'phpbb3': ! $sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('" . $add[$i] . "', '" . str_replace('\\\'', '\'\'', addslashes($board_config[$add[$i]])) . "')"; ! break; ! } $db->sql_query($sql); } --- 262,266 ---- for($i=0; $i<count($add); $i++) { ! $sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('" . $add[$i] . "', '" . str_replace('\\\'', '\'\'', addslashes($board_config[$add[$i]])) . "')"; $db->sql_query($sql); } *************** *** 292,306 **** for($i=0; $i<count($del); $i++) { ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! $sql = "DELETE FROM " . PORTAL_TABLE . " WHERE config_name='" . $db->sql_escape($del[$i]) . "'"; ! break; ! ! case 'phpbb2': ! case 'phpbb3': ! $sql = "DELETE FROM " . CONFIG_TABLE . " WHERE config_name='" . $del[$i] . "'"; ! break; ! } $db->sql_query($sql); } --- 268,272 ---- for($i=0; $i<count($del); $i++) { ! $sql = "DELETE FROM " . CONFIG_TABLE . " WHERE config_name='" . $del[$i] . "'"; $db->sql_query($sql); } *************** *** 308,326 **** for($i=0; $i<count($up); $i++) { ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! $sql = "UPDATE " . PORTAL_TABLE . " SET '" . $up[$i] . "' = '" . str_replace('\\\'', '\'\'', addslashes($board_config[$up[$i]])) . "' WHERE portal_id = 1"; ! ! $portal_config[$up[$i]] = $board_config[$up[$i]]; ! $mx_cache->put( 'mxbb_config', $portal_config ); ! break; ! ! case 'phpbb2': ! case 'phpbb3': ! $sql = "UPDATE " . CONFIG_TABLE . " SET config_value='" . str_replace('\\\'', '\'\'', addslashes($board_config[$up[$i]])) . "' WHERE config_name='" . $up[$i] . "'"; ! $mx_cache->put( 'phpbb_config', $board_config ); ! break; ! } $db->sql_query($sql); } --- 274,279 ---- for($i=0; $i<count($up); $i++) { ! $sql = "UPDATE " . CONFIG_TABLE . " SET config_value='" . str_replace('\\\'', '\'\'', addslashes($board_config[$up[$i]])) . "' WHERE config_name='" . $up[$i] . "'"; ! $mx_cache->put( 'phpbb_config', $board_config ); $db->sql_query($sql); } *************** *** 973,987 **** global $admin_script; $admin_script = ($admin_script) ? $admin_script : $filename; - } ! if ( !(PORTAL_BACKEND == 'phpbb3') ) ! { ! $template = $theme['template_name']; ! } ! else ! { ! $template = $theme['style_name']; ! } global $$template; --- 926,932 ---- global $admin_script; $admin_script = ($admin_script) ? $admin_script : $filename; } ! $template = $mx_user->template_name; global $$template; |
|
From: Jon O. <jon...@us...> - 2008-07-11 21:52:41
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16006/sessions/internal Modified Files: core.php Log Message: Cleaned up template.php Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/core.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** core.php 11 Jul 2008 21:23:19 -0000 1.1 --- core.php 11 Jul 2008 21:52:37 -0000 1.2 *************** *** 22,25 **** --- 22,30 ---- class mx_backend { + // + // XS Template - use backend db settings + // + var $edit_db = false; + /** * Validate backend |
|
From: Jon O. <jon...@us...> - 2008-07-11 21:52:41
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16006/sessions/phpbb2 Modified Files: core.php Log Message: Cleaned up template.php Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/core.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** core.php 11 Jul 2008 21:23:19 -0000 1.1 --- core.php 11 Jul 2008 21:52:37 -0000 1.2 *************** *** 22,25 **** --- 22,30 ---- class mx_backend { + // + // XS Template - use backend db settings + // + var $edit_db = true; + /** * Validate backend |
|
From: Jon O. <jon...@us...> - 2008-07-11 21:52:41
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16006/sessions/phpbb3 Modified Files: core.php Log Message: Cleaned up template.php Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** core.php 11 Jul 2008 21:23:18 -0000 1.1 --- core.php 11 Jul 2008 21:52:37 -0000 1.2 *************** *** 22,25 **** --- 22,30 ---- class mx_backend { + // + // XS Template - use backend db settings + // + var $edit_db = true; + /** * Validate backend |
|
From: Jon O. <jon...@us...> - 2008-07-11 21:23:53
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2159/includes Modified Files: mx_functions_core.php page_header.php page_tail.php Log Message: New object, mx_backend() Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** page_header.php 3 Jul 2008 17:52:09 -0000 1.55 --- page_header.php 11 Jul 2008 21:23:17 -0000 1.56 *************** *** 93,255 **** // Generate logged in/logged out status // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! ! if ( $userdata['session_logged_in'] ) ! { ! $is_logged = true; ! $u_login_logout = 'login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id']; ! $l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]'; ! } ! else ! { ! $is_logged = false; ! $u_login_logout = 'login.'.$phpEx; ! $l_login_logout = $lang['Login']; ! } ! ! $s_last_visit = ( $userdata['session_logged_in'] ) ? phpBB2::create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : ''; ! ! // ! // Obtain number of new private messages ! // if user is logged in ! // ! if ( ($userdata['session_logged_in']) && (empty($gen_simple_header)) ) ! { ! if ( $userdata['user_new_privmsg'] ) ! { ! $l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms']; ! $l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']); ! ! if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] ) ! { ! $sql = "UPDATE " . USERS_TABLE . " ! SET user_last_privmsg = " . $userdata['user_lastvisit'] . " ! WHERE user_id = " . $userdata['user_id']; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql); ! } ! ! $s_privmsg_new = 1; ! $icon_pm = $images['pm_new_msg']; ! } ! else ! { ! $s_privmsg_new = 0; ! $icon_pm = $images['pm_no_new_msg']; ! } ! $mx_priv_msg = $lang['Private_Messages'] . ' (' . $userdata['user_new_privmsg'] . ')'; ! } ! else ! { ! $l_privmsgs_text = $lang['No_new_pm']; ! ! $s_privmsg_new = 0; ! $icon_pm = $images['pm_no_new_msg']; ! $mx_priv_msg = $lang['Private_Messages']; ! } ! ! if ( $userdata['user_unread_privmsg'] ) ! { ! $l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms']; ! $l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']); ! } ! else ! { ! $l_privmsgs_text_unread = $lang['No_unread_pm']; ! } ! } ! else ! { ! $icon_pm = $images['pm_no_new_msg']; ! $l_privmsgs_text = $lang['Login_check_pm']; ! $l_privmsgs_text_unread = ''; ! $s_privmsg_new = 0; ! $mx_priv_msg = $lang['Private_Messages']; ! } ! ! break; ! ! case 'phpbb3': ! ! if ( $mx_user->data['user_id'] != 1 ) ! { ! $is_logged = true; ! $u_login_logout = 'login.'.$phpEx.'?logout=true&sid=' . $mx_user->data['session_id']; ! $l_login_logout = $lang['Logout'] . ' [ ' . $mx_user->data['username'] . ' ]'; ! } ! else ! { ! $is_logged = false; ! $u_login_logout = 'login.'.$phpEx; ! $l_login_logout = $lang['Login']; ! } ! $s_last_visit = ( $mx_user->data['session_logged_in'] ) ? phpBB2::create_date($board_config['default_dateformat'], $mx_user->data['user_lastvisit'], $board_config['board_timezone']) : ''; ! ! // ! // Obtain number of new private messages ! // if user is logged in ! // ! if ( ($mx_user->data['session_logged_in']) && (empty($gen_simple_header)) ) ! { ! if ( $mx_user->data['user_new_privmsg'] ) ! { ! $l_message_new = ( $mx_user->data['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms']; ! $l_privmsgs_text = sprintf($l_message_new, $mx_user->data['user_new_privmsg']); ! ! if ( $mx_user->data['user_last_privmsg'] > $mx_user->data['user_lastvisit'] ) ! { ! $sql = "UPDATE " . USERS_TABLE . " ! SET user_last_privmsg = " . $mx_user->data['user_lastvisit'] . " ! WHERE user_id = " . $mx_user->data['user_id']; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql); ! } ! ! $s_privmsg_new = 1; ! $icon_pm = $images['pm_new_msg']; ! } ! else ! { ! $s_privmsg_new = 0; ! $icon_pm = $images['pm_no_new_msg']; ! } ! $mx_priv_msg = $lang['Private_Messages'] . ' (' . $mx_user->data['user_new_privmsg'] . ')'; ! } ! else ! { ! $l_privmsgs_text = $lang['No_new_pm']; ! ! $s_privmsg_new = 0; ! $icon_pm = $images['pm_no_new_msg']; ! $mx_priv_msg = $lang['Private_Messages']; ! } ! ! if ( $mx_user->data['user_unread_privmsg'] ) ! { ! $l_message_unread = ( $mx_user->data['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms']; ! $l_privmsgs_text_unread = sprintf($l_message_unread, $mx_user->data['user_unread_privmsg']); ! } ! else ! { ! $l_privmsgs_text_unread = $lang['No_unread_pm']; ! } ! } ! else ! { ! $icon_pm = $images['pm_no_new_msg']; ! $l_privmsgs_text = $lang['Login_check_pm']; ! $l_privmsgs_text_unread = ''; ! $s_privmsg_new = 0; ! $mx_priv_msg = $lang['Private_Messages']; ! } ! ! break; ! } ! // --- 93,97 ---- // Generate logged in/logged out status // ! $mx_backend->page_header('generate_login_logout_stats'); // *************** *** 294,297 **** --- 136,142 ---- } + // + // Search box + // $search_page_id_pafiledb = get_page_id('dload.' . $phpEx, true); $search_page_id_kb = get_page_id('kb.' . $phpEx, true); *************** *** 340,375 **** } - // Definitions of main navigation links - switch (PORTAL_BACKEND) - { - case 'internal': - case 'phpbb2': - $u_register = 'profile.'.$phpEx.'?mode=register' ; - $u_profile = 'profile.'.$phpEx.'?mode=editprofile'; - $u_privatemsgs = 'privmsg.'.$phpEx.'?folder=inbox'; - $u_privatemsgs_popup = 'privmsg.'.$phpEx.'?mode=newpm'; - $u_search = 'search.'.$phpEx; - $u_memberlist = 'memberlist.'.$phpEx; - $u_modcp = 'modcp.'.$phpEx; - $u_faq = 'faq.'.$phpEx; - $u_viewonline = 'viewonline.'.$phpEx; - $u_group_cp = 'groupcp.'.$phpEx; - $u_sendpassword = mx3_append_sid("{$phpbb_root_path}profile.$phpEx", 'mode=sendpassword'); - break; - case 'phpbb3': - $u_register = 'ucp.'.$phpEx.'?mode=register'; - $u_profile = 'ucp.'.$phpEx; - $u_privatemsgs = 'ucp.'.$phpEx.'?i=pm&folder=inbox'; - $u_privatemsgs_popup ='ucp.'.$phpEx.'?i=pm&mode=popup'; - $u_search = 'search.'.$phpEx; - $u_memberlist = 'memberlist.'.$phpEx; - $u_modcp = 'mcp.'.$phpEx; - $u_faq = 'faq.'.$phpEx; - $u_viewonline = 'viewonline.'.$phpEx; - $u_group_cp = 'ucp.'.$phpEx.'?i=167'; - $u_sendpassword = ($board_config['email_enable']) ? mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : ''; - break; - } - $useragent = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT'); --- 185,188 ---- *************** *** 378,394 **** 'SITE_DESCRIPTION' => $board_config['site_desc'], 'PAGE_TITLE' => $mx_page->page_title, - 'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit), 'CURRENT_TIME' => sprintf($lang['Current_time'], phpBB2::create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), - 'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], phpBB2::create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])), - 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, - 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, - 'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new, - - 'PRIVMSG_IMG' => $icon_pm, 'L_USERNAME' => $lang['Username'], 'L_PASSWORD' => $lang['Password'], - 'L_LOGIN_LOGOUT' => $l_login_logout, 'L_LOGIN' => $lang['Login'], 'L_LOG_ME_IN' => $lang['Log_me_in'], --- 191,199 ---- *************** *** 398,402 **** 'L_PROFILE' => $lang['Profile'], 'L_SEARCH' => $lang['Search'], - 'L_PRIVATEMSGS' => $mx_priv_msg, 'L_WHO_IS_ONLINE' => $lang['Who_is_Online'], 'L_MEMBERLIST' => $lang['Memberlist'], --- 203,206 ---- *************** *** 414,430 **** 'U_SEARCH_NEW' => mx_append_sid(PHPBB_URL .'search.'.$phpEx.'?search_id=newposts'), - 'U_REGISTER' => mx_append_sid(PHPBB_URL . $u_register), - 'U_PROFILE' => mx_append_sid(PHPBB_URL . $u_profile), - 'U_PRIVATEMSGS' => mx_append_sid(PHPBB_URL . $u_privatemsgs), - 'U_PRIVATEMSGS_POPUP' => mx_append_sid(PHPBB_URL . $u_privatemsgs_popup), - 'U_SEARCH' => mx_append_sid(PHPBB_URL . $u_search), - 'U_MEMBERLIST' =>mx_append_sid(PHPBB_URL . $u_memberlist), - 'U_MODCP' => mx_append_sid(PHPBB_URL . $u_modcp), - 'U_FAQ' => mx_append_sid(PHPBB_URL . $u_faq), - 'U_VIEWONLINE' => mx_append_sid(PHPBB_URL . $u_viewonline), - 'U_LOGIN_LOGOUT' => mx_append_sid(PORTAL_URL . $u_login_logout), - 'U_GROUP_CP' => mx_append_sid(PHPBB_URL . $u_group_cp), - 'U_SEND_PASSWORD' => $u_sendpassword, - 'LOGO' => $images['mx_logo'], 'THEME_GRAPHICS' => $images['theme_graphics'], --- 218,221 ---- *************** *** 529,544 **** 'IS_ADMIN' => $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN, - // Backend - 'PHPBB' => PORTAL_BACKEND != 'internal', - - // Show phpbb stats? - 'PHPBB_STATS' => $mx_page->phpbb_stats && PORTAL_BACKEND != 'internal', - // Allow autologin? - 'ALLOW_AUTOLOGIN' => !$userdata['session_logged_in'] && (!isset($board_config['allow_autologin']) || $board_config['allow_autologin']) && PORTAL_BACKEND != 'internal', - // phpBB PM - 'ENABLE_PM_POPUP' => $userdata['session_logged_in'] && !empty($userdata['user_popup_pm']) && PORTAL_BACKEND != 'internal', - // Do NOT set basedir when in EDIT mode 'SET_BASE' => !$mx_request_vars->is_request('portalpage'), // Additional css for gecko browsers 'GECKO' => strstr($useragent, 'Gecko'), --- 320,326 ---- 'IS_ADMIN' => $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN, // Do NOT set basedir when in EDIT mode 'SET_BASE' => !$mx_request_vars->is_request('portalpage'), + // Additional css for gecko browsers 'GECKO' => strstr($useragent, 'Gecko'), *************** *** 547,619 **** // ! // Login box & swithes for logged in users? ! // ! /* ! if ( !$userdata['session_logged_in'] ) ! { ! $layouttemplate->assign_block_vars('switch_user_logged_out', array()); ! ! // ! // Allow autologin? ! // ! if (!isset($board_config['allow_autologin']) || $board_config['allow_autologin'] ) ! { ! $layouttemplate->assign_block_vars('switch_allow_autologin', array()); ! $layouttemplate->assign_block_vars('switch_user_logged_out.switch_allow_autologin', array()); ! } ! ! // ! // Show phpbb stats? ! // ! if ( $mx_page->phpbb_stats ) ! { ! $layouttemplate->assign_block_vars('phpbb_stats', array()); ! $layouttemplate->assign_block_vars('phpbb_stats.switch_user_logged_out', array()); ! } ! } ! else ! { ! $layouttemplate->assign_block_vars('switch_user_logged_in', array()); ! ! if ( !empty($userdata['user_popup_pm']) ) ! { ! $layouttemplate->assign_block_vars('switch_enable_pm_popup', array()); ! } ! ! // ! // Show phpbb stats? ! // ! if ( $mx_page->phpbb_stats ) ! { ! $layouttemplate->assign_block_vars('phpbb_stats', array()); ! $layouttemplate->assign_block_vars('phpbb_stats.switch_user_logged_in', array()); ! } ! } ! ! // ! // Handy switch for Admin ! // ! if ( $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN ) ! { ! $layouttemplate->assign_block_vars('is_admin', array()); ! } ! ! // ! // Do NOT set basedir when in EDIT mode ! // ! if ( !$mx_request_vars->is_request('portalpage')) ! { ! $layouttemplate->assign_block_vars('switch_set_base', array()); ! } ! ! // ! // Determine if user have gecko/opera browser // ! $useragent = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT'); ! if ( strstr($useragent, 'Gecko') ) ! { ! $layouttemplate->assign_block_vars('switch_gecko', array()); ! } ! */ // --- 329,335 ---- // ! // Definitions of main navigation links // ! $mx_backend->page_header('generate_nav_links'); // Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** page_tail.php 16 Jun 2008 10:46:38 -0000 1.38 --- page_tail.php 11 Jul 2008 21:23:17 -0000 1.39 *************** *** 107,110 **** --- 107,113 ---- } + $mx_backend->page_tail('generate_backend_version'); + + /* switch (PORTAL_BACKEND) { *************** *** 121,129 **** break; } $template->assign_vars(array( - 'PHPBB_BACKEND' => PORTAL_BACKEND != 'internal', 'U_PORTAL_ROOT_PATH' => PORTAL_URL, - 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, 'MXBB_EXTRA' => $mxbb_footer_text, --- 124,131 ---- break; } + */ $template->assign_vars(array( 'U_PORTAL_ROOT_PATH' => PORTAL_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, 'MXBB_EXTRA' => $mxbb_footer_text, *************** *** 132,136 **** 'POWERED_BY' => $lang['Powered_by'], 'MX_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? PORTAL_VERSION : '', - 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? $current_phpbb_version : '', 'ADMIN_LINK' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '<a href="' . $u_acp . '?sid=' . $userdata['session_id'] . '">' . $l_acp . '</a><br />' : '', 'L_ACP' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? $l_acp : '', --- 134,137 ---- Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** mx_functions_core.php 10 Jul 2008 23:40:53 -0000 1.93 --- mx_functions_core.php 11 Jul 2008 21:23:16 -0000 1.94 *************** *** 55,204 **** { /** - * Enter description here... - * - * @access public - * @param boolean $use_cache - * @return unknown - */ - function obtain_phpbb_config($use_cache = true) - { - global $db; - - if (($config = $this->get('phpbb_config')) && ($use_cache) ) - { - return $config; - } - else - { - $sql = "SELECT * - FROM " . CONFIG_TABLE; - - if ( !( $result = $db->sql_query( $sql ) ) ) - { - if (!function_exists('mx_message_die')) - { - die("Couldnt query config information, Allso this hosting or server is using a cache optimizer not compatible with MX-Publisher or just lost connection to database wile query."); - } - else - { - mx_message_die( GENERAL_ERROR, 'Couldnt query config information', '', __LINE__, __FILE__, $sql ); - } - } - - while ( $row = $db->sql_fetchrow($result) ) - { - $config[$row['config_name']] = $row['config_value']; - } - $db->sql_freeresult($result); - - if ($use_cache) - { - $this->put('phpbb_config', $config); - } - - return ( $config ); - } - } - - /** - * Get MX-Publisher config data - * - * @access public - * @return unknown - */ - function obtain_mxbb_config($use_cache = true) - { - global $db; - - if ( ($config = $this->get('mxbb_config')) && ($use_cache) ) - { - return $config; - } - else - { - $sql = "SELECT * - FROM " . PORTAL_TABLE . " - WHERE portal_id = '1'"; - - if ( !( $result = $db->sql_query( $sql ) ) ) - { - if (!function_exists('mx_message_die')) - { - die("Couldnt query portal configuration, Allso this hosting or server is using a cache optimizer not compatible with MX-Publisher or just lost connection to database wile query."); - } - else - { - mx_message_die( GENERAL_ERROR, 'Couldnt query portal configuration', '', __LINE__, __FILE__, $sql ); - } - } - $row = $db->sql_fetchrow( $result ); - foreach ( $row as $config_name => $config_value ) - { - $config[$config_name] = trim( $config_value ); - } - $db->sql_freeresult( $result ); - $this->put('mxbb_config', $config); - - return ( $config ); - } - } - - /** - * Obtain cfg file data - * - * @param unknown_type $theme - * @return unknown - */ - function obtain_cfg_items($theme) - { - global $board_config, $phpbb_root_path; - - $parsed_items = array( - 'theme' => array(), - 'template' => array(), - 'imageset' => array() - ); - - foreach ($parsed_items as $key => $parsed_array) - { - $parsed_array = $this->get('_cfg_' . $key . '_' . $theme[$key . '_path']); - - if ($parsed_array === false) - { - $parsed_array = array(); - } - - $reparse = false; - $filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg'; - - if (!file_exists($filename)) - { - continue; - } - - if (!isset($parsed_array['filetime']) || (($board_config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime']))) - { - $reparse = true; - } - - // Re-parse cfg file - if ($reparse) - { - $parsed_array = mx_parse_cfg_file($filename); - $parsed_array['filetime'] = @filemtime($filename); - - $this->put('_cfg_' . $key . '_' . $theme[$key . '_path'], $parsed_array); - } - $parsed_items[$key] = $parsed_array; - } - - return $parsed_items; - } - - /** * load_backend * * Define Users/Group/Sessions backend, and validate ! * Set $portal_config, $phpbb_root_path, $tplEx, $table_prefix & PORTAL_BACKEND * */ --- 55,62 ---- { /** * load_backend * * Define Users/Group/Sessions backend, and validate ! * Set $portal_config, $phpbb_root_path, $tplEx, $table_prefix & PORTAL_BACKEND/$mx_backend * */ *************** *** 207,210 **** --- 65,69 ---- global $db, $portal_config, $phpbb_root_path, $mx_root_path; global $mx_table_prefix, $table_prefix, $phpEx, $tplEx; + global $mx_backend; // *************** *** 218,255 **** } ! $table_prefix = ''; ! switch ($portal_config['portal_backend']) ! { ! case 'internal': ! $phpbb_root_path = $mx_root_path . 'includes/shared/phpbb2/'; ! str_replace("//", "/", $phpbb_root_path); ! $portal_backend_valid_file = true; ! $table_prefix = 'phpBB_'; ! $tplEx = 'tpl'; ! break; ! case 'phpbb2': ! $phpbb_root_path = $mx_root_path . $portal_config['portal_backend_path']; ! str_replace("//", "/", $phpbb_root_path); ! $portal_backend_valid_file = @file_exists($phpbb_root_path . "modcp.$phpEx"); ! @include_once($phpbb_root_path . 'config.' . $phpEx); ! $tplEx = 'tpl'; ! $_result = $db->sql_query( "SELECT config_value from " . $table_prefix . "config WHERE config_name = 'cookie_domain'" ); ! $portal_backend_valid_db = $db->sql_numrows( $_result ) != 0; ! break; ! case 'phpbb3': ! $phpbb_root_path = $mx_root_path . $portal_config['portal_backend_path']; ! str_replace("//", "/", $phpbb_root_path); ! $portal_backend_valid_file = @file_exists($phpbb_root_path . "mcp.$phpEx"); ! @include_once($phpbb_root_path . 'config.' . $phpEx); ! $tplEx = 'html'; ! $_result = $db->sql_query( "SELECT config_value from " . $table_prefix . "config WHERE config_name = 'cookie_domain'" ); ! $portal_backend_valid_db = $db->sql_numrows( $_result ) != 0; ! break; ! } ! if (!$portal_backend_valid_file || empty($table_prefix) || !$portal_backend_valid_db) { // ! // If phpBB setup is bad, revert to standalone. Thus we can access the adminCP ;) // define('PORTAL_BACKEND', 'internal'); --- 77,97 ---- } ! // ! // Load backend ! // ! include_once($mx_root_path . 'includes/sessions/'.$portal_config['portal_backend'].'/core.' . $phpEx); ! // ! // Instantiate the mx_backend class ! // ! $mx_backend = new mx_backend(); ! ! // ! // Validate backend ! // ! if (!$mx_backend->validate_backend()) { // ! // If backend setup is bad, revert to standalone/internal. Thus we can access the adminCP ;) // define('PORTAL_BACKEND', 'internal'); *************** *** 270,459 **** /** ! * setup_backend ! * ! * Define some general backend definitions ! * PORTAL_URL, PHPBB_URL, PORTAL_VERSION & $board_config * */ ! function setup_backend() { ! global $portal_config, $board_config, $phpbb_root_path; ! ! $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($portal_config['script_path'])); ! $server_name = trim($portal_config['server_name']); ! $server_protocol = ( $portal_config['cookie_secure'] ) ? 'https://' : 'http://'; ! $server_port = ( $portal_config['server_port'] <> 80 ) ? ':' . trim($portal_config['server_port']) . '/' : '/'; ! ! $server_url = $server_protocol . str_replace("//", "/", $server_name . $server_port . $script_name . '/'); //On some server the slash is not added and this trick will fix it ! ! define('PORTAL_URL', $server_url); ! define('PORTAL_VERSION', $portal_config['portal_version']); ! // ! // Setup forum wide options, if this fails ! // then we output a CRITICAL_ERROR since ! // basic forum information is not available ! // ! switch (PORTAL_BACKEND) { ! case 'internal': ! $board_config = array(); ! $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim('includes/shared/phpbb2/')) . '/'; ! break; ! case 'phpbb2': ! if( @file_exists($phpbb_root_path . 'includes/class_config.' . $phpEx) && @file_exists($phpbb_root_path . 'includes/class_groups.' . $phpEx) ) { ! include($mx_root_path . 'includes/mx_functions_ch.'.$phpEx); } else { ! // ! // Grab phpBB global variables, re-cache if necessary ! // - optional parameter to enable/disable cache for config data. If enabled, remember to refresh the MX-Publisher cache whenever updating phpBB config settings ! // - true: enable cache, false: disable cache ! $board_config = $this->obtain_phpbb_config(false); } - $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])) . '/'; - break; - - case 'phpbb3': - // - // Grab phpBB global variables, re-cache if necessary - // - optional parameter to enable/disable cache for config data. If enabled, remember to refresh the MX-Publisher cache whenever updating phpBB config settings - // - true: enable cache, false: disable cache - $board_config = $this->obtain_phpbb_config(false); - $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])) . '/'; - break; - } - - $server_url_phpbb = $server_protocol . $server_name . $server_port . $script_name_phpbb; - define('PHPBB_URL', $server_url_phpbb); - - // - // Now sync Configs - // In phpBB mode, we rely on native phpBB configs, thus we need to sync mxp and phpbb settings - // - $this->sync_configs(); - } - - /** - * Sync Configs - * @access private - */ - function sync_configs() - { - global $portal_config, $board_config; - - foreach ($portal_config as $key => $value) - { - $do = true; - switch ($key) - { - // - // Keep phpBB cookies/sessions - // - case 'cookie_domain': - case 'cookie_name': - case 'cookie_path': - case 'cookie_secure': - case 'session_length': - case 'allow_autologin': - case 'max_autologin_time': - case 'max_login_attempts': - case 'login_reset_time': - - if (PORTAL_BACKEND != 'internal') - { - $do = false; - } - break; - - // - // Keep phpBB stats - // - case 'record_online_users': - case 'record_online_date': - - if (PORTAL_BACKEND != 'internal') - { - $do = false; - } - break; - - // - // Keep portal settings - // - case 'default_style': - case 'override_user_style': - case 'default_lang': - - // - // Keep portal settings - // - case 'allow_html': - case 'allow_html_tags': - case 'allow_bbcode': - case 'allow_smilies': - case 'smilies_path': - - // - // Keep portal settings - // - case 'board_email': - case 'board_email_sig': - case 'smtp_delivery': - case 'smtp_host': - case 'smtp_username': - case 'smtp_password': - case 'smtp_auth_method': - - // - // Keep portal settings - // - case 'default_dateformat': - case 'board_timezone': - case 'gzip_compress': - - // - // Keep portal settings - // - case 'portal_id': - case 'portal_status': - case 'disabled_message': - case 'script_path': - case 'mx_use_cache': - case 'mod_rewrite': - case 'default_admin_style': - case 'overall_header': - case 'overall_footer': - case 'main_layout': - case 'navigation_block': - case 'top_phpbb_links': - case 'portal_version': - case 'portal_recached': - case 'portal_backend': - case 'portal_startdate': - case 'rand_seed': - - break; - - // Rename config keys and get internal sitename/sitedesc - // - case 'portal_name': - - $key = 'sitename'; - break; - - case 'portal_desc': - - $key = 'site_desc'; - break; } ! ! if ($do) { ! $board_config[$key] = $value; } } } --- 112,154 ---- /** ! * Get MX-Publisher config data * + * @access public + * @return unknown */ ! function obtain_mxbb_config($use_cache = true) { ! global $db; ! if ( ($config = $this->get('mxbb_config')) && ($use_cache) ) { ! return $config; ! } ! else ! { ! $sql = "SELECT * ! FROM " . PORTAL_TABLE . " ! WHERE portal_id = '1'"; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! if (!function_exists('mx_message_die')) { ! die("Couldnt query portal configuration, Allso this hosting or server is using a cache optimizer not compatible with MX-Publisher or just lost connection to database wile query."); } else { ! mx_message_die( GENERAL_ERROR, 'Couldnt query portal configuration', '', __LINE__, __FILE__, $sql ); } } ! $row = $db->sql_fetchrow( $result ); ! foreach ( $row as $config_name => $config_value ) { ! $config[$config_name] = trim( $config_value ); } + $db->sql_freeresult( $result ); + $this->put('mxbb_config', $config); + + return ( $config ); } } *************** *** 479,502 **** function load_file($file = '', $force_shared = false) { ! global $mx_root_path, $phpbb_root_path, $phpEx; ! if (PORTAL_BACKEND == 'internal' || $force_shared) ! { ! $backend = in_array($force_shared, array('internal', 'phpbb2', 'phpbb3')) ? $force_shared : PORTAL_BACKEND; ! switch ($backend) ! { ! case 'internal': ! case 'phpbb2': ! $path = $mx_root_path . 'includes/shared/phpbb2/includes/'; ! break; ! case 'phpbb3': ! $path = $mx_root_path . 'includes/shared/phpbb3/includes/'; ! break; ! } ! } ! else ! { ! $path = $phpbb_root_path . 'includes/'; ! } if (file_exists($path . $file.'.'.$phpEx)) --- 174,180 ---- function load_file($file = '', $force_shared = false) { ! global $mx_root_path, $phpbb_root_path, $phpEx, $mx_backend; ! $path = $mx_backend->_load_file($force_shared); if (file_exists($path . $file.'.'.$phpEx)) |
|
From: Jon O. <jon...@us...> - 2008-07-11 21:23:50
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2159 Modified Files: common.php Log Message: New object, mx_backend() Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** common.php 10 Jul 2008 22:04:51 -0000 1.95 --- common.php 11 Jul 2008 21:23:08 -0000 1.96 *************** *** 203,212 **** // ! // instatiate the mx_request_vars class // make sure to do before it's ever used $mx_request_vars = new mx_request_vars(); // ! // Instatiate the mx_cache class // $mx_cache = new mx_cache(); --- 203,212 ---- // ! // Instantiate the mx_request_vars class // make sure to do before it's ever used $mx_request_vars = new mx_request_vars(); // ! // Instantiate the mx_cache class // $mx_cache = new mx_cache(); *************** *** 235,249 **** // ! // instatiate the mx_user class // $mx_user = new mx_user(); // ! // instatiate the mx_page (CORE) class // $mx_page = new mx_page(); // ! // instatiate the mx_block class // $mx_block = new mx_block(); --- 235,249 ---- // ! // Instantiate the mx_user class // $mx_user = new mx_user(); // ! // Instantiate the mx_page (CORE) class // $mx_page = new mx_page(); // ! // Instantiate the mx_block class // $mx_block = new mx_block(); *************** *** 259,263 **** // PORTAL_URL, PHPBB_URL, PORTAL_VERSION & $board_config // ! $mx_cache->setup_backend(); // --- 259,263 ---- // PORTAL_URL, PHPBB_URL, PORTAL_VERSION & $board_config // ! $mx_backend->setup_backend(); // |
|
From: Jon O. <jon...@us...> - 2008-07-11 21:23:27
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2159/includes/sessions/phpbb3 Modified Files: session.php Added Files: core.php Log Message: New object, mx_backend() --- NEW FILE: core.php --- <?php /** * * @package Auth * @version $Id: core.php,v 1.1 2008/07/11 21:23:18 jonohlsson Exp $ * @copyright (c) 2002-2008 MX-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } /** * Backend specific tasks * @package MX-Publisher */ class mx_backend { /** * Validate backend * * Define Users/Group/Sessions backend, and validate * Set $phpbb_root_path, $tplEx, $table_prefix * */ function validate_backend() { global $db, $portal_config, $phpbb_root_path, $mx_root_path; global $table_prefix, $phpEx, $tplEx; $table_prefix = ''; // // Define relative path to phpBB, and validate // $phpbb_root_path = $mx_root_path . $portal_config['portal_backend_path']; str_replace("//", "/", $phpbb_root_path); $portal_backend_valid_file = @file_exists($phpbb_root_path . "mcp.$phpEx"); // // Load phpbb config.php (to get table prefix) // @include_once($phpbb_root_path . 'config.' . $phpEx); // // Define backend template extension // $tplEx = 'html'; // // Validate db connection for backend // $_result = $db->sql_query( "SELECT config_value from " . $table_prefix . "config WHERE config_name = 'cookie_domain'" ); $portal_backend_valid_db = $db->sql_numrows( $_result ) != 0; return $portal_backend_valid_file && !empty($table_prefix) && $portal_backend_valid_db; } /** * setup_backend * * Define some general backend definitions * PORTAL_URL, PHPBB_URL, PORTAL_VERSION & $board_config * */ function setup_backend() { global $portal_config, $board_config, $phpbb_root_path, $phpEx; $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($portal_config['script_path'])); $server_name = trim($portal_config['server_name']); $server_protocol = ( $portal_config['cookie_secure'] ) ? 'https://' : 'http://'; $server_port = ( $portal_config['server_port'] <> 80 ) ? ':' . trim($portal_config['server_port']) . '/' : '/'; $server_url = $server_protocol . str_replace("//", "/", $server_name . $server_port . $script_name . '/'); //On some server the slash is not added and this trick will fix it define('PORTAL_URL', $server_url); define('PORTAL_VERSION', $portal_config['portal_version']); // // Grab phpBB global variables, re-cache if necessary // - optional parameter to enable/disable cache for config data. If enabled, remember to refresh the MX-Publisher cache whenever updating phpBB config settings // - true: enable cache, false: disable cache $board_config = $this->obtain_phpbb_config(false); $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])) . '/'; $server_url_phpbb = $server_protocol . $server_name . $server_port . $script_name_phpbb; define('PHPBB_URL', $server_url_phpbb); // // Now sync Configs // In phpBB mode, we rely on native phpBB configs, thus we need to sync mxp and phpbb settings // $this->sync_configs(); } /** * Sync Configs * @access private */ function sync_configs() { global $portal_config, $board_config; foreach ($portal_config as $key => $value) { $do = true; switch ($key) { // // Keep phpBB cookies/sessions // case 'cookie_domain': case 'cookie_name': case 'cookie_path': case 'cookie_secure': case 'session_length': case 'allow_autologin': case 'max_autologin_time': case 'max_login_attempts': case 'login_reset_time': $do = false; break; // // Keep phpBB stats // case 'record_online_users': case 'record_online_date': $do = false; break; // // Keep portal settings // case 'default_style': case 'override_user_style': case 'default_lang': // // Keep portal settings // case 'allow_html': case 'allow_html_tags': case 'allow_bbcode': case 'allow_smilies': case 'smilies_path': // // Keep portal settings // case 'board_email': case 'board_email_sig': case 'smtp_delivery': case 'smtp_host': case 'smtp_username': case 'smtp_password': case 'smtp_auth_method': // // Keep portal settings // case 'default_dateformat': case 'board_timezone': case 'gzip_compress': // // Keep portal settings // case 'portal_id': case 'portal_status': case 'disabled_message': case 'script_path': case 'mx_use_cache': case 'mod_rewrite': case 'default_admin_style': case 'overall_header': case 'overall_footer': case 'main_layout': case 'navigation_block': case 'top_phpbb_links': case 'portal_version': case 'portal_recached': case 'portal_backend': case 'portal_startdate': case 'rand_seed': break; // Rename config keys and get internal sitename/sitedesc // case 'portal_name': $key = 'sitename'; break; case 'portal_desc': $key = 'site_desc'; break; } if ($do) { $board_config[$key] = $value; } } } /** * _load_file * * @param unknown_type $force_shared * @access private */ function _load_file($force_shared) { global $mx_root_path, $phpbb_root_path, $phpEx; if ($force_shared) { $backend = in_array($force_shared, array('internal', 'phpbb2', 'phpbb3')) ? $force_shared : PORTAL_BACKEND; switch ($backend) { case 'internal': case 'phpbb2': $path = $mx_root_path . 'includes/shared/phpbb2/includes/'; break; case 'phpbb3': $path = $mx_root_path . 'includes/shared/phpbb3/includes/'; break; } } else { $path = $phpbb_root_path . 'includes/'; } return $path; } /** * Backend specific Page Header data * * @param unknown_type $mode */ function page_header($mode = false) { global $db, $mx_root_path, $phpbb_root_path, $userdata, $mx_user, $lang, $images, $phpEx, $board_config, $gen_simple_header, $layouttemplate, $mx_page; switch ($mode) { case 'generate_login_logout_stats': if ( $mx_user->data['user_id'] != 1 ) { $is_logged = true; $u_login_logout = 'login.'.$phpEx.'?logout=true&sid=' . $mx_user->data['session_id']; $l_login_logout = $lang['Logout'] . ' [ ' . $mx_user->data['username'] . ' ]'; } else { $is_logged = false; $u_login_logout = 'login.'.$phpEx; $l_login_logout = $lang['Login']; } $s_last_visit = ( $mx_user->data['session_logged_in'] ) ? phpBB2::create_date($board_config['default_dateformat'], $mx_user->data['user_lastvisit'], $board_config['board_timezone']) : ''; // // Obtain number of new private messages // if user is logged in // if ( ($mx_user->data['session_logged_in']) && (empty($gen_simple_header)) ) { if ( $mx_user->data['user_new_privmsg'] ) { $l_message_new = ( $mx_user->data['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms']; $l_privmsgs_text = sprintf($l_message_new, $mx_user->data['user_new_privmsg']); if ( $mx_user->data['user_last_privmsg'] > $mx_user->data['user_lastvisit'] ) { $sql = "UPDATE " . USERS_TABLE . " SET user_last_privmsg = " . $mx_user->data['user_lastvisit'] . " WHERE user_id = " . $mx_user->data['user_id']; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql); } $s_privmsg_new = 1; $icon_pm = $images['pm_new_msg']; } else { $s_privmsg_new = 0; $icon_pm = $images['pm_no_new_msg']; } $mx_priv_msg = $lang['Private_Messages'] . ' (' . $mx_user->data['user_new_privmsg'] . ')'; } else { $l_privmsgs_text = $lang['No_new_pm']; $s_privmsg_new = 0; $icon_pm = $images['pm_no_new_msg']; $mx_priv_msg = $lang['Private_Messages']; } if ( $mx_user->data['user_unread_privmsg'] ) { $l_message_unread = ( $mx_user->data['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms']; $l_privmsgs_text_unread = sprintf($l_message_unread, $mx_user->data['user_unread_privmsg']); } else { $l_privmsgs_text_unread = $lang['No_unread_pm']; } } else { $icon_pm = $images['pm_no_new_msg']; $l_privmsgs_text = $lang['Login_check_pm']; $l_privmsgs_text_unread = ''; $s_privmsg_new = 0; $mx_priv_msg = $lang['Private_Messages']; } $layouttemplate->assign_vars(array( 'U_LOGIN_LOGOUT' => mx_append_sid(PORTAL_URL . $u_login_logout), 'L_LOGIN_LOGOUT' => $l_login_logout, 'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit), 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, 'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new, 'PRIVMSG_IMG' => $icon_pm, 'L_PRIVATEMSGS' => $mx_priv_msg, // Backend 'PHPBB' => true, // Show phpbb stats? 'PHPBB_STATS' => $mx_page->phpbb_stats, // Allow autologin? 'ALLOW_AUTOLOGIN' => !$userdata['session_logged_in'] && (!isset($board_config['allow_autologin']) || $board_config['allow_autologin']), // phpBB PM 'ENABLE_PM_POPUP' => $userdata['session_logged_in'] && !empty($userdata['user_popup_pm']), )); break; case 'generate_nav_links': $u_register = 'ucp.'.$phpEx.'?mode=register'; $u_profile = 'ucp.'.$phpEx; $u_privatemsgs = 'ucp.'.$phpEx.'?i=pm&folder=inbox'; $u_privatemsgs_popup ='ucp.'.$phpEx.'?i=pm&mode=popup'; $u_search = 'search.'.$phpEx; $u_memberlist = 'memberlist.'.$phpEx; $u_modcp = 'mcp.'.$phpEx; $u_faq = 'faq.'.$phpEx; $u_viewonline = 'viewonline.'.$phpEx; $u_group_cp = 'ucp.'.$phpEx.'?i=167'; $u_sendpassword = ($board_config['email_enable']) ? mx3_append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : ''; $layouttemplate->assign_vars(array( 'U_REGISTER' => mx_append_sid(PHPBB_URL . $u_register), 'U_PROFILE' => mx_append_sid(PHPBB_URL . $u_profile), 'U_PRIVATEMSGS' => mx_append_sid(PHPBB_URL . $u_privatemsgs), 'U_PRIVATEMSGS_POPUP' => mx_append_sid(PHPBB_URL . $u_privatemsgs_popup), 'U_SEARCH' => mx_append_sid(PHPBB_URL . $u_search), 'U_MEMBERLIST' =>mx_append_sid(PHPBB_URL . $u_memberlist), 'U_MODCP' => mx_append_sid(PHPBB_URL . $u_modcp), 'U_FAQ' => mx_append_sid(PHPBB_URL . $u_faq), 'U_VIEWONLINE' => mx_append_sid(PHPBB_URL . $u_viewonline), 'U_GROUP_CP' => mx_append_sid(PHPBB_URL . $u_group_cp), 'U_SEND_PASSWORD' => $u_sendpassword, )); break; } } /** * Backend specific Page Tail data * * @param unknown_type $mode */ function page_tail($mode = false) { global $board_config, $userdata, $template; switch ($mode) { case 'generate_backend_version': $current_phpbb_version = $board_config['version']; $template->assign_vars(array( 'PHPBB_BACKEND' => true, 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? $current_phpbb_version : '', 'U_PHPBB_ROOT_PATH' => PHPBB_URL, )); break; } } /** * Enter description here... * * @access public * @param boolean $use_cache * @return unknown */ function obtain_phpbb_config($use_cache = true) { global $db, $mx_cache; if (($config = $mx_cache->get('phpbb_config')) && ($use_cache) ) { return $config; } else { $sql = "SELECT * FROM " . CONFIG_TABLE; if ( !( $result = $db->sql_query( $sql ) ) ) { if (!function_exists('mx_message_die')) { die("Couldnt query config information, Allso this hosting or server is using a cache optimizer not compatible with MX-Publisher or just lost connection to database wile query."); } else { mx_message_die( GENERAL_ERROR, 'Couldnt query config information', '', __LINE__, __FILE__, $sql ); } } while ( $row = $db->sql_fetchrow($result) ) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); if ($use_cache) { $mx_cache->put('phpbb_config', $config); } return ( $config ); } } /** * Obtain cfg file data * * @param unknown_type $theme * @return unknown */ function obtain_cfg_items($theme) { global $board_config, $phpbb_root_path, $mx_cache; $parsed_items = array( 'theme' => array(), 'template' => array(), 'imageset' => array() ); foreach ($parsed_items as $key => $parsed_array) { $parsed_array = $mx_cache->get('_cfg_' . $key . '_' . $theme[$key . '_path']); if ($parsed_array === false) { $parsed_array = array(); } $reparse = false; $filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg'; if (!file_exists($filename)) { continue; } if (!isset($parsed_array['filetime']) || (($board_config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime']))) { $reparse = true; } // Re-parse cfg file if ($reparse) { $parsed_array = mx_parse_cfg_file($filename); $parsed_array['filetime'] = @filemtime($filename); $mx_cache->put('_cfg_' . $key . '_' . $theme[$key . '_path'], $parsed_array); } $parsed_items[$key] = $parsed_array; } return $parsed_items; } } ?> Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/session.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** session.php 10 Jul 2008 23:08:59 -0000 1.25 --- session.php 11 Jul 2008 21:23:18 -0000 1.26 *************** *** 1334,1338 **** { global $db, $template, $board_config, $userdata, $phpbb_auth, $phpEx, $phpbb_root_path, $mx_root_path, $mx_cache; ! global $mx_request_vars, $portal_config; //added for mxp if (!empty($_GET['style']) && $phpbb_auth->acl_get('a_styles')) --- 1334,1338 ---- { global $db, $template, $board_config, $userdata, $phpbb_auth, $phpEx, $phpbb_root_path, $mx_root_path, $mx_cache; ! global $mx_request_vars, $portal_config, $mx_backend; //added for mxp if (!empty($_GET['style']) && $phpbb_auth->acl_get('a_styles')) *************** *** 1403,1407 **** // Now parse the cfg file and cache it ! $parsed_items = $mx_cache->obtain_cfg_items($this->theme); // We are only interested in the theme configuration for now --- 1403,1407 ---- // Now parse the cfg file and cache it ! $parsed_items = $mx_backend->obtain_cfg_items($this->theme); // We are only interested in the theme configuration for now |
|
From: Jon O. <jon...@us...> - 2008-07-11 21:23:24
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2159/includes/sessions/internal Added Files: core.php Log Message: New object, mx_backend() --- NEW FILE: core.php --- <?php /** * * @package Auth * @version $Id: core.php,v 1.1 2008/07/11 21:23:19 jonohlsson Exp $ * @copyright (c) 2002-2008 MX-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } /** * Backend specific tasks * @package MX-Publisher */ class mx_backend { /** * Validate backend * * Define Users/Group/Sessions backend, and validate * Set $phpbb_root_path, $tplEx, $table_prefix * */ function validate_backend() { global $db, $portal_config, $phpbb_root_path, $mx_root_path; global $table_prefix, $phpEx, $tplEx; // // Define relative path to phpBB, and validate // $phpbb_root_path = $mx_root_path . 'includes/shared/phpbb2/'; str_replace("//", "/", $phpbb_root_path); $portal_backend_valid_file = @file_exists($phpbb_root_path . "includes/functions.$phpEx"); // // Define backend template extension // $tplEx = 'tpl'; return $portal_backend_valid_file; } /** * setup_backend * * Define some general backend definitions * PORTAL_URL, PHPBB_URL, PORTAL_VERSION & $board_config * */ function setup_backend() { global $portal_config, $board_config, $phpbb_root_path, $phpEx; $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($portal_config['script_path'])); $server_name = trim($portal_config['server_name']); $server_protocol = ( $portal_config['cookie_secure'] ) ? 'https://' : 'http://'; $server_port = ( $portal_config['server_port'] <> 80 ) ? ':' . trim($portal_config['server_port']) . '/' : '/'; $server_url = $server_protocol . str_replace("//", "/", $server_name . $server_port . $script_name . '/'); //On some server the slash is not added and this trick will fix it define('PORTAL_URL', $server_url); define('PORTAL_VERSION', $portal_config['portal_version']); $board_config = array(); $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim('includes/shared/phpbb2/')) . '/'; $server_url_phpbb = $server_protocol . $server_name . $server_port . $script_name_phpbb; define('PHPBB_URL', $server_url_phpbb); // // Now sync Configs // In phpBB mode, we rely on native phpBB configs, thus we need to sync mxp and phpbb settings // $this->sync_configs(); } /** * Sync Configs * @access private */ function sync_configs() { global $portal_config, $board_config; foreach ($portal_config as $key => $value) { $do = true; switch ($key) { // // Keep phpBB cookies/sessions // case 'cookie_domain': case 'cookie_name': case 'cookie_path': case 'cookie_secure': case 'session_length': case 'allow_autologin': case 'max_autologin_time': case 'max_login_attempts': case 'login_reset_time': // // Keep phpBB stats // case 'record_online_users': case 'record_online_date': // // Keep portal settings // case 'default_style': case 'override_user_style': case 'default_lang': // // Keep portal settings // case 'allow_html': case 'allow_html_tags': case 'allow_bbcode': case 'allow_smilies': case 'smilies_path': // // Keep portal settings // case 'board_email': case 'board_email_sig': case 'smtp_delivery': case 'smtp_host': case 'smtp_username': case 'smtp_password': case 'smtp_auth_method': // // Keep portal settings // case 'default_dateformat': case 'board_timezone': case 'gzip_compress': // // Keep portal settings // case 'portal_id': case 'portal_status': case 'disabled_message': case 'script_path': case 'mx_use_cache': case 'mod_rewrite': case 'default_admin_style': case 'overall_header': case 'overall_footer': case 'main_layout': case 'navigation_block': case 'top_phpbb_links': case 'portal_version': case 'portal_recached': case 'portal_backend': case 'portal_startdate': case 'rand_seed': break; // // Rename config keys and get internal sitename/sitedesc // case 'portal_name': $key = 'sitename'; break; case 'portal_desc': $key = 'site_desc'; break; } if ($do) { $board_config[$key] = $value; } } } /** * _load_file * * @param unknown_type $force_shared * @access private */ function _load_file($force_shared) { global $mx_root_path, $phpbb_root_path, $phpEx; $backend = in_array($force_shared, array('internal', 'phpbb2', 'phpbb3')) ? $force_shared : PORTAL_BACKEND; switch ($backend) { case 'internal': case 'phpbb2': $path = $mx_root_path . 'includes/shared/phpbb2/includes/'; break; case 'phpbb3': $path = $mx_root_path . 'includes/shared/phpbb3/includes/'; break; } return $path; } /** * Backend specific Page Header data * * @param unknown_type $mode */ function page_header($mode = false) { global $db, $mx_root_path, $phpbb_root_path, $userdata, $mx_user, $lang, $images, $phpEx, $board_config, $gen_simple_header, $layouttemplate, $mx_page; switch ($mode) { case 'generate_login_logout_stats': if ( $userdata['session_logged_in'] ) { $is_logged = true; $u_login_logout = 'login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id']; $l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]'; } else { $is_logged = false; $u_login_logout = 'login.'.$phpEx; $l_login_logout = $lang['Login']; } $s_last_visit = ( $userdata['session_logged_in'] ) ? phpBB2::create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : ''; // // Obtain number of new private messages // if user is logged in // if ( ($userdata['session_logged_in']) && (empty($gen_simple_header)) ) { if ( $userdata['user_new_privmsg'] ) { $l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms']; $l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']); if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] ) { $sql = "UPDATE " . USERS_TABLE . " SET user_last_privmsg = " . $userdata['user_lastvisit'] . " WHERE user_id = " . $userdata['user_id']; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql); } $s_privmsg_new = 1; $icon_pm = $images['pm_new_msg']; } else { $s_privmsg_new = 0; $icon_pm = $images['pm_no_new_msg']; } $mx_priv_msg = $lang['Private_Messages'] . ' (' . $userdata['user_new_privmsg'] . ')'; } else { $l_privmsgs_text = $lang['No_new_pm']; $s_privmsg_new = 0; $icon_pm = $images['pm_no_new_msg']; $mx_priv_msg = $lang['Private_Messages']; } if ( $userdata['user_unread_privmsg'] ) { $l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms']; $l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']); } else { $l_privmsgs_text_unread = $lang['No_unread_pm']; } } else { $icon_pm = $images['pm_no_new_msg']; $l_privmsgs_text = $lang['Login_check_pm']; $l_privmsgs_text_unread = ''; $s_privmsg_new = 0; $mx_priv_msg = $lang['Private_Messages']; } $layouttemplate->assign_vars(array( 'U_LOGIN_LOGOUT' => mx_append_sid(PORTAL_URL . $u_login_logout), 'L_LOGIN_LOGOUT' => $l_login_logout, 'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit), 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, 'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new, 'PRIVMSG_IMG' => $icon_pm, 'L_PRIVATEMSGS' => $mx_priv_msg, // Backend 'PHPBB' => false, // Show phpbb stats? 'PHPBB_STATS' => false, // Allow autologin? 'ALLOW_AUTOLOGIN' => false, // phpBB PM 'ENABLE_PM_POPUP' => false, )); break; case 'generate_nav_links': /* $u_register = 'profile.'.$phpEx.'?mode=register' ; $u_profile = 'profile.'.$phpEx.'?mode=editprofile'; $u_privatemsgs = 'privmsg.'.$phpEx.'?folder=inbox'; $u_privatemsgs_popup = 'privmsg.'.$phpEx.'?mode=newpm'; $u_search = 'search.'.$phpEx; $u_memberlist = 'memberlist.'.$phpEx; $u_modcp = 'modcp.'.$phpEx; $u_faq = 'faq.'.$phpEx; $u_viewonline = 'viewonline.'.$phpEx; $u_group_cp = 'groupcp.'.$phpEx; $u_sendpassword = mx3_append_sid("{$phpbb_root_path}profile.$phpEx", 'mode=sendpassword'); $layouttemplate->assign_vars(array( 'U_REGISTER' => mx_append_sid(PHPBB_URL . $u_register), 'U_PROFILE' => mx_append_sid(PHPBB_URL . $u_profile), 'U_PRIVATEMSGS' => mx_append_sid(PHPBB_URL . $u_privatemsgs), 'U_PRIVATEMSGS_POPUP' => mx_append_sid(PHPBB_URL . $u_privatemsgs_popup), 'U_SEARCH' => mx_append_sid(PHPBB_URL . $u_search), 'U_MEMBERLIST' =>mx_append_sid(PHPBB_URL . $u_memberlist), 'U_MODCP' => mx_append_sid(PHPBB_URL . $u_modcp), 'U_FAQ' => mx_append_sid(PHPBB_URL . $u_faq), 'U_VIEWONLINE' => mx_append_sid(PHPBB_URL . $u_viewonline), 'U_GROUP_CP' => mx_append_sid(PHPBB_URL . $u_group_cp), 'U_SEND_PASSWORD' => $u_sendpassword, )); */ break; } } /** * Backend specific Page Tail data * * @param unknown_type $mode */ function page_tail($mode = false) { global $board_config, $userdata, $template; switch ($mode) { case 'generate_backend_version': $template->assign_vars(array( 'PHPBB_BACKEND' => false, 'U_PHPBB_ROOT_PATH' => PHPBB_URL, )); break; } } /** * Enter description here... * * @access public * @param boolean $use_cache * @return unknown */ function obtain_phpbb_config($use_cache = true) { global $db, $mx_cache; if (($config = $mx_cache->get('phpbb_config')) && ($use_cache) ) { return $config; } else { $sql = "SELECT * FROM " . CONFIG_TABLE; if ( !( $result = $db->sql_query( $sql ) ) ) { if (!function_exists('mx_message_die')) { die("Couldnt query config information, Allso this hosting or server is using a cache optimizer not compatible with MX-Publisher or just lost connection to database wile query."); } else { mx_message_die( GENERAL_ERROR, 'Couldnt query config information', '', __LINE__, __FILE__, $sql ); } } while ( $row = $db->sql_fetchrow($result) ) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); if ($use_cache) { $mx_cache->put('phpbb_config', $config); } return ( $config ); } } } ?> |
|
From: Jon O. <jon...@us...> - 2008-07-11 21:23:24
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2159/includes/sessions/phpbb2 Added Files: core.php Log Message: New object, mx_backend() --- NEW FILE: core.php --- <?php /** * * @package Auth * @version $Id: core.php,v 1.1 2008/07/11 21:23:19 jonohlsson Exp $ * @copyright (c) 2002-2008 MX-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } /** * Backend specific tasks * @package MX-Publisher */ class mx_backend { /** * Validate backend * * Define Users/Group/Sessions backend, and validate * Set $phpbb_root_path, $tplEx, $table_prefix * */ function validate_backend() { global $db, $portal_config, $phpbb_root_path, $mx_root_path; global $table_prefix, $phpEx, $tplEx; $table_prefix = ''; // // Define relative path to phpBB, and validate // $phpbb_root_path = $mx_root_path . $portal_config['portal_backend_path']; str_replace("//", "/", $phpbb_root_path); $portal_backend_valid_file = @file_exists($phpbb_root_path . "modcp.$phpEx"); // // Load phpbb config.php (to get table prefix) // @include_once($phpbb_root_path . 'config.' . $phpEx); // // Define backend template extension // $tplEx = 'tpl'; // // Validate db connection for backend // $_result = $db->sql_query( "SELECT config_value from " . $table_prefix . "config WHERE config_name = 'cookie_domain'" ); $portal_backend_valid_db = $db->sql_numrows( $_result ) != 0; return $portal_backend_valid_file && !empty($table_prefix) && $portal_backend_valid_db; } /** * setup_backend * * Define some general backend definitions * PORTAL_URL, PHPBB_URL, PORTAL_VERSION & $board_config * */ function setup_backend() { global $portal_config, $board_config, $phpbb_root_path, $phpEx; $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($portal_config['script_path'])); $server_name = trim($portal_config['server_name']); $server_protocol = ( $portal_config['cookie_secure'] ) ? 'https://' : 'http://'; $server_port = ( $portal_config['server_port'] <> 80 ) ? ':' . trim($portal_config['server_port']) . '/' : '/'; $server_url = $server_protocol . str_replace("//", "/", $server_name . $server_port . $script_name . '/'); //On some server the slash is not added and this trick will fix it define('PORTAL_URL', $server_url); define('PORTAL_VERSION', $portal_config['portal_version']); if( @file_exists($phpbb_root_path . 'includes/class_config.' . $phpEx) && @file_exists($phpbb_root_path . 'includes/class_groups.' . $phpEx) ) { include($mx_root_path . 'includes/mx_functions_ch.'.$phpEx); } else { // // Grab phpBB global variables, re-cache if necessary // - optional parameter to enable/disable cache for config data. If enabled, remember to refresh the MX-Publisher cache whenever updating phpBB config settings // - true: enable cache, false: disable cache $board_config = $this->obtain_phpbb_config(false); } $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])) . '/'; $server_url_phpbb = $server_protocol . $server_name . $server_port . $script_name_phpbb; define('PHPBB_URL', $server_url_phpbb); // // Now sync Configs // In phpBB mode, we rely on native phpBB configs, thus we need to sync mxp and phpbb settings // $this->sync_configs(); } /** * Sync Configs * @access private */ function sync_configs() { global $portal_config, $board_config; foreach ($portal_config as $key => $value) { $do = true; switch ($key) { // // Keep phpBB cookies/sessions // case 'cookie_domain': case 'cookie_name': case 'cookie_path': case 'cookie_secure': case 'session_length': case 'allow_autologin': case 'max_autologin_time': case 'max_login_attempts': case 'login_reset_time': $do = false; break; // // Keep phpBB stats // case 'record_online_users': case 'record_online_date': $do = false; break; // // Keep portal settings // case 'default_style': case 'override_user_style': case 'default_lang': // // Keep portal settings // case 'allow_html': case 'allow_html_tags': case 'allow_bbcode': case 'allow_smilies': case 'smilies_path': // // Keep portal settings // case 'board_email': case 'board_email_sig': case 'smtp_delivery': case 'smtp_host': case 'smtp_username': case 'smtp_password': case 'smtp_auth_method': // // Keep portal settings // case 'default_dateformat': case 'board_timezone': case 'gzip_compress': // // Keep portal settings // case 'portal_id': case 'portal_status': case 'disabled_message': case 'script_path': case 'mx_use_cache': case 'mod_rewrite': case 'default_admin_style': case 'overall_header': case 'overall_footer': case 'main_layout': case 'navigation_block': case 'top_phpbb_links': case 'portal_version': case 'portal_recached': case 'portal_backend': case 'portal_startdate': case 'rand_seed': break; // // Rename config keys and get internal sitename/sitedesc // case 'portal_name': $key = 'sitename'; break; case 'portal_desc': $key = 'site_desc'; break; } if ($do) { $board_config[$key] = $value; } } } /** * _load_file * * @param unknown_type $force_shared * @access private */ function _load_file($force_shared) { global $mx_root_path, $phpbb_root_path, $phpEx; if ($force_shared) { $backend = in_array($force_shared, array('internal', 'phpbb2', 'phpbb3')) ? $force_shared : PORTAL_BACKEND; switch ($backend) { case 'internal': case 'phpbb2': $path = $mx_root_path . 'includes/shared/phpbb2/includes/'; break; case 'phpbb3': $path = $mx_root_path . 'includes/shared/phpbb3/includes/'; break; } } else { $path = $phpbb_root_path . 'includes/'; } return $path; } /** * Backend specific Page Header data * * @param unknown_type $mode */ function page_header($mode = false) { global $db, $mx_root_path, $phpbb_root_path, $userdata, $mx_user, $lang, $images, $phpEx, $board_config, $gen_simple_header, $layouttemplate, $mx_page; switch ($mode) { case 'generate_login_logout_stats': if ( $userdata['session_logged_in'] ) { $is_logged = true; $u_login_logout = 'login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id']; $l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]'; } else { $is_logged = false; $u_login_logout = 'login.'.$phpEx; $l_login_logout = $lang['Login']; } $s_last_visit = ( $userdata['session_logged_in'] ) ? phpBB2::create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : ''; // // Obtain number of new private messages // if user is logged in // if ( ($userdata['session_logged_in']) && (empty($gen_simple_header)) ) { if ( $userdata['user_new_privmsg'] ) { $l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms']; $l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']); if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] ) { $sql = "UPDATE " . USERS_TABLE . " SET user_last_privmsg = " . $userdata['user_lastvisit'] . " WHERE user_id = " . $userdata['user_id']; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql); } $s_privmsg_new = 1; $icon_pm = $images['pm_new_msg']; } else { $s_privmsg_new = 0; $icon_pm = $images['pm_no_new_msg']; } $mx_priv_msg = $lang['Private_Messages'] . ' (' . $userdata['user_new_privmsg'] . ')'; } else { $l_privmsgs_text = $lang['No_new_pm']; $s_privmsg_new = 0; $icon_pm = $images['pm_no_new_msg']; $mx_priv_msg = $lang['Private_Messages']; } if ( $userdata['user_unread_privmsg'] ) { $l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms']; $l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']); } else { $l_privmsgs_text_unread = $lang['No_unread_pm']; } } else { $icon_pm = $images['pm_no_new_msg']; $l_privmsgs_text = $lang['Login_check_pm']; $l_privmsgs_text_unread = ''; $s_privmsg_new = 0; $mx_priv_msg = $lang['Private_Messages']; } $layouttemplate->assign_vars(array( 'U_LOGIN_LOGOUT' => mx_append_sid(PORTAL_URL . $u_login_logout), 'L_LOGIN_LOGOUT' => $l_login_logout, 'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit), 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, 'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new, 'PRIVMSG_IMG' => $icon_pm, 'L_PRIVATEMSGS' => $mx_priv_msg, // Backend 'PHPBB' => true, // Show phpbb stats? 'PHPBB_STATS' => $mx_page->phpbb_stats, // Allow autologin? 'ALLOW_AUTOLOGIN' => !$userdata['session_logged_in'] && (!isset($board_config['allow_autologin']) || $board_config['allow_autologin']), // phpBB PM 'ENABLE_PM_POPUP' => $userdata['session_logged_in'] && !empty($userdata['user_popup_pm']), )); break; case 'generate_nav_links': $u_register = 'profile.'.$phpEx.'?mode=register' ; $u_profile = 'profile.'.$phpEx.'?mode=editprofile'; $u_privatemsgs = 'privmsg.'.$phpEx.'?folder=inbox'; $u_privatemsgs_popup = 'privmsg.'.$phpEx.'?mode=newpm'; $u_search = 'search.'.$phpEx; $u_memberlist = 'memberlist.'.$phpEx; $u_modcp = 'modcp.'.$phpEx; $u_faq = 'faq.'.$phpEx; $u_viewonline = 'viewonline.'.$phpEx; $u_group_cp = 'groupcp.'.$phpEx; $u_sendpassword = mx3_append_sid("{$phpbb_root_path}profile.$phpEx", 'mode=sendpassword'); $layouttemplate->assign_vars(array( 'U_REGISTER' => mx_append_sid(PHPBB_URL . $u_register), 'U_PROFILE' => mx_append_sid(PHPBB_URL . $u_profile), 'U_PRIVATEMSGS' => mx_append_sid(PHPBB_URL . $u_privatemsgs), 'U_PRIVATEMSGS_POPUP' => mx_append_sid(PHPBB_URL . $u_privatemsgs_popup), 'U_SEARCH' => mx_append_sid(PHPBB_URL . $u_search), 'U_MEMBERLIST' =>mx_append_sid(PHPBB_URL . $u_memberlist), 'U_MODCP' => mx_append_sid(PHPBB_URL . $u_modcp), 'U_FAQ' => mx_append_sid(PHPBB_URL . $u_faq), 'U_VIEWONLINE' => mx_append_sid(PHPBB_URL . $u_viewonline), 'U_GROUP_CP' => mx_append_sid(PHPBB_URL . $u_group_cp), 'U_SEND_PASSWORD' => $u_sendpassword, )); break; } } /** * Backend specific Page Tail data * * @param unknown_type $mode */ function page_tail($mode = false) { global $board_config, $userdata, $template; switch ($mode) { case 'generate_backend_version': $current_phpbb_version = '2' . $board_config['version']; $template->assign_vars(array( 'PHPBB_BACKEND' => true, 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? $current_phpbb_version : '', 'U_PHPBB_ROOT_PATH' => PHPBB_URL, )); break; } } /** * Enter description here... * * @access public * @param boolean $use_cache * @return unknown */ function obtain_phpbb_config($use_cache = true) { global $db, $mx_cache; if (($config = $mx_cache->get('phpbb_config')) && ($use_cache) ) { return $config; } else { $sql = "SELECT * FROM " . CONFIG_TABLE; if ( !( $result = $db->sql_query( $sql ) ) ) { if (!function_exists('mx_message_die')) { die("Couldnt query config information, Allso this hosting or server is using a cache optimizer not compatible with MX-Publisher or just lost connection to database wile query."); } else { mx_message_die( GENERAL_ERROR, 'Couldnt query config information', '', __LINE__, __FILE__, $sql ); } } while ( $row = $db->sql_fetchrow($result) ) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); if ($use_cache) { $mx_cache->put('phpbb_config', $config); } return ( $config ); } } } ?> |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:47:24
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9021 Modified Files: Tag: core28x mx_functions_tools.php Log Message: Fix Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.15.2.11 retrieving revision 1.15.2.12 diff -C2 -d -r1.15.2.11 -r1.15.2.12 *** mx_functions_tools.php 6 Jul 2008 22:10:32 -0000 1.15.2.11 --- mx_functions_tools.php 10 Jul 2008 23:47:21 -0000 1.15.2.12 *************** *** 3675,3679 **** function obtain_ranks( &$ranks ) { ! } --- 3675,3679 ---- function obtain_ranks( &$ranks ) { ! return; } *************** *** 3809,3816 **** $ranksrow = array(); ! if ($portal_config['portal_backend'] != 'internal') ! { ! $this->obtain_ranks( $ranksrow ); ! } while ( $this->comments_row = $db->sql_fetchrow( $result ) ) --- 3809,3813 ---- $ranksrow = array(); ! $this->obtain_ranks( $ranksrow ); while ( $this->comments_row = $db->sql_fetchrow( $result ) ) *************** *** 4034,4041 **** $ranksrow = array(); ! if ($portal_config['portal_backend'] != 'internal') ! { ! $this->obtain_ranks( $ranksrow ); ! } while ( $this->comments_row = $db->sql_fetchrow( $result ) ) --- 4031,4035 ---- $ranksrow = array(); ! $this->obtain_ranks( $ranksrow ); while ( $this->comments_row = $db->sql_fetchrow( $result ) ) |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:40:56
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6104 Modified Files: mx_functions_core.php mx_functions_style.php Log Message: A couple of minor bugs Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** mx_functions_core.php 10 Jul 2008 22:20:34 -0000 1.92 --- mx_functions_core.php 10 Jul 2008 23:40:53 -0000 1.93 *************** *** 206,210 **** { global $db, $portal_config, $phpbb_root_path, $mx_root_path; ! global $table_prefix, $phpEx, $tplEx; // --- 206,210 ---- { global $db, $portal_config, $phpbb_root_path, $mx_root_path; ! global $mx_table_prefix, $table_prefix, $phpEx, $tplEx; // Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** mx_functions_style.php 10 Jul 2008 23:17:13 -0000 1.81 --- mx_functions_style.php 10 Jul 2008 23:40:53 -0000 1.82 *************** *** 436,440 **** $board_config['phpbb_lang'] = $board_config['default_lang']; // Handy switch $this->lang['default_lang'] = phpBB2::phpbb_ltrim(basename(phpBB2::phpbb_rtrim($this->decode_lang($board_config['default_lang']))), "'"); ! $this->lang['user_lang'] = phpBB2::phpbb_ltrim(basename(phpBB2::phpbb_rtrim($this->decode_lang($this->data['user_lang']))), "'"); if ( $this->data['session_logged_in'] ) --- 436,440 ---- $board_config['phpbb_lang'] = $board_config['default_lang']; // Handy switch $this->lang['default_lang'] = phpBB2::phpbb_ltrim(basename(phpBB2::phpbb_rtrim($this->decode_lang($board_config['default_lang']))), "'"); ! $this->data['user_lang'] = phpBB2::phpbb_ltrim(basename(phpBB2::phpbb_rtrim($this->decode_lang($this->data['user_lang']))), "'"); if ( $this->data['session_logged_in'] ) |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:40:56
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6104/sessions/internal Modified Files: session.php Log Message: A couple of minor bugs Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/session.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** session.php 10 Jul 2008 23:23:16 -0000 1.12 --- session.php 10 Jul 2008 23:40:53 -0000 1.13 *************** *** 57,60 **** --- 57,62 ---- function load() { + global $portal_config; + $this->data = $this->session_pagestart($this->user_ip, - ( MX_PORTAL_PAGES_OFFSET + $this->page_id )); |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:23:19
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31121/phpbb2 Modified Files: session.php Log Message: Dummy... Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/session.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** session.php 10 Jul 2008 23:08:59 -0000 1.10 --- session.php 10 Jul 2008 23:23:16 -0000 1.11 *************** *** 642,649 **** } } - */ - // We include common language file here to not load it every time a custom language file is included - //$this->lang = &$lang; $this->add_lang($lang_set); --- 642,646 ---- *************** *** 651,654 **** --- 648,652 ---- //$lang = &$this->lang; unset($lang_set); + */ return; |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:23:19
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31121/internal Modified Files: session.php Log Message: Dummy... Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/session.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** session.php 10 Jul 2008 23:08:59 -0000 1.11 --- session.php 10 Jul 2008 23:23:16 -0000 1.12 *************** *** 646,653 **** } } - */ - // We include common language file here to not load it every time a custom language file is included - //$this->lang = &$lang; $this->add_lang($lang_set); --- 646,650 ---- *************** *** 655,658 **** --- 652,656 ---- //$lang = &$this->lang; unset($lang_set); + */ return; |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:17:17
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28508/admin Modified Files: admin_mx_block_cp.php index_jon.php index_new.php pagestart.php Log Message: Moving load_file to mx_cache... Index: pagestart.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/pagestart.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** pagestart.php 15 Jun 2008 20:59:59 -0000 1.36 --- pagestart.php 10 Jul 2008 23:17:13 -0000 1.37 *************** *** 25,29 **** if( !function_exists('generate_smilies') ) { ! mx_page::load_file('functions_post'); } --- 25,29 ---- if( !function_exists('generate_smilies') ) { ! mx_cache::load_file('functions_post'); } Index: index_jon.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/index_jon.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index_jon.php 15 Jun 2008 21:00:00 -0000 1.1 --- index_jon.php 10 Jul 2008 23:17:13 -0000 1.2 *************** *** 140,146 **** if ( PORTAL_BACKEND == 'phpbb2' ) { ! mx_page::load_file( 'functions', true ); ! mx_page::load_file( 'functions_selects', true ); ! mx_page::load_file( 'functions_validate', true ); } --- 140,146 ---- if ( PORTAL_BACKEND == 'phpbb2' ) { ! mx_cache::load_file( 'functions', true ); ! mx_cache::load_file( 'functions_selects', true ); ! mx_cache::load_file( 'functions_validate', true ); } *************** *** 148,158 **** { include_once( $mx_root_path . 'includes/sessions/phpbb3/auth.' . $phpEx ); ! mx_page::load_file( 'functions_admin', 'phpbb3' ); ! mx_page::load_file( 'acp/auth', 'phpbb3' ); ! mx_page::load_file( 'auth', 'phpbb3'); ! mx_page::load_file( 'functions', 'phpbb3' ); ! mx_page::load_file( 'functions', 'phpbb2' ); ! mx_page::load_file( 'functions_module', 'phpbb3' ); ! mx_page::load_file( 'message_parser' , 'phpbb3' ); $phpbb_admin_path = ( defined( 'PHPBB_ADMIN_PATH' ) ) ? PHPBB_ADMIN_PATH : 'adm/'; --- 148,158 ---- { include_once( $mx_root_path . 'includes/sessions/phpbb3/auth.' . $phpEx ); ! mx_cache::load_file( 'functions_admin', 'phpbb3' ); ! mx_cache::load_file( 'acp/auth', 'phpbb3' ); ! mx_cache::load_file( 'auth', 'phpbb3'); ! mx_cache::load_file( 'functions', 'phpbb3' ); ! mx_cache::load_file( 'functions', 'phpbb2' ); ! mx_cache::load_file( 'functions_module', 'phpbb3' ); ! mx_cache::load_file( 'message_parser' , 'phpbb3' ); $phpbb_admin_path = ( defined( 'PHPBB_ADMIN_PATH' ) ) ? PHPBB_ADMIN_PATH : 'adm/'; Index: index_new.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/index_new.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** index_new.php 20 Jun 2008 15:55:03 -0000 1.14 --- index_new.php 10 Jul 2008 23:17:13 -0000 1.15 *************** *** 49,53 **** { global $mx_root_path, $phpEx; ! $info_global = ""; foreach( $_GET as $key => $value) --- 49,53 ---- { global $mx_root_path, $phpEx; ! $info_global = ""; foreach( $_GET as $key => $value) *************** *** 65,71 **** $file = "_{$file}"; } ! return "{$mx_root_path}cache/acp_{$part}{$file}.{$phpEx}"; ! } --- 65,71 ---- $file = "_{$file}"; } ! return "{$mx_root_path}cache/acp_{$part}{$file}.{$phpEx}"; ! } *************** *** 76,80 **** fwrite( $fopen, "<?php\r\n$code\r\n?>"); fclose( $fopen); ! return $filename; } /** --- 76,80 ---- fwrite( $fopen, "<?php\r\n$code\r\n?>"); fclose( $fopen); ! return $filename; } /** *************** *** 133,150 **** if ( PORTAL_BACKEND == PHPBB2X_BACKEND ) { ! mx_page::load_file( 'functions' ); ! mx_page::load_file( 'functions_selects' ); ! mx_page::load_file( 'functions_validate' ); } if ( PORTAL_BACKEND == OLYMPUS_BACKEND ) { //include_once( $mx_root_path . 'includes/sessions/phpbb3/auth.' . $phpEx ); ! mx_page::load_file( 'acp/auth', 'phpbb3' ); ! mx_page::load_file( 'functions', 'phpbb3' ); ! mx_page::load_file( 'functions_module', 'phpbb3' ); ! mx_page::load_file( 'functions_admin', 'phpbb3' ); ! mx_page::load_file( 'functions_hook', 'phpbb3' ); ! mx_page::load_file( 'bbcode', 'phpbb3'); $phpbb_admin_path = ( defined( 'PHPBB_ADMIN_PATH' ) ) ? PHPBB_ADMIN_PATH : 'adm/'; --- 133,150 ---- if ( PORTAL_BACKEND == PHPBB2X_BACKEND ) { ! mx_cache::load_file( 'functions' ); ! mx_cache::load_file( 'functions_selects' ); ! mx_cache::load_file( 'functions_validate' ); } if ( PORTAL_BACKEND == OLYMPUS_BACKEND ) { //include_once( $mx_root_path . 'includes/sessions/phpbb3/auth.' . $phpEx ); ! mx_cache::load_file( 'acp/auth', 'phpbb3' ); ! mx_cache::load_file( 'functions', 'phpbb3' ); ! mx_cache::load_file( 'functions_module', 'phpbb3' ); ! mx_cache::load_file( 'functions_admin', 'phpbb3' ); ! mx_cache::load_file( 'functions_hook', 'phpbb3' ); ! mx_cache::load_file( 'bbcode', 'phpbb3'); $phpbb_admin_path = ( defined( 'PHPBB_ADMIN_PATH' ) ) ? PHPBB_ADMIN_PATH : 'adm/'; Index: admin_mx_block_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_block_cp.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** admin_mx_block_cp.php 9 Mar 2008 23:37:59 -0000 1.22 --- admin_mx_block_cp.php 10 Jul 2008 23:17:13 -0000 1.23 *************** *** 28,34 **** if( !function_exists('generate_smilies') ) { ! mx_page::load_file('functions_post'); } ! mx_page::load_file('functions_search'); // --- 28,34 ---- if( !function_exists('generate_smilies') ) { ! mx_cache::load_file('functions_post'); } ! mx_cache::load_file('functions_search'); // |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:17:16
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28508/includes Modified Files: mx_functions_style.php Log Message: Moving load_file to mx_cache... Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** mx_functions_style.php 10 Jul 2008 23:08:59 -0000 1.80 --- mx_functions_style.php 10 Jul 2008 23:17:13 -0000 1.81 *************** *** 114,117 **** --- 114,118 ---- global $module_root_path, $mx_root_path, $phpbb_root_path, $theme, $mx_user, $mx_block; + /* switch (PORTAL_BACKEND) { *************** *** 124,127 **** --- 125,130 ---- break; } + */ + $style_path = $mx_user->template_name; // |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:09:05
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24560 Modified Files: mx_functions_style.php Log Message: Moved another PORTAL_BACKEND Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** mx_functions_style.php 10 Jul 2008 20:46:36 -0000 1.79 --- mx_functions_style.php 10 Jul 2008 23:08:59 -0000 1.80 *************** *** 53,109 **** $this->load(); ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! // ! // Simulate the user lang setting ! // ! $this->data['user_lang'] = $portal_config['default_lang']; ! $this->data['user_dateformat'] = $portal_config['user_dateformat']; ! $this->data['user_timezone'] = $portal_config['user_timezone']; ! ! // ! // Populate session_id ! // ! $this->session_id = $this->data['session_id']; ! break; ! ! case 'phpbb2': ! // ! // Populate session_id ! // ! $this->session_id = $this->data['session_id']; ! break; ! ! case 'phpbb3': ! // ! // Redefine some MXP stylish userdata ! // ! $this->data['session_logged_in'] = $this->data['user_id'] != ANONYMOUS ? 1 : 0; ! ! if ( $this->data['user_id'] == ANONYMOUS ) ! { ! $this->data['user_type'] = -1; ! } ! ! switch ($this->data['user_type']) ! { ! case 3: ! $this->data['user_level'] = 1; ! break; ! case 0: ! $this->data['user_level'] = 2; ! break; ! default: ! $this->data['user_level'] = 0; ! break; ! } ! ! $this->data['session_id'] = $this->session_id; ! ! break; ! } ! ! $userdata = $this->data; // Syncronize } } --- 53,60 ---- $this->load(); ! // ! // Syncronize ! // ! $userdata = $this->data; } } *************** *** 523,528 **** { $sql = 'UPDATE ' . USERS_TABLE . " ! SET user_lang = '" . $this->encode_lang($this->lang['default_lang'], PORTAL_BACKEND) . "' ! WHERE user_lang = '" . $this->encode_lang($this->data['user_lang'], PORTAL_BACKEND) . "'"; if ( !($result = $db->sql_query($sql)) ) --- 474,479 ---- { $sql = 'UPDATE ' . USERS_TABLE . " ! SET user_lang = '" . $this->encode_lang($this->lang['default_lang']) . "' ! WHERE user_lang = '" . $this->encode_lang($this->data['user_lang']) . "'"; if ( !($result = $db->sql_query($sql)) ) |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:09:05
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24560/sessions/internal Modified Files: session.php Log Message: Moved another PORTAL_BACKEND Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/session.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** session.php 10 Jul 2008 20:46:36 -0000 1.10 --- session.php 10 Jul 2008 23:08:59 -0000 1.11 *************** *** 58,61 **** --- 58,73 ---- { $this->data = $this->session_pagestart($this->user_ip, - ( MX_PORTAL_PAGES_OFFSET + $this->page_id )); + + // + // Simulate the user lang setting + // + $this->data['user_lang'] = $portal_config['default_lang']; + $this->data['user_dateformat'] = $portal_config['user_dateformat']; + $this->data['user_timezone'] = $portal_config['user_timezone']; + + // + // Populate session_id + // + $this->session_id = $this->data['session_id']; } |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:09:04
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24560/sessions/phpbb2 Modified Files: session.php Log Message: Moved another PORTAL_BACKEND Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/session.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** session.php 10 Jul 2008 20:46:36 -0000 1.9 --- session.php 10 Jul 2008 23:08:59 -0000 1.10 *************** *** 58,61 **** --- 58,66 ---- { $this->data = $this->session_pagestart($this->user_ip, - ( MX_PORTAL_PAGES_OFFSET + $this->page_id )); + + // + // Populate session_id + // + $this->session_id = $this->data['session_id']; } |
|
From: Jon O. <jon...@us...> - 2008-07-10 23:09:04
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24560/sessions/phpbb3 Modified Files: session.php Log Message: Moved another PORTAL_BACKEND Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/session.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** session.php 10 Jul 2008 20:46:36 -0000 1.24 --- session.php 10 Jul 2008 23:08:59 -0000 1.25 *************** *** 95,98 **** --- 95,123 ---- //define('NEED_SID', 1); $this->session_begin(); + + // + // Redefine some MXP stylish userdata + // + $this->data['session_logged_in'] = $this->data['user_id'] != ANONYMOUS ? 1 : 0; + + if ( $this->data['user_id'] == ANONYMOUS ) + { + $this->data['user_type'] = -1; + } + + switch ($this->data['user_type']) + { + case 3: + $this->data['user_level'] = 1; + break; + case 0: + $this->data['user_level'] = 2; + break; + default: + $this->data['user_level'] = 0; + break; + } + + $this->data['session_id'] = $this->session_id; } |