]> source.dussan.org Git - nextcloud-server.git/commitdiff
Cleanup code
authorLukas Reschke <lukas@statuscode.ch>
Thu, 18 May 2017 13:16:50 +0000 (15:16 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Thu, 18 May 2017 18:49:08 +0000 (20:49 +0200)
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
apps/oauth2/lib/Controller/OauthApiController.php
apps/oauth2/templates/admin.php

index 97f8185149a6878e4e8348dca139a1f70fbdab17..b97d85ae3e67c0523b1cf9cfc18c8cf4880be97d 100644 (file)
@@ -81,7 +81,7 @@ class OauthApiController extends Controller {
                                'token_type' => 'Bearer',
                                'expires_in' => 3600,
                                'refresh_token' => $newCode,
-                               'user_id' => ($this->defaultTokenMapper->getTokenById($accessToken->getTokenId()))->getUID(),
+                               'user_id' => $this->defaultTokenMapper->getTokenById($accessToken->getTokenId())->getUID(),
                        ]
                );
        }
index 9c09499add3d22f81ccfb2a0f8c996d75fbac83d..d2e34e08db8288f010b03bcf4040d5738a8c1336 100644 (file)
@@ -45,12 +45,15 @@ $clients = $_['clients'];
                </tr>
                </thead>
                <tbody>
-               <?php foreach ($clients as $client) { ?>
+               <?php
+               $imageUrl = $urlGenerator->imagePath('core', 'actions/toggle.svg');
+               foreach ($clients as $client) {
+               ?>
                        <tr>
                                <td><?php p($client->getName()); ?></td>
                                <td><?php p($client->getRedirectUri()); ?></td>
                                <td><code><?php p($client->getClientIdentifier()); ?></code></td>
-                               <td data-value="<?php p($client->getSecret()); ?>"><code>****</code><img class='show-oauth-credentials' src="<?php p($urlGenerator->imagePath('core', 'actions/toggle.svg'));?>"/></td>
+                               <td data-value="<?php p($client->getSecret()); ?>"><code>****</code><img class='show-oauth-credentials' src="<?php p($imageUrl); ?>"/></td>
                                <td>
                                        <form id="form-inline" class="delete" action="<?php p($urlGenerator->linkToRoute('oauth2.Settings.deleteClient', ['id' => $client->getId()])); ?>" method="POST">
                                                <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />