From 2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 29 May 2008 12:25:56 +0000 Subject: ok... i hope i haven't messed too much with the code and everything is still working. Changes: - Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed. - A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid('memberlist')) - in this case the root path and extension get added automatically. The hook is called after these are added. git-svn-id: file:///svn/phpbb/trunk@8572 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/develop/benchmark.php | 462 -------------------------------------------- 1 file changed, 462 deletions(-) delete mode 100644 phpBB/develop/benchmark.php (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php deleted file mode 100644 index 5bbe6f53be..0000000000 --- a/phpBB/develop/benchmark.php +++ /dev/null @@ -1,462 +0,0 @@ - . -[/code] -[b]bolded[/b], [i]italic[/i] -[email]james@totalgeek.org[/email] -[url=http://www.totalgeek.org]totalgeek.org[/url] -[url]www.totalgeek.org[/url] -[list] -[*] This is the first bulleted item. -[*] This is the second bulleted item. -[/list] -[list=A] -[*] This is the first bulleted item. -[*] This is the second bulleted item. -[/list] -[quote] -And a quote! -[/quote] -'; - - -// The script expects the ID's in the tables to sequential (1,2,3,4,5), -// so no holes please (1,4,5,8)... -$nr_of_users = nrof(USERS_TABLE); -$nr_of_cats = nrof(CATEGORIES_TABLE); -$nr_of_forums = nrof(FORUMS_TABLE); -$nr_of_posts = nrof(POSTS_TABLE); - -$u = $users; - -$starttime = microtime(); - -$usercreationcount = 0; -while($users > 0) -{ - - $name = "testuser_" . substr(md5(uniqid(rand())), 0, 10); - if (make_user($name)) - { - $usercreationcount++; - $users--; - } - if (($usercreationcount % 500) == 0) - { - echo "status: $usercreationcount
\n"; - flush(); - } - -} - -if ($posts > 0) -{ - filldb($posts); -} - -$endtime = microtime(); - -if ($submit="" || !isset($submit)) -{ - ?> -Hello, welcome to this little phpBB Benchmarking script :)

- -At the moment there are:
- - - - - -
Users
Forums
Posts
-

-What do you want to create?

- -

- Users
- Posts/topics (optional: post size in bytes)
- -
- - TIME TAKEN : ".$timetaken_sec."s
\n"; - - print "

