diff options
author | Benny Baumann <BenBE@geshi.org> | 2014-01-07 21:40:24 +0100 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2014-01-07 21:40:24 +0100 |
commit | 3855113d680a590549c18a16b55d5ce8bc46d4d0 (patch) | |
tree | a6f67288441a845bfa60fb15558c6568aece81bf | |
parent | 41f47a449c77f14f44e2cf073b2ffa951e57787d (diff) | |
download | cacert-devel-3855113d680a590549c18a16b55d5ce8bc46d4d0.tar.gz cacert-devel-3855113d680a590549c18a16b55d5ce8bc46d4d0.tar.xz cacert-devel-3855113d680a590549c18a16b55d5ce8bc46d4d0.zip |
bug 1236: Use single assignment for global variables
-rw-r--r-- | includes/account.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/includes/account.php b/includes/account.php index 67f0e7a..5f5e680 100644 --- a/includes/account.php +++ b/includes/account.php @@ -22,16 +22,16 @@ loadem("account"); - $id = 0; if(array_key_exists("id",$_REQUEST)) $id=intval($_REQUEST['id']); - $oldid = 0; if(array_key_exists("oldid",$_REQUEST)) $oldid=intval($_REQUEST['oldid']); - $process = ""; if(array_key_exists("process",$_REQUEST)) $process=$_REQUEST['process']; + $id = array_key_exists("id",$_REQUEST) ? intval($_REQUEST['id']) : 0; + $oldid = array_key_exists("oldid",$_REQUEST) ? intval($_REQUEST['oldid']) : 0; + $process = array_key_exists("process",$_REQUEST) ? $_REQUEST['process'] : ""; // $showdetalis refers to Secret Question and Answers from account/13.php - $showdetails = ""; if(array_key_exists("showdetails",$_REQUEST)) $showdetails=$_REQUEST['showdetails']; + $showdetails = array_key_exists("showdetails",$_REQUEST) ? $_REQUEST['showdetails'] : ""; - $cert=0; if(array_key_exists('cert',$_REQUEST)) $cert=intval($_REQUEST['cert']); - $orgid=0; if(array_key_exists('orgid',$_REQUEST)) $orgid=intval($_REQUEST['orgid']); - $memid=0; if(array_key_exists('memid',$_REQUEST)) $memid=intval($_REQUEST['memid']); - $domid=0; if(array_key_exists('domid',$_REQUEST)) $domid=intval($_REQUEST['domid']); + $cert = array_key_exists('cert',$_REQUEST) ? intval($_REQUEST['cert']) : 0; + $orgid = array_key_exists('orgid',$_REQUEST) ? intval($_REQUEST['orgid']) : 0; + $memid = array_key_exists('memid',$_REQUEST) ? intval($_REQUEST['memid']) : 0; + $domid = array_key_exists('domid',$_REQUEST) ? intval($_REQUEST['domid']) : 0; if(!$_SESSION['mconn']) |