Fix profile submenu highlight. Make is_profile_page a constant so that register globals can't manipulate it. see #5736

git-svn-id: http://svn.automattic.com/wordpress/trunk@6700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-01-31 22:03:48 +00:00
parent 78e80be72f
commit 7db4c0ad2c
3 changed files with 9 additions and 9 deletions

View File

@ -2,9 +2,6 @@
require_once('admin.php');
$parent_file = 'profile.php';
$submenu_file = 'profile.php';
check_admin_referer('update-profile_' . $user_ID);
if ( !$_POST )

View File

@ -1,4 +1,4 @@
<?php
$is_profile_page = true;
define('IS_PROFILE_PAGE', true);
require_once('user-edit.php');
?>

View File

@ -1,9 +1,12 @@
<?php
$is_profile_page = isset($is_profile_page) && $is_profile_page? true : false;
require_once('admin.php');
if ( defined('IS_PROFILE_PAGE') && IS_PROFILE_PAGE )
$is_profile_page = true;
else
$is_profile_page = false;
function profile_js ( ) {
?>
<script type="text/javascript">
@ -52,10 +55,10 @@ if ( $is_profile_page ) {
$title = $is_profile_page? __('Profile') : __('Edit User');
if ( current_user_can('edit_users') && !$is_profile_page )
$parent_file = 'users.php';
$submenu_file = 'users.php';
else
$parent_file = 'profile.php';
$submenu_file = 'users.php';
$submenu_file = 'profile.php';
$parent_file = 'users.php';
wp_reset_vars(array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer'));