* Fix bug when create gitlab server.
This commit is contained in:
@@ -3234,9 +3234,9 @@ class bugModel extends model
|
||||
|
||||
/**
|
||||
* Build bug menu.
|
||||
*
|
||||
* @param object $bug
|
||||
* @param string $type
|
||||
*
|
||||
* @param object $bug
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -259,7 +259,7 @@ class gitlab extends control
|
||||
$user = $this->gitlab->apiGetCurrentUser($gitlab->url, $gitlab->token, true);
|
||||
|
||||
if(!is_object($user)) return $this->send(array('result' => 'fail', 'message' => array('url' => array(sprintf($this->lang->gitlab->hostError, $this->config->gitlab->minCompatibleVersion)))));
|
||||
if(isset($user->error)) return $this->send(array('result' => 'fail', 'message' => array('token' => array($this->lang->gitlab->tokenError))));
|
||||
if(!isset($user->id)) return $this->send(array('result' => 'fail', 'message' => array('token' => array($this->lang->gitlab->tokenError))));
|
||||
|
||||
/* Verify version compatibility. */
|
||||
$result = $this->gitlab->getVersion($gitlab->url, $gitlab->token);
|
||||
|
||||
Reference in New Issue
Block a user