mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Fixup
* access class property in screenshot/comment-admin by function. Aowow is compatible with PHP 5.5 again * changed line-endings across the board from \r\n to \n
This commit is contained in:
@@ -172,7 +172,7 @@ class AjaxAdmin extends AjaxHandler
|
|||||||
DB::Aowow()->query('UPDATE ?_screenshots SET status = ?d, userIdApprove = ?d WHERE id = ?d', CC_FLAG_APPROVED, User::$id, $id);
|
DB::Aowow()->query('UPDATE ?_screenshots SET status = ?d, userIdApprove = ?d WHERE id = ?d', CC_FLAG_APPROVED, User::$id, $id);
|
||||||
Util::gainSiteReputation($_['userIdOwner'], SITEREP_ACTION_UPLOAD, ['id' => $id, 'what' => 1, 'date' => $_['date']]);
|
Util::gainSiteReputation($_['userIdOwner'], SITEREP_ACTION_UPLOAD, ['id' => $id, 'what' => 1, 'date' => $_['date']]);
|
||||||
// flag DB entry as having screenshots
|
// flag DB entry as having screenshots
|
||||||
if (Util::$typeClasses[$_['type']] && ($tbl = (new Util::$typeClasses[$_['type']])::$dataTable))
|
if (Util::$typeClasses[$_['type']] && ($tbl = get_class_vars(Util::$typeClasses[$_['type'])['dataTable']))
|
||||||
DB::Aowow()->query('UPDATE '.$tbl.' SET cuFlags = cuFlags | ?d WHERE id = ?d', CUSTOM_HAS_SCREENSHOT, $_['typeId']);
|
DB::Aowow()->query('UPDATE '.$tbl.' SET cuFlags = cuFlags | ?d WHERE id = ?d', CUSTOM_HAS_SCREENSHOT, $_['typeId']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,7 +247,7 @@ class AjaxAdmin extends AjaxHandler
|
|||||||
{
|
{
|
||||||
$typeIds = explode(',', $typeIds);
|
$typeIds = explode(',', $typeIds);
|
||||||
$toUnflag = DB::Aowow()->selectCol('SELECT typeId AS ARRAY_KEY, IF(BIT_OR(`status`) & ?d, 1, 0) AS hasMore FROM ?_screenshots WHERE `type` = ?d AND typeId IN (?a) GROUP BY typeId HAVING hasMore = 0', CC_FLAG_APPROVED, $type, $typeIds);
|
$toUnflag = DB::Aowow()->selectCol('SELECT typeId AS ARRAY_KEY, IF(BIT_OR(`status`) & ?d, 1, 0) AS hasMore FROM ?_screenshots WHERE `type` = ?d AND typeId IN (?a) GROUP BY typeId HAVING hasMore = 0', CC_FLAG_APPROVED, $type, $typeIds);
|
||||||
if ($toUnflag && Util::$typeClasses[$type] && ($tbl = (new Util::$typeClasses[$type](null))::$dataTable))
|
if ($toUnflag && Util::$typeClasses[$type] && ($tbl = get_class_vars(Util::$typeClasses[$type])['dataTable']))
|
||||||
DB::Aowow()->query('UPDATE '.$tbl.' SET cuFlags = cuFlags & ~?d WHERE id IN (?a)', CUSTOM_HAS_SCREENSHOT, array_keys($toUnflag));
|
DB::Aowow()->query('UPDATE '.$tbl.' SET cuFlags = cuFlags & ~?d WHERE id IN (?a)', CUSTOM_HAS_SCREENSHOT, array_keys($toUnflag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class AjaxComment extends AjaxHandler
|
|||||||
DB::Aowow()->query('INSERT INTO ?_comments_rates (commentId, userId, value) VALUES (?d, 0, 1)', $postIdx);
|
DB::Aowow()->query('INSERT INTO ?_comments_rates (commentId, userId, value) VALUES (?d, 0, 1)', $postIdx);
|
||||||
|
|
||||||
// flag target with hasComment
|
// flag target with hasComment
|
||||||
if (Util::$typeClasses[$this->_get['type']] && ($tbl = (new Util::$typeClasses[$this->_get['type']](null))::$dataTable))
|
if (Util::$typeClasses[$this->_get['type']] && ($tbl = get_class_vars(Util::$typeClasses[$this->_get['type'])['dataTable']))
|
||||||
DB::Aowow()->query('UPDATE '.$tbl.' SET cuFlags = cuFlags | ?d WHERE id = ?d', CUSTOM_HAS_COMMENT, $this->_get['typeid']);
|
DB::Aowow()->query('UPDATE '.$tbl.' SET cuFlags = cuFlags | ?d WHERE id = ?d', CUSTOM_HAS_COMMENT, $this->_get['typeid']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ class AjaxComment extends AjaxHandler
|
|||||||
$this->_post['id']
|
$this->_post['id']
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!$coInfo['hasMore'] && Util::$typeClasses[$coInfo['type']] && ($tbl = (new Util::$typeClasses[$coInfo['type']](null))::$dataTable))
|
if (!$coInfo['hasMore'] && Util::$typeClasses[$coInfo['type']] && ($tbl = get_class_vars(Util::$typeClasses[$coInfo['type'])['dataTable']))
|
||||||
DB::Aowow()->query('UPDATE '.$tbl.' SET cuFlags = cuFlags & ~?d WHERE id = ?d', CUSTOM_HAS_COMMENT, $coInfo['typeId']);
|
DB::Aowow()->query('UPDATE '.$tbl.' SET cuFlags = cuFlags & ~?d WHERE id = ?d', CUSTOM_HAS_COMMENT, $coInfo['typeId']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -172,7 +172,7 @@ class AjaxComment extends AjaxHandler
|
|||||||
if ($ok)
|
if ($ok)
|
||||||
{
|
{
|
||||||
$coInfo = DB::Aowow()->selectRow('SELECT type, typeId FROM ?_comments WHERE id = ?d', $this->_post['id']);
|
$coInfo = DB::Aowow()->selectRow('SELECT type, typeId FROM ?_comments WHERE id = ?d', $this->_post['id']);
|
||||||
if (Util::$typeClasses[$coInfo['type']] && ($tbl = (new Util::$typeClasses[$coInfo['type']](null))::$dataTable))
|
if (Util::$typeClasses[$coInfo['type']] && ($tbl = (new get_class_vars(Util::$typeClasses[$coInfo['type'])['dataTable']))
|
||||||
DB::Aowow()->query('UPDATE '.$tbl.' SET cuFlags = cuFlags | ?d WHERE id = ?d', CUSTOM_HAS_COMMENT, $coInfo['typeId']);
|
DB::Aowow()->query('UPDATE '.$tbl.' SET cuFlags = cuFlags | ?d WHERE id = ?d', CUSTOM_HAS_COMMENT, $coInfo['typeId']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
var _ = function(family)
|
var _ = function(family)
|
||||||
{
|
{
|
||||||
family.foodCount = 0;
|
family.foodCount = 0;
|
||||||
for (var food in g_pet_foods)
|
for (var food in g_pet_foods)
|
||||||
{
|
{
|
||||||
if( family.diet & food)
|
if( family.diet & food)
|
||||||
family.foodCount++;
|
family.foodCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
family.spellCount = 0;
|
family.spellCount = 0;
|
||||||
|
|
||||||
for (var i = 0, len = family.spells.length; i < len; ++i)
|
for (var i = 0, len = family.spells.length; i < len; ++i)
|
||||||
{
|
{
|
||||||
if (family.spells[i])
|
if (family.spells[i])
|
||||||
family.spellCount++;
|
family.spellCount++;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
g_initPath({$page.path}, {if empty($filter.query)} 0 {else} 1 {/if}); _// activeTab: 1, breadcrumb: [1,5,2,'eu','blackout','dragonblight']});
|
g_initPath({$page.path}, {if empty($filter.query)} 0 {else} 1 {/if}); _// activeTab: 1, breadcrumb: [1,5,2,'eu','blackout','dragonblight']});
|
||||||
{if isset($filter.query)}Menu.append(mn_database[1], '&filter={$filter.query|escape:'quotes'}'); // todo: menu order varies per locale{/if}
|
{if isset($filter.query)}Menu.append(mn_database[1], '&filter={$filter.query|escape:'quotes'}'); // todo: menu order varies per locale{/if}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="fi">
|
<div id="fi">
|
||||||
<form action="/web/20120205222627/http://www.wowhead.com/filter=guilds" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
<form action="/web/20120205222627/http://www.wowhead.com/filter=guilds" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
||||||
|
|||||||
Reference in New Issue
Block a user