summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2023-11-27 02:28:22 -0500
committerspiderr <spiderr@bitweaver.org>2023-11-27 02:28:22 -0500
commit7d69a66375de5fb08836f03e1473a9cc347b84d4 (patch)
treeb98de36b8bf24ae9c529c4e2dc368f0ac7114c38
parentd4176e9761ac6fe8eba398f731880d1db80d30db (diff)
downloadstats-7d69a66375de5fb08836f03e1473a9cc347b84d4.tar.gz
stats-7d69a66375de5fb08836f03e1473a9cc347b84d4.tar.bz2
stats-7d69a66375de5fb08836f03e1473a9cc347b84d4.zip
use simple_set_toggle/value for admin_stats
-rw-r--r--admin/admin_stats_inc.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/admin/admin_stats_inc.php b/admin/admin_stats_inc.php
index 61a2dbc..21bd8ac 100644
--- a/admin/admin_stats_inc.php
+++ b/admin/admin_stats_inc.php
@@ -2,6 +2,7 @@
$formFeaturesBit = array(
'stats_referers' => array(
'label' => 'Referer Statistics',
+ 'type' => "checkbox",
'note' => 'Records statistics including HTTP_REFERRER',
),
'google_tagmanager_id' => array(
@@ -23,9 +24,13 @@ $formFeaturesBit = array(
$gBitSmarty->assign( 'formFeaturesBit', $formFeaturesBit );
-if( !empty( $_REQUEST['change_prefs'] ) ) {
+if( !empty( $_POST['change_prefs'] ) ) {
foreach ( array_keys( $formFeaturesBit ) as $feature) {
- $gBitSystem->storeConfig( $feature, (isset( $_REQUEST[$feature] ) ? $_REQUEST[$feature] : NULL), STATS_PKG_NAME );
+ if( $formFeaturesBit[$feature]['type'] == 'text' ) {
+ simple_set_value( $feature, STATS_PKG_NAME );
+ } else {
+ simple_set_toggle( $feature, STATS_PKG_NAME );
+ }
}
}