diff --git a/e107_handlers/cache_handler.php b/e107_handlers/cache_handler.php
index 4aae2b978..fde541d02 100644
--- a/e107_handlers/cache_handler.php
+++ b/e107_handlers/cache_handler.php
@@ -45,7 +45,8 @@ class ecache {
*/
public function setMD5($text)
{
- $this->CachePageMD5 = md5($text);
+ $this->CachePageMD5 = md5($text);
+ return $this;
}
/**
diff --git a/e107_plugins/forum/e_emailprint.php b/e107_plugins/forum/e_emailprint.php
index c2bc40eea..7be29d08f 100755
--- a/e107_plugins/forum/e_emailprint.php
+++ b/e107_plugins/forum/e_emailprint.php
@@ -7,7 +7,8 @@ function print_item($thread_id)
$gen = new convert;
include_once(e_PLUGIN.'forum/forum_class.php');
$forum = new e107forum;
- $thread_info = $forum->thread_get($thread_id,0,999);
+
+ $thread_info = $forum->threadGet($thread_id,0,999);
$thread_name = $tp->toHTML($thread_info[0]['thread_name'], TRUE);
$text = "".$thread_name."
".$thread_info[0]['user_name'].", ".$gen->convert_date($thread_info[0]['thread_datestamp'], "forum")."
@@ -35,7 +36,7 @@ function email_item($thread_id)
$gen = new convert;
include_once(e_PLUGIN.'forum/forum_class.php');
$forum = new e107forum;
- $thread_info = $forum->thread_get($thread_id,0,999);
+ $thread_info = $forum->threadGet($thread_id,0,999);
$thread_name = $tp->toHTML($thread_info[0]['thread_name'], TRUE);
$text = "".$thread_name."
diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php
index 2956af1fc..60bc66247 100644
--- a/e107_plugins/forum/forum_class.php
+++ b/e107_plugins/forum/forum_class.php
@@ -474,17 +474,21 @@ class e107forum
private function loadPermList()
{
- if($tmp = e107::getCache()->retrieve_sys('forum_perms'))
+ if($tmp = e107::getCache()->setMD5(e_LANGUAGE.USERCLASS_LIST)->retrieve('forum_perms'))
{
e107::getMessage()->addDebug("Using Permlist cache: True");
+
$this->permList = e107::unserialize($tmp);
+
+ // print_a($this->permList);
+
}
else
{
e107::getMessage()->addDebug("Using Permlist cache: False");
$this->_getForumPermList();
$tmp = e107::serialize($this->permList, false);
- e107::getCache()->set_sys('forum_perms', $tmp);
+ e107::getCache()->setMD5(e_LANGUAGE.USERCLASS_LIST)->set('forum_perms', $tmp);
}
unset($tmp);
}
@@ -572,6 +576,11 @@ class e107forum
function checkPerm($forumId, $type='view')
{
// print_a( $this->permList[$type]);
+ if(empty($this->permList[$type]))
+ {
+ // return false;
+ }
+
return (in_array($forumId, $this->permList[$type]));
}