mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 11:01:48 +02:00
[ticket/12612] Prefix get_*_data() with phpbb_ and delete unused global
PHPBB3-12612
This commit is contained in:
@@ -106,7 +106,7 @@ function phpbb_extra_url()
|
||||
/**
|
||||
* Get simple topic data
|
||||
*/
|
||||
function get_topic_data($topic_ids, $acl_list = false, $read_tracking = false)
|
||||
function phpbb_get_topic_data($topic_ids, $acl_list = false, $read_tracking = false)
|
||||
{
|
||||
global $auth, $db, $config, $user;
|
||||
static $rowset = array();
|
||||
@@ -195,7 +195,7 @@ function get_topic_data($topic_ids, $acl_list = false, $read_tracking = false)
|
||||
/**
|
||||
* Get simple post data
|
||||
*/
|
||||
function get_post_data($post_ids, $acl_list = false, $read_tracking = false)
|
||||
function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = false)
|
||||
{
|
||||
global $db, $auth, $config, $user;
|
||||
|
||||
@@ -269,7 +269,7 @@ function get_post_data($post_ids, $acl_list = false, $read_tracking = false)
|
||||
/**
|
||||
* Get simple forum data
|
||||
*/
|
||||
function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false)
|
||||
function phpbb_get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false)
|
||||
{
|
||||
global $auth, $db, $user, $config, $phpbb_container;
|
||||
|
||||
@@ -322,9 +322,9 @@ function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false)
|
||||
/**
|
||||
* Get simple pm data
|
||||
*/
|
||||
function get_pm_data($pm_ids)
|
||||
function phpbb_get_pm_data($pm_ids)
|
||||
{
|
||||
global $db, $auth, $config, $user;
|
||||
global $db;
|
||||
|
||||
$rowset = array();
|
||||
|
||||
|
@@ -185,7 +185,7 @@ class mcp_ban
|
||||
}
|
||||
else if ($post_id)
|
||||
{
|
||||
$post_info = get_post_data($post_id, 'm_ban');
|
||||
$post_info = phpbb_get_post_data($post_id, 'm_ban');
|
||||
|
||||
if (sizeof($post_info) && !empty($post_info[$post_id]))
|
||||
{
|
||||
|
@@ -380,7 +380,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
|
||||
$sync_topics = array_merge($topic_ids, array($to_topic_id));
|
||||
|
||||
$topic_data = get_topic_data($sync_topics, 'm_merge');
|
||||
$topic_data = phpbb_get_topic_data($sync_topics, 'm_merge');
|
||||
|
||||
if (!sizeof($topic_data) || empty($topic_data[$to_topic_id]))
|
||||
{
|
||||
|
@@ -187,7 +187,7 @@ class mcp_main
|
||||
|
||||
$forum_id = request_var('f', 0);
|
||||
|
||||
$forum_info = get_forum_data($forum_id, 'm_', true);
|
||||
$forum_info = phpbb_get_forum_data($forum_id, 'm_', true);
|
||||
|
||||
if (!sizeof($forum_info))
|
||||
{
|
||||
@@ -286,7 +286,7 @@ function lock_unlock($action, $ids)
|
||||
WHERE ' . $db->sql_in_set($sql_id, $ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
$data = ($action == 'lock' || $action == 'unlock') ? get_topic_data($ids) : get_post_data($ids);
|
||||
$data = ($action == 'lock' || $action == 'unlock') ? phpbb_get_topic_data($ids) : phpbb_get_post_data($ids);
|
||||
|
||||
foreach ($data as $id => $row)
|
||||
{
|
||||
@@ -388,7 +388,7 @@ function change_topic_type($action, $topic_ids)
|
||||
|
||||
if (sizeof($topic_ids))
|
||||
{
|
||||
$data = get_topic_data($topic_ids);
|
||||
$data = phpbb_get_topic_data($topic_ids);
|
||||
|
||||
foreach ($data as $topic_id => $row)
|
||||
{
|
||||
@@ -442,7 +442,7 @@ function mcp_move_topic($topic_ids)
|
||||
|
||||
if ($to_forum_id)
|
||||
{
|
||||
$forum_data = get_forum_data($to_forum_id, 'f_post');
|
||||
$forum_data = phpbb_get_forum_data($to_forum_id, 'f_post');
|
||||
|
||||
if (!sizeof($forum_data))
|
||||
{
|
||||
@@ -479,7 +479,7 @@ function mcp_move_topic($topic_ids)
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$topic_data = get_topic_data($topic_ids);
|
||||
$topic_data = phpbb_get_topic_data($topic_ids);
|
||||
$leave_shadow = (isset($_POST['move_leave_shadow'])) ? true : false;
|
||||
|
||||
$forum_sync_data = array();
|
||||
@@ -697,7 +697,7 @@ function mcp_restore_topic($topic_ids)
|
||||
{
|
||||
$success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_RESTORED_SUCCESS' : 'TOPICS_RESTORED_SUCCESS';
|
||||
|
||||
$data = get_topic_data($topic_ids);
|
||||
$data = phpbb_get_topic_data($topic_ids);
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
foreach ($data as $topic_id => $row)
|
||||
@@ -770,7 +770,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
|
||||
{
|
||||
$success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_DELETED_SUCCESS' : 'TOPICS_DELETED_SUCCESS';
|
||||
|
||||
$data = get_topic_data($topic_ids);
|
||||
$data = phpbb_get_topic_data($topic_ids);
|
||||
|
||||
foreach ($data as $topic_id => $row)
|
||||
{
|
||||
@@ -896,7 +896,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
|
||||
if (confirm_box(true) && $is_soft)
|
||||
{
|
||||
$post_info = get_post_data($post_ids);
|
||||
$post_info = phpbb_get_post_data($post_ids);
|
||||
|
||||
$topic_info = $approve_log = array();
|
||||
|
||||
@@ -984,7 +984,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
$affected_topics = sizeof($topic_id_list);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$post_data = get_post_data($post_ids);
|
||||
$post_data = phpbb_get_post_data($post_ids);
|
||||
|
||||
foreach ($post_data as $id => $row)
|
||||
{
|
||||
@@ -1124,7 +1124,7 @@ function mcp_fork_topic($topic_ids)
|
||||
|
||||
if ($to_forum_id)
|
||||
{
|
||||
$forum_data = get_forum_data($to_forum_id, 'f_post');
|
||||
$forum_data = phpbb_get_forum_data($to_forum_id, 'f_post');
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
@@ -1161,7 +1161,7 @@ function mcp_fork_topic($topic_ids)
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$topic_data = get_topic_data($topic_ids, 'f_post');
|
||||
$topic_data = phpbb_get_topic_data($topic_ids, 'f_post');
|
||||
|
||||
$total_topics = $total_topics_unapproved = $total_topics_softdeleted = 0;
|
||||
$total_posts = $total_posts_unapproved = $total_posts_softdeleted = 0;
|
||||
|
@@ -100,7 +100,7 @@ class mcp_pm_reports
|
||||
$pm_id = $report['pm_id'];
|
||||
$report_id = $report['report_id'];
|
||||
|
||||
$pm_info = get_pm_data(array($pm_id));
|
||||
$pm_info = phpbb_get_pm_data(array($pm_id));
|
||||
|
||||
if (!sizeof($pm_info))
|
||||
{
|
||||
|
@@ -33,7 +33,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
$start = request_var('start', 0);
|
||||
|
||||
// Get post data
|
||||
$post_info = get_post_data(array($post_id), false, true);
|
||||
$post_info = phpbb_get_post_data(array($post_id), false, true);
|
||||
|
||||
add_form_key('mcp_post_details');
|
||||
|
||||
@@ -508,7 +508,7 @@ function change_poster(&$post_info, $userdata)
|
||||
$to_username = $userdata['username'];
|
||||
|
||||
// Renew post info
|
||||
$post_info = get_post_data(array($post_id), false, true);
|
||||
$post_info = phpbb_get_post_data(array($post_id), false, true);
|
||||
|
||||
if (!sizeof($post_info))
|
||||
{
|
||||
|
@@ -159,7 +159,7 @@ class mcp_queue
|
||||
|
||||
if ($topic_id)
|
||||
{
|
||||
$topic_info = get_topic_data(array($topic_id), 'm_approve');
|
||||
$topic_info = phpbb_get_topic_data(array($topic_id), 'm_approve');
|
||||
if (isset($topic_info[$topic_id]['topic_first_post_id']))
|
||||
{
|
||||
$post_id = (int) $topic_info[$topic_id]['topic_first_post_id'];
|
||||
@@ -174,7 +174,7 @@ class mcp_queue
|
||||
|
||||
$phpbb_notifications->mark_notifications_read('post_in_queue', $post_id, $user->data['user_id']);
|
||||
|
||||
$post_info = get_post_data(array($post_id), 'm_approve', true);
|
||||
$post_info = phpbb_get_post_data(array($post_id), 'm_approve', true);
|
||||
|
||||
if (!sizeof($post_info))
|
||||
{
|
||||
@@ -343,7 +343,7 @@ class mcp_queue
|
||||
|
||||
if ($topic_id)
|
||||
{
|
||||
$topic_info = get_topic_data(array($topic_id));
|
||||
$topic_info = phpbb_get_topic_data(array($topic_id));
|
||||
|
||||
if (!sizeof($topic_info))
|
||||
{
|
||||
@@ -389,7 +389,7 @@ class mcp_queue
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_info = get_forum_data(array($forum_id), $m_perm);
|
||||
$forum_info = phpbb_get_forum_data(array($forum_id), $m_perm);
|
||||
|
||||
if (!sizeof($forum_info))
|
||||
{
|
||||
@@ -591,7 +591,7 @@ class mcp_queue
|
||||
'redirect' => $redirect,
|
||||
));
|
||||
|
||||
$post_info = get_post_data($post_id_list, 'm_approve');
|
||||
$post_info = phpbb_get_post_data($post_id_list, 'm_approve');
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
@@ -813,7 +813,7 @@ class mcp_queue
|
||||
'redirect' => $redirect,
|
||||
));
|
||||
|
||||
$topic_info = get_topic_data($topic_id_list, 'm_approve');
|
||||
$topic_info = phpbb_get_topic_data($topic_id_list, 'm_approve');
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
@@ -1016,7 +1016,7 @@ class mcp_queue
|
||||
}
|
||||
}
|
||||
|
||||
$post_info = get_post_data($post_id_list, 'm_approve');
|
||||
$post_info = phpbb_get_post_data($post_id_list, 'm_approve');
|
||||
|
||||
$is_disapproving = false;
|
||||
foreach ($post_info as $post_id => $post_data)
|
||||
|
@@ -106,7 +106,7 @@ class mcp_reports
|
||||
$parse_post_flags += $report['reported_post_enable_smilies'] ? OPTION_FLAG_SMILIES : 0;
|
||||
$parse_post_flags += $report['reported_post_enable_magic_url'] ? OPTION_FLAG_LINKS : 0;
|
||||
|
||||
$post_info = get_post_data(array($post_id), 'm_report', true);
|
||||
$post_info = phpbb_get_post_data(array($post_id), 'm_report', true);
|
||||
|
||||
if (!sizeof($post_info))
|
||||
{
|
||||
@@ -269,7 +269,7 @@ class mcp_reports
|
||||
|
||||
if ($topic_id)
|
||||
{
|
||||
$topic_info = get_topic_data(array($topic_id));
|
||||
$topic_info = phpbb_get_topic_data(array($topic_id));
|
||||
|
||||
if (!sizeof($topic_info))
|
||||
{
|
||||
@@ -312,7 +312,7 @@ class mcp_reports
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_info = get_forum_data(array($forum_id), 'm_report');
|
||||
$forum_info = phpbb_get_forum_data(array($forum_id), 'm_report');
|
||||
|
||||
if (!sizeof($forum_info))
|
||||
{
|
||||
@@ -515,7 +515,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$post_info = ($pm) ? get_pm_data($post_id_list) : get_post_data($post_id_list, 'm_report');
|
||||
$post_info = ($pm) ? phpbb_get_pm_data($post_id_list) : phpbb_get_post_data($post_id_list, 'm_report');
|
||||
|
||||
$sql = "SELECT r.report_id, r.$id_column, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type
|
||||
FROM " . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u
|
||||
|
@@ -33,7 +33,7 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
$topic_id = request_var('t', 0);
|
||||
$topic_info = get_topic_data(array($topic_id), false, true);
|
||||
$topic_info = phpbb_get_topic_data(array($topic_id), false, true);
|
||||
|
||||
if (!sizeof($topic_info))
|
||||
{
|
||||
@@ -278,7 +278,7 @@ function mcp_topic_view($id, $mode, $action)
|
||||
// Has the user selected a topic for merge?
|
||||
if ($to_topic_id)
|
||||
{
|
||||
$to_topic_info = get_topic_data(array($to_topic_id), 'm_merge');
|
||||
$to_topic_info = phpbb_get_topic_data(array($to_topic_id), 'm_merge');
|
||||
|
||||
if (!sizeof($to_topic_info))
|
||||
{
|
||||
@@ -374,7 +374,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
}
|
||||
|
||||
$post_id = $post_id_list[0];
|
||||
$post_info = get_post_data(array($post_id));
|
||||
$post_info = phpbb_get_post_data(array($post_id));
|
||||
|
||||
if (!sizeof($post_info))
|
||||
{
|
||||
@@ -398,7 +398,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
return;
|
||||
}
|
||||
|
||||
$forum_info = get_forum_data(array($to_forum_id), 'f_post');
|
||||
$forum_info = phpbb_get_forum_data(array($to_forum_id), 'f_post');
|
||||
|
||||
if (!sizeof($forum_info))
|
||||
{
|
||||
@@ -505,7 +505,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
$to_topic_id = $db->sql_nextid();
|
||||
move_posts($post_id_list, $to_topic_id);
|
||||
|
||||
$topic_info = get_topic_data(array($topic_id));
|
||||
$topic_info = phpbb_get_topic_data(array($topic_id));
|
||||
$topic_info = $topic_info[$topic_id];
|
||||
|
||||
add_log('mod', $to_forum_id, $to_topic_id, 'LOG_SPLIT_DESTINATION', $subject);
|
||||
@@ -594,7 +594,7 @@ function merge_posts($topic_id, $to_topic_id)
|
||||
|
||||
$sync_topics = array($topic_id, $to_topic_id);
|
||||
|
||||
$topic_data = get_topic_data($sync_topics, 'm_merge');
|
||||
$topic_data = phpbb_get_topic_data($sync_topics, 'm_merge');
|
||||
|
||||
if (!sizeof($topic_data) || empty($topic_data[$to_topic_id]))
|
||||
{
|
||||
|
@@ -118,7 +118,7 @@ if (!$auth->acl_getf_global('m_'))
|
||||
$allow_user = false;
|
||||
if ($quickmod && isset($user_quickmod_actions[$action]) && $user->data['is_registered'] && $auth->acl_gets($user_quickmod_actions[$action], $forum_id))
|
||||
{
|
||||
$topic_info = get_topic_data(array($topic_id));
|
||||
$topic_info = phpbb_get_topic_data(array($topic_id));
|
||||
if ($topic_info[$topic_id]['topic_poster'] == $user->data['user_id'])
|
||||
{
|
||||
$allow_user = true;
|
||||
|
Reference in New Issue
Block a user