From: <var...@us...> - 2010-06-09 10:06:44
|
Revision: 7506 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7506&view=rev Author: vargenau Date: 2010-06-09 10:06:37 +0000 (Wed, 09 Jun 2010) Log Message: ----------- split is deprecated, replace with explode Modified Paths: -------------- trunk/lib/IniConfig.php trunk/lib/PageList.php trunk/lib/WikiDB/adodb/drivers/adodb-informix72.inc.php trunk/lib/WikiDB/adodb/drivers/adodb-ldap.inc.php trunk/lib/WikiDB/adodb/drivers/adodb-postgres64.inc.php trunk/lib/WikiDB/backend.php trunk/lib/WikiUser/POP3.php trunk/lib/WikiUser/Session.php trunk/lib/WikiUserNew.php trunk/lib/XMLRPC/xmlrpc.inc trunk/lib/XmlParser.php trunk/lib/config.php trunk/lib/plugin/LdapSearch.php trunk/lib/plugin/ListPages.php trunk/lib/plugin/Template.php trunk/lib/wikilens/Utils.php trunk/lib/ziplib.php Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/IniConfig.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -425,7 +425,7 @@ if (defined('PLUGIN_MARKUP_MAP') and trim(PLUGIN_MARKUP_MAP) != "") { $_map = preg_split('/\s+/', PLUGIN_MARKUP_MAP); foreach ($_map as $v) { - list($xml,$plugin) = split(':', $v); + list($xml,$plugin) = explode(':', $v); if (!empty($xml) and !empty($plugin)) $PLUGIN_MARKUP_MAP[$xml] = $plugin; } Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/PageList.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -1395,7 +1395,7 @@ return $limit; } if (strstr($limit, ',')) { - list($from, $limit) = split(',', $limit); + list($from, $limit) = explode(',', $limit); if ((!empty($from) && !is_numeric($from)) or (!empty($limit) && !is_numeric($limit))) { return $this->error(_("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/WikiDB/adodb/drivers/adodb-informix72.inc.php =================================================================== --- trunk/lib/WikiDB/adodb/drivers/adodb-informix72.inc.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/WikiDB/adodb/drivers/adodb-informix72.inc.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -312,7 +312,7 @@ foreach($fp as $k => $v) { $o = new ADOFieldObject; $o->name = $k; - $arr = split(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE" + $arr = explode(';', $v); //"SQLTYPE;length;precision;scale;ISNULLABLE" $o->type = $arr[0]; $o->max_length = $arr[1]; $this->_fieldprops[] = $o; @@ -389,4 +389,4 @@ } } -?> \ No newline at end of file +?> Modified: trunk/lib/WikiDB/adodb/drivers/adodb-ldap.inc.php =================================================================== --- trunk/lib/WikiDB/adodb/drivers/adodb-ldap.inc.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/WikiDB/adodb/drivers/adodb-ldap.inc.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -39,7 +39,7 @@ $conn_info = array( $host ); if ( strstr( $host, ':' ) ) { - $conn_info = split( ':', $host ); + $conn_info = explode(':', $host); } $this->_connectionID = ldap_connect( $conn_info[0], $conn_info[1] ) @@ -306,4 +306,4 @@ } } -?> \ No newline at end of file +?> Modified: trunk/lib/WikiDB/adodb/drivers/adodb-postgres64.inc.php =================================================================== --- trunk/lib/WikiDB/adodb/drivers/adodb-postgres64.inc.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/WikiDB/adodb/drivers/adodb-postgres64.inc.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -571,7 +571,7 @@ if (strlen($db) == 0) $db = 'template1'; $db = adodb_addslashes($db); if ($str) { - $host = split(":", $str); + $host = explode(":", $str); if ($host[0]) $str = "host=".adodb_addslashes($host[0]); else $str = 'host=localhost'; if (isset($host[1])) $str .= " port=$host[1]"; Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/WikiDB/backend.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -525,7 +525,7 @@ */ function limit($limit) { if (strstr($limit, ',')) { - list($from, $limit) = split(',', $limit); + list($from, $limit) = explode(',', $limit); if ((!empty($from) && !is_numeric($from)) or (!empty($limit) && !is_numeric($limit))) { return $this->error(_("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/WikiUser/POP3.php =================================================================== --- trunk/lib/WikiUser/POP3.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/WikiUser/POP3.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -28,7 +28,7 @@ if (defined('POP3_AUTH_PORT')) $port = POP3_AUTH_PORT; elseif (strstr($host,':')) { - list(,$port) = split(':',$host); + list(,$port) = explode(':', $host); } else { $port = 110; } Modified: trunk/lib/WikiUser/Session.php =================================================================== --- trunk/lib/WikiUser/Session.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/WikiUser/Session.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -27,14 +27,14 @@ if (strstr(AUTH_SESS_USER,"][")) { $sess = $GLOBALS['HTTP_SESSION_VARS']; // recurse into hashes: "[user][userid]", sess = sess[user] => sess = sess[userid] - foreach (split("][",AUTH_SESS_USER) as $v) { + foreach (explode("][", AUTH_SESS_USER) as $v) { $v = str_replace(array("[","]"),'',$v); $sess = $sess[$v]; } $this->_userid = $sess; } elseif (strstr(AUTH_SESS_USER,"->")) { // object "user->id" (no objects inside hashes supported!) - list($obj,$key) = split("->",AUTH_SESS_USER); + list($obj,$key) = explode("->", AUTH_SESS_USER); $this->_userid = $sess[$obj]->$key; } else { $this->_userid = $sess[AUTH_SESS_USER]; Modified: trunk/lib/WikiUserNew.php =================================================================== --- trunk/lib/WikiUserNew.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/WikiUserNew.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -1883,7 +1883,7 @@ if ($noconnect) return array(true, sprintf(_("E-Mail address '%s' is properly formatted"), $email)); - list ( $Username, $Domain ) = split ("@", $email); + list ( $Username, $Domain ) = explode("@", $email); //Todo: getmxrr workaround on windows or manual input field to verify it manually if (!isWindows() and getmxrr($Domain, $MXHost)) { // avoid warning on Windows. $ConnectAddress = $MXHost[0]; Modified: trunk/lib/XMLRPC/xmlrpc.inc =================================================================== --- trunk/lib/XMLRPC/xmlrpc.inc 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/XMLRPC/xmlrpc.inc 2010-06-09 10:06:37 UTC (rev 7506) @@ -201,7 +201,7 @@ */ function xmlrpc_entity_decode($string) { - $top=split('&', $string); + $top=explode('&', $string); $op=''; $i=0; while($i<sizeof($top)) @@ -1500,7 +1500,7 @@ } } // be tolerant to line endings, and extra empty lines - $ar = split("\r?\n", trim(substr($data, 0, $pos))); + $ar = explode("\r?\n", trim(substr($data, 0, $pos))); while (list(,$line) = @each($ar)) { // take care of multi-line headers Modified: trunk/lib/XmlParser.php =================================================================== --- trunk/lib/XmlParser.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/XmlParser.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -92,9 +92,9 @@ $node = new XmlElement($this->_tag); if (is_string($attrs) and !empty($attrs)) { // lowercase attr names - foreach(split(' ',$attrs) as $pair) { + foreach(explode(' ', $attrs) as $pair) { if (strstr($pair,"=")) { - list($key,$val) = split('=',$pair); + list($key,$val) = explode('=', $pair); $key = strtolower(trim($key)); $val = str_replace(array('"',"'"),'',trim($val)); $node->_attr[$key] = $val; Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/config.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -178,7 +178,7 @@ // do the reverse: return the detected locale collapsed to our LANG $locale = setlocale($category, ''); if ($locale) { - if (strstr($locale, '_')) list ($lang) = split('_', $locale); + if (strstr($locale, '_')) list ($lang) = explode('_', $locale); else $lang = $locale; if (strlen($lang) > 2) { foreach ($alt as $try => $locs) { @@ -193,7 +193,7 @@ if (strlen($locale) == 2) $lang = $locale; else - list ($lang) = split('_', $locale); + list ($lang) = explode('_', $locale); if (!isset($alt[$lang])) return false; @@ -228,7 +228,7 @@ $setlocale = guessing_setlocale(LC_ALL, $loc); // [56ms] if (!$setlocale) { // system has no locale for this language, so gettext might fail $setlocale = FileFinder::_get_lang(); - list ($setlocale,) = split('_', $setlocale, 2); + list ($setlocale,) = explode('_', $setlocale, 2); $setlocale = guessing_setlocale(LC_ALL, $setlocale); // try again if (!$setlocale) $setlocale = $loc; } Modified: trunk/lib/plugin/LdapSearch.php =================================================================== --- trunk/lib/plugin/LdapSearch.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/plugin/LdapSearch.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -135,7 +135,7 @@ if (!$attributes) { $res = ldap_search($connect, $basedn, $filter); } else { - $attr_array = split (" ",$attributes); + $attr_array = explode(" ", $attributes); $res = ldap_search($connect, $basedn, $filter, $attr_array); } $entries = ldap_get_entries($connect, $res); Modified: trunk/lib/plugin/ListPages.php =================================================================== --- trunk/lib/plugin/ListPages.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/plugin/ListPages.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -69,7 +69,7 @@ if ($info == 'pagename' and isa($GLOBALS['WikiTheme'], 'wikilens')) $info .= ",top3recs"; if ($info) - $info = split(',', $info); + $info = explode(',', $info); else $info = array(); Modified: trunk/lib/plugin/Template.php =================================================================== --- trunk/lib/plugin/Template.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/plugin/Template.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -210,8 +210,8 @@ $dbi =& $request->_dbi; $var = array(); if (is_string($vars) and !empty($vars)) { - foreach (split("&",$vars) as $pair) { - list($key,$val) = split("=",$pair); + foreach (explode("&", $vars) as $pair) { + list($key,$val) = explode("=", $pair); $var[$key] = $val; } } elseif (is_array($vars)) { Modified: trunk/lib/wikilens/Utils.php =================================================================== --- trunk/lib/wikilens/Utils.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/wikilens/Utils.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -82,7 +82,7 @@ $singles = $pageArray[$p]; $singles = substr($singles, strpos($singles, $START_DELIM) + strlen($START_DELIM)); - $retArray = split($DELIM, $singles); + $retArray = explode($DELIM, $singles); } for ($i = 0; $i < count($retArray); $i++) { $retArray[$i] = trim($retArray[$i]); Modified: trunk/lib/ziplib.php =================================================================== --- trunk/lib/ziplib.php 2010-06-09 08:47:52 UTC (rev 7505) +++ trunk/lib/ziplib.php 2010-06-09 10:06:37 UTC (rev 7506) @@ -767,10 +767,10 @@ return ''; } $hash = array(); - foreach (split(";",trim($string)) as $accessgroup) { - list($access,$groupstring) = split(":",trim($accessgroup)); + foreach (explode(";", trim($string)) as $accessgroup) { + list($access,$groupstring) = explode(":", trim($accessgroup)); $access = trim($access); - $groups = split(",",trim($groupstring)); + $groups = explode(",", trim($groupstring)); foreach ($groups as $group) { $group = trim($group); $bool = (boolean) (substr($group,0,1) != '-'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |