$info_array = file($infofile);
foreach ($info_array as $line) {
- list($key,$value) = split("\|",$line);
+ list($key,$value) = preg_split("/\|/",$line);
$result[$key]=$value;
}
return $result;
if (ereg("([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{4})",
$info_array["date"])) {
// remain compatible - DD.MM.YYYY
- list($day,$month,$year) = split("\.", $info_array["date"]);
+ list($day,$month,$year) = preg_split("/\./", $info_array["date"]);
$year = rtrim($year);
$month = rtrim($month);
$day = rtrim($day);
$acceptarr = explode("," , $accept);
foreach ($acceptarr as $lang) {
//get rid of trailing garbage
- $lang = ereg_replace("^(.*)\;.*","\\1", $lang);
+ $lang = preg_replace("/^(.*)\;.*/","\\1", $lang);
if (is_dir("l10n/$lang")) {
return $lang;
exit;
while ($file = $adr->Read()) {
// checking for inc is only really needed when gallery_dir == $root
// hopefully not many galleries will be named inc ;)
- if (is_dir("$gallery_dir/$file") && !ereg("\.", $file) && $file!="inc") {
+ if (is_dir("$gallery_dir/$file") && !preg_match("/\./", $file) && $file!="inc") {
// Use date file for gallery date if avaliable
// info.txt format described in README
readInfo("$root/$gallery_dir/$file/info.txt", $file);