Permalink
Browse files

removed trailing whitespace

  • Loading branch information...
1 parent 929f64a commit b258382150c7e0545ecd079d2c28be96f26f547e @tleilax tleilax committed Apr 2, 2012
Showing with 16 additions and 16 deletions.
  1. +16 −16 app/controllers/admin.php
View
@@ -6,7 +6,7 @@
class AdminController extends StudipController
{
private static $error_reporting;
-
+
/**
*
**/
@@ -37,7 +37,7 @@ public function before_filter(&$action, &$args)
$back = sprintf('<a href="%s">%s</a>',
$this->url_for('admin'),
_('Zurück zur Übersicht'));
- $this->addToInfobox('Aktionen', $back, 'icons/16/black/arr_1left');
+ $this->addToInfobox('Aktionen', $back, 'icons/16/black/arr_1left');
}
$new = sprintf('<a href="%s">%s</a>',
@@ -76,20 +76,20 @@ public function render_keys($key, $consumer = null)
if ($consumer === null) {
$consumer = $this->store->load($key);
}
-
+
return array(
'Consumer Key = ' . $consumer['consumer_key'],
'Consumer Secret = ' . $consumer['consumer_secret'],
);
}
-
+
/**
*
**/
public function keys_action($key)
{
$details = $this->render_keys($key);
-
+
if (Request::isXhr()) {
$this->render_text(implode('<br>', $details));
} else {
@@ -113,9 +113,9 @@ public function edit_action($key = null)
PageLayout::postMessage($message);
return;
}
-
+
$consumer = $this->store->store($this->consumer, Request::int('enabled', 0));
-
+
if ($key) {
$message = MessageBox::success(_('Die Applikation wurde erfolgreich gespeichert.'));
} else {
@@ -131,7 +131,7 @@ public function edit_action($key = null)
$this->id = $id;
}
-
+
/**
*
**/
@@ -142,17 +142,17 @@ public function toggle_action($key, $state = null)
$state = $state === null
? !$consumer['enabled']
: $state === 'on';
-
+
$consumer = $this->store->store($consumer, $state);
-
+
$message = $state
? _('Die Applikation wurde erfolgreich aktiviert.')
: _('Die Applikation wurde erfolgreich deaktiviert.');
-
+
PageLayout::postMessage(MessageBox::success($message));
$this->redirect('admin/index#' . $consumer['consumer_key']);
}
-
+
/**
*
**/
@@ -162,15 +162,15 @@ public function delete_action($key)
PageLayout::postMessage(MessageBox::success(_('Die Applikation wurde erfolgreich gelöscht.')));
$this->redirect('admin/index');
}
-
+
/**
*
**/
public function permissions_action($consumer_key = null)
{
if (Request::submitted('store')) {
$perms = $_POST['permission'];
-
+
$permissions = RestIP\Router::getInstance($consumer_key ?: null)->getPermissions();
foreach ($_POST['permission'] as $route => $methods) {
foreach ($methods as $method => $granted) {
@@ -182,11 +182,11 @@ public function permissions_action($consumer_key = null)
$this->redirect($consumer_key ? 'admin' : 'admin/permissions');
return;
}
-
+
$title = $consumer_key ? 'Zugriffsberechtigungen' : 'Globale Zugriffsberechtigungen';
$title .= ' - ' . PageLayout::getTitle();
PageLayout::setTitle($title);
-
+
$this->consumer_key = $consumer_key;
$this->router = RestIP\Router::getInstance($consumer_key);
$this->routes = $this->router->getRoutes();

0 comments on commit b258382

Please sign in to comment.