Skip to content

Instantly share code, notes, and snippets.

@nidgetgod
Last active September 9, 2017 10:42
Show Gist options
  • Save nidgetgod/7f4dd0e65e754eb8cda47641f454f488 to your computer and use it in GitHub Desktop.
Save nidgetgod/7f4dd0e65e754eb8cda47641f454f488 to your computer and use it in GitHub Desktop.
OpenCart 2.3.0.2 OCMOD - 替換最小字元長度
<?xml version="1.0" encoding="utf-8"?>
<modification>
   <code><![CDATA[替換最小字元長度]]></code>
<name><![CDATA[替換最小字元長度]]></name>
<version><![CDATA[1.0]]></version>
<author><![CDATA[NidgetGod]]></author>
<link>https://gist.github.com/nidgetgod/7f4dd0e65e754eb8cda47641f454f488</link>
<file path="admin/controller/localisation/weight_class.php">
<operation>
<search><![CDATA[if ((utf8_strlen($value['title']) < 3) || (utf8_strlen($value['title']) > 32)) {]]></search>
<add position="replace"><![CDATA[if ((utf8_strlen($value['title']) < 1) || (utf8_strlen($value['title']) > 32)) {]]></add>
</operation>
</file>
<file path="admin/controller/localisation/length_class.php">
<operation>
<search><![CDATA[if ((utf8_strlen($value['title']) < 3) || (utf8_strlen($value['title']) > 32)) {]]></search>
<add position="replace"><![CDATA[if ((utf8_strlen($value['title']) < 1) || (utf8_strlen($value['title']) > 32)) {]]></add>
</operation>
</file>
<file path="admin/controller/localisation/stock_status.php">
<operation>
<search><![CDATA[if ((utf8_strlen($value['name']) < 3) || (utf8_strlen($value['name']) > 32)) {]]></search>
<add position="replace"><![CDATA[if ((utf8_strlen($value['name']) < 1) || (utf8_strlen($value['name']) > 32)) {]]></add>
</operation>
</file>
<file path="admin/controller/catalog/category.php">
<operation>
<search><![CDATA[if ((utf8_strlen($value['name']) < 2) || (utf8_strlen($value['name']) > 255)) {]]></search>
<add position="replace"><![CDATA[if ((utf8_strlen($value['name']) < 1) || (utf8_strlen($value['name']) > 255)) {]]></add>
</operation>
<operation>
<search><![CDATA[if ((utf8_strlen($value['meta_title']) < 3) || (utf8_strlen($value['meta_title']) > 255)) {]]></search>
<add position="replace"><![CDATA[if ((utf8_strlen($value['meta_title']) < 1) || (utf8_strlen($value['meta_title']) > 255)) {]]></add>
</operation>
</file>
<file path="admin/controller/extension/module/featured.php">
<operation>
<search><![CDATA[if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 64)) {]]></search>
<add position="replace"><![CDATA[if ((utf8_strlen($this->request->post['name']) < 1) || (utf8_strlen($this->request->post['name']) > 64)) {]]></add>
</operation>
</file>
</modification>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment