fix coding standard

This commit is contained in:
Nicolas Le Goff
2012-04-26 19:14:47 +02:00
parent 61de4aef2c
commit d443c12a5a

View File

@@ -147,8 +147,7 @@ class API_OAuth2_Application
$stmt->execute(array(':application_id' => $this->id)); $stmt->execute(array(':application_id' => $this->id));
$row = $stmt->fetch(PDO::FETCH_ASSOC); $row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor(); $stmt->closeCursor();
$this->creator = !$row['creator'] ? null : $this->creator = ! $row['creator'] ? null : User_Adapter::getInstance($row['creator'], $this->appbox);
User_Adapter::getInstance($row['creator'], $this->appbox);
$this->type = $row['type']; $this->type = $row['type'];
$this->name = $row['name']; $this->name = $row['name'];
$this->description = $row['description']; $this->description = $row['description'];
@@ -599,28 +598,12 @@ class API_OAuth2_Application
{ {
$sql = ' $sql = '
INSERT INTO api_applications ( INSERT INTO api_applications (
application_id, application_id, creator, created_on, name, last_modified,
creator, nonce, client_id, client_secret, activated, grant_password
created_on,
name,
last_modified,
nonce,
client_id,
client_secret,
activated,
grant_password
) )
VALUES ( VALUES (
null, null, :usr_id, NOW(), :name, NOW(), :nonce, :client_id,
:usr_id, :client_secret, :activated, :grant_password
NOW(),
:name,
NOW(),
:nonce,
:client_id,
:client_secret,
:activated,
:grant_password
)'; )';
$nonce = random::generatePassword(6); $nonce = random::generatePassword(6);