Skip to content

Commit

Permalink
Modify code table SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
stranac committed Jun 30, 2021
1 parent d72ae27 commit 55f4252
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions install.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>CoinGate</name>
<code>coningate</code>
<version>3.1.3</version>
<author>Ivan</author>
<!-- Allow 4 characters in form validation -->
<file path="admin/controller/localisation/currency.php">
<operation>
<search><![CDATA[if (utf8_strlen($this->request->post['code']) != 3)]]></search>
<add position="replace"><![CDATA[if (!in_array(utf8_strlen($this->request->post['code']), array(3, 4)))]]></add>
</operation>
</file>
</modification>
2 changes: 1 addition & 1 deletion upload/admin/model/extension/payment/coingate.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function install() {
// Modify the currency table to allow 4-character currency code
$this->db->query("
ALTER TABLE `" . DB_PREFIX . "currency`
MODIFY `code` VARCHAR(3) NOT NULL;
MODIFY `code` VARCHAR(4) COLLATE utf8_general_ci NOT NULL;
");

$this->load->model('setting/setting');
Expand Down

0 comments on commit 55f4252

Please sign in to comment.