From e47423fd061d058f0d2cee9ea8ceddb7d2805aef Mon Sep 17 00:00:00 2001 From: klingac Date: Sat, 29 Aug 2009 22:57:38 +0200 Subject: [PATCH] *uprava odsadenia --- application/controllers/IndexController.php | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index db815dd..bfaeaf2 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -31,17 +31,17 @@ class IndexController extends Zend_Controller_Action } } - public function unsignAction() - { - //overi autorizaciu - $auth = $this->_getAuth(); + public function unsignAction() + { + //overi autorizaciu + $auth = $this->_getAuth(); - if ($auth->hasIdentity()) { - $storage = $auth->getStorage()->read(); - //odstrani hraca z player_in_game - $this->_unsignPlayer($storage->player_id); - } - } + if ($auth->hasIdentity()) { + $storage = $auth->getStorage()->read(); + //odstrani hraca z player_in_game + $this->_unsignPlayer($storage->player_id); + } + } /* * metoda zisti informacie o hracoch prihlasenych na aktualnu hru @@ -81,26 +81,26 @@ class IndexController extends Zend_Controller_Action } } - protected function _unsignPlayer($player_id) - { - $_model = $this->_getModel(); - try { - $_model->unsignPlayer($player_id); - }catch (Zend_Db_Statement_Exception $exception) { - echo $exception->getCode(); - echo $exception->getMessage(); - } + protected function _unsignPlayer($player_id) + { + $_model = $this->_getModel(); + try { + $_model->unsignPlayer($player_id); + }catch (Zend_Db_Statement_Exception $exception) { + echo $exception->getCode(); + echo $exception->getMessage(); + } } - protected function _getAuth() - { - //overi autorizaciu - $auth = Zend_Auth::getInstance(); - #$authAdapter = Zend_Registry::get('authAdapter'); - $authAdapter = new Zend_Auth_Adapter_DbTable(Zend_Registry::get('dbAdapter')); - $authAdapter->setTableName('player') - ->setIdentityColumn('login') - ->setCredentialColumn('passwd'); - return $auth; - } + protected function _getAuth() + { + //overi autorizaciu + $auth = Zend_Auth::getInstance(); + #$authAdapter = Zend_Registry::get('authAdapter'); + $authAdapter = new Zend_Auth_Adapter_DbTable(Zend_Registry::get('dbAdapter')); + $authAdapter->setTableName('player') + ->setIdentityColumn('login') + ->setCredentialColumn('passwd'); + return $auth; + } } -- 2.11.4.GIT