mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 12:02:24 +09:00
Set up replacement table for path conversions
This commit is contained in:
parent
48a5e73bdc
commit
b0bfb9a364
3 changed files with 10 additions and 2 deletions
|
|
@ -9,6 +9,13 @@ class HTMLDisplayHandler
|
||||||
public static $reservedCSS = '@\bcommon/css/(?:xe|mobile)\.(?:min\.)?css$@';
|
public static $reservedCSS = '@\bcommon/css/(?:xe|mobile)\.(?:min\.)?css$@';
|
||||||
public static $reservedJS = '@\bcommon/js/(?:jquery(?:-[123]\.x)?|xe?|common|js_app|xml_handler|xml_js_filter)\.(?:min\.)?js$@';
|
public static $reservedJS = '@\bcommon/js/(?:jquery(?:-[123]\.x)?|xe?|common|js_app|xml_handler|xml_js_filter)\.(?:min\.)?js$@';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replacement table for XE compatibility
|
||||||
|
*/
|
||||||
|
public static $replacements = array(
|
||||||
|
'@\bcommon/xeicon/@' => 'common/css/xeicon/',
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Produce HTML compliant content given a module object.\n
|
* Produce HTML compliant content given a module object.\n
|
||||||
* @param ModuleObject $oModule the module object
|
* @param ModuleObject $oModule the module object
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ class FrontEndFileHandler extends Handler
|
||||||
{
|
{
|
||||||
$args = array($args);
|
$args = array($args);
|
||||||
}
|
}
|
||||||
|
$args[0] = preg_replace(array_keys(HTMLDisplayHandler::$replacements), array_values(HTMLDisplayHandler::$replacements), $args[0]);
|
||||||
$isCommon = preg_match(HTMLDisplayHandler::$reservedCSS, $args[0]) || preg_match(HTMLDisplayHandler::$reservedJS, $args[0]);
|
$isCommon = preg_match(HTMLDisplayHandler::$reservedCSS, $args[0]) || preg_match(HTMLDisplayHandler::$reservedJS, $args[0]);
|
||||||
if($args[3] > -1500000 && $isCommon)
|
if($args[3] > -1500000 && $isCommon)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
*/
|
*/
|
||||||
class TemplateHandler
|
class TemplateHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
private $compiled_path = 'files/cache/template_compiled/'; ///< path of compiled caches files
|
private $compiled_path = 'files/cache/template_compiled/'; ///< path of compiled caches files
|
||||||
private $path = NULL; ///< target directory
|
private $path = NULL; ///< target directory
|
||||||
private $filename = NULL; ///< target filename
|
private $filename = NULL; ///< target filename
|
||||||
|
|
@ -689,6 +688,8 @@ class TemplateHandler
|
||||||
case 'load':
|
case 'load':
|
||||||
case 'unload':
|
case 'unload':
|
||||||
$metafile = '';
|
$metafile = '';
|
||||||
|
$replacements = HTMLDisplayHandler::$replacements;
|
||||||
|
$attr['target'] = preg_replace(array_keys($replacements), array_values($replacements), $attr['target']);
|
||||||
$pathinfo = pathinfo($attr['target']);
|
$pathinfo = pathinfo($attr['target']);
|
||||||
$doUnload = ($m[3] === 'unload');
|
$doUnload = ($m[3] === 'unload');
|
||||||
$isRemote = !!preg_match('@^(https?:)?//@i', $attr['target']);
|
$isRemote = !!preg_match('@^(https?:)?//@i', $attr['target']);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue