diff options
Diffstat (limited to 'public/system/modification.xml')
-rw-r--r-- | public/system/modification.xml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/public/system/modification.xml b/public/system/modification.xml new file mode 100644 index 0000000..6cfd9f6 --- /dev/null +++ b/public/system/modification.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<modification> + <name>Modification Default</name> + <code>default</code> + <version>1.0</version> + <author>OpenCart Ltd</author> + <link>http://www.opencart.com</link> + <file path="system/{engine,library}/{action,loader,config,language}*.php|system/library/template/template.php"> + <operation> + <search regex="true"> + <![CDATA[~(require|include)(_once)?\(([^)]+)~]]> + </search> + <add position="replace"> + <![CDATA[$1$2(modification($3)]]> + </add> + </operation> + </file> + <file path="system/library/template/twig.php"> + <operation> + <search> + <![CDATA[$loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);]]> + </search> + <add position="replace"> + <![CDATA[ + $loader = new \Twig_Loader_Filesystem(); + + if (defined('DIR_CATALOG') && is_dir(DIR_MODIFICATION . 'admin/view/template/')) { + $loader->addPath(DIR_MODIFICATION . 'admin/view/template/'); + } elseif (is_dir(DIR_MODIFICATION . 'catalog/view/theme/')) { + $loader->addPath(DIR_MODIFICATION . 'catalog/view/theme/'); + } + + $loader->addPath(DIR_TEMPLATE);]]> + </add> + </operation> + </file> +</modification> |