From 84ff8a80845318c3c0ed6d98e72f19da2e0222db Mon Sep 17 00:00:00 2001 From: Nozomi Anzai Date: Tue, 11 Oct 2011 07:28:14 +0000 Subject: [PATCH] - split() -> explode() - based on one coding rule --- changePassword.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/changePassword.php b/changePassword.php index 5f835b8..3d43dc8 100644 --- a/changePassword.php +++ b/changePassword.php @@ -26,7 +26,7 @@ require_once('common.php'); $tpl->assign('help', basename( __FILE__, '.php')); -if(!isset($_SESSION[SESSION_LOGIN_USER])) { +if (!isset($_SESSION[SESSION_LOGIN_USER])) { header('Location: login.php'); exit(); } @@ -41,7 +41,7 @@ if(isset($_POST['action'])) { switch ( $action ) { case 'update': - if(!isset($_POST['password']) || !isset($_POST['password2'])) { + if (!isset($_POST['password']) || !isset($_POST['password2'])) { $tpl->display('changePassword.tpl'); break; } @@ -49,23 +49,23 @@ switch ( $action ) { $password = $_POST['password']; $password2 = $_POST['password2']; - if($password == '' || $password2 == '') { + if ($password == '' || $password2 == '') { $tpl->assign('error', $message['errPasswordMismatch']); $tpl->display('changePassword.tpl'); break; } - if($password === $password2) { + if ($password === $password2) { $passFile = @file(_PGPOOL2_PASSWORD_FILE); - if($passFile == false) { + if ($passFile == FALSE) { $errorCode = 'e6001'; $tpl->assign('errorCode', $errorCode); $tpl->display('error.tpl'); exit(); } - if( ! is_writable(_PGPOOL2_PASSWORD_FILE) ) { + if (! is_writable(_PGPOOL2_PASSWORD_FILE) ) { $errorCode = 'e6003'; $tpl->assign('errorCode', $errorCode); $tpl->display('error.tpl'); @@ -73,12 +73,12 @@ switch ( $action ) { } $fw = fopen(_PGPOOL2_PASSWORD_FILE, 'w'); - for($i=0; $idisplay('login.tpl'); break; + } else { $tpl->assign('error', $message['errPasswordMismatch']); } -- 2.39.5