[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13955] convert from deprecated split() to preg_split
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13955] convert from deprecated split() to preg_split() or explode() |
Date: |
Thu, 17 Sep 2015 16:45:29 +0000 |
Revision: 13955
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13955
Author: sigurdne
Date: 2015-09-17 16:45:28 +0000 (Thu, 17 Sep 2015)
Log Message:
-----------
convert from deprecated split() to preg_split() or explode()
Modified Paths:
--------------
trunk/about.php
trunk/addressbook/inc/class.boXport.inc.php
trunk/admin/inc/class.bolog.inc.php
trunk/admin/inc/class.uiconfig.inc.php
trunk/booking/inc/class.uibuilding.inc.php
trunk/booking/inc/class.uievent.inc.php
trunk/bookingfrontend/inc/class.uibooking.inc.php
trunk/calendar/inc/class.bocalendar.inc.php
trunk/calendar/inc/class.socalendar.inc.php
trunk/calendar/inc/class.uicalendar.inc.php
trunk/catch/inc/class.boconfig.inc.php
trunk/controller/inc/class.uicheck_list.inc.php
trunk/email/inc/class.mail_msg_display.inc.php
trunk/email/inc/class.svc_nextmatches.inc.php
trunk/emailadmin/inc/class.pleskimap.inc.php
trunk/felamimail/inc/class.Script.inc.php
trunk/felamimail/inc/class.uisieve.inc.php
trunk/hrm/inc/class.bocommon.inc.php
trunk/hrm/inc/class.uicategory.inc.php
trunk/ipc_test_suite/sources/api/class.vcard.inc.php
trunk/ipc_test_suite/sources/app/class.ipc_addressbook.inc.php
trunk/phpgwapi/inc/class.asyncservice.inc.php
trunk/phpgwapi/inc/class.jscal.inc.php
trunk/phpgwapi/inc/class.net_http_client.inc.php
trunk/phpgwapi/inc/class.send.inc.php
trunk/phpgwapi/inc/class.setup.inc.php
trunk/phpgwapi/inc/class.sql_builder.inc.php
trunk/phpgwapi/inc/class.vcard.inc.php
trunk/phpgwapi/inc/wiki2html/textile/Textile.php
trunk/phpgwapi/js/uploadify/uploadify.php
trunk/preferences/inc/class.boadmin_acl.inc.php
trunk/property/inc/class.interlink.inc.php
trunk/property/inc/cron/default/catch_ppc.php
trunk/rental/inc/class.bofellesdata.inc.php
trunk/rental/inc/model/class.contract.inc.php
trunk/sms/inc/plugin/gateway/clickatell/fn.php
trunk/sms/inc/plugin/gateway/uplink/fn.php
trunk/soap.php
trunk/todo/inc/class.uitodo.inc.php
trunk/xmlrpc.php
Modified: trunk/about.php
===================================================================
--- trunk/about.php 2015-09-17 11:33:02 UTC (rev 13954)
+++ trunk/about.php 2015-09-17 16:45:28 UTC (rev 13955)
@@ -93,7 +93,7 @@
if (is_array($infos))
{
$names =
explode('<br />',$infos['name']);
- $emails =
split('@|<br />',$infos['email']);
+ $emails =
preg_split('/@|<br \/>/',$infos['email']);
if
(count($names) < count($emails)/2)
{
$names
= '';
Modified: trunk/addressbook/inc/class.boXport.inc.php
===================================================================
--- trunk/addressbook/inc/class.boXport.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/addressbook/inc/class.boXport.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -133,7 +133,7 @@
while ($data = fgets($fp,8000))
{
$url = "";
- list($name,$value,$extra) = split(':',
$data);
+ list($name,$value,$extra) =
preg_split('/:/', $data);
if (substr($name,0,2) == 'dn')
{
$buffer =
$contacts->import_start_record($buffer);
@@ -156,7 +156,7 @@
if ($name && $value)
{
- $test = split(',mail=',$value);
+ $test =
preg_split('/,mail=/',$value);
if ($test[1])
{
$name = "mail";
Modified: trunk/admin/inc/class.bolog.inc.php
===================================================================
--- trunk/admin/inc/class.bolog.inc.php 2015-09-17 11:33:02 UTC (rev 13954)
+++ trunk/admin/inc/class.bolog.inc.php 2015-09-17 16:45:28 UTC (rev 13955)
@@ -42,7 +42,7 @@
if (
preg_match('/@/',$record['log_account_lid']))
{
- $t =
split('@',$record['log_account_lid']);
+ $t =
preg_split('/@/',$record['log_account_lid']);
$record['log_account_lid'] = $t[0];
}
Modified: trunk/admin/inc/class.uiconfig.inc.php
===================================================================
--- trunk/admin/inc/class.uiconfig.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/admin/inc/class.uiconfig.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -211,7 +211,7 @@
break;
case 'checked':
/* '+' is used as a
delimiter for the check value */
- list($newvalue,$check)
= split('\+',$newval);
+ list($newvalue,$check)
= preg_split('/\+/',$newval);
$newval =
preg_replace('/ /','_',$newvalue);
if($current_config[$newval] == $check)
{
Modified: trunk/booking/inc/class.uibuilding.inc.php
===================================================================
--- trunk/booking/inc/class.uibuilding.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/booking/inc/class.uibuilding.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -33,7 +33,7 @@
public function properties()
{
$q = phpgw::get_var('query', 'str', 'REQUEST', null);
- $type_id = count(split('-', $q));
+ $type_id = count(explode('-', $q));
$so = CreateObject('property.solocation');
$ret = $so->read(array('type_id' => $type_id,
'location_code'=>$q));
foreach($ret as &$r)
Modified: trunk/booking/inc/class.uievent.inc.php
===================================================================
--- trunk/booking/inc/class.uievent.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/booking/inc/class.uievent.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -378,8 +378,8 @@
$event['to_'] = $checkdate['to_'];
$_POST['to_'] = $checkdate['to_'];
list($event, $errors) =
$this->extract_and_validate($event);
- $time_from = split(" ",$_POST['from_']);
- $time_to = split(" ",$_POST['to_']);
+ $time_from = explode("
",$_POST['from_']);
+ $time_to = explode(" ",$_POST['to_']);
if ($time_from[0] == $time_to[0])
{
if ($time_from[1] >=
$time_to[1])
@@ -396,8 +396,8 @@
else
{
list($event, $errors) =
$this->extract_and_validate($event);
- $time_from = split(" ",$_POST['from_']);
- $time_to = split(" ",$_POST['to_']);
+ $time_from = explode(" ",$_POST['from_']);
+ $time_to = explode(" ",$_POST['to_']);
if ($time_from[0] == $time_to[0]) {
if ($time_from[1] >= $time_to[1])
{
Modified: trunk/bookingfrontend/inc/class.uibooking.inc.php
===================================================================
--- trunk/bookingfrontend/inc/class.uibooking.inc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/bookingfrontend/inc/class.uibooking.inc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -101,8 +101,8 @@
#The string replace is a workaround for a problem at Bergen
Kommune
$booking['from_'] = str_replace('%3A',':',phpgw::get_var('from_',
'str', 'GET'));
$booking['to_'] = str_replace('%3A',':',phpgw::get_var('to_',
'str', 'GET'));
- $time_from = split(" ",phpgw::get_var('from_', 'str',
'GET'));
- $time_to = split(" ",phpgw::get_var('to_', 'str',
'GET'));
+ $time_from = explode(" ",phpgw::get_var('from_', 'str',
'GET'));
+ $time_to = explode(" ",phpgw::get_var('to_', 'str',
'GET'));
$step = phpgw::get_var('step', 'str', 'POST');
if (! isset($step)) $step = 1;
Modified: trunk/calendar/inc/class.bocalendar.inc.php
===================================================================
--- trunk/calendar/inc/class.bocalendar.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/calendar/inc/class.bocalendar.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -2564,7 +2564,7 @@
$details['startdate'] =
$GLOBALS['phpgw']->common->show_date($starttime);
$details['enddate'] =
$GLOBALS['phpgw']->common->show_date($endtime);
- list($subject,$body) =
split("\n",$GLOBALS['phpgw']->preferences->parse_notify($notify_msg,$details),2);
+ list($subject,$body) =
explode("\n",$GLOBALS['phpgw']->preferences->parse_notify($notify_msg,$details),2);
$subject =
trim($send->encode_subject($subject));
switch($part_prefs['calendar']['update_format'])
{
Modified: trunk/calendar/inc/class.socalendar.inc.php
===================================================================
--- trunk/calendar/inc/class.socalendar.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/calendar/inc/class.socalendar.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -147,7 +147,7 @@
$sql = 'AND (phpgw_cal_user.cal_login IN
('.implode(',',$members).')) AND '.
'(phpgw_cal_user.cal_login='.intval($this->owner).' OR phpgw_cal.is_public=1)
AND (';
- $words = split(' ',$keywords);
+ $words = explode(' ',$keywords);
foreach($words as $i => $word)
{
$sql .= $i > 0 ? ' OR ' : '';
Modified: trunk/calendar/inc/class.uicalendar.inc.php
===================================================================
--- trunk/calendar/inc/class.uicalendar.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/calendar/inc/class.uicalendar.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -2298,7 +2298,7 @@
$params = explode('&', $params);
foreach( $params as $v )
{
- $b = split('=', $v);
+ $b = explode('=', $v);
if(isset($b[0]) && $b[0])
{
$new_params[$b[0]] = $b[1];
Modified: trunk/catch/inc/class.boconfig.inc.php
===================================================================
--- trunk/catch/inc/class.boconfig.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/catch/inc/class.boconfig.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -88,7 +88,7 @@
foreach ($config_info as & $entry)
{
- list($entity_id, $cat_id) = split('[_]',
$entry['schema']);
+ list($entity_id, $cat_id) = preg_split('/[_]/',
$entry['schema']);
$category =
$entity->read_single_category($entity_id, $cat_id);
$entry['schema'] = "{$entry['schema']}
{$category['name']}";
}
@@ -101,7 +101,7 @@
$values =
$this->so->read_single_type($id);
$entity =
CreateObject('property.soadmin_entity');
$entity->type = 'catch';
- list($entity_id, $cat_id) = split('[_]',
$values['schema']);
+ list($entity_id, $cat_id) = preg_split('/[_]/',
$values['schema']);
$category =
$entity->read_single_category($entity_id, $cat_id);
$values['schema_text'] = "{$values['schema']}
{$category['name']}";
return $values;
Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/controller/inc/class.uicheck_list.inc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -1532,7 +1532,7 @@
$from =
str_replace(array('[',']'),array('<','>'),$from_address);
- $from_array = split('<', $from);
+ $from_array = explode('<', $from);
unset($from);
if ( count($from_array) == 2 )
{
Modified: trunk/email/inc/class.mail_msg_display.inc.php
===================================================================
--- trunk/email/inc/class.mail_msg_display.inc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/email/inc/class.mail_msg_display.inc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -2352,7 +2352,7 @@
}
$newText = '';
- $lines = split("\n",$data);
+ $lines = explode("\n",$data);
while ( list ($key,$line) = each ($lines))
{
Modified: trunk/email/inc/class.svc_nextmatches.inc.php
===================================================================
--- trunk/email/inc/class.svc_nextmatches.inc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/email/inc/class.svc_nextmatches.inc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -83,7 +83,7 @@
$extra = explode('&', $extra);
foreach( $extra as $v )
{
- $b = split('=', $v);
+ $b = explode('=', $v);
if(isset($b[0]) && $b[0])
{
$new_extra[$b[0]] = $b[1];
@@ -197,7 +197,7 @@
$extravar = explode('&', $extravar);
foreach( $extravar as $v )
{
- $b = split('=', $v);
+ $b = explode('=', $v);
if(isset($b[0]) && $b[0])
{
$new_extravar[$b[0]] = $b[1];
Modified: trunk/emailadmin/inc/class.pleskimap.inc.php
===================================================================
--- trunk/emailadmin/inc/class.pleskimap.inc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/emailadmin/inc/class.pleskimap.inc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -423,7 +423,7 @@
while(!feof($fp))
{
$line = trim(fgets($fp));
- list($name,$value) = split(': *',$line,2);
+ list($name,$value) = preg_split('/: */',$line,2);
if (!is_null($value) && strpos($name,'An error
occured') === false && $name)
{
$values[$name] = $value;
Modified: trunk/felamimail/inc/class.Script.inc.php
===================================================================
--- trunk/felamimail/inc/class.Script.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/felamimail/inc/class.Script.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -380,7 +380,7 @@
$if[] = 'address :contains
["To","TO","Cc","CC"] "'.$addr.'"';
}
$newscriptbody .= 'if anyof
('.implode(', ',$if).") {\n";
- foreach(split(',
?',$vacation['forwards']) as $addr) {
+ foreach(preg_split('/,
?/',$vacation['forwards']) as $addr) {
$newscriptbody .= "\tredirect
\"".$addr."\";\n";
}
$newscriptbody .= "\tkeep;\n}\n";
Modified: trunk/felamimail/inc/class.uisieve.inc.php
===================================================================
--- trunk/felamimail/inc/class.uisieve.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/felamimail/inc/class.uisieve.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -260,7 +260,7 @@
if ($_vacation['forwards'])
{
- foreach(split(', ?',$_vacation['forwards']) as
$addr)
+ foreach(preg_split('/,
?/',$_vacation['forwards']) as $addr)
{
if (!preg_match($regexp,$addr))
{
Modified: trunk/hrm/inc/class.bocommon.inc.php
===================================================================
--- trunk/hrm/inc/class.bocommon.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/hrm/inc/class.bocommon.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -120,8 +120,8 @@
{
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
- $fields = split('[./-]',$datestr);
- foreach(split('[./-]',$dateformat) as $n => $field)
+ $fields = preg_split('/[.\/-]/',$datestr);
+ foreach(preg_split('/[.\/-]/',$dateformat) as $n =>
$field)
{
$date[$field] = intval($fields[$n]);
Modified: trunk/hrm/inc/class.uicategory.inc.php
===================================================================
--- trunk/hrm/inc/class.uicategory.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/hrm/inc/class.uicategory.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -77,7 +77,7 @@
while (is_array($category_list) && list(,$category) =
each($category_list))
{
- $words = split(' ',$category['descr']);
+ $words = explode(' ',$category['descr']);
$first = "$words[0] $words[1] $words[2]
$words[3]";
$content[] = array
Modified: trunk/ipc_test_suite/sources/api/class.vcard.inc.php
===================================================================
--- trunk/ipc_test_suite/sources/api/class.vcard.inc.php 2015-09-17
11:33:02 UTC (rev 13954)
+++ trunk/ipc_test_suite/sources/api/class.vcard.inc.php 2015-09-17
16:45:28 UTC (rev 13955)
@@ -174,7 +174,7 @@
/* Following is a lot of pain and little magic */
while ( list($name,$value) = @each($buffer) )
{
- $field = split(';',$name);
+ $field = explode(';',$name);
while (list($key,$val) = each($field))
{
@@ -185,7 +185,7 @@
$field[0] = preg_replace("/B\./",'',$field[0]);
$field[0] = preg_replace("/C\./",'',$field[0]);
$field[0] = preg_replace("/D\./",'',$field[0]);
- $values = split(';',$value);
+ $values = explode(';',$value);
switch ($field[0])
{
case 'N':
@@ -207,7 +207,7 @@
}
break;
case 'FN':
- $fn = split(" ", $values[0], 3);
+ $fn = explode(" ", $values[0], 3);
switch (count($fn))
{
case 1:
@@ -479,7 +479,7 @@
}
}
- if (count($street =
split("\r*\n",$buffer['adr_one_street'],3)) > 1)
+ if (count($street =
preg_split("/\r*\n/",$buffer['adr_one_street'],3)) > 1)
{
$entry['adr_one_street'] = $street[0];
// RB 2001/05/08 added for Lotus Organizer to split multiline adresses
$entry['address2'] = $street[1];
Modified: trunk/ipc_test_suite/sources/app/class.ipc_addressbook.inc.php
===================================================================
--- trunk/ipc_test_suite/sources/app/class.ipc_addressbook.inc.php
2015-09-17 11:33:02 UTC (rev 13954)
+++ trunk/ipc_test_suite/sources/app/class.ipc_addressbook.inc.php
2015-09-17 16:45:28 UTC (rev 13955)
@@ -627,7 +627,7 @@
$add_parts =
explode(',', utf8_decode($data[$attribute][0]));
for($k=0;$k<count($add_parts);++$k)
{
- list($name,
$value) = split('=', $add_parts[$k], 2);
+ list($name,
$value) = explode('=', $add_parts[$k], 2);
$value =
utf8_decode($value);
switch(strtolower($name))
{
@@ -690,7 +690,7 @@
$add_parts =
explode(';', utf8_decode($data[$attribute][0]));
for($k=0;$k<count($add_parts);++$k)
{
- list($name,
$value) = split('=', $add_parts[$k], 2);
+ list($name,
$value) = explode('=', $add_parts[$k], 2);
switch(strtolower($name))
{
case
'c':
Modified: trunk/phpgwapi/inc/class.asyncservice.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.asyncservice.inc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/phpgwapi/inc/class.asyncservice.inc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -655,7 +655,7 @@
while ($line = fgets($crontab,256))
{
if ($this->debug) echo 'line '.++$n.":
$line<br>\n";
- $parts = split(' ',$line,6);
+ $parts = explode(' ',$line,6);
if ($line[0] == '#' || count($parts) <
6 || ($parts[5][0] != '/' && substr($parts[5],0,3) != 'php'))
{
Modified: trunk/phpgwapi/inc/class.jscal.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.jscal.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/phpgwapi/inc/class.jscal.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -177,8 +177,8 @@
{
return False;
}
- $fields = split('[./-]',$datestr);
- foreach(split('[./-]',$this->dateformat) as $n =>
$field)
+ $fields = preg_split('/[.\/-]/',$datestr);
+ foreach(preg_split('/[.\/-]/',$this->dateformat) as $n
=> $field)
{
$date[$field] = intval($fields[$n]);
if($field == 'M')
Modified: trunk/phpgwapi/inc/class.net_http_client.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.net_http_client.inc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/phpgwapi/inc/class.net_http_client.inc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -722,7 +722,7 @@
if( $this->debug & DBGINDATA ) echo "HEADER :
$str;";
$finished = ( $str == $lastLine );
if ( !$finished ) {
- list( $hdr, $value ) = split( ": ",
$str, 2 );
+ list( $hdr, $value ) = preg_split( "/:
/", $str, 2 );
// nasty workaround broken multiple
same headers (eg. Set-Cookie headers) @FIXME
if( isset( $headers[$hdr]) )
$headers[$hdr] .= "; " .
trim($value);
Modified: trunk/phpgwapi/inc/class.send.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.send.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/phpgwapi/inc/class.send.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -71,7 +71,7 @@
{
$mail = createObject('phpgwapi.mailer_smtp');
$from =
str_replace(array('[',']'),array('<','>'),$from);
- $from_array = split('<', $from);
+ $from_array = explode('<', $from);
unset($from);
if ( count($from_array) == 2 )
{
@@ -89,7 +89,7 @@
foreach ($to as $entry)
{
$entry =
str_replace(array('[',']'),array('<','>'),$entry);
- $to_array = split('<', $entry);
+ $to_array = explode('<', $entry);
if ( count($to_array) == 2 )
{
$mail->AddAddress(trim($to_array[1],'>'), $to_array[0]);
@@ -108,7 +108,7 @@
foreach ($cc as $entry)
{
$entry =
str_replace(array('[',']'),array('<','>'),$entry);
- $cc_array = split('<', $entry);
+ $cc_array = explode('<', $entry);
if ( count($cc_array) == 2 )
{
$mail->AddCC(trim($cc_array[1],'>'), $cc_array[0]);
@@ -127,7 +127,7 @@
foreach ($bcc as $entry)
{
$entry =
str_replace(array('[',']'),array('<','>'),$entry);
- $bcc_array = split('<', $entry);
+ $bcc_array = explode('<', $entry);
if ( count($bcc_array) == 2 )
{
$mail->AddBCC(trim($bcc_array[1],'>'), $bcc_array[0]);
Modified: trunk/phpgwapi/inc/class.setup.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.setup.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/phpgwapi/inc/class.setup.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -229,17 +229,17 @@
function checkip($remoteip='')
{
- $allowed_ips =
split(',',$GLOBALS['phpgw_info']['server']['setup_acl']);
+ $allowed_ips =
explode(',',$GLOBALS['phpgw_info']['server']['setup_acl']);
if(is_array($allowed_ips))
{
$foundip = False;
while(list(,$value) = @each($allowed_ips))
{
- $test = split("\.",$value);
+ $test = preg_split("/\./",$value);
if(count($test) < 3)
{
$value .= ".0.0";
- $tmp = split("\.",$remoteip);
+ $tmp =
preg_split("/\./",$remoteip);
$tmp[2] = 0;
$tmp[3] = 0;
$testremoteip = join('.',$tmp);
@@ -247,14 +247,14 @@
elseif(count($test) < 4)
{
$value .= ".0";
- $tmp = split("\.",$remoteip);
+ $tmp =
preg_split("/\./",$remoteip);
$tmp[3] = 0;
$testremoteip = join('.',$tmp);
}
elseif(count($test) == 4 &&
intval($test[3]) == 0)
{
- $tmp = split("\.",$remoteip);
+ $tmp =
preg_split("/\./",$remoteip);
$tmp[3] = 0;
$testremoteip = join('.',$tmp);
}
Modified: trunk/phpgwapi/inc/class.sql_builder.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.sql_builder.inc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/phpgwapi/inc/class.sql_builder.inc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -789,7 +789,7 @@
elseif(is_string($data))
{
$this->ldebug('criteria', 'Query a string is',
'msg');
- list($field, $filter) = split ('=',
str_replace(' ', '', $data));
+ list($field, $filter) = explode('=',
str_replace(' ', '', $data));
$ent = $this->get_entity($field);
$this->entities[$ent]->add_criteria($field,
$filter);
}
Modified: trunk/phpgwapi/inc/class.vcard.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.vcard.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/phpgwapi/inc/class.vcard.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -174,7 +174,7 @@
/* Following is a lot of pain and little magic */
while ( list($name,$value) = @each($buffer) )
{
- $field = split(';',$name);
+ $field = explode(';',$name);
while (list($key,$val) = each($field))
{
@@ -185,7 +185,7 @@
$field[0] = str_replace("B\.",'',$field[0]);
$field[0] = str_replace("C\.",'',$field[0]);
$field[0] = str_replace("D\.",'',$field[0]);
- $values = split(';',$value);
+ $values = explode(';',$value);
switch ($field[0])
{
case 'N':
@@ -207,7 +207,7 @@
}
break;
case 'FN':
- $fn = split(" ", $values[0], 3);
+ $fn = explode(" ", $values[0], 3);
switch (count($fn))
{
case 1:
@@ -479,7 +479,7 @@
}
}
- if (count($street =
split("\r*\n",$buffer['adr_one_street'],3)) > 1)
+ if (count($street =
preg_split("/\r*\n/",$buffer['adr_one_street'],3)) > 1)
{
$entry['adr_one_street'] = $street[0];
// RB 2001/05/08 added for Lotus Organizer to split multiline adresses
$entry['address2'] = $street[1];
Modified: trunk/phpgwapi/inc/wiki2html/textile/Textile.php
===================================================================
--- trunk/phpgwapi/inc/wiki2html/textile/Textile.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/phpgwapi/inc/wiki2html/textile/Textile.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -609,7 +609,7 @@
$o = '';
if( $style ) {
foreach($style as $s) {
- $parts = split(';', $s);
+ $parts = explode(';', $s);
foreach( $parts as $p ) {
$p = trim($p, '; ');
if( !empty( $p ) )
Modified: trunk/phpgwapi/js/uploadify/uploadify.php
===================================================================
--- trunk/phpgwapi/js/uploadify/uploadify.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/phpgwapi/js/uploadify/uploadify.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -32,7 +32,7 @@
// $fileTypes = str_replace('*.','',$_REQUEST['fileext']);
// $fileTypes = str_replace(';','|',$fileTypes);
- // $typesArray = split('\|',$fileTypes);
+ // $typesArray = preg_split('/\|/',$fileTypes);
// $fileParts = pathinfo($_FILES['Filedata']['name']);
// if (in_array($fileParts['extension'],$typesArray)) {
@@ -45,4 +45,3 @@
// echo 'Invalid file type.';
// }
}
-?>
Modified: trunk/preferences/inc/class.boadmin_acl.inc.php
===================================================================
--- trunk/preferences/inc/class.boadmin_acl.inc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/preferences/inc/class.boadmin_acl.inc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -247,7 +247,7 @@
$totalacl = array();
foreach ( $values as $rowinfo => $perm )
{
- list($user_id,$rights) = split('_', $rowinfo);
+ list($user_id,$rights) = explode('_', $rowinfo);
if ( !isset($totalacl[$user_id]) )
{
Modified: trunk/property/inc/class.interlink.inc.php
===================================================================
--- trunk/property/inc/class.interlink.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/property/inc/class.interlink.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -174,7 +174,6 @@
$location = ltrim($location, '.');
$parts = explode('.', $location);
- // list($type, $entity_id,
$cat_id) = split('[.]', $location);
$this->boadmin_entity->type = $parts[0];
switch( $parts[0] )
{
Modified: trunk/property/inc/cron/default/catch_ppc.php
===================================================================
--- trunk/property/inc/cron/default/catch_ppc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/property/inc/cron/default/catch_ppc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -79,7 +79,7 @@
$this->pickup_path =
$config_data['pickup_path'];
$target = $config_data['target'];
$target_table = "fm_catch_{$target}";
- list($entity_id, $cat_id) = split('[_]',
$target);
+ list($entity_id, $cat_id) = preg_split('/[_]/',
$target);
$this->category_dir =
"catch_{$entity_id}_{$cat_id}";
$category =
$admin_entity->read_single_category($entity_id, $cat_id);
$schema_text = "{$target}
{$category['name']}";
Modified: trunk/rental/inc/class.bofellesdata.inc.php
===================================================================
--- trunk/rental/inc/class.bofellesdata.inc.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/rental/inc/class.bofellesdata.inc.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -579,7 +579,7 @@
$selector = "";
switch($search_type){
case 'unit_leader':
- $search_words = split('
', $search_for);
+ $search_words =
explode(' ', $search_for);
$count = 0;
$selector = "(";
foreach($search_words
as $search_word){
@@ -719,7 +719,7 @@
$selector = "";
switch($search_type){
case 'unit_leader':
- $search_words = split('
', $search_for);
+ $search_words =
explode(' ', $search_for);
$count = 0;
$selector = "(";
foreach($search_words
as $search_word)
Modified: trunk/rental/inc/model/class.contract.inc.php
===================================================================
--- trunk/rental/inc/model/class.contract.inc.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/rental/inc/model/class.contract.inc.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -689,13 +689,13 @@
$date_end = phpgw::get_var('date_end');
if(isset($date_start)){
- $aDate = split ("/", $date_start);
+ $aDate = explode("/", $date_start);
$date_start =
$aDate[1]."/".$aDate[0]."/".$aDate[2];
$timestamp_invoice_start =
strtotime($date_start);
}
if(isset($date_end)){
- $aDate = split ("/", $date_end);
+ $aDate = explode("/", $date_end);
$date_end =
$aDate[1]."/".$aDate[0]."/".$aDate[2];
$timestamp_invoice_end = strtotime($date_end);
}
Modified: trunk/sms/inc/plugin/gateway/clickatell/fn.php
===================================================================
--- trunk/sms/inc/plugin/gateway/clickatell/fn.php 2015-09-17 11:33:02 UTC
(rev 13954)
+++ trunk/sms/inc/plugin/gateway/clickatell/fn.php 2015-09-17 16:45:28 UTC
(rev 13955)
@@ -19,7 +19,7 @@
$fd = @implode ('', file ($url));
if ($fd)
{
- $response = split (" ", $fd);
+ $response = explode(" ", $fd);
$err_code = trim ($response[1]);
$credit = 0;
if ((strtoupper(trim($response[2])) == "CHARGE:"))
@@ -149,7 +149,7 @@
setsmsdeliverystatus($smslog_id,$uid,$p_status);
if ($fd)
{
- $response = split (":", $fd);
+ $response = explode(":", $fd);
$err_code = trim ($response[1]);
if ((strtoupper($response[0]) == "ID"))
{
Modified: trunk/sms/inc/plugin/gateway/uplink/fn.php
===================================================================
--- trunk/sms/inc/plugin/gateway/uplink/fn.php 2015-09-17 11:33:02 UTC (rev
13954)
+++ trunk/sms/inc/plugin/gateway/uplink/fn.php 2015-09-17 16:45:28 UTC (rev
13955)
@@ -53,7 +53,7 @@
$fd = @implode ('', file ($url));
if ($fd)
{
- $response = split (" ", $fd);
+ $response = explode(" ", $fd);
if ($response[0] == "OK")
{
$remote_slid = $response[1];
Modified: trunk/soap.php
===================================================================
--- trunk/soap.php 2015-09-17 11:33:02 UTC (rev 13954)
+++ trunk/soap.php 2015-09-17 16:45:28 UTC (rev 13955)
@@ -77,7 +77,7 @@
$tmp = str_replace(' ','',$tmp);
$tmp = str_replace('Basic','',$tmp);
$auth = base64_decode(trim($tmp));
- list($login,$password) = split(':',$auth);
+ list($login,$password) = explode(':',$auth);
if($GLOBALS['phpgw']->session->create($login, $password))
{
Modified: trunk/todo/inc/class.uitodo.inc.php
===================================================================
--- trunk/todo/inc/class.uitodo.inc.php 2015-09-17 11:33:02 UTC (rev 13954)
+++ trunk/todo/inc/class.uitodo.inc.php 2015-09-17 16:45:28 UTC (rev 13955)
@@ -191,7 +191,7 @@
if (!$title)
{
- $words = split('
',$GLOBALS['phpgw']->strip_html($todo_list[$i]['descr']));
+ $words = explode('
',$GLOBALS['phpgw']->strip_html($todo_list[$i]['descr']));
$title = "$words[0] $words[1] $words[2]
$words[3] ...";
}
@@ -385,7 +385,7 @@
}
if (! $todo['title'])
{
- $words = split('
',$GLOBALS['phpgw']->strip_html($todo['descr']));
+ $words = explode('
',$GLOBALS['phpgw']->strip_html($todo['descr']));
$title = "$words[0] $words[1] $words[2]
$words[3] ...";
$todo_select .= ">$title";
}
Modified: trunk/xmlrpc.php
===================================================================
--- trunk/xmlrpc.php 2015-09-17 11:33:02 UTC (rev 13954)
+++ trunk/xmlrpc.php 2015-09-17 16:45:28 UTC (rev 13955)
@@ -139,7 +139,7 @@
$tmp = str_replace(' ','',$tmp);
$tmp = str_replace('Basic','',$tmp);
$auth = base64_decode(trim($tmp));
- list($login,$password) = split(':',$auth);
+ list($login,$password) = explode(':',$auth);
if($GLOBALS['phpgw']->session->create($login, $password))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13955] convert from deprecated split() to preg_split() or explode(),
Sigurd Nes <=