Files
aowow/index.php
Sarjuuk 732226b44a BaseType:
- dropped property "names" and changed getField to return localized Fields if specified. Dropped stupid getNameFieldName() in the process as it was now obsolete.
 - made property "matches" private. Access through getMatches() that will execute the query _only_ when needed (which is basically always anyway (so much for optimization))

SpellList: parsing
 - ""fixed"" behavior of the amount-switch $l when used on russian text. It has 3 options instead of 2, no idea what the last one is for though
 - fixed extra leading whitespace occuring when parsing formulas

Lang:
 - removed offset from getMagicShools(), apparently it is unneeded :o

Util:
 - changed the output of formatTime() in the long version to be more correct in layout
 - initialized values in parseTime() to prevent empty strings returned by formatTime()
 - added asBin() and asHex() - helper to improve display of bitmasks (Spells are coming!)
 - update Spell-Effects/Auras and added misc strings to display different MiscValue-content

Filter:
 - removed escapes from $_POST-handler. If the input is erronous it should be corrected/ignored/noted by the $_GET-handler

Smarty:
 - added optinal parameter to saveCache(), loadCache() to better handle filter variables

Search:
 - changed $maxResults to 10 for OpenSearches in an effort to lower execution time and appied limits to all queries
 - changed result calculation for OpenSearch. It should now stick to it's limit of 10 results for the list
 - simplified WorldEvent search

global.js:
 - backported function to parse title-tag of dfn-elements into mouseover-tooltips
 - shortened document.getElementByTagName(x) calls to gE(document, x)
2013-04-26 17:02:35 +02:00

137 lines
4.2 KiB
PHP

<?php
define('AOWOW_REVISION', 12);
if (!file_exists('config/config.php'))
{
$cwDir = /*$_SERVER['DOCUMENT_ROOT']; //*/getcwd();
require 'setup/setup.php';
exit;
}
// include all necessities, set up basics
require 'includes/kernel.php';
switch ($pageCall)
{
/* called by user */
case 'account': // account management [nyi]
case 'achievement':
case 'achievements':
// case 'arena-team':
// case 'arena-teams':
case 'class':
case 'classes':
case 'currency':
case 'currencies':
case 'compare': // tool: item comparison
case 'event':
case 'events':
case 'faction':
case 'factions':
// case 'guild':
// case 'guilds':
case 'item':
case 'items':
case 'itemset':
case 'itemsets':
case 'maps': // tool: map listing
case 'npc':
case 'npcs':
case 'object':
case 'objects':
case 'pet':
case 'pets':
case 'profile': // character profiler [nyi]
case 'profiles': // character profile listing [nyi]
case 'quest':
case 'quests':
case 'race':
case 'races':
case 'skill':
case 'skills':
case 'spell':
case 'spells':
case 'title':
case 'titles':
case 'user': // tool: user profiles [nyi]
case 'zone':
case 'zones':
if (file_exists('pages/'.$pageCall.'.php'))
require 'pages/'.$pageCall.'.php';
else
$smarty->error();
break;
case 'talent': // tool: talent calculator
case 'petcalc': // tool: pet talent calculator
require 'pages/talent.php';
break;
/* called by script */
case 'contactus':
if ($pageCall == 'contactus')
{
// 0:ok; 1:captchaInvalid; 2:tooLong; 3:noReasonGiven; 7:alreadyReported; other:prints String
die("not yet implemented:\n".print_r($_POST));
}
case 'comment':
if ($pageParam == 'rating')
{
// why is this called via index...?
die('{"success":true,"error":"","up":7,"down":9}');
}
else if ($pageParam == 'rate')
{
// 0:success, 1:ratingban, 3:rated too often
die('3');
}
case 'locale': // subdomain-workaround, change the language
User::setLocale($pageParam);
User::writeCookie();
header('Location: '.(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '.'));
break;
case 'data': // tool: dataset-loader
case 'search': // tool: searches
require $pageCall.'.php';
break;
/* other */
case '': // no parameter given -> MainPage
require 'pages/main.php';
break;
case 'latest-comments':
case 'latest-screenshots':
case 'latest-videos':
case 'missing-comments':
case 'missing-screenshots':
case 'missing-videos':
case 'unrated-comments':
case 'random':
require 'pages/miscTools.php';
break;
case 'build':
if (User::isInGroup(U_GROUP_EMPLOYEE))
{
require 'setup/tools/dataset-assembler/'.$pageParam.'.php';
break;
}
case 'sql':
if (User::isInGroup(U_GROUP_EMPLOYEE))
{
require 'setup/tools/sql/_'.$pageParam.'.php';
break;
}
case 'setup':
if (User::isInGroup(U_GROUP_EMPLOYEE))
{
require 'setup/syncronize.php';
break;
}
default: // unk parameter given -> ErrorPage
if (isset($_GET['power']))
die('$WowheadPower.register(0, '.User::$localeId.', {})');
else // in conjunction with a propper rewriteRule in .htaccess...
$smarty->error();
break;
}
?>