Skip to content

Commit

Permalink
Issue #5079 - PHP 8.2 Deprecated error removal
Browse files Browse the repository at this point in the history
  • Loading branch information
CaMer0n committed Oct 26, 2023
1 parent 4467ad3 commit 552af19
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 5 additions & 0 deletions e107_handlers/e107_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ class e107
public $file_path;
public $site_path;
public $relative_base_path;

public $ecache;



// public $_ip_cache;
// public $_host_name_cache;

Expand Down
6 changes: 3 additions & 3 deletions e107_handlers/e_ranks_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public function __construct($force = false)
$this->imageFolder = is_dir(THEME.'images/ranks') ? THEME_ABS.'images/ranks/' : e_IMAGE_ABS.'ranks/';


$e107 = e107::getInstance();
$ecache = e107::getCache();
$sql = e107::getDb();
//Check to see if we can get it from cache
if($force == false && ($ranks = $e107->ecache->retrieve_sys('nomd5_user_ranks')))
if($force == false && ($ranks = $ecache->retrieve_sys('nomd5_user_ranks')))
{
$this->ranks = e107::unserialize($ranks);
}
Expand Down Expand Up @@ -62,7 +62,7 @@ public function __construct($force = false)
}
}
}
$e107->ecache->set_sys('nomd5_user_ranks', e107::serialize($this->ranks, false));
$ecache->set_sys('nomd5_user_ranks', e107::serialize($this->ranks, false));
}

// defaults
Expand Down
6 changes: 3 additions & 3 deletions e107_handlers/userclass_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ public function readTree($force = FALSE)
{
if (isset($this->class_tree) && count($this->class_tree) && !$force) return;

$e107 = e107::getInstance();
$ecache = e107::getCache();

$this->class_tree = array();
$this->class_parents = array();



if ($temp = $e107->ecache->retrieve_sys(UC_CACHE_TAG))
if ($temp = $ecache->retrieve_sys(UC_CACHE_TAG))
{
$this->class_tree = e107::unserialize($temp);
unset($temp);
Expand Down Expand Up @@ -202,7 +202,7 @@ public function readTree($force = FALSE)
}

$userCache = e107::serialize($this->class_tree, FALSE);
$e107->ecache->set_sys(UC_CACHE_TAG,$userCache);
$ecache->set_sys(UC_CACHE_TAG,$userCache);
unset($userCache);
}

Expand Down
3 changes: 1 addition & 2 deletions e107_plugins/forum/e_admin_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function plugin_forum_admin_events($type, $parms)
//Called if classtree cache is cleared. Meaning we'll need to rebuild moderator cache
function plugin_forum_admin_events_clear_moderators()
{
$e107 = e107::getInstance();
$e107->ecache->clear_sys('nomd5_forum_moderators');
e107::getCache()->clear_sys('nomd5_forum_moderators');
}

0 comments on commit 552af19

Please sign in to comment.