\nBack to the overview page\n"; -} - - -function filldb($newposts) -{ - global $nr_of_forums; - global $nr_of_users; - - $forum_topic_counts = array(); - - for ($i = 1; $i <= $nr_of_forums; $i++) - { - $forum_topic_counts[$i] = get_topic_count($i); - } - - for($i = 0; $i < $newposts; $i++) - { - $userid = rand(2, $nr_of_users - 1); - $forum = rand(1,$nr_of_forums); - - if ((rand(0,30) < 1) || ($forum_topic_count[$forum] == 0)) - { - // create a new topic 1 in 30 times (or when there are none); - $topic = make_topic($userid, "Testing topic $i", $forum); - $forum_topic_count[$forum]++; - } - else - { - // Otherwise create a reply(posting) somewhere. - $topic = get_smallest_topic($forum); - create_posting($userid, $topic, $forum, "reply"); - } - - if (($i % 1000) == 0) - { - echo "status: $i
"; - flush(); - } - - } -} - - -function get_smallest_topic($forum_id) -{ - global $db; - - $sql = "SELECT topic_id - FROM " . TOPICS_TABLE . " - WHERE (forum_id = $forum_id) - ORDER BY topic_replies ASC LIMIT 1"; - if($result = $db->sql_query($sql)) - { - $row = $db->sql_fetchrow($result); - $topic_id = $row['topic_id']; - - unset($result); - unset($row); - return $topic_id; - } - else - { - message_die(GENERAL_ERROR, "Couldn't get smallest topic.", "", __LINE__, __FILE__, $sql); - } - -} - - -function get_topic_count($forum_id) -{ - global $db; - - $sql = "SELECT forum_topics - FROM " . FORUMS_TABLE . " - WHERE (forum_id = $forum_id)"; - if($result = $db->sql_query($sql)) - { - $row = $db->sql_fetchrow($result); - $topic_count = $row['forum_topics']; - - unset($result); - unset($row); - return $topic_count; - } - else - { - message_die(GENERAL_ERROR, "Couldn't get topic count.", "", __LINE__, __FILE__, $sql); - } - -} - - -function make_topic($user_id, $subject, $forum_id) -{ - global $db; - $topic_type = POST_NORMAL; - $topic_vote = 0; - $current_time = time(); - - $sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) - VALUES ('$subject', $user_id, $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)"; - - if( $result = $db->sql_query($sql, BEGIN_TRANSACTION) ) - { - $new_topic_id = $db->sql_nextid(); - } - else - { - message_die(GENERAL_ERROR, "Error inserting data into topics table", "", __LINE__, __FILE__, $sql); - } - - create_posting($user_id, $new_topic_id, $forum_id); - - return $new_topic_id; -} - - - -function create_posting($userid, $topic_id, $forum, $mode='newtopic') -{ - $message = generatepost(); - - return make_post($topic_id, $forum, $userid, "", $message, $mode); - -} - - - -function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $mode='newtopic') -{ - global $db; - $current_time = time(); - $user_ip = "ac100202"; - $bbcode_on = 1; - $html_on = 1; - $smilies_on = 1; - $attach_sig = 1; - $bbcode_uid = make_bbcode_uid(); - - $post_subject = 'random subject'; - - $post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid); - - $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_approved, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text) - VALUES ($new_topic_id, $forum_id, $user_id, 0, 0, '$post_username', $current_time, '$user_ip', 1, '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig, '$post_subject', '$post_message')"; - $result = $db->sql_query($sql); - - if ($result) - { - $new_post_id = $db->sql_nextid(); - - $sql = "UPDATE " . TOPICS_TABLE . " - SET topic_last_post_id = $new_post_id"; - if($mode == "reply") - { - $sql .= ", topic_replies = topic_replies + 1 "; - } - $sql .= " WHERE topic_id = $new_topic_id"; - - if($db->sql_query($sql)) - { - $sql = "UPDATE " . FORUMS_TABLE . " - SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1"; - if($mode == "newtopic") - { - $sql .= ", forum_topics = forum_topics + 1"; - } - $sql .= " WHERE forum_id = $forum_id"; - - if($db->sql_query($sql)) - { - $sql = "UPDATE " . USERS_TABLE . " - SET user_posts = user_posts + 1 - WHERE user_id = " . $user_id; - - if($db->sql_query($sql, END_TRANSACTION)) - { - // SUCCESS. - return true; - } - else - { - message_die(GENERAL_ERROR, "Error updating users table", "", __LINE__, __FILE__, $sql); - } - } - else - { - message_die(GENERAL_ERROR, "Error updating forums table", "", __LINE__, __FILE__, $sql); - } - } - else - { - // Rollback - if($db->sql_layer == "mysql") - { - $sql = "DELETE FROM " . POSTS_TABLE . " - WHERE post_id = $new_post_id"; - $db->sql_query($sql); - } - message_die(GENERAL_ERROR, "Error updating topics table", "", __LINE__, __FILE__, $sql); - } - } - else - { - message_die(GENERAL_ERROR, "Error inserting data into posts table", "", __LINE__, __FILE__, $sql); - } -} - - -function generatepost($size=850) -{ - global $bigass_text; - // Returns a string with a length between $size and $size*0.2 - $size = rand(0.2*$size, $size); - - $textsize = strlen($bigass_text); - $currentsize = 0; - // Add whole $text multiple times - while($currentsize < $size && $size-$currentsize <= $textsize) - { - $message .= $bigass_text; - $currentsize += $textsize; - } - // Add the remainder number of chars and return it. - $message .= substr($bigass_text, 0, $size-$currentsize); - - return (addslashes($message)); -} - - -function nrof($table) -{ - global $db; - $sql = "SELECT count(*) AS counted FROM $table"; - $result = $db->sql_query($sql); - $topics = $db->sql_fetchrow($result); - return $topics[counted]; -} - - -function make_user($username) -{ - global $db, $board_config; - - $password = md5("benchpass"); - $email = "nobody@localhost"; - $icq = "12345678"; - $website = "http://www.phpbb.com"; - $occupation = "phpBB tester"; - $location = "phpBB world hq"; - $interests = "Eating, sleeping, living, and breathing phpBB"; - $signature = "$username: phpBB tester."; - $signature_bbcode_uid = ""; - $avatar_filename = ""; - $viewemail = 0; - $aim = 0; - $yim = 0; - $msn = 0; - $attachsig = 1; - $allowsmilies = 1; - $allowhtml = 1; - $allowbbcode = 1; - $allowviewonline = 1; - $notifyreply = 0; - $notifypm = 0; - $user_timezone = $board_config['board_timezone']; - $user_dateformat = $board_config['default_dateformat']; - $user_lang = $board_config['default_lang']; - $user_style = $board_config['default_style']; - - - $sql = "SELECT MAX(user_id) AS total - FROM " . USERS_TABLE; - if($result = $db->sql_query($sql)) - { - $row = $db->sql_fetchrow($result); - $new_user_id = $row['total'] + 1; - - unset($result); - unset($row); - } - else - { - message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql); - } - - $sql = "SELECT MAX(group_id) AS total - FROM " . GROUPS_TABLE; - if($result = $db->sql_query($sql)) - { - $row = $db->sql_fetchrow($result); - $new_group_id = $row['total'] + 1; - - unset($result); - unset($row); - } - else - { - message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql); - } - - - $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, 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', '$occupation', '$location', '$interests', '$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 .= "1, '')"; - - if($result = $db->sql_query($sql, BEGIN_TRANSACTION)) - { - $sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator) - VALUES ($new_group_id, '', 'Personal User', 1, 0)"; - if($result = $db->sql_query($sql)) - { - $sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending) - VALUES ($new_user_id, $new_group_id, 0)"; - if($result = $db->sql_query($sql, END_TRANSACTION)) - { - - // SUCCESS. - return true; - } - else - { - message_die(GENERAL_ERROR, "Couldn't insert data into user_group table", "", __LINE__, __FILE__, $sql); - } - } - else - { - message_die(GENERAL_ERROR, "Couldn't insert data into groups table", "", __LINE__, __FILE__, $sql); - } - } - else - { - message_die(GENERAL_ERROR, "Couldn't insert data into users table", "", __LINE__, __FILE__, $sql); - } - -} - -?> \ No newline at end of file -- cgit v1.2.1 From 2e17e448deed073f8614bb555a8ef20c57291c2a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 4 Oct 2009 18:14:59 +0000 Subject: Copy 3.0.x branch to trunk git-svn-id: file:///svn/phpbb/trunk@10211 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/develop/benchmark.php | 462 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 462 insertions(+) create mode 100644 phpBB/develop/benchmark.php (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php new file mode 100644 index 0000000000..5bbe6f53be --- /dev/null +++ b/phpBB/develop/benchmark.php @@ -0,0 +1,462 @@ + . +[/code] +[b]bolded[/b], [i]italic[/i] +[email]james@totalgeek.org[/email] +[url=http://www.totalgeek.org]totalgeek.org[/url] +[url]www.totalgeek.org[/url] +[list] +[*] This is the first bulleted item. +[*] This is the second bulleted item. +[/list] +[list=A] +[*] This is the first bulleted item. +[*] This is the second bulleted item. +[/list] +[quote] +And a quote! +[/quote] +'; + + +// The script expects the ID's in the tables to sequential (1,2,3,4,5), +// so no holes please (1,4,5,8)... +$nr_of_users = nrof(USERS_TABLE); +$nr_of_cats = nrof(CATEGORIES_TABLE); +$nr_of_forums = nrof(FORUMS_TABLE); +$nr_of_posts = nrof(POSTS_TABLE); + +$u = $users; + +$starttime = microtime(); + +$usercreationcount = 0; +while($users > 0) +{ + + $name = "testuser_" . substr(md5(uniqid(rand())), 0, 10); + if (make_user($name)) + { + $usercreationcount++; + $users--; + } + if (($usercreationcount % 500) == 0) + { + echo "status: $usercreationcount
\n"; + flush(); + } + +} + +if ($posts > 0) +{ + filldb($posts); +} + +$endtime = microtime(); + +if ($submit="" || !isset($submit)) +{ + ?> +Hello, welcome to this little phpBB Benchmarking script :)

+ +At the moment there are:
+ + + + + +
Users
Forums
Posts
+

+What do you want to create?

+ +

+ Users
+ Posts/topics (optional: post size in bytes)
+ +
+ + TIME TAKEN : ".$timetaken_sec."s
\n"; + + print "

\nBack to the overview page\n"; +} + + +function filldb($newposts) +{ + global $nr_of_forums; + global $nr_of_users; + + $forum_topic_counts = array(); + + for ($i = 1; $i <= $nr_of_forums; $i++) + { + $forum_topic_counts[$i] = get_topic_count($i); + } + + for($i = 0; $i < $newposts; $i++) + { + $userid = rand(2, $nr_of_users - 1); + $forum = rand(1,$nr_of_forums); + + if ((rand(0,30) < 1) || ($forum_topic_count[$forum] == 0)) + { + // create a new topic 1 in 30 times (or when there are none); + $topic = make_topic($userid, "Testing topic $i", $forum); + $forum_topic_count[$forum]++; + } + else + { + // Otherwise create a reply(posting) somewhere. + $topic = get_smallest_topic($forum); + create_posting($userid, $topic, $forum, "reply"); + } + + if (($i % 1000) == 0) + { + echo "status: $i
"; + flush(); + } + + } +} + + +function get_smallest_topic($forum_id) +{ + global $db; + + $sql = "SELECT topic_id + FROM " . TOPICS_TABLE . " + WHERE (forum_id = $forum_id) + ORDER BY topic_replies ASC LIMIT 1"; + if($result = $db->sql_query($sql)) + { + $row = $db->sql_fetchrow($result); + $topic_id = $row['topic_id']; + + unset($result); + unset($row); + return $topic_id; + } + else + { + message_die(GENERAL_ERROR, "Couldn't get smallest topic.", "", __LINE__, __FILE__, $sql); + } + +} + + +function get_topic_count($forum_id) +{ + global $db; + + $sql = "SELECT forum_topics + FROM " . FORUMS_TABLE . " + WHERE (forum_id = $forum_id)"; + if($result = $db->sql_query($sql)) + { + $row = $db->sql_fetchrow($result); + $topic_count = $row['forum_topics']; + + unset($result); + unset($row); + return $topic_count; + } + else + { + message_die(GENERAL_ERROR, "Couldn't get topic count.", "", __LINE__, __FILE__, $sql); + } + +} + + +function make_topic($user_id, $subject, $forum_id) +{ + global $db; + $topic_type = POST_NORMAL; + $topic_vote = 0; + $current_time = time(); + + $sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) + VALUES ('$subject', $user_id, $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)"; + + if( $result = $db->sql_query($sql, BEGIN_TRANSACTION) ) + { + $new_topic_id = $db->sql_nextid(); + } + else + { + message_die(GENERAL_ERROR, "Error inserting data into topics table", "", __LINE__, __FILE__, $sql); + } + + create_posting($user_id, $new_topic_id, $forum_id); + + return $new_topic_id; +} + + + +function create_posting($userid, $topic_id, $forum, $mode='newtopic') +{ + $message = generatepost(); + + return make_post($topic_id, $forum, $userid, "", $message, $mode); + +} + + + +function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $mode='newtopic') +{ + global $db; + $current_time = time(); + $user_ip = "ac100202"; + $bbcode_on = 1; + $html_on = 1; + $smilies_on = 1; + $attach_sig = 1; + $bbcode_uid = make_bbcode_uid(); + + $post_subject = 'random subject'; + + $post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid); + + $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_approved, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text) + VALUES ($new_topic_id, $forum_id, $user_id, 0, 0, '$post_username', $current_time, '$user_ip', 1, '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig, '$post_subject', '$post_message')"; + $result = $db->sql_query($sql); + + if ($result) + { + $new_post_id = $db->sql_nextid(); + + $sql = "UPDATE " . TOPICS_TABLE . " + SET topic_last_post_id = $new_post_id"; + if($mode == "reply") + { + $sql .= ", topic_replies = topic_replies + 1 "; + } + $sql .= " WHERE topic_id = $new_topic_id"; + + if($db->sql_query($sql)) + { + $sql = "UPDATE " . FORUMS_TABLE . " + SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1"; + if($mode == "newtopic") + { + $sql .= ", forum_topics = forum_topics + 1"; + } + $sql .= " WHERE forum_id = $forum_id"; + + if($db->sql_query($sql)) + { + $sql = "UPDATE " . USERS_TABLE . " + SET user_posts = user_posts + 1 + WHERE user_id = " . $user_id; + + if($db->sql_query($sql, END_TRANSACTION)) + { + // SUCCESS. + return true; + } + else + { + message_die(GENERAL_ERROR, "Error updating users table", "", __LINE__, __FILE__, $sql); + } + } + else + { + message_die(GENERAL_ERROR, "Error updating forums table", "", __LINE__, __FILE__, $sql); + } + } + else + { + // Rollback + if($db->sql_layer == "mysql") + { + $sql = "DELETE FROM " . POSTS_TABLE . " + WHERE post_id = $new_post_id"; + $db->sql_query($sql); + } + message_die(GENERAL_ERROR, "Error updating topics table", "", __LINE__, __FILE__, $sql); + } + } + else + { + message_die(GENERAL_ERROR, "Error inserting data into posts table", "", __LINE__, __FILE__, $sql); + } +} + + +function generatepost($size=850) +{ + global $bigass_text; + // Returns a string with a length between $size and $size*0.2 + $size = rand(0.2*$size, $size); + + $textsize = strlen($bigass_text); + $currentsize = 0; + // Add whole $text multiple times + while($currentsize < $size && $size-$currentsize <= $textsize) + { + $message .= $bigass_text; + $currentsize += $textsize; + } + // Add the remainder number of chars and return it. + $message .= substr($bigass_text, 0, $size-$currentsize); + + return (addslashes($message)); +} + + +function nrof($table) +{ + global $db; + $sql = "SELECT count(*) AS counted FROM $table"; + $result = $db->sql_query($sql); + $topics = $db->sql_fetchrow($result); + return $topics[counted]; +} + + +function make_user($username) +{ + global $db, $board_config; + + $password = md5("benchpass"); + $email = "nobody@localhost"; + $icq = "12345678"; + $website = "http://www.phpbb.com"; + $occupation = "phpBB tester"; + $location = "phpBB world hq"; + $interests = "Eating, sleeping, living, and breathing phpBB"; + $signature = "$username: phpBB tester."; + $signature_bbcode_uid = ""; + $avatar_filename = ""; + $viewemail = 0; + $aim = 0; + $yim = 0; + $msn = 0; + $attachsig = 1; + $allowsmilies = 1; + $allowhtml = 1; + $allowbbcode = 1; + $allowviewonline = 1; + $notifyreply = 0; + $notifypm = 0; + $user_timezone = $board_config['board_timezone']; + $user_dateformat = $board_config['default_dateformat']; + $user_lang = $board_config['default_lang']; + $user_style = $board_config['default_style']; + + + $sql = "SELECT MAX(user_id) AS total + FROM " . USERS_TABLE; + if($result = $db->sql_query($sql)) + { + $row = $db->sql_fetchrow($result); + $new_user_id = $row['total'] + 1; + + unset($result); + unset($row); + } + else + { + message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql); + } + + $sql = "SELECT MAX(group_id) AS total + FROM " . GROUPS_TABLE; + if($result = $db->sql_query($sql)) + { + $row = $db->sql_fetchrow($result); + $new_group_id = $row['total'] + 1; + + unset($result); + unset($row); + } + else + { + message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql); + } + + + $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, 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', '$occupation', '$location', '$interests', '$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 .= "1, '')"; + + if($result = $db->sql_query($sql, BEGIN_TRANSACTION)) + { + $sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator) + VALUES ($new_group_id, '', 'Personal User', 1, 0)"; + if($result = $db->sql_query($sql)) + { + $sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending) + VALUES ($new_user_id, $new_group_id, 0)"; + if($result = $db->sql_query($sql, END_TRANSACTION)) + { + + // SUCCESS. + return true; + } + else + { + message_die(GENERAL_ERROR, "Couldn't insert data into user_group table", "", __LINE__, __FILE__, $sql); + } + } + else + { + message_die(GENERAL_ERROR, "Couldn't insert data into groups table", "", __LINE__, __FILE__, $sql); + } + } + else + { + message_die(GENERAL_ERROR, "Couldn't insert data into users table", "", __LINE__, __FILE__, $sql); + } + +} + +?> \ No newline at end of file -- cgit v1.2.1 From af5b9a96409d788733fcb1ff367e0c7fb0583702 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Tue, 9 Nov 2010 08:59:25 +0100 Subject: [ticket/9556] Drop php closing tags, add trailing newline Closing tags converted using Oleg's script. remove-php-end-tags.py -a . Trailing newlines added using the following where $ext is file extension. find . -type f -name "*.$ext" -print | xargs printf "e %s\nw\n" | ed -s; Extensions: php, css, html, js, xml. PHPBB3-9556 --- phpBB/develop/benchmark.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index 5bbe6f53be..c867b9262e 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -458,5 +458,3 @@ function make_user($username) } } - -?> \ No newline at end of file -- cgit v1.2.1 From 625e7ef58aab1b2d61505f756d53c7d85d9f2d2b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 30 Aug 2012 22:54:24 +0200 Subject: [feature/soft-delete] Update development scripts with new column names PHPBB3-9657 --- phpBB/develop/benchmark.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index c867b9262e..11fbd38d76 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -263,7 +263,7 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m $post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid); - $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_approved, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text) + $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_visibility, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text) VALUES ($new_topic_id, $forum_id, $user_id, 0, 0, '$post_username', $current_time, '$user_ip', 1, '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig, '$post_subject', '$post_message')"; $result = $db->sql_query($sql); -- cgit v1.2.1 From f77a6eaab5485329a3b13922649fb8902e6e397f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 10 Nov 2012 11:24:52 +0100 Subject: [feature/soft-delete] Fix the rest of *_approved and the delete_post unit test PHPBB3-9567 --- phpBB/develop/benchmark.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index 11fbd38d76..c653fdaa24 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -192,13 +192,13 @@ function get_topic_count($forum_id) { global $db; - $sql = "SELECT forum_topics + $sql = "SELECT forum_topics_approved FROM " . FORUMS_TABLE . " WHERE (forum_id = $forum_id)"; if($result = $db->sql_query($sql)) { $row = $db->sql_fetchrow($result); - $topic_count = $row['forum_topics']; + $topic_count = $row['forum_topics_approved']; unset($result); unset($row); @@ -282,10 +282,10 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m if($db->sql_query($sql)) { $sql = "UPDATE " . FORUMS_TABLE . " - SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1"; + SET forum_last_post_id = $new_post_id, forum_posts_approved = forum_posts_approved + 1"; if($mode == "newtopic") { - $sql .= ", forum_topics = forum_topics + 1"; + $sql .= ", forum_topics_approved = forum_topics_approved + 1"; } $sql .= " WHERE forum_id = $forum_id"; -- cgit v1.2.1 From 3c640e57c5815c970e706f724fb29a3114826352 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 2 Feb 2014 15:41:49 +0100 Subject: [ticket/12115] Convert user occupation to a profile field PHPBB3-12115 --- phpBB/develop/benchmark.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index c653fdaa24..d91da3169e 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -368,7 +368,6 @@ function make_user($username) $email = "nobody@localhost"; $icq = "12345678"; $website = "http://www.phpbb.com"; - $occupation = "phpBB tester"; $location = "phpBB world hq"; $interests = "Eating, sleeping, living, and breathing phpBB"; $signature = "$username: phpBB tester."; @@ -422,8 +421,8 @@ function make_user($username) } - $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, 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', '$occupation', '$location', '$interests', '$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_icq, user_website, user_from, user_interests, 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', '$location', '$interests', '$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 .= "1, '')"; -- cgit v1.2.1 From bbada27ee9e797c7f6ce997152bc1efb8c8f125d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 2 Feb 2014 21:45:59 +0100 Subject: [ticket/12115] Also port user interests to profile fields PHPBB3-12115 --- phpBB/develop/benchmark.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index d91da3169e..16f10b1225 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -369,7 +369,6 @@ function make_user($username) $icq = "12345678"; $website = "http://www.phpbb.com"; $location = "phpBB world hq"; - $interests = "Eating, sleeping, living, and breathing phpBB"; $signature = "$username: phpBB tester."; $signature_bbcode_uid = ""; $avatar_filename = ""; @@ -421,8 +420,8 @@ function make_user($username) } - $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_from, user_interests, 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', '$location', '$interests', '$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_icq, user_website, user_from, 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', '$location', '$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 .= "1, '')"; -- cgit v1.2.1 From 6bee91c42915dd613e9714016006b25fa51cb24a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 6 Feb 2014 15:00:49 +0100 Subject: [ticket/12169] Convert user_from to profile field location Missing changes on memberlist view due to missing functionality PHPBB3-12169 --- phpBB/develop/benchmark.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index 16f10b1225..d5eaed3bc7 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -368,7 +368,6 @@ function make_user($username) $email = "nobody@localhost"; $icq = "12345678"; $website = "http://www.phpbb.com"; - $location = "phpBB world hq"; $signature = "$username: phpBB tester."; $signature_bbcode_uid = ""; $avatar_filename = ""; @@ -420,8 +419,8 @@ function make_user($username) } - $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_from, 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', '$location', '$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_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 .= "1, '')"; -- cgit v1.2.1 From 76409388afcd6389b5a29bc54b49faaf6bc4b4a5 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 28 Feb 2014 15:11:17 +0100 Subject: [ticket/12234] Replace ICQ with custom profile field PHPBB3-12234 --- phpBB/develop/benchmark.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index d5eaed3bc7..0be483e234 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -366,7 +366,6 @@ function make_user($username) $password = md5("benchpass"); $email = "nobody@localhost"; - $icq = "12345678"; $website = "http://www.phpbb.com"; $signature = "$username: phpBB tester."; $signature_bbcode_uid = ""; @@ -419,8 +418,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_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', '$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 .= "1, '')"; -- cgit v1.2.1 From 5b1fbfb2f2c901b89bb1163503b0468e11bbc307 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 3 Mar 2014 20:01:19 +0100 Subject: [ticket/12187] Remove user_website functionality PHPBB3-12187 --- phpBB/develop/benchmark.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index 0be483e234..d985b073f9 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -366,7 +366,6 @@ function make_user($username) $password = md5("benchpass"); $email = "nobody@localhost"; - $website = "http://www.phpbb.com"; $signature = "$username: phpBB tester."; $signature_bbcode_uid = ""; $avatar_filename = ""; @@ -418,8 +417,8 @@ function make_user($username) } - $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, 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', '$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_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', '$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 .= "1, '')"; -- cgit v1.2.1 From 83a7e632b9b21fed88a3dbea679580d0740664f7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2014 10:19:08 +0100 Subject: [ticket/12235] Convert WLM to custom profile field PHPBB3-12235 --- phpBB/develop/benchmark.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index d985b073f9..db3b8bc508 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -372,7 +372,6 @@ function make_user($username) $viewemail = 0; $aim = 0; $yim = 0; - $msn = 0; $attachsig = 1; $allowsmilies = 1; $allowhtml = 1; @@ -417,8 +416,8 @@ function make_user($username) } - $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_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', '$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_aim, user_yim, 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, '$aim', '$yim', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; $sql .= "1, '')"; -- cgit v1.2.1 From 2e5106aae1bfe83ad8b2336a6d519da5aabc59d2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2014 11:22:55 +0100 Subject: [ticket/12237] Convert yahoo messanger to custom profile field PHPBB3-12237 --- phpBB/develop/benchmark.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index db3b8bc508..51340dcedd 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -371,7 +371,6 @@ function make_user($username) $avatar_filename = ""; $viewemail = 0; $aim = 0; - $yim = 0; $attachsig = 1; $allowsmilies = 1; $allowhtml = 1; @@ -416,8 +415,8 @@ function make_user($username) } - $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_aim, user_yim, 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, '$aim', '$yim', $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_aim, 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, '$aim', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; $sql .= "1, '')"; -- cgit v1.2.1 From f2059f52f3f8f430888366b70aa07c534abb35a1 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 5 Mar 2014 22:13:22 +0100 Subject: [ticket/12236] Move AOL Instant Messanger field to custom profile field PHPBB3-12236 --- phpBB/develop/benchmark.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index 51340dcedd..27176c97d3 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -370,7 +370,6 @@ function make_user($username) $signature_bbcode_uid = ""; $avatar_filename = ""; $viewemail = 0; - $aim = 0; $attachsig = 1; $allowsmilies = 1; $allowhtml = 1; @@ -415,8 +414,8 @@ function make_user($username) } - $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_aim, 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, '$aim', $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, '')"; -- cgit v1.2.1 From ff6e026a403a622bd1aa498bff396a737735faed Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Thu, 26 Jun 2014 17:17:35 +0200 Subject: [ticket/12446] Unnecessary db connect inphpbb_bootstrap_enabled_exts PHPBB3-12446 --- phpBB/develop/benchmark.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/develop/benchmark.php') diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index 27176c97d3..c3cf90773e 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -313,7 +313,7 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m else { // Rollback - if($db->sql_layer == "mysql") + if($db->get_sql_layer() == "mysql") { $sql = "DELETE FROM " . POSTS_TABLE . " WHERE post_id = $new_post_id"; -- cgit v1.2.1