Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14685

PHP event for altering announcements sql

    XMLWordPrintable

Details

    • Improvement
    • Status: Unverified Fix (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.1.9
    • 3.1.10-RC1
    • None

    Description

      We already have an event for normal topics in view forum (core.viewforum_get_topic_ids_data), however I've run into an issue where I need one for announcements.

      	$sql_ary = array(
      		'SELECT'	=> $sql_anounce_array['SELECT'],
      		'FROM'		=> $sql_array['FROM'],
      		'LEFT_JOIN'	=> $sql_anounce_array['LEFT_JOIN'],
       
      		'WHERE'		=> '(t.forum_id = ' . $forum_id . '
      				AND t.topic_type = ' . POST_ANNOUNCE . ') OR
      			(' . $db->sql_in_set('t.forum_id', $g_forum_ary) . '
      				AND t.topic_type = ' . POST_GLOBAL . ')',
       
      		'ORDER_BY'	=> 't.topic_time DESC',
      	);
      

      I'll be writing a PR soon.

      Attachments

        Activity

          People

            Marc Marc
            kinerity Kailey Truscott [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: