dever 3 vuotta sitten
vanhempi
commit
9d76a3c2ce
2 muutettua tiedostoa jossa 12 lisäystä ja 0 poistoa
  1. 5 0
      lib/Api.php
  2. 7 0
      lib/Parse.php

+ 5 - 0
lib/Api.php

@@ -204,6 +204,11 @@ class Api
 
 	private function parse($url, $project, $rule, $param, $col, $set, $push)
 	{
+		$test = Dever::input('test');
+		if ($test) {
+			$parse = new Parse($url, $project, $rule, $param, $col, $set, $push);
+			return $parse->get();
+		}
 		try {
 			$parse = new Parse($url, $project, $rule, $param, $col, $set, $push);
 			return $parse->get();

+ 7 - 0
lib/Parse.php

@@ -120,6 +120,13 @@ class Parse
 			if ($v['local'] == 1) {
 				$this->res = $v['res_key'];
 				$value = $this->local($value, $v['type']);
+			} elseif ($v['type'] == 2) {
+				if (is_string($value) && strstr($value, '[')) {
+					$temp = Dever::json_decode($value);
+					if ($temp) {
+						$value = implode(',', $temp);
+					}
+				}
 			}
 
 			if ($v['collect_filter_link'] == 1) {