aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-03-13 11:59:51 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-03-15 15:14:00 +0100
commit87292f534ec64364a8f64d53153004c743980a48 (patch)
tree3920a3fbd38691ad53c256d0c71ce235480a236c /phpBB/develop
parent2071abda1fac18a3b53b27ac31d2714c167c993f (diff)
downloadforums-87292f534ec64364a8f64d53153004c743980a48.tar
forums-87292f534ec64364a8f64d53153004c743980a48.tar.gz
forums-87292f534ec64364a8f64d53153004c743980a48.tar.bz2
forums-87292f534ec64364a8f64d53153004c743980a48.tar.xz
forums-87292f534ec64364a8f64d53153004c743980a48.zip
[ticket/12262] Do not use inline assignments
PHPBB3-12262
Diffstat (limited to 'phpBB/develop')
-rw-r--r--phpBB/develop/export_events_for_wiki.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php
index e8a94c1608..3021b64e05 100644
--- a/phpBB/develop/export_events_for_wiki.php
+++ b/phpBB/develop/export_events_for_wiki.php
@@ -121,7 +121,8 @@ function check_for_events($phpbb_root_path, $file)
for ($i = 0, $num_lines = sizeof($lines); $i < $num_lines; $i++)
{
$event_line = 0;
- if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->trigger_event('"))
+ $found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->trigger_event('");
+ if ($found_trigger_event !== false)
{
$event_line = $i;
$event_name = $lines[$event_line];
@@ -130,7 +131,8 @@ function check_for_events($phpbb_root_path, $file)
$current_line = trim($lines[$event_line]);
$arguments = array();
- if (($found_inline_array = strpos($current_line, "', compact(array('")) !== false)
+ $found_inline_array = strpos($current_line, "', compact(array('");
+ if ($found_inline_array !== false)
{
$varsarray = substr($current_line, $found_inline_array + strlen("', compact(array('"), -6);
$arguments = explode("', '", $varsarray);
@@ -175,11 +177,12 @@ function check_for_events($phpbb_root_path, $file)
throw new LogicException('$vars array does not match the list of @var tags for event "' . $event_name . '" in file "' . $file . '"');
}
}
- else if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->dispatch('"))
+ $found_dispatch = strpos($lines[$i], "phpbb_dispatcher->dispatch('");
+ if ($found_dispatch !== false)
{
$event_line = $i;
$event_name = $lines[$event_line];
- $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->dispatch('"));
+ $event_name = substr($event_name, $found_dispatch + strlen("phpbb_dispatcher->dispatch('"));
$event_name = substr($event_name, 0, strpos($event_name, "'"));
$arguments = array();
}