summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/forum.module5
-rw-r--r--modules/forum/forum.module5
-rw-r--r--modules/locale.module5
-rw-r--r--modules/locale/locale.module5
4 files changed, 14 insertions, 6 deletions
diff --git a/modules/forum.module b/modules/forum.module
index cfe9dc4cd..7825f7eeb 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -104,7 +104,7 @@ function forum_block($op = "list", $delta = 0) {
}
$blocks["subject"] = t("Forum topics");
- $blocks["content"] = $content;
+ $blocks["content"] = $content->data;
}
}
@@ -310,7 +310,7 @@ function forum_get_forums($tid = 0) {
$tid = 0;
}
- $forums = unserialize(cache_get("forum:$tid"));
+ $forums = cache_get("forum:$tid");
if (!$forums) {
$forums = array();
@@ -333,6 +333,7 @@ function forum_get_forums($tid = 0) {
}
if ($user->uid && $forums) {
+ $forums = unserialize($forums);
foreach (_forum_topics_read($user->uid) as $tid => $old) {
if ($forums[$tid]) {
$forums[$tid]->old_topics = $old;
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index cfe9dc4cd..7825f7eeb 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -104,7 +104,7 @@ function forum_block($op = "list", $delta = 0) {
}
$blocks["subject"] = t("Forum topics");
- $blocks["content"] = $content;
+ $blocks["content"] = $content->data;
}
}
@@ -310,7 +310,7 @@ function forum_get_forums($tid = 0) {
$tid = 0;
}
- $forums = unserialize(cache_get("forum:$tid"));
+ $forums = cache_get("forum:$tid");
if (!$forums) {
$forums = array();
@@ -333,6 +333,7 @@ function forum_get_forums($tid = 0) {
}
if ($user->uid && $forums) {
+ $forums = unserialize($forums);
foreach (_forum_topics_read($user->uid) as $tid => $old) {
if ($forums[$tid]) {
$forums[$tid]->old_topics = $old;
diff --git a/modules/locale.module b/modules/locale.module
index a726fc6c3..8dfccad47 100644
--- a/modules/locale.module
+++ b/modules/locale.module
@@ -282,7 +282,10 @@ function locale($string) {
static $locale_t;
if (!isset($locale_t)) {
- $locale_t = unserialize(cache_get("locale:$locale"));
+ $cache = cache_get("locale:$locale");
+ if ($cache) {
+ $locale_t = unserialize($cache->data);
+ }
}
if ($locale_t[$string] != "") {
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index a726fc6c3..8dfccad47 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -282,7 +282,10 @@ function locale($string) {
static $locale_t;
if (!isset($locale_t)) {
- $locale_t = unserialize(cache_get("locale:$locale"));
+ $cache = cache_get("locale:$locale");
+ if ($cache) {
+ $locale_t = unserialize($cache->data);
+ }
}
if ($locale_t[$string] != "") {