mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
misc:
- fixed caching, by escaping control chars - rough support for shortened urls .. kinda - achievements shows icons for required items again; also can get name for quest
This commit is contained in:
@@ -19,11 +19,12 @@ AddDefaultCharset utf8
|
|||||||
|
|
||||||
php_value default_charset UTF-8
|
php_value default_charset UTF-8
|
||||||
|
|
||||||
|
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
|
||||||
# Mapper-Helper: If you cant provide maps for all locales, redirect the browser
|
# Mapper-Helper: If you cant provide maps for all locales, redirect the browser
|
||||||
RewriteRule ^images/maps/(frfr|dede|eses|ruru)/(.*)$ images/maps/enus/$2 [NC]
|
RewriteRule ^images/maps/(frfr|dede|eses|ruru)/(.*)$ images/maps/enus/$2 [NC]
|
||||||
|
|
||||||
# accept flattened urls | NYI - need more work :x
|
# accept flattened urls | NYI - need more work :x
|
||||||
# RewriteRule ^([a-z0-9]+)=([^?&/=]*)(.*)$ index.php?$1=$2&$3 [NC]
|
RewriteRule ^([a-z0-9\-]+)$ ?$1 [NC] # /items => ?items
|
||||||
|
RewriteRule ^([a-z0-9\-]+)=([^?&]*)$ ?$1=$2 [NC] # /items=4.1 => ?items=4.1
|
||||||
|
RewriteRule ^([a-z0-9\-]+)=([^?&]*)[&?](.*)$ ?$1=$2&$3 [NC] # /items=4.1?filter=sl=7 => ?items=4.1&filter=sl=7
|
||||||
|
|||||||
@@ -836,7 +836,7 @@ class SmartyAoWoW extends Smarty
|
|||||||
$file = $this->cache_dir.'data/'.$key;
|
$file = $this->cache_dir.'data/'.$key;
|
||||||
|
|
||||||
$cacheData = time()." ".AOWOW_REVISION."\n";
|
$cacheData = time()." ".AOWOW_REVISION."\n";
|
||||||
$cacheData .= serialize($data);
|
$cacheData .= serialize(str_replace(["\n", "\t"], ['\n', '\t'], $data));
|
||||||
|
|
||||||
if ($filter)
|
if ($filter)
|
||||||
$cacheData .= "\n".serialize($filter);
|
$cacheData .= "\n".serialize($filter);
|
||||||
@@ -861,7 +861,7 @@ class SmartyAoWoW extends Smarty
|
|||||||
if ($expireTime <= time() || $rev < AOWOW_REVISION)
|
if ($expireTime <= time() || $rev < AOWOW_REVISION)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$data = unserialize($cache[1]);
|
$data = str_replace(['\n', '\t'], ["\n", "\t"], unserialize($cache[1]));
|
||||||
if (isset($cache[2]))
|
if (isset($cache[2]))
|
||||||
$filter = unserialize($cache[2]);
|
$filter = unserialize($cache[2]);
|
||||||
|
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
|||||||
break;
|
break;
|
||||||
// link to quest
|
// link to quest
|
||||||
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST:
|
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST:
|
||||||
$crtName = Quest::getName($obj);
|
$crtName = QuestList::getName($obj);
|
||||||
$tmp['link'] = array(
|
$tmp['link'] = array(
|
||||||
'href' => '?quest='.$obj,
|
'href' => '?quest='.$obj,
|
||||||
'text' => $crtName ? $crtName : $crtName,
|
'text' => $crtName ? $crtName : $crtName,
|
||||||
|
|||||||
@@ -106,14 +106,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{strip}
|
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
{foreach from=$lvData.page.icons item=ic}
|
{foreach from=$lvData.page.icons item=ic}
|
||||||
ge('iconlist-icon{$ic.itr}').appendChild({$ic.type}.createIcon({$ic.id}, 0, {if isset($ic.count) && $ic.count > 0}{$ic.count}{else}0{/if}));
|
ge('iconlist-icon{$ic.itr}').appendChild({$ic.type}.createIcon({$ic.id}, 0, {if isset($ic.count) && $ic.count > 0}{$ic.count}{else}0{/if}));
|
||||||
{/foreach}
|
{/foreach}
|
||||||
//]]></script>
|
//]]></script>
|
||||||
{/strip}
|
|
||||||
|
|
||||||
|
|
||||||
<div style="clear: left"></div>
|
<div style="clear: left"></div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user