modification.xml (1228B)
1 <?xml version="1.0" encoding="utf-8"?> 2 <modification> 3 <name>Modification Default</name> 4 <code>default</code> 5 <version>1.0</version> 6 <author>OpenCart Ltd</author> 7 <link>http://www.opencart.com</link> 8 <file path="system/{engine,library}/{action,loader,config,language}*.php|system/library/template/template.php"> 9 <operation> 10 <search regex="true"> 11 <![CDATA[~(require|include)(_once)?\(([^)]+)~]]> 12 </search> 13 <add position="replace"> 14 <![CDATA[$1$2(modification($3)]]> 15 </add> 16 </operation> 17 </file> 18 <file path="system/library/template/twig.php"> 19 <operation> 20 <search> 21 <![CDATA[$loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);]]> 22 </search> 23 <add position="replace"> 24 <![CDATA[ 25 $loader = new \Twig_Loader_Filesystem(); 26 27 if (defined('DIR_CATALOG') && is_dir(DIR_MODIFICATION . 'admin/view/template/')) { 28 $loader->addPath(DIR_MODIFICATION . 'admin/view/template/'); 29 } elseif (is_dir(DIR_MODIFICATION . 'catalog/view/theme/')) { 30 $loader->addPath(DIR_MODIFICATION . 'catalog/view/theme/'); 31 } 32 33 $loader->addPath(DIR_TEMPLATE);]]> 34 </add> 35 </operation> 36 </file> 37 </modification>