mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Events
drop usage of holidayIds (as far as possible) the obvious change is, that all events are now refenreced by a positive eventId. (?event=375 will probably become ?event=5) Comments fixed malformed db-table. It can now hold negative typeIds. applying this commit will drop any comments related to events without holiday added gain of SiteReputation for comment-replies resyncing dependencies of 'game_event' is required
This commit is contained in:
@@ -634,27 +634,7 @@ class GenericPage
|
||||
|
||||
$this->initJSGlobal($type);
|
||||
|
||||
// todo (med): properly distinguish holidayId and eventId
|
||||
$cnd = [CFG_SQL_LIMIT_NONE];
|
||||
if ($type == TYPE_WORLDEVENT)
|
||||
{
|
||||
$hIds = array_filter($ids, function($v) { return $v > 0; });
|
||||
$eIds = array_filter($ids, function($v) { return $v < 0; });
|
||||
|
||||
if ($hIds)
|
||||
$cnd[] = ['holidayId', array_unique($hIds, SORT_NUMERIC)];
|
||||
|
||||
if ($eIds)
|
||||
{
|
||||
array_walk($eIds, function(&$v) { $v = abs($v);});
|
||||
$cnd[] = ['e.id', array_unique($eIds, SORT_NUMERIC)];
|
||||
}
|
||||
|
||||
if ($eIds && $hIds)
|
||||
$cnd[] = 'OR';
|
||||
}
|
||||
else
|
||||
$cnd [] = ['id', array_unique($ids, SORT_NUMERIC)];
|
||||
$cnd = [CFG_SQL_LIMIT_NONE, ['id', array_unique($ids, SORT_NUMERIC)]];
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user