From bc738b910f44ed6998dc2d181fb284f029a9a4d2 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 2 Dec 2013 12:25:10 -0500 Subject: Removing unnecessary dependencies! --- framework/Wsat/TWsatARGenerator.php | 2 ++ framework/Wsat/TWsatService.php | 2 +- framework/Wsat/pages/TWsatLogin.php | 7 +------ framework/Wsat/pages/config.xml | 6 +++++- framework/Wsat/pages/layout/TWsatLayout.php | 4 +--- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/framework/Wsat/TWsatARGenerator.php b/framework/Wsat/TWsatARGenerator.php index 5c812ef5..d5b87a4f 100644 --- a/framework/Wsat/TWsatARGenerator.php +++ b/framework/Wsat/TWsatARGenerator.php @@ -52,6 +52,8 @@ class TWsatARGenerator function __construct() { + if(!class_exists("TActiveRecordManager", false)) + throw new Exception("You need to enable the ActiveRecord module in your application configuration file."); $ar_manager = TActiveRecordManager::getInstance(); $this->_conn = $ar_manager->getDbConnection(); $this->_conn->Active = true; diff --git a/framework/Wsat/TWsatService.php b/framework/Wsat/TWsatService.php index 85b062e5..1f5ebe40 100644 --- a/framework/Wsat/TWsatService.php +++ b/framework/Wsat/TWsatService.php @@ -37,7 +37,7 @@ class TWsatService extends TPageService { private $_pass = ''; - + public function init($config) { if ($this->getApplication()->getMode() === TApplicationMode::Performance || $this->getApplication()->getMode() === TApplicationMode::Normal) diff --git a/framework/Wsat/pages/TWsatLogin.php b/framework/Wsat/pages/TWsatLogin.php index 02d5c9fd..7f0927b6 100644 --- a/framework/Wsat/pages/TWsatLogin.php +++ b/framework/Wsat/pages/TWsatLogin.php @@ -18,12 +18,7 @@ class TWsatLogin extends TPage { $this->Session["wsat_password"] = $this->getService()->getPassword(); - $authManager = $this->Application->getModule('auth'); - $url = $authManager->ReturnUrl; - if (empty($url)) - { - $url = $this->Service->constructUrl('TWsatHome'); - } + $url = $this->Service->constructUrl('TWsatHome'); $this->Response->redirect($url); } } diff --git a/framework/Wsat/pages/config.xml b/framework/Wsat/pages/config.xml index 3ed8ea41..727e8eab 100644 --- a/framework/Wsat/pages/config.xml +++ b/framework/Wsat/pages/config.xml @@ -1,5 +1,9 @@ - + + + + \ No newline at end of file diff --git a/framework/Wsat/pages/layout/TWsatLayout.php b/framework/Wsat/pages/layout/TWsatLayout.php index 4a7c578c..67caa77d 100644 --- a/framework/Wsat/pages/layout/TWsatLayout.php +++ b/framework/Wsat/pages/layout/TWsatLayout.php @@ -33,6 +33,4 @@ class TWsatLayout extends TTemplateControl $this->Response->redirect($url); } -} - -?> \ No newline at end of file +} \ No newline at end of file -- cgit v1.2.3