From ceca2e9ba17daeae3e6144cf673a27b58a235cf9 Mon Sep 17 00:00:00 2001 From: PayBas Date: Tue, 15 Apr 2014 17:17:47 +0200 Subject: [PATCH 1/4] [ticket/12411] Expand vars of event: core.search_modify_tpl_ary PHPBB3-12411 --- phpBB/search.php | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/phpBB/search.php b/phpBB/search.php index dfb53c6896..2b616c40fa 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -1002,11 +1002,43 @@ if ($keywords || $author || $author_id || $search_id || $submit) * Modify the topic data before it is assigned to the template * * @event core.search_modify_tpl_ary - * @var array row Array with topic data - * @var array tpl_ary Template block array with topic data + * @var array row Array with topic data + * @var array tpl_ary Template block array with topic data + * @var string show_results Display topics or posts + * @var string topic_title Cleaned topic title + * @var int replies The number of topic replies + * @var string view_topic_url The URL to the topic + * @var string folder_img The folder image of the topic + * @var string folder_alt The alt attribute of the topic folder img + * @var int topic_type The topic type + * @var int unread_topic Whether the topic has unread posts + * @var int topic_unapproved Whether the topic is unapproved + * @var int posts_unapproved The number of unapproved posts + * @var int topic_deleted Whether the topic has been deleted + * @var string u_mcp_queue The URL to the corresponding MCP queue page + * @var array zebra The zebra data of the current user + * @var array attachments All the attachments of the search results * @since 3.1.0-a1 + * @changed 3.1.0-b3 Added many vars */ - $vars = array('row', 'tpl_ary'); + $vars = array( + 'row', + 'tpl_ary', + 'show_results', + 'topic_title', + 'replies', + 'view_topic_url', + 'folder_img', + 'folder_alt', + 'topic_type', + 'unread_topic', + 'topic_unapproved', + 'posts_unapproved', + 'topic_deleted', + 'u_mcp_queue', + 'zebra', + 'attachments' + ); extract($phpbb_dispatcher->trigger_event('core.search_modify_tpl_ary', compact($vars))); $template->assign_block_vars('searchresults', $tpl_ary); From 598d1ecda853702225429432c0dec3faa3f5ad82 Mon Sep 17 00:00:00 2001 From: PayBas Date: Sat, 19 Apr 2014 12:24:08 +0200 Subject: [PATCH 2/4] [ticket/12411] Corrected event vars description PHPBB3-12411 --- phpBB/search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/search.php b/phpBB/search.php index 2b616c40fa..b9454ea792 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -1012,9 +1012,9 @@ if ($keywords || $author || $author_id || $search_id || $submit) * @var string folder_alt The alt attribute of the topic folder img * @var int topic_type The topic type * @var int unread_topic Whether the topic has unread posts - * @var int topic_unapproved Whether the topic is unapproved + * @var bool topic_unapproved Whether the topic is unapproved * @var int posts_unapproved The number of unapproved posts - * @var int topic_deleted Whether the topic has been deleted + * @var bool topic_deleted Whether the topic has been deleted * @var string u_mcp_queue The URL to the corresponding MCP queue page * @var array zebra The zebra data of the current user * @var array attachments All the attachments of the search results From 91ab67d1d951eca41f45c9f702c7fd32651b8965 Mon Sep 17 00:00:00 2001 From: PayBas Date: Sat, 19 Apr 2014 16:40:49 +0200 Subject: [PATCH 3/4] [ticket/12411] Missed on bool var sloppy PHPBB3-12411 --- phpBB/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/search.php b/phpBB/search.php index b9454ea792..fe7544d6d3 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -1011,7 +1011,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) * @var string folder_img The folder image of the topic * @var string folder_alt The alt attribute of the topic folder img * @var int topic_type The topic type - * @var int unread_topic Whether the topic has unread posts + * @var bool unread_topic Whether the topic has unread posts * @var bool topic_unapproved Whether the topic is unapproved * @var int posts_unapproved The number of unapproved posts * @var bool topic_deleted Whether the topic has been deleted From 67c26623ed54e94acb1047021359f17856c098b4 Mon Sep 17 00:00:00 2001 From: PayBas Date: Fri, 2 May 2014 16:05:52 +0200 Subject: [PATCH 4/4] [ticket/12411] Improved change documentation PHPBB3-12411 --- phpBB/search.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpBB/search.php b/phpBB/search.php index fe7544d6d3..1c7c970d9f 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -1019,7 +1019,10 @@ if ($keywords || $author || $author_id || $search_id || $submit) * @var array zebra The zebra data of the current user * @var array attachments All the attachments of the search results * @since 3.1.0-a1 - * @changed 3.1.0-b3 Added many vars + * @changed 3.1.0-b3 Added vars show_results, topic_title, replies, + * view_topic_url, folder_img, folder_alt, topic_type, unread_topic, + * topic_unapproved, posts_unapproved, topic_deleted, u_mcp_queue, + * zebra, attachments */ $vars = array( 'row', @@ -1037,7 +1040,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) 'topic_deleted', 'u_mcp_queue', 'zebra', - 'attachments' + 'attachments', ); extract($phpbb_dispatcher->trigger_event('core.search_modify_tpl_ary', compact($vars)));