Skip to content

Commit

Permalink
Fix performance issue with update checker
Browse files Browse the repository at this point in the history
  • Loading branch information
partydragen committed Dec 26, 2020
1 parent 2a1b571 commit 8df29d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion upload/modules/Members/classes/Members.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function updateCheck($current_version = null) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_URL, 'https://api.partydragen.com/stats.php?uid=' . $uid . '&version=' . $current_version . '&module=Members&module_version='.$module->getVersion());
curl_setopt($ch, CURLOPT_URL, 'https://api.partydragen.com/stats.php?uid=' . $uid . '&version=' . $current_version . '&module=Members&module_version='.$module->getVersion() . '&domain='. Util::getSelfURL());

$update_check = curl_exec($ch);
curl_close($ch);
Expand Down
4 changes: 2 additions & 2 deletions upload/modules/Members/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct($members_language, $pages, $navigation, $cache){

$name = 'Members';
$author = '<a href="https://partydragen.com" target="_blank" rel="nofollow noopener">Partydragen</a>, <a href="https://samerton.me" target="_blank" rel="nofollow noopener">Samerton</a>';
$module_version = '2.1.0';
$module_version = '2.1.1';
$nameless_version = '2.0.0-pr8';

parent::__construct($this, $name, $author, $module_version, $nameless_version);
Expand Down Expand Up @@ -146,7 +146,7 @@ public function onPageLoad($user, $pages, $cache, $smarty, $navs, $widgets, $tem
if(rtrim($_GET['route'], '/') == '/panel/members' || rtrim($_GET['route'], '/') == '/members'){

$cache->setCache('members_module_cache');
if($cache->isCached('update_checko')){
if($cache->isCached('update_check')){
$update_check = $cache->retrieve('update_check');
} else {
require_once(ROOT_PATH . '/modules/Members/classes/Members.php');
Expand Down

0 comments on commit 8df29d7

Please sign in to comment.