diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 676f9456..3218b803 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -368,14 +368,14 @@ jobs: db: "mcr.microsoft.com/mssql/server:2017-latest" db_alias: 'MSSQL 2017' - php: '7.2' - db: "mcr.microsoft.com/mssql/server:2019-latest" + db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04" db_alias: 'MSSQL 2019' name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }} services: mssql: - image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-latest' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }} + image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }} env: SA_PASSWORD: "Pssw0rd_12" ACCEPT_EULA: "y" @@ -415,7 +415,7 @@ jobs: env: MATRIX_DB: ${{ matrix.db }} run: | - if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-latest' ] + if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] then db='mssql' else diff --git a/README.md b/README.md index d9cd8f3d..9b6dc8cc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The official Ideas Centre used at [phpBB.com](https://www.phpbb.com/ideas/). This phpBB extension lets phpBB.com community members propose and vote on ideas to improve and enhance phpBB software. -[](https://github.com/phpbb/ideas/actions) +[](https://github.com/phpbb/ideas/actions) [](https://scrutinizer-ci.com/g/phpbb/ideas/?branch=master) ## Contribute diff --git a/controller/base.php b/controller/base.php index 6c6b22c2..53f30077 100644 --- a/controller/base.php +++ b/controller/base.php @@ -13,7 +13,6 @@ use phpbb\auth\auth; use phpbb\config\config; use phpbb\controller\helper; -use phpbb\ideas\ext; use phpbb\ideas\factory\linkhelper; use phpbb\language\language; use phpbb\pagination; @@ -151,8 +150,6 @@ protected function display_common_vars() 'S_DISPLAY_SEARCHBOX' => $this->auth->acl_get('u_search') && $this->auth->acl_get('f_search', $this->config['ideas_forum_id']) && $this->config['load_search'], 'S_SEARCHBOX_ACTION' => append_sid("{$this->root_path}search.$this->php_ext"), 'S_SEARCH_IDEAS_HIDDEN_FIELDS' => build_hidden_fields(['fid' => [$this->config['ideas_forum_id']]]), - - 'U_SEARCH_MY_IDEAS' => $this->helper->route('phpbb_ideas_list_controller', ['sort' => ext::SORT_MYIDEAS, 'status' => '-1']), ]); } } diff --git a/event/listener.php b/event/listener.php index a275ed74..bfe94f0a 100644 --- a/event/listener.php +++ b/event/listener.php @@ -82,6 +82,7 @@ public function __construct(auth $auth, config $config, helper $helper, idea $id public static function getSubscribedEvents() { return array( + 'core.page_header' => 'global_template_vars', 'core.viewforum_get_topic_data' => 'ideas_forum_redirect', 'core.viewtopic_modify_post_row' => 'show_post_buttons', 'core.viewtopic_modify_page_title' => 'show_idea', @@ -93,6 +94,22 @@ public static function getSubscribedEvents() ); } + /** + * Assign global template variables + * + * @return void + */ + public function global_template_vars() + { + if ($this->user->data['is_registered'] && !$this->user->data['is_bot']) + { + $this->template->assign_var( + 'U_SEARCH_MY_IDEAS', + $this->helper->route('phpbb_ideas_list_controller', ['sort' => ext::SORT_MYIDEAS, 'status' => '-1']) + ); + } + } + /** * Redirect users from the forum to the Ideas centre * @@ -223,7 +240,6 @@ public function show_idea($event) 'U_IDEA_VOTE' => $this->link_helper->get_idea_link($idea['idea_id'], 'vote', true), 'U_IDEA_DUPLICATE' => $this->link_helper->get_idea_link($idea['duplicate_id']), 'U_IDEA_STATUS_LINK'=> $this->helper->route('phpbb_ideas_list_controller', ['status' => $idea['idea_status']]), - 'U_SEARCH_MY_IDEAS' => $this->helper->route('phpbb_ideas_list_controller', ['sort' => ext::SORT_MYIDEAS, 'status' => '-1']), 'U_TITLE_LIVESEARCH'=> $this->helper->route('phpbb_ideas_livesearch_controller'), )); diff --git a/language/en/common.php b/language/en/common.php index 7ede2932..9fdf298d 100644 --- a/language/en/common.php +++ b/language/en/common.php @@ -54,7 +54,7 @@ 'LATEST_IDEAS' => 'Latest Ideas', 'LIST_DUPLICATE' => 'Duplicate ideas', - 'LIST_EGOSEARCH' => 'Your ideas', + 'LIST_EGOSEARCH' => 'My Ideas', 'LIST_IMPLEMENTED' => 'Implemented ideas', 'LIST_IN_PROGRESS' => 'In Progress ideas', 'LIST_INVALID' => 'Invalid ideas', diff --git a/styles/prosilver/template/event/navbar_header_profile_list_after.html b/styles/prosilver/template/event/navbar_header_profile_list_after.html new file mode 100644 index 00000000..079bfe2b --- /dev/null +++ b/styles/prosilver/template/event/navbar_header_profile_list_after.html @@ -0,0 +1,7 @@ +{% if U_SEARCH_MY_IDEAS %} +