diff options
-rw-r--r-- | phpBB/phpbb/avatar/driver/gravatar.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/avatar/driver/remote.php | 4 | ||||
-rw-r--r-- | phpBB/viewforum.php | 32 |
3 files changed, 33 insertions, 7 deletions
diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php index bb4977c30c..7a43b55852 100644 --- a/phpBB/phpbb/avatar/driver/gravatar.php +++ b/phpBB/phpbb/avatar/driver/gravatar.php @@ -52,8 +52,8 @@ class gravatar extends \phpbb\avatar\driver\driver public function prepare_form($request, $template, $user, $row, &$error) { $template->assign_vars(array( - 'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', 0), - 'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_gravatar_width', 0), + 'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', ''), + 'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_gravatar_width', ''), 'AVATAR_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '', )); diff --git a/phpBB/phpbb/avatar/driver/remote.php b/phpBB/phpbb/avatar/driver/remote.php index 4b0ee3f06f..bec54897b2 100644 --- a/phpBB/phpbb/avatar/driver/remote.php +++ b/phpBB/phpbb/avatar/driver/remote.php @@ -36,8 +36,8 @@ class remote extends \phpbb\avatar\driver\driver public function prepare_form($request, $template, $user, $row, &$error) { $template->assign_vars(array( - 'AVATAR_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_remote_width', 0), - 'AVATAR_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_remote_width', 0), + 'AVATAR_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_remote_width', ''), + 'AVATAR_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_remote_width', ''), 'AVATAR_REMOTE_URL' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar']) ? $row['avatar'] : '', )); diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index ccf9c3cd5c..e0cc9ba512 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -492,6 +492,28 @@ if ($forum_data['forum_type'] == FORUM_POST) 'ORDER_BY' => 't.topic_time DESC', ); + + /** + * Event to modify the SQL query before the announcement topic ids data is retrieved + * + * @event core.viewforum_get_announcement_topic_ids_data + * @var array forum_data Data about the forum + * @var array g_forum_ary Global announcement forums array + * @var array sql_anounce_array SQL announcement array + * @var array sql_ary SQL query array to get the announcement topic ids data + * @var int forum_id The forum ID + * + * @since 3.1.10-RC1 + */ + $vars = array( + 'forum_data', + 'g_forum_ary', + 'sql_anounce_array', + 'sql_ary', + 'forum_id', + ); + extract($phpbb_dispatcher->trigger_event('core.viewforum_get_announcement_topic_ids_data', compact($vars))); + $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); @@ -917,11 +939,15 @@ if (sizeof($topic_list)) * Modify the topic data before it is assigned to the template * * @event core.viewforum_modify_topicrow - * @var array row Array with topic data - * @var array topic_row Template array with topic data + * @var array row Array with topic data + * @var array topic_row Template array with topic data + * @var bool s_type_switch Flag indicating if the topic type is [global] announcement + * @var bool s_type_switch_test Flag indicating if the test topic type is [global] announcement * @since 3.1.0-a1 + * + * @changed 3.1.10-RC1 Added s_type_switch, s_type_switch_test */ - $vars = array('row', 'topic_row'); + $vars = array('row', 'topic_row', 's_type_switch', 's_type_switch_test'); extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_topicrow', compact($vars))); $template->assign_block_vars('topicrow', $topic_row); |