summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Services/TPageService.php3
-rw-r--r--framework/Web/THttpRequest.php45
-rw-r--r--framework/Web/THttpResponse.php1
-rw-r--r--framework/Web/THttpSession.php1
4 files changed, 26 insertions, 24 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index f32e8ee7..0fb39dfb 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -165,8 +165,7 @@ class TPageService extends TComponent implements IService
$module->init($this->_application,$moduleConfig[2]);
}
- if(($auth=$application->getAuthManager())!==null)
- $auth->getAuthorizationRules()->mergeWith($pageConfig->getRules());
+ $application->getAuthorizationRules()->mergeWith($pageConfig->getRules());
$this->_initialized=true;
}
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index f87111ba..9be0db8a 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -68,6 +68,28 @@ class THttpRequest extends TComponent implements IModule
*/
public function __construct()
{
+ }
+
+ /**
+ * Strips slashes from input data.
+ * This method is applied when magic quotes is enabled.
+ * Do not call this method.
+ * @param mixed input data to be processed
+ * @param mixed processed data
+ */
+ public function stripSlashes(&$data)
+ {
+ return is_array($data)?array_map(array($this,'stripSlashes'),$data):stripslashes($data);
+ }
+
+ /**
+ * Initializes the module.
+ * This method is required by IModule and is invoked by application.
+ * @param IApplication application
+ * @param TXmlElement module configuration
+ */
+ public function init($application,$config)
+ {
// Info about server variables:
// PHP_SELF contains real URI (w/ path info, w/o query string)
// SCRIPT_NAME is the real URI for the requested script (w/o path info and query string)
@@ -101,29 +123,8 @@ class THttpRequest extends TComponent implements IModule
$this->_items=new TMap(array_merge($_POST,$_GET));
$this->resolveRequest();
- }
-
- /**
- * Strips slashes from input data.
- * This method is applied when magic quotes is enabled.
- * Do not call this method.
- * @param mixed input data to be processed
- * @param mixed processed data
- */
- public function stripSlashes(&$data)
- {
- return is_array($data)?array_map(array($this,'stripSlashes'),$data):stripslashes($data);
- }
-
- /**
- * Initializes the module.
- * This method is required by IModule and is invoked by application.
- * @param IApplication application
- * @param TXmlElement module configuration
- */
- public function init($application,$config)
- {
$this->_initialized=true;
+ $application->setRequest($this);
}
/**
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php
index 4dd81868..777c6621 100644
--- a/framework/Web/THttpResponse.php
+++ b/framework/Web/THttpResponse.php
@@ -68,6 +68,7 @@ class THttpResponse extends TComponent implements IModule, ITextWriter
if($this->_bufferOutput)
ob_start();
$this->_initialized=true;
+ $application->setResponse($this);
}
/**
diff --git a/framework/Web/THttpSession.php b/framework/Web/THttpSession.php
index fc8f99c6..ff3af560 100644
--- a/framework/Web/THttpSession.php
+++ b/framework/Web/THttpSession.php
@@ -79,6 +79,7 @@ class THttpSession extends TComponent implements IModule
if($this->_autoStart)
session_start();
$this->_initialized=true;
+ $application->setSession($this);
}
/**