[surforce-library commit] r28 - trunk/library/Zsurforce/Generic

1 view
Skip to first unread message

codesite...@google.com

unread,
Jun 25, 2008, 3:44:12 PM6/25/08
to surforce...@googlegroups.com
Author: enriqueplace
Date: Wed Jun 25 12:44:02 2008
New Revision: 28

Modified:
trunk/library/Zsurforce/Generic/Controller.php

Log:
Bug:

- Si el bootstrap no tiene definido una session, falla en el Controller

- Puede no estar el proyecto usando sessión, por consiguiente hay que validar antes si está definido o no para luego tomar del registro la variable "session".

Modified: trunk/library/Zsurforce/Generic/Controller.php
==============================================================================
--- trunk/library/Zsurforce/Generic/Controller.php (original)
+++ trunk/library/Zsurforce/Generic/Controller.php Wed Jun 25 12:44:02 2008
@@ -39,14 +39,17 @@
* Carga información desde el bootstrap (index.php).
*/
$this->_registry = Zend_Registry::getInstance();
- $this->_debug = $this->_registry->get('config_sys')->debug;
- $this->_session = $this->_registry->get('session');
+ $this->_debug = $this->_registry->get('config_sys')->debug;
+
+ if( Zend_Registry::isRegistered('session')){
+ $this->_session = $this->_registry->get('session');
+ }

/*
* Carga información para las vistas del sistema
*/
$this->initView();
- $this->view->basePath = $this->registry->get('base_path');
+ $this->view->basePath = $this->_registry->get('base_path');
$this->view->baseUrl = $this->_request->getBaseUrl();
$this->view->debug = $this->_debug;
$this->view->session = $this->_session;

Reply all
Reply to author
Forward
0 new messages