1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/14972] replace all occurrences of sizeof() with the count()

PHPBB3-14972
This commit is contained in:
rxu
2017-06-28 00:58:03 +07:00
committed by Marc Alexander
parent ff18802656
commit f8fbe37936
165 changed files with 983 additions and 983 deletions

View File

@@ -230,10 +230,10 @@ class ucp_main
$forums = array_keys($request->variable('f', array(0 => 0)));
$topics = array_keys($request->variable('t', array(0 => 0)));
if (sizeof($forums) || sizeof($topics))
if (count($forums) || count($topics))
{
$l_unwatch = '';
if (sizeof($forums))
if (count($forums))
{
$sql = 'DELETE FROM ' . FORUMS_WATCH_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forums) . '
@@ -243,7 +243,7 @@ class ucp_main
$l_unwatch .= '_FORUMS';
}
if (sizeof($topics))
if (count($topics))
{
$sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . '
WHERE ' . $db->sql_in_set('topic_id', $topics) . '
@@ -453,7 +453,7 @@ class ucp_main
$topics = (isset($_POST['t'])) ? array_keys($request->variable('t', array(0 => 0))) : array();
$url = $this->u_action;
if (!sizeof($topics))
if (!count($topics))
{
trigger_error('NO_BOOKMARKS_SELECTED');
}
@@ -508,7 +508,7 @@ class ucp_main
{
$drafts = array_keys($request->variable('d', array(0 => 0)));
if (sizeof($drafts))
if (count($drafts))
{
$sql = 'DELETE FROM ' . DRAFTS_TABLE . '
WHERE ' . $db->sql_in_set('draft_id', $drafts) . '
@@ -594,7 +594,7 @@ class ucp_main
}
$db->sql_freeresult($result);
if (sizeof($topic_ids))
if (count($topic_ids))
{
$sql = 'SELECT topic_id, forum_id, topic_title
FROM ' . TOPICS_TABLE . '