* adjust the ztcli.
This commit is contained in:
@@ -28,23 +28,28 @@ 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')
|
||||
{
|
||||
$path = pathinfo($request['path']);
|
||||
|
||||
/* url like http://pms.zentao.net/zentao/my-todo.html, PATH_INFO is 'my-todo.html'. */
|
||||
if(strpos($path['basename'], $config->requestFix))
|
||||
{
|
||||
$_SERVER['PATH_INFO'] = $path['basename'];
|
||||
}
|
||||
else
|
||||
{
|
||||
/* url like http://pms.zentao.net/zentao/my/, PATH_INFO is 'my'. */
|
||||
if(is_dir('./module/' . $path['basename']))
|
||||
{
|
||||
$_SERVER['PATH_INFO'] = $path['basename'];
|
||||
}
|
||||
/* url like http://pms.zentao.net/zentao/, PATH_INFO is '/'. */
|
||||
else
|
||||
{
|
||||
$_SERVER['PATH_INFO'] = '';
|
||||
$_SERVER['PATH_INFO'] = '/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class commonModel extends model
|
||||
{
|
||||
$this->app->user = $this->session->user;
|
||||
}
|
||||
elseif($this->app->company->guest)
|
||||
elseif($this->app->company->guest or defined('IN_SHELL'))
|
||||
{
|
||||
$user = new stdClass();
|
||||
$user->id = 0;
|
||||
|
||||
Reference in New Issue
Block a user