Merge branch 'bug_21823' into 'master'

Fix bug #21823,7042

See merge request easycorp/zentaopms!3032
This commit is contained in:
李玉春
2022-04-20 07:55:40 +00:00
3 changed files with 21 additions and 19 deletions
+1
View File
@@ -188,6 +188,7 @@ class dingapi
if(isset($response->errcode) and $response->errcode == 0) return $response;
if(empty($response)) $this->errors = $errors;
if(isset($response->result) and $response->result == 'fail') $this->errors['curl'] = $response->message;
if(isset($response->errcode)) $this->errors[$response->errcode] = "Errcode:{$response->errcode}, Errmsg:{$response->errmsg}";
return false;
}
+19 -18
View File
@@ -9,12 +9,12 @@ class feishuapi
private $errors = array();
/**
* Construct
*
* @param string $appKey
* @param string $appSecret
* @param string $agentId
* @param string $apiUrl
* Construct
*
* @param string $appKey
* @param string $appSecret
* @param string $agentId
* @param string $apiUrl
* @access public
* @return void
*/
@@ -29,7 +29,7 @@ class feishuapi
/**
* Get token.
*
*
* @access public
* @return string
*/
@@ -47,7 +47,7 @@ class feishuapi
/**
* Get users.
*
*
* @param string $selectedDepts
* @access public
* @return array
@@ -103,7 +103,7 @@ class feishuapi
/**
* Get depts.
*
*
* @access public
* @return array
*/
@@ -146,7 +146,7 @@ class feishuapi
/**
* Get department tree structure.
*
*
* @access public
* @return array
*/
@@ -186,10 +186,10 @@ class feishuapi
}
/**
* Send message
*
* @param string $userList
* @param string $message
* Send message
*
* @param string $userList
* @param string $message
* @access public
* @return array
*/
@@ -207,8 +207,8 @@ class feishuapi
/**
* Query API.
*
* @param string $url
*
* @param string $url
* @access public
* @return string
*/
@@ -225,6 +225,7 @@ class feishuapi
if(isset($response->code) and $response->code == 0) return $response;
if(empty($response)) $this->errors = $errors;
if(isset($response->result) and $response->result == 'fail') $this->errors['curl'] = $response->message;
if(isset($response->code)) $this->errors[$response->code] = "Errcode:{$response->code}, Errmsg:{$response->msg}";
if(!empty($this->errors))
{
@@ -236,7 +237,7 @@ class feishuapi
/**
* Check for errors.
*
*
* @access public
* @return bool
*/
@@ -247,7 +248,7 @@ class feishuapi
/**
* Get errors.
*
*
* @access public
* @return array
*/
+1 -1
View File
@@ -434,7 +434,7 @@ class customModel extends model
global $lang, $app, $dbh;
if(!isset($lang->$module->featureBar[$method])) return;
$queryModule = $module == 'execution' ? 'task' : ($module == 'product' ? 'story' : $module);
$shortcuts = $dbh->query('select id, title from ' . TABLE_USERQUERY . " where `account` = '{$app->user->account}' AND `module` = '{$queryModule}' AND `shortcut` = '1' order by id")->fetchAll();
$shortcuts = $dbh->query('select id, title from ' . TABLE_USERQUERY . " where (`account` = '{$app->user->account}' or `common` = '1') AND `module` = '{$queryModule}' AND `shortcut` = '1' order by id")->fetchAll();
if($shortcuts)
{