Merge branch '12.x'

This commit is contained in:
wangyidong
2020-12-11 20:42:10 +08:00
89 changed files with 1780 additions and 363 deletions
+6 -4
View File
@@ -1383,15 +1383,17 @@ class bug extends control
/**
* AJAX: get bugs of a user in html select.
*
* @param string $account
* @param int $userID
* @param string $id the id of the select control.
* @access public
* @return string
*/
public function ajaxGetUserBugs($account = '', $id = '')
public function ajaxGetUserBugs($userID = '', $id = '')
{
if($account == '') $account = $this->app->user->account;
$bugs = $this->bug->getUserBugPairs($account);
if($userID == '') $userID = $this->app->user->id;
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
$bugs = $this->bug->getUserBugPairs($account);
if($id) die(html::select("bugs[$id]", $bugs, '', 'class="form-control"'));
die(html::select('bug', $bugs, '', 'class=form-control'));