1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-08-07 17:42:53 +03:00

functions.inc.php: reduce global usage

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@114 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
David Goodwin
2007-10-02 12:48:21 +00:00
parent 04ea2698f7
commit 2ffb2ef3e6

View File

@@ -1064,12 +1064,10 @@ function pacrypt ($pw, $pw_db="")
// Action: Creates MD5 encrypted password // Action: Creates MD5 encrypted password
// Call: md5crypt (string cleartextpassword) // Call: md5crypt (string cleartextpassword)
// //
$MAGIC = "$1$";
$ITOA64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
function md5crypt ($pw, $salt="", $magic="") function md5crypt ($pw, $salt="", $magic="")
{ {
global $MAGIC; $MAGIC = "$1$";
if ($magic == "") $magic = $MAGIC; if ($magic == "") $magic = $MAGIC;
if ($salt == "") $salt = create_salt (); if ($salt == "") $salt = create_salt ();
@@ -1155,7 +1153,7 @@ function hex2bin ($str)
function to64 ($v, $n) function to64 ($v, $n)
{ {
global $ITOA64; $ITOA64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
$ret = ""; $ret = "";
while (($n - 1) >= 0) while (($n - 1) >= 0)
{ {