瀏覽代碼

fix card_key error

stanley-king 4 年之前
父節點
當前提交
491ced737d
共有 4 個文件被更改,包括 15 次插入1 次删除
  1. 1 0
      data/model/refill_stats.model.php
  2. 1 0
      helper/statistics/stat_refill.php
  3. 4 1
      shop/control/card_key.php
  4. 9 0
      test/TestRefillStats.php

+ 1 - 0
data/model/refill_stats.model.php

@@ -0,0 +1 @@
+<?php

+ 1 - 0
helper/statistics/stat_refill.php

@@ -0,0 +1 @@
+<?php

+ 4 - 1
shop/control/card_key.php

@@ -2,6 +2,8 @@
 
 defined('InShopNC') or exit('Access Invalid!');
 
+require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
+
 class card_keycontrol extends BaseSellerControl
 {
 
@@ -12,7 +14,8 @@ class card_keycontrol extends BaseSellerControl
 
     public function indexOp()
     {
-        if (chksubmit()) {
+        if (chksubmit())
+        {
             if (mtopcard\scard_type($_POST['card_type']) == 'unknown') {
                 showDialog('卡种错误。', 'reload', 'error');
             }

+ 9 - 0
test/TestRefillStats.php

@@ -0,0 +1,9 @@
+<?php
+
+
+use PHPUnit\Framework\TestCase;
+
+class TestRefillStats extends TestCase
+{
+
+}