diff --git a/app/Controller/ServersController.php b/app/Controller/ServersController.php index faaaed75e..2002869fb 100755 --- a/app/Controller/ServersController.php +++ b/app/Controller/ServersController.php @@ -152,9 +152,6 @@ class ServersController extends AppController { public function pull($id = null, $technique=false) { // TODO should we de-activate data validation for type and category / and or mapping? Maybe other instances have other configurations that are incompatible. if (!$this->_IsSiteAdmin() && !($this->Server->organization == $this->Auth->user('org') && $this->checkAction('perm_sync'))) $this->redirect(array('controller' => 'servers', 'action' => 'index')); -// if (!$this->request->is('post')) { -// throw new MethodNotAllowedException(); -// } $this->Server->id = $id; if (!$this->Server->exists()) { throw new NotFoundException(__('Invalid server')); @@ -184,10 +181,8 @@ class ServersController extends AppController { $eventIds = array_reverse($eventIds); } elseif ("incremental" == $technique) { // TODO incremental pull - // lastpulledid throw new NotFoundException('Sorry, this is not yet implemented'); - // increment lastid based on the highest ID seen } elseif (true == $technique) { $eventIds[] = intval($technique); } diff --git a/app/View/Servers/index.ctp b/app/View/Servers/index.ctp index 1ea10b39f..b8dd5865f 100755 --- a/app/View/Servers/index.ctp +++ b/app/View/Servers/index.ctp @@ -48,8 +48,10 @@ foreach ($servers as $server): ?> Form->postLink('', array('action' => 'pull', $server['Server']['id'], 'full'), array('class' => 'icon-download', 'title' => 'Pull all')); - if ($server['Server']['push'] && $me['org'] == 'ADMIN') echo $this->Form->postLink('', array('action' => 'push', $server['Server']['id'], 'full'), array('class' => 'icon-upload', 'title' => 'Push all') ); + if ($server['Server']['pull'] && $me['org'] == 'ADMIN') + echo $this->Html->link('', array('action' => 'pull', $server['Server']['id'], 'full'), array('class' => 'icon-download', 'title' => 'Pull all')); + if ($server['Server']['push'] && $me['org'] == 'ADMIN') + echo $this->Form->postLink('', array('action' => 'push', $server['Server']['id'], 'full'), array('class' => 'icon-upload', 'title' => 'Push all') ); ?>