Remove the PHP 5.3 deprecated split function.

This commit is contained in:
Loic d'Anterroches
2009-09-24 20:40:22 +02:00
parent 157819195b
commit 838645463d
15 changed files with 23 additions and 23 deletions

View File

@@ -321,11 +321,11 @@ function IDF_Views_Admin_getForgeSize()
}
$cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk '
.escapeshellarg(Pluf::f('upload_path'));
$out = split(' ', shell_exec($cmd), 2);
$out = explode(' ', shell_exec($cmd), 2);
$res['downloads'] = $out[0]*1024;
$cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk '
.escapeshellarg(Pluf::f('upload_issue_path'));
$out = split(' ', shell_exec($cmd), 2);
$out = explode(' ', shell_exec($cmd), 2);
$res['attachments'] = $out[0]*1024;
$res['database'] = IDF_Views_Admin_getForgeDbSize();
$res['total'] = $res['repositories'] + $res['downloads'] + $res['attachments'] + $res['database'];

View File

@@ -231,7 +231,7 @@ class IDF_Views_Download
foreach ($st as $s) {
$v = '';
$d = '';
$_s = split('=', $s, 2);
$_s = explode('=', $s, 2);
if (count($_s) > 1) {
$v = trim($_s[0]);
$d = trim($_s[1]);

View File

@@ -563,7 +563,7 @@ class IDF_Views_Issue
foreach ($st as $s) {
$v = '';
$d = '';
$_s = split('=', $s, 2);
$_s = explode('=', $s, 2);
if (count($_s) > 1) {
$v = trim($_s[0]);
$d = trim($_s[1]);

View File

@@ -226,7 +226,7 @@ class IDF_Views_Source
$cache->set($key, $res);
}
// try to find the previous level if it exists.
$prev = split('/', $request_file);
$prev = explode('/', $request_file);
$l = array_pop($prev);
$previous = substr($request_file, 0, -strlen($l.' '));
$scmConf = $request->conf->getVal('scm', 'git');
@@ -250,7 +250,7 @@ class IDF_Views_Source
public static function makeBreadCrumb($project, $commit, $file, $sep='/')
{
$elts = split('/', $file);
$elts = explode('/', $file);
$out = array();
$stack = '';
$i = 0;
@@ -346,7 +346,7 @@ class IDF_Views_Source
$cobject = $scm->getCommit($commit);
$in_branches = $scm->inBranches($commit, $request_file);
// try to find the previous level if it exists.
$prev = split('/', $request_file);
$prev = explode('/', $request_file);
$l = array_pop($prev);
$previous = substr($request_file, 0, -strlen($l.' '));
$scmConf = $request->conf->getVal('scm', 'git');

View File

@@ -397,7 +397,7 @@ class IDF_Views_Wiki
foreach ($st as $s) {
$v = '';
$d = '';
$_s = split('=', $s, 2);
$_s = explode('=', $s, 2);
if (count($_s) > 1) {
$v = trim($_s[0]);
$d = trim($_s[1]);