|
From: Jon O. <jon...@us...> - 2008-06-15 22:44:11
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18434/includes Modified Files: mx_functions_phpbb.php Log Message: This will fix the adminCP for phpbb3, the SIDS and mxp forms Note: i updated your fix. since $mx_user->session_id is not set in internal mode Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** mx_functions_phpbb.php 15 Jun 2008 22:32:20 -0000 1.62 --- mx_functions_phpbb.php 15 Jun 2008 22:44:07 -0000 1.63 *************** *** 684,688 **** function mx_append_sid($url, $non_html_amp = false, $mod_rewrite_only = false) { ! global $SID, $_SID, $mx_mod_rewrite, $mx_user; // Is mod_rewrite enabled? If so, do some url rewrites... --- 684,688 ---- function mx_append_sid($url, $non_html_amp = false, $mod_rewrite_only = false) { ! global $SID, $_SID, $mx_mod_rewrite, $userdata; // Is mod_rewrite enabled? If so, do some url rewrites... *************** *** 698,712 **** } ! //Do we relay need this? ! if ( empty($SID) ) { ! $SID = $mx_user->session_id; } ! //Will this make troble if it's correct? if ( !empty($_SID) && !preg_match('#sid=#', $url) ) { ! $url .= ( (strpos($url, '?') === false) ? '?' : (( $non_html_amp ) ? '&' : '&' ) ) . $_SID; } --- 698,712 ---- } ! /* ! if ( !empty($_SID) && !preg_match('#sid=#', $url) ) { ! $url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID; } ! */ //Will this make troble if it's correct? if ( !empty($_SID) && !preg_match('#sid=#', $url) ) { ! $url .= ( (strpos($url, '?') === false) ? '?' : (( $non_html_amp ) ? '&' : '&' ) ) . 'sid=' . $_SID; } *************** *** 716,722 **** } return $url; } - /** * Redirect. --- 716,726 ---- } + if (defined('IN_ADMIN') && !preg_match('#sid=#', $url)) + { + $url .= ( (strpos($url, '?') === false) ? '?' : (( $non_html_amp ) ? '&' : '&' ) ) . 'sid=' . $userdata['session_id']; + } + return $url; } /** * Redirect. |