Fixed some call-time pass-by-reference warnings with PHP 5.2.6.
This commit is contained in:
parent
7a0a0b523b
commit
c02c52b14a
@ -71,7 +71,7 @@ class IDF_Scm_Git
|
||||
escapeshellarg($this->repo),
|
||||
escapeshellarg($hash));
|
||||
$ret = 0; $out = array();
|
||||
IDF_Scm::exec($cmd, &$out, &$ret);
|
||||
IDF_Scm::exec($cmd, $out, $ret);
|
||||
if ($ret != 0) return false;
|
||||
return trim($out[0]);
|
||||
}
|
||||
@ -114,7 +114,7 @@ class IDF_Scm_Git
|
||||
$rawlog = array();
|
||||
$cmd = sprintf('GIT_DIR=%s git log --raw --abbrev=40 --pretty=oneline %s',
|
||||
escapeshellarg($this->repo), escapeshellarg($commit));
|
||||
IDF_Scm::exec($cmd, &$rawlog);
|
||||
IDF_Scm::exec($cmd, $rawlog);
|
||||
// We reverse the log to be able to use a fixed efficient
|
||||
// regex without back tracking.
|
||||
$rawlog = implode("\n", array_reverse($rawlog));
|
||||
@ -123,7 +123,7 @@ class IDF_Scm_Git
|
||||
// information as possible.
|
||||
$matches = array();
|
||||
if ($file->type == 'blob' and preg_match('/^\:\d{6} \d{6} [0-9a-f]{40} '.$file->hash.' .*^([0-9a-f]{40})/msU',
|
||||
$rawlog, &$matches)) {
|
||||
$rawlog, $matches)) {
|
||||
$fc = $this->getCommit($matches[1]);
|
||||
$file->date = $fc->date;
|
||||
$file->log = $fc->title;
|
||||
@ -158,7 +158,7 @@ class IDF_Scm_Git
|
||||
escapeshellarg($tree));
|
||||
$out = array();
|
||||
$res = array();
|
||||
IDF_Scm::exec($cmd, &$out);
|
||||
IDF_Scm::exec($cmd, $out);
|
||||
foreach ($out as $line) {
|
||||
list($perm, $type, $hash, $size, $file) = preg_split('/ |\t/', $line, 5, PREG_SPLIT_NO_EMPTY);
|
||||
$res[] = (object) array('perm' => $perm, 'type' => $type,
|
||||
@ -183,7 +183,7 @@ class IDF_Scm_Git
|
||||
escapeshellarg($this->repo),
|
||||
escapeshellarg($commit));
|
||||
$out = array();
|
||||
IDF_Scm::exec($cmd, &$out);
|
||||
IDF_Scm::exec($cmd, $out);
|
||||
foreach ($out as $line) {
|
||||
list($perm, $type, $hash, $size, $file) = preg_split('/ |\t/', $line, 5, PREG_SPLIT_NO_EMPTY);
|
||||
if ($totest == $file) {
|
||||
@ -218,7 +218,7 @@ class IDF_Scm_Git
|
||||
{
|
||||
$out = array();
|
||||
IDF_Scm::exec(sprintf('GIT_DIR=%s git branch',
|
||||
escapeshellarg($this->repo)), &$out);
|
||||
escapeshellarg($this->repo)), $out);
|
||||
$res = array();
|
||||
foreach ($out as $b) {
|
||||
$res[] = substr($b, 2);
|
||||
@ -239,7 +239,7 @@ class IDF_Scm_Git
|
||||
"'".$this->mediumtree_fmt."'",
|
||||
escapeshellarg($commit));
|
||||
$out = array();
|
||||
IDF_Scm::exec($cmd, &$out);
|
||||
IDF_Scm::exec($cmd, $out);
|
||||
$log = array();
|
||||
$change = array();
|
||||
$inchange = false;
|
||||
@ -274,7 +274,7 @@ class IDF_Scm_Git
|
||||
escapeshellarg($this->repo), $n, $this->mediumtree_fmt,
|
||||
escapeshellarg($commit));
|
||||
$out = array();
|
||||
IDF_Scm::exec($cmd, &$out);
|
||||
IDF_Scm::exec($cmd, $out);
|
||||
return self::parseLog($out, 4);
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ class IDF_Scm_Mercurial
|
||||
escapeshellarg($hash));
|
||||
$ret = 0;
|
||||
$out = array();
|
||||
IDF_Scm::exec($cmd, &$out, &$ret);
|
||||
IDF_Scm::exec($cmd, $out, $ret);
|
||||
return ($ret != 0) ? false : 'commit';
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ class IDF_Scm_Mercurial
|
||||
$cmd = sprintf($cmd_tmpl, escapeshellarg($this->repo), $tree, ($recurse) ? '' : '');
|
||||
$out = array();
|
||||
$res = array();
|
||||
IDF_Scm::exec($cmd, &$out);
|
||||
IDF_Scm::exec($cmd, $out);
|
||||
$out_hack = array();
|
||||
foreach ($out as $line) {
|
||||
list($hash, $perm, $exec, $file) = preg_split('/ |\t/', $line, 4);
|
||||
@ -181,7 +181,7 @@ class IDF_Scm_Mercurial
|
||||
$cmd = sprintf($cmd_tmpl, escapeshellarg($this->repo), $commit);
|
||||
$out = array();
|
||||
$res = array();
|
||||
IDF_Scm::exec($cmd, &$out);
|
||||
IDF_Scm::exec($cmd, $out);
|
||||
$out_hack = array();
|
||||
foreach ($out as $line) {
|
||||
list($hash, $perm, $exec, $file) = preg_split('/ |\t/', $line, 4);
|
||||
@ -246,7 +246,7 @@ class IDF_Scm_Mercurial
|
||||
{
|
||||
$out = array();
|
||||
IDF_Scm::exec(sprintf('hg branches -R %s',
|
||||
escapeshellarg($this->repo)), &$out);
|
||||
escapeshellarg($this->repo)), $out);
|
||||
$res = array();
|
||||
foreach ($out as $b) {
|
||||
preg_match('/(\S+).*\S+:(\S+)/', $b, $match);
|
||||
@ -266,7 +266,7 @@ class IDF_Scm_Mercurial
|
||||
|
||||
$cmd = sprintf('hg log -p -r %s -R %s', escapeshellarg($commit), escapeshellarg($this->repo));
|
||||
$out = array();
|
||||
IDF_Scm::exec($cmd, &$out);
|
||||
IDF_Scm::exec($cmd, $out);
|
||||
$log = array();
|
||||
$change = array();
|
||||
$inchange = false;
|
||||
@ -297,7 +297,7 @@ class IDF_Scm_Mercurial
|
||||
{
|
||||
$cmd = sprintf('hg log -R %s -l%s ', escapeshellarg($this->repo), $n, $commit);
|
||||
$out = array();
|
||||
IDF_Scm::exec($cmd, &$out);
|
||||
IDF_Scm::exec($cmd, $out);
|
||||
return self::parseLog($out, 6);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user