]> gitweb.fluxo.info Git - original.git/commitdiff
Avoiding deprecation notices
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 18 Feb 2011 13:32:56 +0000 (11:32 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 18 Feb 2011 13:32:56 +0000 (11:32 -0200)
www/inc/funkce.inc.php
www/inc/l10nget.inc.php
www/index.php

index 27e1dbd91b7f623f838a86f013d3f33a0e3ed645..368ea8e8f6d9152a697ed9a070021c870d76628d 100644 (file)
@@ -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);
index f04b18c263ccf0913d4e2b96664b58bf4265a149..cdc3418a01429a41a07bd7075ae301853c2d3b79 100644 (file)
@@ -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;
index f99ab0dc54c97a6c068fc0246b4b30f286c2c05a..5711b8722647a254351494fbe4b5931d6f49921e 100644 (file)
@@ -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);