diff --git a/lib/dingapi/dingapi.class.php b/lib/dingapi/dingapi.class.php index dacf0a52b7..238e1a084c 100644 --- a/lib/dingapi/dingapi.class.php +++ b/lib/dingapi/dingapi.class.php @@ -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; } diff --git a/lib/feishuapi/feishuapi.class.php b/lib/feishuapi/feishuapi.class.php index d25126517d..3749eb5a99 100644 --- a/lib/feishuapi/feishuapi.class.php +++ b/lib/feishuapi/feishuapi.class.php @@ -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 */ diff --git a/module/custom/model.php b/module/custom/model.php index 273a093ff9..1b9eed74ad 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -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) {