From 4a740376c89755698ae5fac3746eb57ba07142ae Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Wed, 23 May 2012 21:25:48 +0100 Subject: Dropped header.inc.php in favor of the PMA_Header class --- user_password.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'user_password.php') diff --git a/user_password.php b/user_password.php index 8a9937eb00..d28550bb93 100644 --- a/user_password.php +++ b/user_password.php @@ -12,7 +12,9 @@ */ require_once './libraries/common.inc.php'; -$GLOBALS['js_include'][] = 'server_privileges.js'; +$header = PMA_Header::getInstance(); +$scripts = $header->getScripts(); +$scripts->addFile('server_privileges.js'); /** * Displays an error message and exits if the user isn't allowed to use this @@ -22,7 +24,7 @@ if (! $cfg['ShowChgPassword']) { $cfg['ShowChgPassword'] = PMA_DBI_select_db('mysql'); } if ($cfg['Server']['auth_type'] == 'config' || ! $cfg['ShowChgPassword']) { - include_once './libraries/header.inc.php'; + $header->display(); PMA_Message::error(__('You don\'t have sufficient privileges to be here right now!'))->display(); include './libraries/footer.inc.php'; } // end if @@ -50,8 +52,7 @@ if (isset($_REQUEST['nopass'])) { * If the "change password" form hasn't been submitted or the values submitted * aren't valid -> displays the form */ -// Loads the headers -require_once './libraries/header.inc.php'; +$header->display(); // Displays an error message if required if (isset($message)) { @@ -203,7 +204,7 @@ function PMA_changePassAuthType($_url_params, $password) */ function PMA_changePassDisplayPage($message, $sql_query, $_url_params) { - include_once './libraries/header.inc.php'; + PMA_Header::getInstance()->display(); echo '

' . __('Change password') . '

' . "\n\n"; echo PMA_getMessage($message, $sql_query, 'success'); echo ''. "\n" -- cgit v1.2.3