Removing function_exists('array_search') code.

1.9.x
Julio Montoya 12 years ago
parent 01ea1ae59e
commit 98c075406a
  1. 24
      main/inc/lib/fileDisplay.lib.php

@ -9,30 +9,6 @@
/**
* Code
*/
/* GENERIC FUNCTIONS : FOR OLDER PHP VERSIONS */
if ( ! function_exists('array_search') ) {
/**
* Searches haystack for needle and returns the key
* if it is found in the array, FALSE otherwise.
*
* Natively implemented in PHP since 4.0.5 version.
* This function is intended for previous version.
*
* @author - Hugues Peeters <peeters@ipm.ucl.ac.be>
* @param - needle (mixed)
* @param - haystack (array)
* @return - array key or FALSE
*
* @see - http://www.php.net/array_search
*/
function array_search($needle, $haystack)
{
while (list($key, $val) = each($haystack))
if ($val == $needle)
return $key;
return false;
}
}
/* FILE DISPLAY FUNCTIONS */
/**

Loading…
Cancel
Save