Merge branch '12.x'
This commit is contained in:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user