Skip to content

Commit

Permalink
removed trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tleilax committed Apr 2, 2012
1 parent 929f64a commit b258382
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions app/controllers/admin.php
Expand Up @@ -6,7 +6,7 @@
class AdminController extends StudipController class AdminController extends StudipController
{ {
private static $error_reporting; private static $error_reporting;

/** /**
* *
**/ **/
Expand Down Expand Up @@ -37,7 +37,7 @@ public function before_filter(&$action, &$args)
$back = sprintf('<a href="%s">%s</a>', $back = sprintf('<a href="%s">%s</a>',
$this->url_for('admin'), $this->url_for('admin'),
_('Zurück zur Übersicht')); _('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>', $new = sprintf('<a href="%s">%s</a>',
Expand Down Expand Up @@ -76,20 +76,20 @@ public function render_keys($key, $consumer = null)
if ($consumer === null) { if ($consumer === null) {
$consumer = $this->store->load($key); $consumer = $this->store->load($key);
} }

return array( return array(
'Consumer Key = ' . $consumer['consumer_key'], 'Consumer Key = ' . $consumer['consumer_key'],
'Consumer Secret = ' . $consumer['consumer_secret'], 'Consumer Secret = ' . $consumer['consumer_secret'],
); );
} }

/** /**
* *
**/ **/
public function keys_action($key) public function keys_action($key)
{ {
$details = $this->render_keys($key); $details = $this->render_keys($key);

if (Request::isXhr()) { if (Request::isXhr()) {
$this->render_text(implode('<br>', $details)); $this->render_text(implode('<br>', $details));
} else { } else {
Expand All @@ -113,9 +113,9 @@ public function edit_action($key = null)
PageLayout::postMessage($message); PageLayout::postMessage($message);
return; return;
} }

$consumer = $this->store->store($this->consumer, Request::int('enabled', 0)); $consumer = $this->store->store($this->consumer, Request::int('enabled', 0));

if ($key) { if ($key) {
$message = MessageBox::success(_('Die Applikation wurde erfolgreich gespeichert.')); $message = MessageBox::success(_('Die Applikation wurde erfolgreich gespeichert.'));
} else { } else {
Expand All @@ -131,7 +131,7 @@ public function edit_action($key = null)


$this->id = $id; $this->id = $id;
} }

/** /**
* *
**/ **/
Expand All @@ -142,17 +142,17 @@ public function toggle_action($key, $state = null)
$state = $state === null $state = $state === null
? !$consumer['enabled'] ? !$consumer['enabled']
: $state === 'on'; : $state === 'on';

$consumer = $this->store->store($consumer, $state); $consumer = $this->store->store($consumer, $state);

$message = $state $message = $state
? _('Die Applikation wurde erfolgreich aktiviert.') ? _('Die Applikation wurde erfolgreich aktiviert.')
: _('Die Applikation wurde erfolgreich deaktiviert.'); : _('Die Applikation wurde erfolgreich deaktiviert.');

PageLayout::postMessage(MessageBox::success($message)); PageLayout::postMessage(MessageBox::success($message));
$this->redirect('admin/index#' . $consumer['consumer_key']); $this->redirect('admin/index#' . $consumer['consumer_key']);
} }

/** /**
* *
**/ **/
Expand All @@ -162,15 +162,15 @@ public function delete_action($key)
PageLayout::postMessage(MessageBox::success(_('Die Applikation wurde erfolgreich gelöscht.'))); PageLayout::postMessage(MessageBox::success(_('Die Applikation wurde erfolgreich gelöscht.')));
$this->redirect('admin/index'); $this->redirect('admin/index');
} }

/** /**
* *
**/ **/
public function permissions_action($consumer_key = null) public function permissions_action($consumer_key = null)
{ {
if (Request::submitted('store')) { if (Request::submitted('store')) {
$perms = $_POST['permission']; $perms = $_POST['permission'];

$permissions = RestIP\Router::getInstance($consumer_key ?: null)->getPermissions(); $permissions = RestIP\Router::getInstance($consumer_key ?: null)->getPermissions();
foreach ($_POST['permission'] as $route => $methods) { foreach ($_POST['permission'] as $route => $methods) {
foreach ($methods as $method => $granted) { foreach ($methods as $method => $granted) {
Expand All @@ -182,11 +182,11 @@ public function permissions_action($consumer_key = null)
$this->redirect($consumer_key ? 'admin' : 'admin/permissions'); $this->redirect($consumer_key ? 'admin' : 'admin/permissions');
return; return;
} }

$title = $consumer_key ? 'Zugriffsberechtigungen' : 'Globale Zugriffsberechtigungen'; $title = $consumer_key ? 'Zugriffsberechtigungen' : 'Globale Zugriffsberechtigungen';
$title .= ' - ' . PageLayout::getTitle(); $title .= ' - ' . PageLayout::getTitle();
PageLayout::setTitle($title); PageLayout::setTitle($title);

$this->consumer_key = $consumer_key; $this->consumer_key = $consumer_key;
$this->router = RestIP\Router::getInstance($consumer_key); $this->router = RestIP\Router::getInstance($consumer_key);
$this->routes = $this->router->getRoutes(); $this->routes = $this->router->getRoutes();
Expand Down

0 comments on commit b258382

Please sign in to comment.