Annotation of /mambo/branches/4.6/includes/compat.php41x.php
Parent Directory
|
Revision Log
Revision 297 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | csouza | 297 | * @package Mambo Open Source |
| 4 : | * @copyright (C) 2005 - 2006 Mambo Foundation Inc. | ||
| 5 : | root | 1 | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
| 6 : | csouza | 297 | * |
| 7 : | * Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure | ||
| 8 : | * that Mambo remained free Open Source software owned and managed by the community. | ||
| 9 : | root | 1 | * Mambo is Free Software |
| 10 : | csouza | 297 | */ |
| 11 : | root | 1 | |
| 12 : | /** ensure this file is being included by a parent file */ | ||
| 13 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 14 : | |||
| 15 : | if (!function_exists( 'array_change_key_case' )) { | ||
| 16 : | if (!defined('CASE_LOWER')) { | ||
| 17 : | define('CASE_LOWER', 0); | ||
| 18 : | } | ||
| 19 : | if (!defined('CASE_UPPER')) { | ||
| 20 : | define('CASE_UPPER', 1); | ||
| 21 : | } | ||
| 22 : | function array_change_key_case( $input, $case=CASE_LOWER ) { | ||
| 23 : | if (!is_array( $input )) { | ||
| 24 : | return false; | ||
| 25 : | } | ||
| 26 : | $array = array(); | ||
| 27 : | foreach ($input as $k=>$v) { | ||
| 28 : | if ($case) { | ||
| 29 : | $array[strtoupper( $k )] = $v; | ||
| 30 : | } else { | ||
| 31 : | $array[strtolower( $k )] = $v; | ||
| 32 : | } | ||
| 33 : | } | ||
| 34 : | return $array; | ||
| 35 : | } | ||
| 36 : | } | ||
| 37 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

