* Fix call api error.
This commit is contained in:
@@ -228,6 +228,11 @@ $config->openMethods[] = 'project.createguide';
|
||||
$config->openMethods[] = 'task.editteam';
|
||||
$config->openMethods[] = 'feedback.mergeproductmodule';
|
||||
|
||||
$config->openModules = array();
|
||||
$config->openModules[] = 'install';
|
||||
$config->openModules[] = 'upgrade';
|
||||
$config->openModules[] = 'im';
|
||||
|
||||
/* Define the tables. */
|
||||
define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`');
|
||||
define('TABLE_DEPT', '`' . $config->db->prefix . 'dept`');
|
||||
|
||||
@@ -212,7 +212,7 @@ class baseControl
|
||||
* 检查用户是否登录,如果没有登录,跳转到登录页面。
|
||||
* Check the user has logon or not, if not, goto the login page.
|
||||
*/
|
||||
if($this->config->installed && !in_array($this->moduleName, array('install', 'upgrade')) && empty($this->app->user) && !$this->loadModel('common')->isOpenMethod($this->moduleName, $this->methodName))
|
||||
if($this->config->installed && !in_array($this->moduleName, $this->config->openModules) && empty($this->app->user) && !$this->loadModel('common')->isOpenMethod($this->moduleName, $this->methodName))
|
||||
{
|
||||
$uri = $this->app->getURI(true);
|
||||
if($this->moduleName == 'message' and $this->methodName == 'ajaxgetmessage')
|
||||
@@ -230,7 +230,7 @@ class baseControl
|
||||
|
||||
/**
|
||||
* 如果客户端是手机的话,视图文件增加m.前缀。
|
||||
* If the clent is mobile, add m. as prefix for view file.
|
||||
* If the client is mobile, add m. as prefix for view file.
|
||||
*/
|
||||
$this->setClientDevice();
|
||||
$this->setDevicePrefix();
|
||||
|
||||
@@ -35,7 +35,7 @@ class control extends baseControl
|
||||
|
||||
$this->app->setOpenApp();
|
||||
|
||||
if(defined('IN_USE') or (defined('RUN_MODE') and RUN_MODE != 'api')) $this->setPreference();
|
||||
if(defined('IN_USE') or (defined('RUN_MODE') and !in_array(RUN_MODE, array('api', 'xuanxuan')))) $this->setPreference();
|
||||
|
||||
if(!isset($this->config->bizVersion)) return false;
|
||||
|
||||
@@ -50,12 +50,12 @@ class control extends baseControl
|
||||
|
||||
if(isset($this->config->{$this->moduleName}->exportFields))
|
||||
{
|
||||
foreach($exportFields as $field) $this->config->{$this->moduleName}->exportFields .= ",{$field->field}";
|
||||
foreach($exportFields as $field) $this->config->{$this->moduleName}->exportFields .= ",{$field->field}";
|
||||
}
|
||||
|
||||
if(isset($this->config->{$this->moduleName}->list->exportFields))
|
||||
{
|
||||
foreach($exportFields as $field) $this->config->{$this->moduleName}->list->exportFields .= ",{$field->field}";
|
||||
foreach($exportFields as $field) $this->config->{$this->moduleName}->list->exportFields .= ",{$field->field}";
|
||||
}
|
||||
|
||||
foreach($exportFields as $flowField => $exportField)
|
||||
|
||||
@@ -140,7 +140,7 @@ class sso extends control
|
||||
$key = $this->config->sso->key;
|
||||
$auth = md5($code . $userIP . $token . $key);
|
||||
|
||||
$callback = urlencode($common->getSysURL() . inlink('logout', "type=return"));
|
||||
$callback = urlencode(common::getSysURL() . inlink('logout', "type=return"));
|
||||
$location = $this->config->sso->addr;
|
||||
if(strpos($location, '&') !== false)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user