From 2ffb2ef3e66f23716e9bad0f485d444407c3c83c Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Tue, 2 Oct 2007 12:48:21 +0000 Subject: [PATCH] functions.inc.php: reduce global usage git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@114 a1433add-5e2c-0410-b055-b7f2511e0802 --- functions.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/functions.inc.php b/functions.inc.php index c9293829..39d20de7 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1064,12 +1064,10 @@ function pacrypt ($pw, $pw_db="") // Action: Creates MD5 encrypted password // Call: md5crypt (string cleartextpassword) // -$MAGIC = "$1$"; -$ITOA64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; function md5crypt ($pw, $salt="", $magic="") { - global $MAGIC; + $MAGIC = "$1$"; if ($magic == "") $magic = $MAGIC; if ($salt == "") $salt = create_salt (); @@ -1155,7 +1153,7 @@ function hex2bin ($str) function to64 ($v, $n) { - global $ITOA64; + $ITOA64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; $ret = ""; while (($n - 1) >= 0) {