[pLog-svn] r7207 - in plog/branches/lifetype-1.2/class: bayesian database/pdb/datadict template/menu template/smarty/plugins xml/rssparser/magpierss

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Thu Apr 25 09:31:59 EDT 2013


Author: jondaley
Date: 2013-04-25 09:31:59 -0400 (Thu, 25 Apr 2013)
New Revision: 7207

Modified:
   plog/branches/lifetype-1.2/class/bayesian/bayesiantokenizer.class.php
   plog/branches/lifetype-1.2/class/database/pdb/datadict/pdbbasedatadict.class.php
   plog/branches/lifetype-1.2/class/template/menu/menu.class.php
   plog/branches/lifetype-1.2/class/template/smarty/plugins/function.fetch.php
   plog/branches/lifetype-1.2/class/xml/rssparser/magpierss/rss_parse.inc
Log:
split() is deprecated.  replace with preg_split() or explode() if regexps not needed

Modified: plog/branches/lifetype-1.2/class/bayesian/bayesiantokenizer.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/bayesian/bayesiantokenizer.class.php	2013-04-25 13:03:27 UTC (rev 7206)
+++ plog/branches/lifetype-1.2/class/bayesian/bayesiantokenizer.class.php	2013-04-25 13:31:59 UTC (rev 7207)
@@ -64,7 +64,7 @@
                 {
                     if (preg_match("/\\$[0-9]+[-][0-9]+/", $token))
                     {
-                        $temp = split("[-]", $token);
+                        $temp = explode("-", $token);
                         
                         if (BayesianToken::isValid($temp[0]))
                         {
@@ -78,7 +78,7 @@
                     }
                     else if (!preg_match("/[0-9]+[,.^][0-9]+/", $token))
                     {
-                    	$splitted = split("[,.^]", $token);
+                    	$splitted = preg_split("/[,.^]/", $token);
                     	
                     	foreach ($splitted as $splittedOne)
                     	{

Modified: plog/branches/lifetype-1.2/class/database/pdb/datadict/pdbbasedatadict.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/database/pdb/datadict/pdbbasedatadict.class.php	2013-04-25 13:03:27 UTC (rev 7206)
+++ plog/branches/lifetype-1.2/class/database/pdb/datadict/pdbbasedatadict.class.php	2013-04-25 13:31:59 UTC (rev 7207)
@@ -449,7 +449,7 @@
             if ($flds) {
                 list($lines,$pkey) = $this->_GenFields($flds);
                 list(,$first) = each($lines);
-                list(,$column_def) = split("[\t ]+",$first,2);
+                list(,$column_def) = preg_split("/[\t ]+/",$first,2);
             }
             return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def));
         }

Modified: plog/branches/lifetype-1.2/class/template/menu/menu.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/template/menu/menu.class.php	2013-04-25 13:03:27 UTC (rev 7206)
+++ plog/branches/lifetype-1.2/class/template/menu/menu.class.php	2013-04-25 13:31:59 UTC (rev 7207)
@@ -178,7 +178,7 @@
 			// By means of the code below, we're replicating the needed permissions to all the parent nodes so that we can get the
 			// upper level entries to be displayed
 			//
-			$path = split( "/", $entryPath );
+			$path = explode( "/", $entryPath );
 			$currentPath = "";
 			foreach( $path as $step ) {
 				if( $step != "" ) {

Modified: plog/branches/lifetype-1.2/class/template/smarty/plugins/function.fetch.php
===================================================================
--- plog/branches/lifetype-1.2/class/template/smarty/plugins/function.fetch.php	2013-04-25 13:03:27 UTC (rev 7206)
+++ plog/branches/lifetype-1.2/class/template/smarty/plugins/function.fetch.php	2013-04-25 13:31:59 UTC (rev 7207)
@@ -181,12 +181,12 @@
                         $content .= fgets($fp,4096);
                     }
                     fclose($fp);
-                    $csplit = split("\r\n\r\n",$content,2);
+                    $csplit = explode("\r\n\r\n",$content,2);
 
                     $content = $csplit[1];
 
                     if(!empty($params['assign_headers'])) {
-                        $smarty->assign($params['assign_headers'],split("\r\n",$csplit[0]));
+                        $smarty->assign($params['assign_headers'],explode("\r\n",$csplit[0]));
                     }
                 }
             } else {

Modified: plog/branches/lifetype-1.2/class/xml/rssparser/magpierss/rss_parse.inc
===================================================================
--- plog/branches/lifetype-1.2/class/xml/rssparser/magpierss/rss_parse.inc	2013-04-25 13:03:27 UTC (rev 7206)
+++ plog/branches/lifetype-1.2/class/xml/rssparser/magpierss/rss_parse.inc	2013-04-25 13:31:59 UTC (rev 7207)
@@ -150,7 +150,7 @@
         // check for a namespace, and split if found
         $ns = false;
         if ( strpos( $element, ':' ) ) {
-            list($ns, $el) = split( ':', $element, 2); 
+            list($ns, $el) = explode( ':', $element, 2); 
         }
         if ( $ns and $ns != 'rdf' ) {
             $this->current_namespace = $ns;



More information about the pLog-svn mailing list