diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2016-07-17 22:09:53 +0200 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2016-07-17 22:09:53 +0200 |
| commit | e7ce7ecbe79b036a9cf7dab9ea343efd0d47e1a7 (patch) | |
| tree | f2167925ff269870b6a3b3dc00b79e881a3dafbb /phpBB/phpbb/feed/base.php | |
| parent | 4e480d46f50efad546e3515e52457f2ee0efad35 (diff) | |
| parent | befacabf7e105ff81b2b5c0c2361aa1e32ed5b84 (diff) | |
| download | forums-e7ce7ecbe79b036a9cf7dab9ea343efd0d47e1a7.tar forums-e7ce7ecbe79b036a9cf7dab9ea343efd0d47e1a7.tar.gz forums-e7ce7ecbe79b036a9cf7dab9ea343efd0d47e1a7.tar.bz2 forums-e7ce7ecbe79b036a9cf7dab9ea343efd0d47e1a7.tar.xz forums-e7ce7ecbe79b036a9cf7dab9ea343efd0d47e1a7.zip | |
Merge branch '3.1.x' into 3.2.x
Conflicts:
phpBB/config/feed.yml
phpBB/feed.php
phpBB/phpbb/feed/base.php
Diffstat (limited to 'phpBB/phpbb/feed/base.php')
| -rw-r--r-- | phpBB/phpbb/feed/base.php | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/phpBB/phpbb/feed/base.php b/phpBB/phpbb/feed/base.php index 188d229515..d4be0dc592 100644 --- a/phpBB/phpbb/feed/base.php +++ b/phpBB/phpbb/feed/base.php @@ -39,6 +39,12 @@ abstract class base implements feed_interface /** @var \phpbb\auth\auth */ protected $auth; + /** @var \phpbb\content_visibility */ + protected $content_visibility; + + /** @var \phpbb\event\dispatcher_interface */ + protected $phpbb_dispatcher; + /** @var string */ protected $phpEx; @@ -80,9 +86,20 @@ abstract class base implements feed_interface * @param \phpbb\user $user User object * @param \phpbb\auth\auth $auth Auth object * @param \phpbb\content_visibility $content_visibility Auth object + * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object * @param string $phpEx php file extension */ - public function __construct(\phpbb\feed\helper $helper, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\content_visibility $content_visibility, $phpEx) + public function __construct( + \phpbb\feed\helper $helper, + \phpbb\config\config $config, + \phpbb\db\driver\driver_interface $db, + \phpbb\cache\driver\driver_interface $cache, + \phpbb\user $user, + \phpbb\auth\auth $auth, + \phpbb\content_visibility $content_visibility, + \phpbb\event\dispatcher_interface $phpbb_dispatcher, + $phpEx + ) { $this->config = $config; $this->helper = $helper; @@ -91,6 +108,7 @@ abstract class base implements feed_interface $this->user = $user; $this->auth = $auth; $this->content_visibility = $content_visibility; + $this->phpbb_dispatcher = $phpbb_dispatcher; $this->phpEx = $phpEx; $this->set_keys(); @@ -161,6 +179,21 @@ abstract class base implements feed_interface return false; } + $sql_ary = $this->sql; + + /** + * Event to modify the feed item sql + * + * @event core.feed_base_modify_item_sql + * @var array sql_ary The SQL array to get the feed item data + * + * @since 3.1.10-RC1 + */ + $vars = array('sql_ary'); + extract($this->phpbb_dispatcher->trigger_event('core.feed_base_modify_item_sql', compact($vars))); + $this->sql = $sql_ary; + unset($sql_ary); + // Query database $sql = $this->db->sql_build_query('SELECT', $this->sql); $this->result = $this->db->sql_query_limit($sql, $this->num_items); |
