diff options
| author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-04-16 21:30:52 +0200 |
|---|---|---|
| committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-04-16 21:30:52 +0200 |
| commit | c89384eb86c0d2ff89f9df69dbd14fb61cfcb624 (patch) | |
| tree | 98bac3192ed32ea6483c33a77aadc1c1f95200cf /phpBB/includes/functions_display.php | |
| parent | f077b72d0ddabd13350bea276069b68d5df4a89c (diff) | |
| parent | a089ff5eb0dcdab83c6c2e64cb0e7cb618aec41f (diff) | |
| download | forums-c89384eb86c0d2ff89f9df69dbd14fb61cfcb624.tar forums-c89384eb86c0d2ff89f9df69dbd14fb61cfcb624.tar.gz forums-c89384eb86c0d2ff89f9df69dbd14fb61cfcb624.tar.bz2 forums-c89384eb86c0d2ff89f9df69dbd14fb61cfcb624.tar.xz forums-c89384eb86c0d2ff89f9df69dbd14fb61cfcb624.zip | |
Merge pull request #3446 from MateBartus/ticket/13654
[ticket/13654] Moving reporting into controller
Diffstat (limited to 'phpBB/includes/functions_display.php')
| -rw-r--r-- | phpBB/includes/functions_display.php | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index a6c9c529d6..64d20924d9 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1097,33 +1097,14 @@ function display_custom_bbcodes() /** * Display reasons +* +* @deprecated 3.2.0-dev */ function display_reasons($reason_id = 0) { - global $db, $user, $template; - - $sql = 'SELECT * - FROM ' . REPORTS_REASONS_TABLE . ' - ORDER BY reason_order ASC'; - $result = $db->sql_query($sql); + global $phpbb_container; - while ($row = $db->sql_fetchrow($result)) - { - // If the reason is defined within the language file, we will use the localized version, else just use the database entry... - if (isset($user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])])) - { - $row['reason_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]; - $row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]; - } - - $template->assign_block_vars('reason', array( - 'ID' => $row['reason_id'], - 'TITLE' => $row['reason_title'], - 'DESCRIPTION' => $row['reason_description'], - 'S_SELECTED' => ($row['reason_id'] == $reason_id) ? true : false) - ); - } - $db->sql_freeresult($result); + $phpbb_container->get('phpbb.report.report_reason_list_provider')->display_reasons($reason_id); } /** |
