From 3bcc87caf294cd67f221854d1dc13065706f5a81 Mon Sep 17 00:00:00 2001 From: Macil Tech Date: Wed, 27 Mar 2013 22:09:39 +0800 Subject: Fix PM count caching. cache::get() returns null if the key wasn't found (at least when using the Redis cache backend). --- inc/mod/pages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/mod/pages.php') diff --git a/inc/mod/pages.php b/inc/mod/pages.php index cf06e7d9..726ed735 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -89,7 +89,7 @@ function mod_dashboard() { } } - if (!$config['cache']['enabled'] || ($args['unread_pms'] = cache::get('pm_unreadcount_' . $mod['id'])) === false) { + if (!$config['cache']['enabled'] || ($args['unread_pms'] = cache::get('pm_unreadcount_' . $mod['id'])) == false) { $query = prepare('SELECT COUNT(*) FROM `pms` WHERE `to` = :id AND `unread` = 1'); $query->bindValue(':id', $mod['id']); $query->execute() or error(db_error($query)); -- cgit v1.3 From be1e55b9d63bd4cdb910206e9e99ecf83ca7ffde Mon Sep 17 00:00:00 2001 From: Macil Tech Date: Fri, 1 Mar 2013 05:56:44 +0800 Subject: Fix result page after installing theme getting doubled up. --- inc/mod/pages.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/mod/pages.php') diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 726ed735..22018d31 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -1832,6 +1832,7 @@ function mod_theme_configure($theme_name) { 'result' => $result, 'message' => $message, )); + return; } $settings = themeSettings($theme_name); -- cgit v1.3