From 1e30ba334f16c80958249f4d04287323528f2c61 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sun, 14 Aug 2016 13:38:57 +0200 Subject: [PATCH] Config array serialized --- inc/statifyblacklist.class.php | 4 ++-- views/settings_page.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/statifyblacklist.class.php b/inc/statifyblacklist.class.php index 8049bd6..b9e49ad 100644 --- a/inc/statifyblacklist.class.php +++ b/inc/statifyblacklist.class.php @@ -85,7 +85,7 @@ class StatifyBlacklist get_option('statify-blacklist'), array( 'active_referer' => 0, - 'referer' => '' + 'referer' => array() ) ); } @@ -112,7 +112,7 @@ class StatifyBlacklist $referer = implode('.', $referer); /* Get blacklist */ - $blacklist = explode("\r\n", self::$_options['referer']); + $blacklist = self::$_options['referer']; /* Check blacklist */ return in_array($referer, $blacklist); diff --git a/views/settings_page.php b/views/settings_page.php index add40f8..d4b2dff 100644 --- a/views/settings_page.php +++ b/views/settings_page.php @@ -5,7 +5,7 @@ if ( ! empty($_POST['statifyblacklist']) ) { StatifyBlacklist::update_options( array( 'active_referer' => (int)@$_POST['statifyblacklist']['active_referer'], - 'referer' => (string)@$_POST['statifyblacklist']['referer'] + 'referer' => explode("\r\n", $_POST['statifyblacklist']['referer']) ) ); } @@ -25,7 +25,7 @@ if ( ! empty($_POST['statifyblacklist']) ) {