From 1d55709e1336e826aa514ecb84c8c98c52e500c7 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Fri, 12 Jul 2013 12:56:00 -0500 Subject: [PATCH 1/4] [ticket/11667] includeasset should be abstract PHPBB3-11667 --- phpBB/includes/template/twig/node/includeasset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/template/twig/node/includeasset.php b/phpBB/includes/template/twig/node/includeasset.php index 5abff10e3f..38c0498492 100644 --- a/phpBB/includes/template/twig/node/includeasset.php +++ b/phpBB/includes/template/twig/node/includeasset.php @@ -7,7 +7,7 @@ * */ -class phpbb_template_twig_node_includeasset extends Twig_Node +abstract class phpbb_template_twig_node_includeasset extends Twig_Node { /** @var Twig_Environment */ protected $environment; From 41d8bfa974900c9befbde06cc08060eb8a552ec8 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Fri, 12 Jul 2013 13:32:40 -0500 Subject: [PATCH 2/4] [ticket/11667] Make functions abstract in includeasset Also comment properly PHPBB3-11667 --- .../includes/template/twig/node/includeasset.php | 15 +++++++++++++++ phpBB/includes/template/twig/node/includecss.php | 14 ++++++++++---- phpBB/includes/template/twig/node/includejs.php | 14 ++++++++++---- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/phpBB/includes/template/twig/node/includeasset.php b/phpBB/includes/template/twig/node/includeasset.php index 38c0498492..b12d379157 100644 --- a/phpBB/includes/template/twig/node/includeasset.php +++ b/phpBB/includes/template/twig/node/includeasset.php @@ -62,4 +62,19 @@ abstract class phpbb_template_twig_node_includeasset extends Twig_Node ->raw("\n');\n") ; } + + /** + * Get the definition name + * + * @return string (e.g. 'SCRIPTS') + */ + abstract public function get_definition_name(); + + /** + * Append the output code for the asset + * + * @param Twig_Compiler A Twig_Compiler instance + * @return null + */ + abstract protected function append_asset(Twig_Compiler $compiler); } diff --git a/phpBB/includes/template/twig/node/includecss.php b/phpBB/includes/template/twig/node/includecss.php index 01fda44aad..450edb3e1e 100644 --- a/phpBB/includes/template/twig/node/includecss.php +++ b/phpBB/includes/template/twig/node/includecss.php @@ -9,16 +9,22 @@ class phpbb_template_twig_node_includecss extends phpbb_template_twig_node_includeasset { + /** + * Get the definition name + * + * @return string (e.g. 'SCRIPTS') + */ public function get_definition_name() { return 'STYLESHEETS'; } /** - * Compiles the node to PHP. - * - * @param Twig_Compiler A Twig_Compiler instance - */ + * Append the output code for the asset + * + * @param Twig_Compiler A Twig_Compiler instance + * @return null + */ public function append_asset(Twig_Compiler $compiler) { $compiler diff --git a/phpBB/includes/template/twig/node/includejs.php b/phpBB/includes/template/twig/node/includejs.php index fdf2bea3ed..50ab448e0f 100644 --- a/phpBB/includes/template/twig/node/includejs.php +++ b/phpBB/includes/template/twig/node/includejs.php @@ -9,16 +9,22 @@ class phpbb_template_twig_node_includejs extends phpbb_template_twig_node_includeasset { + /** + * Get the definition name + * + * @return string (e.g. 'SCRIPTS') + */ public function get_definition_name() { return 'SCRIPTS'; } /** - * Compiles the node to PHP. - * - * @param Twig_Compiler A Twig_Compiler instance - */ + * Append the output code for the asset + * + * @param Twig_Compiler A Twig_Compiler instance + * @return null + */ protected function append_asset(Twig_Compiler $compiler) { $config = $this->environment->get_phpbb_config(); From 1d2d3032d3f0f614b0df9851c373618e205580f8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 23 Jul 2013 16:26:01 +0200 Subject: [PATCH 3/4] [ticket/11734] Readd accidently removed language strings of forum permissions PHPBB3-11734 --- phpBB/language/en/acp/permissions_phpbb.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index d0128db34a..5ea151f6ea 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -102,6 +102,17 @@ $lang = array_merge($lang, array( // Forum Permissions $lang = array_merge($lang, array( + 'ACL_F_LIST' => 'Can see forum', + 'ACL_F_READ' => 'Can read forum', + 'ACL_F_SEARCH' => 'Can search the forum', + 'ACL_F_SUBSCRIBE' => 'Can subscribe forum', + 'ACL_F_PRINT' => 'Can print topics', + 'ACL_F_EMAIL' => 'Can email topics', + 'ACL_F_BUMP' => 'Can bump topics', + 'ACL_F_USER_LOCK' => 'Can lock own topics', + 'ACL_F_DOWNLOAD' => 'Can download files', + 'ACL_F_REPORT' => 'Can report posts', + 'ACL_F_POST' => 'Can start new topics', 'ACL_F_STICKY' => 'Can post stickies', 'ACL_F_ANNOUNCE' => 'Can post announcements', From bf04bfcced7934704e7f2682ee608f490cb3fc76 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Tue, 23 Jul 2013 11:16:23 -0500 Subject: [PATCH 4/4] [ticket/11667] Use @inheritdoc PHPBB3-11667 --- phpBB/phpbb/template/twig/node/includecss.php | 9 ++------- phpBB/phpbb/template/twig/node/includejs.php | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/phpBB/phpbb/template/twig/node/includecss.php b/phpBB/phpbb/template/twig/node/includecss.php index 450edb3e1e..a9d9b46d69 100644 --- a/phpBB/phpbb/template/twig/node/includecss.php +++ b/phpBB/phpbb/template/twig/node/includecss.php @@ -10,9 +10,7 @@ class phpbb_template_twig_node_includecss extends phpbb_template_twig_node_includeasset { /** - * Get the definition name - * - * @return string (e.g. 'SCRIPTS') + * {@inheritdoc} */ public function get_definition_name() { @@ -20,10 +18,7 @@ class phpbb_template_twig_node_includecss extends phpbb_template_twig_node_inclu } /** - * Append the output code for the asset - * - * @param Twig_Compiler A Twig_Compiler instance - * @return null + * {@inheritdoc} */ public function append_asset(Twig_Compiler $compiler) { diff --git a/phpBB/phpbb/template/twig/node/includejs.php b/phpBB/phpbb/template/twig/node/includejs.php index 50ab448e0f..2b4b55fb0a 100644 --- a/phpBB/phpbb/template/twig/node/includejs.php +++ b/phpBB/phpbb/template/twig/node/includejs.php @@ -10,9 +10,7 @@ class phpbb_template_twig_node_includejs extends phpbb_template_twig_node_includeasset { /** - * Get the definition name - * - * @return string (e.g. 'SCRIPTS') + * {@inheritdoc} */ public function get_definition_name() { @@ -20,10 +18,7 @@ class phpbb_template_twig_node_includejs extends phpbb_template_twig_node_includ } /** - * Append the output code for the asset - * - * @param Twig_Compiler A Twig_Compiler instance - * @return null + * {@inheritdoc} */ protected function append_asset(Twig_Compiler $compiler) {