Setup:
- setup can now be run from CLI. Use "> php index.php --help" to start off - updated logging for use with CLI - added generators for client imagery (icons, maps, talents, ect) DBC: - parsed DBCs are now expected in the Aowow-DB, prefixed with dbc_* (they are joined with these tables, so its easier to have them here altogether) - setup/db_setup_3.zip may be reapplied (optionally) - alternatively aowow will now extract you own DBCs alongside your textures. They will be parsed and saved to DB, as needed. Misc: * HOST_URL and STATIC_URL will now be determined automaticly once and * then saved to ?_config (setup by CLI requires these to be set) Spell: * added glyph-symbol to infobox for glyph-related spells
This commit is contained in:
parent
1dc63e2b6d
commit
acbe969b8d
25 changed files with 2975 additions and 460 deletions
45
index.php
45
index.php
|
|
@ -1,28 +1,39 @@
|
|||
<?php
|
||||
|
||||
define('AOWOW_REVISION', 12);
|
||||
define('CLI', PHP_SAPI === 'cli');
|
||||
|
||||
if (!file_exists('config/config.php'))
|
||||
{
|
||||
$cwDir = /*$_SERVER['DOCUMENT_ROOT']; //*/getcwd();
|
||||
require 'setup/setup.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
$reqExt = ['SimpleXML', 'gd', 'mysqli', 'mbstring', 'mcrypt'];
|
||||
$reqExt = ['SimpleXML', 'gd', 'mysqli', 'mbstring'];
|
||||
$error = '';
|
||||
foreach ($reqExt as $r)
|
||||
if (!extension_loaded($r))
|
||||
$error .= 'Required Extension <b>'.$r."</b> was not found. Please see if it exists, using <i>php -m</i>\n\n";
|
||||
$error .= 'Required Extension <b>'.$r."</b> was not found. Please check if it should exist, using \"<i>php -m</i>\"\n\n";
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.5.0') < 0)
|
||||
$error .= 'PHP Version <b>5.5.0</b> or higher required! Your version is <b>'.PHP_VERSION."</b>.\nCore functions are unavailable!";
|
||||
$error .= 'PHP Version <b>5.5.0</b> or higher required! Your version is <b>'.PHP_VERSION."</b>.\nCore functions are unavailable!\n";
|
||||
|
||||
// not in root dir
|
||||
if (CLI && getcwd().DIRECTORY_SEPARATOR.'index.php' != __FILE__)
|
||||
$error .= "Aowow must be used from root directory\n";
|
||||
|
||||
if ($error)
|
||||
die('<pre>'.$error.'</pre>');
|
||||
{
|
||||
echo CLI ? strip_tags($error) : $error;
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
// include all necessities, set up basics
|
||||
require 'includes/kernel.php';
|
||||
require_once 'includes/kernel.php';
|
||||
|
||||
|
||||
if (CLI || !file_exists('config/config.php'))
|
||||
{
|
||||
$cwDir = /*$_SERVER['DOCUMENT_ROOT']; //*/getcwd();
|
||||
require 'setup/setup.php';
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$altClass = '';
|
||||
|
|
@ -81,7 +92,8 @@ switch ($pageCall)
|
|||
case 'talent': // tool: talent calculator
|
||||
case 'title':
|
||||
case 'titles':
|
||||
// case 'user': // tool: user profiles [nyi]
|
||||
// case 'user': // tool: user profiles [nyi]
|
||||
case 'video':
|
||||
case 'zone':
|
||||
case 'zones':
|
||||
if (in_array($pageCall, ['admin', 'account', 'profile']))
|
||||
|
|
@ -134,7 +146,8 @@ switch ($pageCall)
|
|||
case 'build':
|
||||
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
{
|
||||
require 'setup/tools/filegen/scriptGen.php';
|
||||
define('TMP_BUILD', 1); // todo (med): needs better solution
|
||||
require 'setup/setup.php';
|
||||
break;
|
||||
}
|
||||
case 'sql':
|
||||
|
|
@ -143,12 +156,6 @@ switch ($pageCall)
|
|||
require 'setup/tools/database/_'.$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.', {})');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue