Add index.php file to googlemerchant XML module with redirect headers
This commit introduces a new index.php file in the googlemerchant XML module. The file contains headers to prevent caching and redirects users to the parent directory. This is part of the module's structure to ensure proper access control and user experience.
This commit is contained in:
25
modules/x13googlemerchant/helpers.1.4/helper.php
Normal file
25
modules/x13googlemerchant/helpers.1.4/helper.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
class Helper {
|
||||
|
||||
protected function l($string, $class = 'AdminTab', $addslashes = false, $htmlentities = true)
|
||||
{
|
||||
// if the class is extended by a module, use modules/[module_name]/xx.php lang file
|
||||
$currentClass = get_class($this);
|
||||
if (Module::getModuleNameFromClass($currentClass))
|
||||
{
|
||||
$string = str_replace('\'', '\\\'', $string);
|
||||
return Module::findTranslation(Module::$classInModule[$currentClass], $string, $currentClass);
|
||||
}
|
||||
global $_LANGADM;
|
||||
|
||||
if ($class == __CLASS__)
|
||||
$class = 'AdminTab';
|
||||
|
||||
$key = md5(str_replace('\'', '\\\'', $string));
|
||||
$str = (key_exists(get_class($this).$key, $_LANGADM)) ? $_LANGADM[get_class($this).$key] : ((key_exists($class.$key, $_LANGADM)) ? $_LANGADM[$class.$key] : $string);
|
||||
$str = $htmlentities ? htmlentities($str, ENT_QUOTES, 'utf-8') : $str;
|
||||
return str_replace('"', '"', ($addslashes ? addslashes($str) : stripslashes($str)));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user