diff options
author | Yuchen Pei <hi@ypei.me> | 2021-10-12 08:27:09 +1100 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2021-10-12 08:27:09 +1100 |
commit | 72cce24864b064b5762f4fe97fdf40d8d2ad4b51 (patch) | |
tree | 408f687c56f060aaac18622d2b091f6e080f76d4 /h-source/Library | |
parent | a349d5115056f17496bba1f88f8043e87de6d9bd (diff) | |
parent | a433241c0aff14110d1355f904d3dace8b6bae6b (diff) |
Merge branch 'development' into h-node
Diffstat (limited to 'h-source/Library')
-rwxr-xr-x | h-source/Library/Call.php | 8 | ||||
-rwxr-xr-x | h-source/Library/Functions.php | 5 | ||||
-rwxr-xr-x | h-source/Library/Helper/List.php | 2 | ||||
-rwxr-xr-x | h-source/Library/Helper/Menu.php | 2 | ||||
-rwxr-xr-x | h-source/Library/Helper/Popup.php | 4 | ||||
-rwxr-xr-x | h-source/Library/Theme.php | 6 |
6 files changed, 12 insertions, 15 deletions
diff --git a/h-source/Library/Call.php b/h-source/Library/Call.php index c75508b..a9145c2 100755 --- a/h-source/Library/Call.php +++ b/h-source/Library/Call.php @@ -257,7 +257,7 @@ function getQueryString() return ''; } -function __autoload($className) +function autoloader($className) { $backupName = $className; @@ -290,6 +290,7 @@ function __autoload($className) } } +spl_autoload_register('autoloader'); try { @@ -324,7 +325,8 @@ try { //load the files defined inside Config/Autoload.php foreach (Autoload::$files as $file) { - $ext = strtolower(end(explode('.', $file))); + $parts = explode('.', $file); + $ext = strtolower(end($parts)); $path = ROOT . DS . APPLICATION_PATH . DS . 'Include' . DS . $file; if (file_exists($path) and $ext === 'php') { @@ -354,4 +356,4 @@ try { echo '<div class="alert">Message: '.$e->getMessage().'</div>'; -}
\ No newline at end of file +} diff --git a/h-source/Library/Functions.php b/h-source/Library/Functions.php index 1477680..e0e77bf 100755 --- a/h-source/Library/Functions.php +++ b/h-source/Library/Functions.php @@ -107,9 +107,6 @@ SANITIZE DEEP */ function stripslashesDeep($value) { - if(get_magic_quotes_gpc()) {#if stripslashes - return array_map('stripslashes', $value); - } return $value; } @@ -304,4 +301,4 @@ function xml_encode($string) } return strtr($string, $trans); -}
\ No newline at end of file +} diff --git a/h-source/Library/Helper/List.php b/h-source/Library/Helper/List.php index ba59643..57aeeff 100755 --- a/h-source/Library/Helper/List.php +++ b/h-source/Library/Helper/List.php @@ -73,7 +73,7 @@ class Helper_List extends Helper_Html { //get the generic language class $this->strings = Factory_Strings::generic(Params::$language); - $baseUrl = 'http://'.DOMAIN_NAME.'/Public/Img/Icons/elementary_2_5/'; + $baseUrl = '/Public/Img/Icons/elementary_2_5/'; //set the files of the images $this->submitImages = array( diff --git a/h-source/Library/Helper/Menu.php b/h-source/Library/Helper/Menu.php index 8fd4bf4..86ee24a 100755 --- a/h-source/Library/Helper/Menu.php +++ b/h-source/Library/Helper/Menu.php @@ -36,7 +36,7 @@ class Helper_Menu extends Helper_Html public function __construct() { - $baseUrl = "http://".DOMAIN_NAME.'/Public/Img/Icons/elementary_2_5/'; + $baseUrl = '/Public/Img/Icons/elementary_2_5/'; //get the generic language class $this->strings = Factory_Strings::generic(Params::$language); diff --git a/h-source/Library/Helper/Popup.php b/h-source/Library/Helper/Popup.php index 18bb00d..43140fe 100755 --- a/h-source/Library/Helper/Popup.php +++ b/h-source/Library/Helper/Popup.php @@ -133,10 +133,10 @@ class Helper_Popup extends Helper_Html { $returnString .= "</div>\n"; } if (count($this->popupArray)>0) { - $returnString .= "<script type=\"text/javascript\" src=\"http://".DOMAIN_NAME."/Public/Js/DisplayTag.js\"></script>\n"; + $returnString .= "<script type=\"text/javascript\" src=\"/Public/Js/DisplayTag.js\"></script>\n"; } } return $returnString; } -}
\ No newline at end of file +} diff --git a/h-source/Library/Theme.php b/h-source/Library/Theme.php index 10c0fce..fe938ee 100755 --- a/h-source/Library/Theme.php +++ b/h-source/Library/Theme.php @@ -39,11 +39,9 @@ class Theme { function __construct($controller) { - $protocol = Params::$useHttps ? "https" : "http"; - $this->controller = $controller; - $this->baseUrl = MOD_REWRITE_MODULE === true ? "$protocol://" . DOMAIN_NAME : "$protocol://" . DOMAIN_NAME . '/index.php'; - $this->baseUrlSrc = "$protocol://" . DOMAIN_NAME; + $this->baseUrl = MOD_REWRITE_MODULE === true ? '': '/index.php'; + $this->baseUrlSrc = ''; } |