diff --git a/config/func.inc.php b/config/func.inc.php index 9f0822f6b..b09e04deb 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -1109,39 +1109,7 @@ function detectUTF8($string, $return_convert = false, $urldecode = true) */ function json_encode2($data) { - switch (gettype($data)) - { - case 'boolean': - return $data?'true':'false'; - case 'integer': - case 'double': - return $data; - case 'string': - return '"'.strtr($data, array('\\'=>'\\\\','"'=>'\\"')).'"'; - case 'object': - $data = get_object_vars($data); - case 'array': - $rel = false; // relative array? - $key = array_keys($data); - foreach($key as $v) - { - if(!is_int($v)) - { - $rel = true; - break; - } - } - - $arr = array(); - foreach ($data as $k=>$v) - { - $arr[] = ($rel?'"'.strtr($k, array('\\'=>'\\\\','"'=>'\\"')).'":':'').json_encode2($v); - } - - return $rel?'{'.join(',', $arr).'}':'['.join(',', $arr).']'; - default: - return '""'; - } + return json_encode($data); } /** diff --git a/modules/counter/conf/module.xml b/modules/counter/conf/module.xml index 2f7d1db01..c648c9e48 100644 --- a/modules/counter/conf/module.xml +++ b/modules/counter/conf/module.xml @@ -1,9 +1,12 @@ - + + + + diff --git a/modules/counter/counter.model.php b/modules/counter/counter.model.php index e1076380f..ec81b152e 100644 --- a/modules/counter/counter.model.php +++ b/modules/counter/counter.model.php @@ -253,6 +253,13 @@ class counterModel extends counter return $status; } + public function getWeeklyUniqueVisitor() + { + $date = date('Ymd'); + $output = $this->getHourlyStatus('week', $date); + + $this->add('data', $output); + } } /* End of file counter.model.php */ /* Location: ./modules/counter/counter.model.php */ diff --git a/modules/member/conf/module.xml b/modules/member/conf/module.xml index b97791770..02e350ad5 100644 --- a/modules/member/conf/module.xml +++ b/modules/member/conf/module.xml @@ -3,7 +3,6 @@ - @@ -38,7 +37,6 @@ -