From 08e6c6118036700f5d4196aa09d9d1a34b840514 Mon Sep 17 00:00:00 2001 From: rechosen Date: Fri, 9 Aug 2013 11:39:43 +0200 Subject: [PATCH] [ticket/11777] Require a suffix of '_listener' on extension template listeners To further mirror the file name and location requirements for php template event listeners, require extension template event listener files to follow the '_listener.html' naming format. PHPBB3-11777 --- phpBB/phpbb/template/twig/node/event.php | 2 +- .../styles/all/template/event/{test.html => test_listener.html} | 0 .../silver/template/event/{test.html => test_listener.html} | 0 .../template/event/{test.html => test_listener.html} | 0 .../styles/all/template/event/{test.html => test_listener.html} | 0 .../silver/template/event/{test.html => test_listener.html} | 0 .../silver/template/event/{two.html => two_listener.html} | 0 .../styles/all/template/event/{test.html => test_listener.html} | 0 ...riable_spacing.html => event_variable_spacing_listener.html} | 0 .../template/event/{universal.html => universal_listener.html} | 0 .../silver/template/event/{simple.html => simple_listener.html} | 0 11 files changed, 1 insertion(+), 1 deletion(-) rename tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/{two.html => two_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/{event_variable_spacing.html => event_variable_spacing_listener.html} (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/{universal.html => universal_listener.html} (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/{simple.html => simple_listener.html} (100%) diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php index c94e5fdf20..4533151d05 100644 --- a/phpBB/phpbb/template/twig/node/event.php +++ b/phpBB/phpbb/template/twig/node/event.php @@ -43,7 +43,7 @@ class phpbb_template_twig_node_event extends Twig_Node { $compiler->addDebugInfo($this); - $location = $this->listener_directory . $this->getNode('expr')->getAttribute('name'); + $location = $this->listener_directory . $this->getNode('expr')->getAttribute('name') . '_listener'; foreach ($this->environment->get_phpbb_extensions() as $ext_namespace => $ext_path) { diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html b/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html b/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test_listener.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing_listener.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing_listener.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal_listener.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal_listener.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple_listener.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple_listener.html