delete history_json from the code controller
This commit is contained in:
parent
476dfe6a6e
commit
0d1b23fc9b
@ -677,49 +677,6 @@ class Code extends Controller
|
||||
return $path;
|
||||
}
|
||||
|
||||
function history_json ($projectid = '', $path = '', $rev = SVN_REVISION_HEAD)
|
||||
{
|
||||
$this->load->model ('ProjectModel', 'projects');
|
||||
|
||||
$login = $this->login->getUser ();
|
||||
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
|
||||
{
|
||||
header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
|
||||
return;
|
||||
}
|
||||
|
||||
$project = $this->projects->get ($projectid);
|
||||
if ($project === FALSE || ($project->public !== 'Y' && $login['id'] == ''))
|
||||
{
|
||||
header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
|
||||
return;
|
||||
}
|
||||
|
||||
$this->load->model ('SubversionModel', 'subversion');
|
||||
|
||||
$path = $this->converter->HexToAscii ($path);
|
||||
if ($path == '.') $path = ''; /* treat a period specially */
|
||||
$path = $this->_normalize_path ($path);
|
||||
|
||||
$file = $this->subversion->getHistory ($projectid, $path, SVN_REVISION_HEAD);
|
||||
if ($file === FALSE)
|
||||
{
|
||||
$history = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$history = $file['history'];
|
||||
$count = count($history);
|
||||
for ($i = 0; $i < $count; $i++)
|
||||
{
|
||||
unset ($history[$i]['msg']);
|
||||
unset ($history[$i]['paths']);
|
||||
}
|
||||
}
|
||||
|
||||
print codepot_json_encode ($history);
|
||||
}
|
||||
|
||||
function graph ($type = '', $projectid = '', $path = '', $rev = SVN_REVISION_HEAD)
|
||||
{
|
||||
$this->load->model ('ProjectModel', 'projects');
|
||||
|
Loading…
Reference in New Issue
Block a user