Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-14685

PHP event for altering announcements sql

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.10-RC1
    • 3.1.9
    • None

      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.

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

              Created:
              Updated:
              Resolved: