Line 38 | Line 38 |
---|
/** @var \phpbb\auth\auth */ protected $auth;
|
/** @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;
| /** @var string */ protected $phpEx;
|
Line 66 | Line 72 |
---|
* Separator for the statistics row (Posted by, post date, replies, etc.) */ var $separator_stats = "\xE2\x80\x94"; // —
|
* Separator for the statistics row (Posted by, post date, replies, etc.) */ var $separator_stats = "\xE2\x80\x94"; // —
|
| /** @var mixed Query result handle */ protected $result;
|
/** * Constructor
| /** * Constructor
|
Line 76 | Line 85 |
---|
* @param \phpbb\cache\driver\driver_interface $cache Cache object * @param \phpbb\user $user User object * @param \phpbb\auth\auth $auth Auth object
|
* @param \phpbb\cache\driver\driver_interface $cache Cache object * @param \phpbb\user $user User object * @param \phpbb\auth\auth $auth Auth object
|
* @param \phpbb\content_visibility $content_visibility Auth object
| * @param \phpbb\content_visibility $content_visibility Content visibility object * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object
|
* @param string $phpEx php file extension */
|
* @param string $phpEx php file extension */
|
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)
| 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;
| { $this->config = $config; $this->helper = $helper;
|
Line 88 | Line 108 |
---|
$this->user = $user; $this->auth = $auth; $this->content_visibility = $content_visibility;
|
$this->user = $user; $this->auth = $auth; $this->content_visibility = $content_visibility;
|
| $this->phpbb_dispatcher = $phpbb_dispatcher;
|
$this->phpEx = $phpEx;
$this->set_keys();
| $this->phpEx = $phpEx;
$this->set_keys();
|
Line 229 | Line 250 |
---|
function get_item() {
|
function get_item() {
|
static $result;
if (!isset($result))
| if (!isset($this->result))
|
{ if (!$this->get_sql()) { return false; }
|
{ if (!$this->get_sql()) { 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);
|
// Query database $sql = $this->db->sql_build_query('SELECT', $this->sql);
|
$result = $this->db->sql_query_limit($sql, $this->num_items);
| $this->result = $this->db->sql_query_limit($sql, $this->num_items);
|
}
|
}
|
return $this->db->sql_fetchrow($result);
| return $this->db->sql_fetchrow($this->result);
|
}
function user_viewprofile($row)
| }
function user_viewprofile($row)
|