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

Add event to modify search parameters before searching

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.1.2
    • 3.1.3-RC1
    • None
    • None

    Description

      An extension I'm creating needs to modify the ex_fid_ary variable before it is set in the SQL query. The core.search_get_posts_data and core.search_get_topic_data do not allow me to do this (see this topic -> https://www.phpbb.com/community/viewtopic.php?f=461&t=2279731). I'm proposing an event before pre-made searches are created (currently line 313 in search.php). I've included an event below - please add more parameters as see fit.

      /**
      * Event to modify the SQL parameters before being assigned to searches.
      *
      * @event core.search_modify_param_before
      * @var	array	ex_fid_ary		Array of excluded forum ids
      * @since 3.1.3
      */
      $vars = array(
          'ex_fid_ary',
      );
      extract($phpbb_dispatcher->trigger_event('core.search_modify_param_before', compact($vars)));

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: