* change for ajax save log for svn and git.
This commit is contained in:
@@ -28,7 +28,7 @@ include './framework/control.class.php';
|
||||
include './framework/model.class.php';
|
||||
include './framework/helper.class.php';
|
||||
include './config/config.php';
|
||||
|
||||
|
||||
/* Set the PATH_INFO variable. */
|
||||
if($config->requestType == 'PATH_INFO')
|
||||
{
|
||||
@@ -52,6 +52,8 @@ if($config->requestType == 'PATH_INFO')
|
||||
$_SERVER['PATH_INFO'] = '/';
|
||||
}
|
||||
}
|
||||
|
||||
$_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -121,17 +121,21 @@ class git extends control
|
||||
$message = trim($this->post->message);
|
||||
$revision = trim($this->post->revision);
|
||||
$files = $this->post->files;
|
||||
|
||||
/* Ignore git. */
|
||||
if(strpos($repoUrl, '://') === false) die();
|
||||
if(empty($repoUrl)) die();
|
||||
|
||||
$parsedFiles = array();
|
||||
foreach($files as $file)
|
||||
{
|
||||
$file = trim($file);
|
||||
if(empty($file)) continue;
|
||||
$action = '';
|
||||
if(preg_match('/^[\w][ \t]/', $file))
|
||||
{
|
||||
$action = $file[0];
|
||||
$file = trim(substr($file, 2));
|
||||
}
|
||||
$path = str_replace($repoRoot, '', $file);
|
||||
$parsedFiles[''][] = $path;
|
||||
$parsedFiles[$action][] = ltrim($path, '/');
|
||||
}
|
||||
|
||||
$objects = $this->git->parseComment($message);
|
||||
|
||||
@@ -118,8 +118,14 @@ class svn extends control
|
||||
{
|
||||
$file = trim($file);
|
||||
if(empty($file)) continue;
|
||||
$action = '';
|
||||
if(preg_match('/^[\w][ \t]/', $file))
|
||||
{
|
||||
$action = $file[0];
|
||||
$file = trim(substr($file, 2));
|
||||
}
|
||||
$path = str_replace($repoRoot, '', $file);
|
||||
$parsedFiles[''][] = $path;
|
||||
$parsedFiles[$action][] = $path;
|
||||
}
|
||||
|
||||
$objects = $this->svn->parseComment($message);
|
||||
|
||||
Reference in New Issue
Block a user