aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/develop')
-rw-r--r--phpBB/develop/benchmark.php9
-rw-r--r--phpBB/develop/export_events_for_wiki.php53
2 files changed, 41 insertions, 21 deletions
diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php
index d5eaed3bc7..27176c97d3 100644
--- a/phpBB/develop/benchmark.php
+++ b/phpBB/develop/benchmark.php
@@ -366,15 +366,10 @@ function make_user($username)
$password = md5("benchpass");
$email = "nobody@localhost";
- $icq = "12345678";
- $website = "http://www.phpbb.com";
$signature = "$username: phpBB tester.";
$signature_bbcode_uid = "";
$avatar_filename = "";
$viewemail = 0;
- $aim = 0;
- $yim = 0;
- $msn = 0;
$attachsig = 1;
$allowsmilies = 1;
$allowhtml = 1;
@@ -419,8 +414,8 @@ function make_user($username)
}
- $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
- VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
+ $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
+ VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
$sql .= "1, '')";
diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php
index b276b4c5fa..3021b64e05 100644
--- a/phpBB/develop/export_events_for_wiki.php
+++ b/phpBB/develop/export_events_for_wiki.php
@@ -54,7 +54,7 @@ function export_from_eventsmd($phpbb_root_path, $filter)
{
$file_details = substr($file_details, strlen("* Locations:\n + "));
$files = explode("\n + ", $file_details);
- $prosilver = $subsilver2 = array();
+ $prosilver = $subsilver2 = $adm = array();
foreach ($files as $file)
{
if (strpos($file, 'styles/prosilver/template/') === 0)
@@ -65,8 +65,19 @@ function export_from_eventsmd($phpbb_root_path, $filter)
{
$subsilver2[] = substr($file, strlen('styles/subsilver2/template/'));
}
+ if (strpos($file, 'adm/style/') === 0)
+ {
+ $adm[] = substr($file, strlen('adm/style/'));
+ }
+ }
+ if ($filter == 'acp')
+ {
+ echo implode(', ', $adm);
+ }
+ else
+ {
+ echo implode(', ', $prosilver) . ' || ' . implode(', ', $subsilver2);
}
- echo implode(', ', $prosilver) . ' || ' . implode(', ', $subsilver2);
}
else if ($filter == 'acp')
{
@@ -110,26 +121,39 @@ 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];
$event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->trigger_event('"));
$event_name = substr($event_name, 0, strpos($event_name, "'"));
- // Find $vars array lines
- $find_varsarray_line = 1;
- while (strpos($lines[$event_line - $find_varsarray_line], "vars = array('") === false)
+ $current_line = trim($lines[$event_line]);
+ $arguments = array();
+ $found_inline_array = strpos($current_line, "', compact(array('");
+ if ($found_inline_array !== false)
{
- $find_varsarray_line++;
+ $varsarray = substr($current_line, $found_inline_array + strlen("', compact(array('"), -6);
+ $arguments = explode("', '", $varsarray);
+ }
- if ($find_varsarray_line > min(50, $event_line))
+ if (empty($arguments))
+ {
+ // Find $vars array lines
+ $find_varsarray_line = 1;
+ while (strpos($lines[$event_line - $find_varsarray_line], "vars = array('") === false)
{
- throw new LogicException('Can not find "$vars = array()"-line for event "' . $event_name . '" in file "' . $file . '"');
+ $find_varsarray_line++;
+
+ if ($find_varsarray_line > min(50, $event_line))
+ {
+ throw new LogicException('Can not find "$vars = array()"-line for event "' . $event_name . '" in file "' . $file . '"');
+ }
}
+ $varsarray = substr(trim($lines[$event_line - $find_varsarray_line]), strlen("\$vars = array('"), -3);
+ $arguments = explode("', '", $varsarray);
}
- $varsarray = substr(trim($lines[$event_line - $find_varsarray_line]), strlen("\$vars = array('"), -3);
- $arguments = explode("', '", $varsarray);
// Validate $vars array with @var
$find_vars_line = 3;
@@ -153,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();
}
@@ -267,7 +292,7 @@ function get_file_list($dir, $path = '')
$files[] = $file_info->getFilename() . '/' . $file;
}
}
- else if ($file_info->getExtension() == 'php')
+ else if (substr($file_info->getFilename(), -4) == '.php')
{
$files[] = $file_info->getFilename();
}