From 823d71ced9b4947b1a5a5ade7245d521ed490061 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 7 Jun 2016 15:17:49 +0200 Subject: * renaming php directory --- app/frontend/web/BaseUrlDerivedFromBasePath.php | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 app/frontend/web/BaseUrlDerivedFromBasePath.php (limited to 'app/frontend/web/BaseUrlDerivedFromBasePath.php') diff --git a/app/frontend/web/BaseUrlDerivedFromBasePath.php b/app/frontend/web/BaseUrlDerivedFromBasePath.php new file mode 100644 index 0000000..2da277f --- /dev/null +++ b/app/frontend/web/BaseUrlDerivedFromBasePath.php @@ -0,0 +1,29 @@ +BaseUrl === NULL && $this->BasePath !== NULL) { + $appWebPath = preg_replace( + '#' . $this->Application->Request->ApplicationUrl . '$#', + '', + $this->Application->Request->ApplicationFilePath + ); + $appBaseUrl = preg_replace( + '#^' . $appWebPath . '#', + '', + dirname($this->Application->Request->ApplicationFilePath) + ); + $this->BaseUrl = $appBaseUrl + . preg_replace( + '#^' . Prado::getPathOfNamespace('Web') . '#', + '', + $this->BasePath + ); + } + parent::init($config); + } + +} + +?> -- cgit v1.2.3