removing smarty - part VI

- rewrote currencies, achievements, events, factions
- GenericPage:
   * moved more checks from Util
   * structured and commented GenericPage to be easier to comprehend
   * added GenericPage::postCache() to modify cached data before display (e.g. update time for events)
- fixed:
   * parsing events from markdown (e.g. articles)
   * huge padding of minibox headings (css)
   * Loot passing jsGlobals to template
   * ItemList::getExtendedCost passing jsGlobals to template
   * categories for factions
   * conflicting GenericPage::$subject when displaying 'notFound'
   * load of typos
This commit is contained in:
Sarjuuk
2014-06-21 18:39:54 +02:00
parent 9c7c2e29b5
commit caa7a7e39f
33 changed files with 1969 additions and 1856 deletions

View File

@@ -696,7 +696,7 @@ class Util
public static $tcEncoding = '0zMcmVokRsaqbdrfwihuGINALpTjnyxtgevElBCDFHJKOPQSUWXYZ123456789';
public static $wowheadLink = '';
private static $notes = [];
private static $notes = [];
// creates an announcement; use if minor issues arise
public static function addNote($uGroupMask, $str)
@@ -895,7 +895,7 @@ class Util
// pageText for Books (Item or GO) and questText
public static function parseHtmlText($text)
{
if (stristr($text, '<HTML>')) // text is basicly a html-document with weird linebreak-syntax
if (stristr($text, '<HTML>')) // text is basically a html-document with weird linebreak-syntax
{
$pairs = array(
'<HTML>' => '',
@@ -915,9 +915,9 @@ class Util
'/\|T([\w]+\\\)*([^\.]+)\.blp:\d+\|t/ui', // images (force size to tiny) |T<fullPath>:<size>|t
'/\|c(\w{6})\w{2}([^\|]+)\|r/ui', // color |c<RRGGBBAA><text>|r
'/\$g\s*([^:;]+)\s*:\s*([^:;]+)\s*(:?[^:;]*);/ui',// directed gender-reference $g:<male>:<female>:<refVariable>
'/\$t([^;]+);/ui', // nonesense, that the client apparently ignores
'/\$t([^;]+);/ui', // nonsense, that the client apparently ignores
'/\|\d\-?\d?\((\$\w)\)/ui', // and another modifier for something russian |3-6($r)
'/<([^\"=\/>]+\s[^\"=\/>]+)>/ui' // emotes (workaround: at least one whitespace and never " oder = between brackets)
'/<([^\"=\/>]+\s[^\"=\/>]+)>/ui' // emotes (workaround: at least one whitespace and never " or = between brackets)
);
$to = array(
@@ -1031,18 +1031,6 @@ class Util
return '';
}
public static function extractURLParams($str)
{
$arr = explode('.', $str);
$params = [];
foreach ($arr as $v)
if (is_numeric($v))
$params[] = (int)$v;
return $params;
}
// for item and spells
public static function setRatingLevel($level, $type, $val)
{