Browse Source

Added str_getcsv() for backwards compatibilty with php5.2

pull/2/head
Nigel Banks 14 years ago
parent
commit
470fbc896a
  1. 17
      api/fedora_utils.inc

17
api/fedora_utils.inc

@ -4,6 +4,23 @@
// @file fedora_utils.inc
// Base utilities used by the Islansora fedora module.
/*
* Functions that emulate php5.3 functionality for backwards compatiablity
*/
if (!function_exists('str_getcsv')) {
function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=null, $eol=null) {
$temp=fopen("php://memory", "rw");
fwrite($temp, $input);
fseek($temp, 0);
$r=fgetcsv($temp, 4096, $delimiter, $enclosure);
fclose($temp);
return $r;
}
}
/*
* Functions that emulate php5.3 functionality for backwards compatiablity
*/
/*
* Static functions used by the Fedora PHP API.
*/

Loading…
Cancel
Save