* Resolve ticket #388. bug #32309.

This commit is contained in:
liuyongkai
2023-02-21 09:12:30 +08:00
parent df38f27ead
commit f6ddcb39c3
2 changed files with 16 additions and 16 deletions
+14 -11
View File
@@ -48,20 +48,23 @@ function getDiffs(fileName)
{
if(!diff.contents || typeof diff.contents[0].lines != 'object') return result;
var lines = diff.contents[0].lines;
$.each(lines, function(l, code)
$.each(diff.contents, function(content)
{
if(code.type == 'all' || code.type == 'new')
var lines = content.lines;
$.each(lines, function(l, code)
{
result.code.new += htmlspecialchars_decode(code.line.substring(2)) + "\n";
result.line.new.push(parseInt(code.newlc));
}
if(code.type == 'all' || code.type == 'new')
{
result.code.new += htmlspecialchars_decode(code.line.substring(2)) + "\n";
result.line.new.push(parseInt(code.newlc));
}
if(code.type == 'all' || code.type == 'old')
{
result.code.old += htmlspecialchars_decode(code.line.substring(2)) + "\n";
result.line.old.push(parseInt(code.oldlc));
}
if(code.type == 'all' || code.type == 'old')
{
result.code.old += htmlspecialchars_decode(code.line.substring(2)) + "\n";
result.line.old.push(parseInt(code.oldlc));
}
})
})
return result;
}
+2 -5
View File
@@ -2829,11 +2829,8 @@ class repoModel extends model
return print(js::locate($link));
}
}
else
{
$this->loadModel('git')->updateCommit($repo, $commentGroup, false);
$_COOKIE['repoBranch'] = $branch;
}
$this->loadModel('git')->updateCommit($repo, $commentGroup, false);
$_COOKIE['repoBranch'] = $branch;
}
if($repo->SCM == 'Subversion') $this->loadModel('svn')->updateCommit($repo, $commentGroup, false);
}