fixed generation of cache files and oversight in titles
This commit is contained in:
parent
656b78358c
commit
6fb1d5eae8
4 changed files with 16 additions and 14 deletions
|
|
@ -17,7 +17,7 @@ require_once('includes/class.faction.php');
|
|||
$id = intVal($pageParam);
|
||||
$item = new Item($id);
|
||||
|
||||
$cacheKeyPage = implode(':', [CACHETYPE_PAGE, TYPEID_ITEM, $id, -1, User::$localeId]);
|
||||
$cacheKeyPage = implode('_', [CACHETYPE_PAGE, TYPEID_ITEM, $id, -1, User::$localeId]);
|
||||
|
||||
if (isset($_GET['xml']))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ require_once('includes/class.item.php');
|
|||
$id = intVal($pageParam);
|
||||
$spell = new Spell($id);
|
||||
|
||||
$cacheKeyPage = implode(':', [CACHETYPE_PAGE, TYPEID_SPELL, $id, -1, User::$localeId]);
|
||||
$cacheKeyTooltip = implode(':', [CACHETYPE_TOOLTIP, TYPEID_SPELL, $id, -1, User::$localeId]);
|
||||
$cacheKeyPage = implode('_', [CACHETYPE_PAGE, TYPEID_SPELL, $id, -1, User::$localeId]);
|
||||
$cacheKeyTooltip = implode('_', [CACHETYPE_TOOLTIP, TYPEID_SPELL, $id, -1, User::$localeId]);
|
||||
|
||||
if (isset($_GET['power']))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,17 +4,19 @@ if (!defined('AOWOW_REVISION'))
|
|||
die('illegal access');
|
||||
|
||||
|
||||
require('includes/class.title.php');
|
||||
require('includes/class.spell.php');
|
||||
require('includes/class.achievement.php');
|
||||
require('includes/class.item.php');
|
||||
require('includes/class.quest.php');
|
||||
require('includes/class.worldevent.php');
|
||||
require('includes/class.community.php');
|
||||
require_once('includes/class.title.php');
|
||||
require_once('includes/class.spell.php');
|
||||
require_once('includes/class.achievement.php');
|
||||
require_once('includes/class.item.php');
|
||||
require_once('includes/class.quest.php');
|
||||
require_once('includes/class.worldevent.php');
|
||||
require_once('includes/class.community.php');
|
||||
|
||||
$Id = intval($pageParam);
|
||||
$Id = intVal($pageParam);
|
||||
|
||||
if (!$smarty->loadCache(array('achievement', $Id), $pageData))
|
||||
$cacheKeyPage = implode('_', [CACHETYPE_PAGE, TYPEID_TITLE, $id, -1, User::$localeId]);
|
||||
|
||||
if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
{
|
||||
$title = new Title($Id);
|
||||
if ($title->template)
|
||||
|
|
@ -81,7 +83,7 @@ if (!$smarty->loadCache(array('achievement', $Id), $pageData))
|
|||
}
|
||||
$pageData['title'] = ucFirst(trim(str_replace('%s', '', str_replace(',', '', $title->name[0]))));
|
||||
|
||||
$smarty->saveCache(array('spell', $Id), $pageData);
|
||||
$smarty->saveCache($cacheKeyPage, $pageData);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ require_once('includes/class.quest.php');
|
|||
|
||||
$cat = Util::extractURLParams($pageParam)[0];
|
||||
$path = [0, 10];
|
||||
$cacheKey = implode(':', [CACHETYPE_PAGE, TYPEID_TITLE, -1, $cat || 0, User::$localeId]);
|
||||
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPEID_TITLE, -1, isset($cat) ? $cat : -1, User::$localeId]);
|
||||
$title = [ucFirst(Lang::$game['titles'])];
|
||||
|
||||
$path[] = $cat; // should be only one parameter anyway
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue