Remove the PHP 5.3 deprecated split function.
This commit is contained in:
@@ -84,7 +84,7 @@ class IDF_Scm_Cache_Git extends Pluf_Model
|
||||
$sql = new Pluf_SQL('project=%s AND githash IN ('.implode(', ', $hashes).')',
|
||||
array($this->_project->id));
|
||||
foreach (Pluf::factory(__CLASS__)->getList(array('filter' => $sql->gen())) as $blob) {
|
||||
$tmp = split(chr(31), $blob->content, 3);
|
||||
$tmp = explode(chr(31), $blob->content, 3);
|
||||
|
||||
$res[$blob->githash] = (object) array(
|
||||
'hash' => $blob->githash,
|
||||
|
@@ -45,7 +45,7 @@ class IDF_Scm_Git extends IDF_Scm
|
||||
{
|
||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -skD '
|
||||
.escapeshellarg($this->repo);
|
||||
$out = split(' ', shell_exec($cmd), 2);
|
||||
$out = explode(' ', shell_exec($cmd), 2);
|
||||
return (int) $out[0]*1024;
|
||||
}
|
||||
|
||||
@@ -671,10 +671,10 @@ class IDF_Scm_Git extends IDF_Scm
|
||||
if (false === $data) {
|
||||
return $res;
|
||||
}
|
||||
$data = split(chr(30), $data);
|
||||
$data = explode(chr(30), $data);
|
||||
foreach ($data as $rec) {
|
||||
if (isset($hashes[substr($rec, 0, 40)])) {
|
||||
$tmp = split(chr(31), substr($rec, 40), 3);
|
||||
$tmp = explode(chr(31), substr($rec, 40), 3);
|
||||
$res[substr($rec, 0, 40)] =
|
||||
(object) array('hash' => substr($rec, 0, 40),
|
||||
'date' => $tmp[0],
|
||||
|
@@ -37,7 +37,7 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
||||
{
|
||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -skD '
|
||||
.escapeshellarg($this->repo);
|
||||
$out = split(' ', shell_exec($cmd), 2);
|
||||
$out = explode(' ', shell_exec($cmd), 2);
|
||||
return (int) $out[0]*1024;
|
||||
}
|
||||
|
||||
|
@@ -58,7 +58,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
||||
}
|
||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -skD '
|
||||
.escapeshellarg(substr($this->repo, 7));
|
||||
$out = split(' ', shell_exec($cmd), 2);
|
||||
$out = explode(' ', shell_exec($cmd), 2);
|
||||
return (int) $out[0]*1024;
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
||||
$log = array();
|
||||
$log['author'] = (string) $entry->author;
|
||||
$log['date'] = gmdate('Y-m-d H:i:s', strtotime((string) $entry->date));
|
||||
$split = split("[\n\r]", (string) $entry->msg, 2);
|
||||
$split = explode("[\n\r]", (string) $entry->msg, 2);
|
||||
$log['title'] = $split[0];
|
||||
$log['commit'] = (string) $entry['revision'];
|
||||
$log['full_message'] = (isset($split[1])) ? trim($split[1]) : '';
|
||||
|
Reference in New Issue
Block a user