some minor error suppresants

This commit is contained in:
Sarjuuk
2015-05-26 23:10:16 +02:00
parent ebc7a9bee8
commit 03b90c438f
9 changed files with 37 additions and 31 deletions

View File

@@ -31,6 +31,7 @@ class AccountPage extends GenericPage
'username' => [FILTER_SANITIZE_SPECIAL_CHARS, 0xC], // FILTER_FLAG_STRIP_LOW | *_HIGH
'password' => [FILTER_UNSAFE_RAW, null],
'c_password' => [FILTER_UNSAFE_RAW, null],
'token' => [FILTER_UNSAFE_RAW, null],
'remember_me' => [FILTER_CALLBACK, ['options' => 'AccountPage::rememberCallback']],
'email' => [FILTER_SANITIZE_EMAIL, null]
);

View File

@@ -923,9 +923,9 @@ class NpcPage extends GenericPage
private function getQuotes()
{
$nQuotes = 0;
$quotes = [];
$quoteQuery = '
$nQuotes = 0;
$quotes = [];
$quoteSrc = DB::World()->select('
SELECT
ct.groupid AS ARRAY_KEY, ct.id as ARRAY_KEY2, ct.`type`,
ct.TextRange AS `range`,
@@ -944,9 +944,11 @@ class NpcPage extends GenericPage
LEFT JOIN
locales_broadcast_text lbct ON ct.BroadcastTextId = lbct.ID
WHERE
ct.entry = ?d';
ct.entry = ?d',
$this->typeId
);
foreach (DB::World()->select($quoteQuery, $this->typeId) as $text)
foreach ($quoteSrc as $text)
{
$group = [];
foreach ($text as $t)

View File

@@ -110,7 +110,7 @@ class ProfilesPage extends GenericPage
$this->filter = ['query' => 1];
$this->filter = ['query' => 1, 'fi' => []];
Lang::sort('game', 'cl');
@@ -121,12 +121,12 @@ class ProfilesPage extends GenericPage
{
$classMask = 1 << ($this->character['classs'] - 1);
$distrib = DB::Aowow()->selectCol('SELECT COUNT(t.id) FROM dbc_talent t JOIN dbc_talenttab tt ON t.tabId = tt.id WHERE tt.classMask & ?d GROUP BY tt.id ORDER BY tt.tabNumber ASC', $classMask);
$result = [];
$result = [0, 0, 0];
$start = 0;
foreach ($distrib as $len)
foreach ($distrib as $idx => $len)
{
$result[] = array_sum(str_split(substr($tString, $start, $len)));
$result[$idx] = array_sum(str_split(substr($tString, $start, $len)));
$start += $len;
}

View File

@@ -4,7 +4,6 @@ if (!defined('AOWOW_REVISION'))
die('illegal access');
// exclude & weightscales are handled as Ajax
class UserPage extends GenericPage
{
protected $tpl = 'user';
@@ -28,10 +27,13 @@ class UserPage extends GenericPage
$this->notFound(sprintf(Lang::user('notFound'), $pageParam));
}
else if (User::$id)
{
header('Location: ?user='.User::$displayName, true, 302);
die();
}
else
$this->forwardToSignIn('user');
}
}
protected function generateContent()
{