continue;
}
- foreach ($file['lines'] AS $hunk)
+ if (is_array($file['lines']))
{
- $lines = '';
-
- $show['hunk'] = true;
- $low = $file['revision']['low'];
- $high = $file['revision']['high'];
-
- $filename = (preg_match('/' . preg_quote($filename, '/') . '$/', $input->in['path']) ? $input->in['path'] : BSFunctions::FetchSourcePath($input->in['path']) . $filename);
- $rlow = ConstructLink('view', $input->in['repos'], $filename, $low);
- $rhigh = ConstructLink('view', $input->in['repos'], $filename, $high);
- eval('$lines .= "' . $template->fetch('diff_line') . '";');
-
- foreach ($hunk AS $key => $line)
+ foreach ($file['lines'] AS $hunk)
{
- $show['hunk'] = false;
- if ($line['act'] == '+')
- {
- $class = 'diff_add';
- }
- else if ($line['act'] == '-')
- {
- $class = 'diff_del';
- }
- else
+ $lines = '';
+
+ $show['hunk'] = true;
+ $low = $file['revision']['low'];
+ $high = $file['revision']['high'];
+
+ $filename = (preg_match('/' . preg_quote($filename, '/') . '$/', $input->in['path']) ? $input->in['path'] : BSFunctions::FetchSourcePath($input->in['path']) . $filename);
+ $rlow = ConstructLink('view', $input->in['repos'], $filename, $low);
+ $rhigh = ConstructLink('view', $input->in['repos'], $filename, $high);
+ eval('$lines .= "' . $template->fetch('diff_line') . '";');
+
+ foreach ($hunk AS $key => $line)
{
- $class = 'diff_norm';
+ $show['hunk'] = false;
+ if ($line['act'] == '+')
+ {
+ $class = 'diff_add';
+ }
+ else if ($line['act'] == '-')
+ {
+ $class = 'diff_del';
+ }
+ else
+ {
+ $class = 'diff_norm';
+ }
+
+ $line['line_clean'] = FormatCode($line['line']);
+
+ eval('$lines .= "' . $template->fetch('diff_line') . '";');
}
-
- $line['line_clean'] = FormatCode($line['line']);
-
- eval('$lines .= "' . $template->fetch('diff_line') . '";');
+ eval('$hunktpl .= "' . $template->fetch('diff_hunk') . '";');
}
- eval('$hunktpl .= "' . $template->fetch('diff_hunk') . '";');
}
if (is_array($file['props']))
*/
public function fetch()
{
+ $this->diff = array();
+
for ($i = 0; $i < sizeof($this->raw); $i++)
{
$line = $this->raw[$i];
$this->captureStart = $i;
$this->index = $index[1];
}
+ else if (preg_match('/Property changes on: (.*)/', $line, $index))
+ {
+ $this->index = $index[1];
+ $this->_processProperties(array_slice($this->raw, 2));
+ }
}
$this->_processFile(array_slice($this->raw, $this->captureStart));
$this->hunkId = 0;
$captureStart = 4;
+
for ($i = 4; $i < sizeof($lines); $i++)
{
$line = $lines[$i];