Annotation of /mambo/branches/4.6/includes/compat.php41x.php
Parent Directory
|
Revision Log
Revision 1 -
(view)
(download)
Original Path: mambo/trunk/includes/compat.php41x.php
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | * PHP 4.1.x Compatibility functions | ||
| 4 : | * @version $Id: compat.php41x.php,v 1.1 2005/07/22 01:57:13 eddieajau Exp $ | ||
| 5 : | * @package Mambo | ||
| 6 : | * @copyright (C) 2000 - 2005 Miro International Pty Ltd | ||
| 7 : | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||
| 8 : | * Mambo is Free Software | ||
| 9 : | */ | ||
| 10 : | |||
| 11 : | /** ensure this file is being included by a parent file */ | ||
| 12 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 13 : | |||
| 14 : | if (!function_exists( 'array_change_key_case' )) { | ||
| 15 : | if (!defined('CASE_LOWER')) { | ||
| 16 : | define('CASE_LOWER', 0); | ||
| 17 : | } | ||
| 18 : | if (!defined('CASE_UPPER')) { | ||
| 19 : | define('CASE_UPPER', 1); | ||
| 20 : | } | ||
| 21 : | function array_change_key_case( $input, $case=CASE_LOWER ) { | ||
| 22 : | if (!is_array( $input )) { | ||
| 23 : | return false; | ||
| 24 : | } | ||
| 25 : | $array = array(); | ||
| 26 : | foreach ($input as $k=>$v) { | ||
| 27 : | if ($case) { | ||
| 28 : | $array[strtoupper( $k )] = $v; | ||
| 29 : | } else { | ||
| 30 : | $array[strtolower( $k )] = $v; | ||
| 31 : | } | ||
| 32 : | } | ||
| 33 : | return $array; | ||
| 34 : | } | ||
| 35 : | } | ||
| 36 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

