|
|
@ -4,6 +4,23 @@ |
|
|
|
// @file fedora_utils.inc |
|
|
|
// @file fedora_utils.inc |
|
|
|
// Base utilities used by the Islansora fedora module. |
|
|
|
// 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. |
|
|
|
* Static functions used by the Fedora PHP API. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|