PHP3 compatibility.

This commit is contained in:
Alexander M. Turek 2003-02-02 23:31:39 +00:00
parent ee1f213836
commit da5d854614
2 changed files with 22 additions and 0 deletions

View File

@ -15,6 +15,7 @@ $Source$
* server_privileges.php3: Remove column privileges.
* config.inc.php3: Added $cfg['DefaultTabServer'].
* header.inc.php3: Link the default tabs.
* libraries/common.lib.php3: PHP3 compatibility.
2003-02-02 Michal Cihar <nijel@users.sourceforge.net>
* lang/czech: Updated.

View File

@ -1624,6 +1624,27 @@ if (typeof(document.getElementById) != 'undefined'
}
if (!function_exists('in_array')) {
/**
* Searches $haystack for $needle and returns TRUE if it is found in
* the array, FALSE otherwise.
*
* @param mixed the 'needle'
* @param array the 'haystack'
*
* @return boolean has $needle been found or not?
*/
function in_array($needle, $haystack) {
while (list(, $value) = each($haystack)) {
if ($value == $haystack) {
return TRUE;
}
}
return FALSE;
}
}
// Kanji encoding convert feature appended by Y.Kawada (2002/2/20)
if (PMA_PHP_INT_VERSION >= 40006
&& @function_exists('mb_convert_encoding')