Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -172,54 +172,6 @@ |
173 | 173 | } |
174 | 174 | } |
175 | 175 | |
176 | | -if ( !function_exists( 'array_diff_key' ) ) { |
177 | | - /** |
178 | | - * Exists in PHP 5.1.0+ |
179 | | - * Not quite compatible, two-argument version only |
180 | | - * Null values will cause problems due to this use of isset() |
181 | | - */ |
182 | | - function array_diff_key( $left, $right ) { |
183 | | - $result = $left; |
184 | | - foreach ( $left as $key => $unused ) { |
185 | | - if ( isset( $right[$key] ) ) { |
186 | | - unset( $result[$key] ); |
187 | | - } |
188 | | - } |
189 | | - return $result; |
190 | | - } |
191 | | -} |
192 | | - |
193 | | -if ( !function_exists( 'array_intersect_key' ) ) { |
194 | | - /** |
195 | | - * Exists in 5.1.0+ |
196 | | - * Define our own array_intersect_key function |
197 | | - */ |
198 | | - function array_intersect_key( $isec, $keys ) { |
199 | | - $argc = func_num_args(); |
200 | | - |
201 | | - if ( $argc > 2 ) { |
202 | | - for ( $i = 1; $isec && $i < $argc; $i++ ) { |
203 | | - $arr = func_get_arg( $i ); |
204 | | - |
205 | | - foreach ( array_keys( $isec ) as $key ) { |
206 | | - if ( !isset( $arr[$key] ) ) |
207 | | - unset( $isec[$key] ); |
208 | | - } |
209 | | - } |
210 | | - |
211 | | - return $isec; |
212 | | - } else { |
213 | | - $res = array(); |
214 | | - foreach ( array_keys( $isec ) as $key ) { |
215 | | - if ( isset( $keys[$key] ) ) |
216 | | - $res[$key] = $isec[$key]; |
217 | | - } |
218 | | - |
219 | | - return $res; |
220 | | - } |
221 | | - } |
222 | | -} |
223 | | - |
224 | 176 | // Support for Wietse Venema's taint feature |
225 | 177 | if ( !function_exists( 'istainted' ) ) { |
226 | 178 | function istainted( $var ) { |