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:
@@ -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 . '
|
||||
|
Reference in New Issue
Block a user