From dc5267728bd3352e3546ac9819365cadf5aaaae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Col=C3=B3n?= Date: Sun, 24 Sep 2017 21:21:01 -0400 Subject: [ticket/15372] Add and handle f_list_topics permission --- phpBB/phpbb/permissions.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/phpbb') diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php index c9181e6202..7697884b6a 100644 --- a/phpBB/phpbb/permissions.php +++ b/phpBB/phpbb/permissions.php @@ -260,6 +260,7 @@ class permissions // Forum Permissions 'f_list' => array('lang' => 'ACL_F_LIST', 'cat' => 'actions'), + 'f_list_topics' => array('lang' => 'ACL_F_LIST_TOPICS', 'cat' => 'actions'), 'f_read' => array('lang' => 'ACL_F_READ', 'cat' => 'actions'), 'f_search' => array('lang' => 'ACL_F_SEARCH', 'cat' => 'actions'), 'f_subscribe' => array('lang' => 'ACL_F_SUBSCRIBE', 'cat' => 'actions'), -- cgit v1.2.1 From e55480385b5c7d49030d3f380bf2c1349695033b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Col=C3=B3n?= Date: Sun, 24 Sep 2017 21:32:53 -0400 Subject: [ticket/15372] Migration for adding f_list_topic permission --- .../data/v32x/f_list_topics_permission_add.php | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php (limited to 'phpBB/phpbb') diff --git a/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php b/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php new file mode 100644 index 0000000000..175c27da03 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php @@ -0,0 +1,38 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\db\migration\data\v32x; + +class f_list_topics_permission_add extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v32x\v321', + ); + } + + public function update_data() + { + return array( + array('permission.add', array('f_list_topics', false)), + ); + } + + public function revert_data() + { + return array( + array('permission.remove', array('f_list_topics', false)), + ); + } +} -- cgit v1.2.1 From 2ba529e144d2101ea3407d39ecd7e7a043029978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Col=C3=B3n?= Date: Sun, 24 Sep 2017 22:07:25 -0400 Subject: [ticket/15372] Fix pagination and don't render viewtopic link --- phpBB/phpbb/pagination.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'phpBB/phpbb') diff --git a/phpBB/phpbb/pagination.php b/phpBB/phpbb/pagination.php index a5a95b096d..40af5eda6b 100644 --- a/phpBB/phpbb/pagination.php +++ b/phpBB/phpbb/pagination.php @@ -136,6 +136,11 @@ class pagination */ public function generate_template_pagination($base_url, $block_var_name, $start_name, $num_items, $per_page, $start = 1, $reverse_count = false, $ignore_on_page = false) { + if (empty($base_url)) + { + return; + } + $total_pages = ceil($num_items / $per_page); $on_page = $this->get_on_page($per_page, $start); $u_previous_page = $u_next_page = ''; -- cgit v1.2.1 From 4ae7cb89ff55902ab50393e1f7aa81b4b055f511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Col=C3=B3n?= Date: Sun, 24 Sep 2017 22:48:51 -0400 Subject: [ticket/15372] Remove revert_data from migration --- .../phpbb/db/migration/data/v32x/f_list_topics_permission_add.php | 7 ------- 1 file changed, 7 deletions(-) (limited to 'phpBB/phpbb') diff --git a/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php b/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php index 175c27da03..e4b77d0f0f 100644 --- a/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php +++ b/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php @@ -28,11 +28,4 @@ class f_list_topics_permission_add extends \phpbb\db\migration\migration array('permission.add', array('f_list_topics', false)), ); } - - public function revert_data() - { - return array( - array('permission.remove', array('f_list_topics', false)), - ); - } } -- cgit v1.2.1 From 33ceceda021160b73fe9d7333e9e950308da5569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Col=C3=B3n?= Date: Thu, 26 Oct 2017 16:21:50 -0400 Subject: [ticket/15372] Add permission to schema and copy from f_read --- phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb') diff --git a/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php b/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php index e4b77d0f0f..49727e5a62 100644 --- a/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php +++ b/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php @@ -25,7 +25,7 @@ class f_list_topics_permission_add extends \phpbb\db\migration\migration public function update_data() { return array( - array('permission.add', array('f_list_topics', false)), + array('permission.add', array('f_list_topics', false, 'f_read')), ); } } -- cgit v1.2.1