From f1e819c4e3c002b61e8158ffe4c6d28ec6e4feb0 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 18 Feb 2011 11:32:56 -0200 Subject: Avoiding deprecation notices --- www/inc/funkce.inc.php | 4 ++-- www/inc/l10nget.inc.php | 2 +- www/index.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'www') diff --git a/www/inc/funkce.inc.php b/www/inc/funkce.inc.php index 27e1dbd..368ea8e 100644 --- a/www/inc/funkce.inc.php +++ b/www/inc/funkce.inc.php @@ -39,7 +39,7 @@ function infoParse ($infofile) { $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; @@ -57,7 +57,7 @@ function readInfo ($infofile, $file) { 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); diff --git a/www/inc/l10nget.inc.php b/www/inc/l10nget.inc.php index f04b18c..cdc3418 100644 --- a/www/inc/l10nget.inc.php +++ b/www/inc/l10nget.inc.php @@ -5,7 +5,7 @@ function get_lang_from_agent($accept) { $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; diff --git a/www/index.php b/www/index.php index f99ab0d..5711b87 100644 --- a/www/index.php +++ b/www/index.php @@ -83,7 +83,7 @@ if (!$galerie) { 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); -- cgit v1.2.3