ocmod使用大括号修改管理文件和目录文件


ocmod modify both admin and catalog files using braces

为什么我的ocmod不使用大括号?

<file path="{admin,catalog}/model/tool/upload.php">
    <operation error="skip">
        <search index="0">
            <![CDATA[public function addUpload(]]>
        </search>
        <add position="below">
            <![CDATA[...]]>
        </add>
    </operation>
</file>

如果我将路径更改为<file path="catalog/model/tool/upload.php">,它会起作用。

https://github.com/opencart/opencart/wiki/Modification-System

Using braces allows for selecting multiple files and not having to repeat the code operation multiple times.
<file path="system/{engine,library}/{action,loader,config,language}*.php">

注意:在OpenCart 2.0.2.0中,通配符路径被无声地破坏。新方法是昏迷分隔完整路径:

<file path="system/{engine,library}/{action,loader,config,language}*.php,">

将写为

<file path="system/engine/action.php,system/engine/loader.php,system/library/config.php,system/library/language.php">