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/adjust_usernames.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/develop/adjust_usernames.php') diff --git a/phpBB/develop/adjust_usernames.php b/phpBB/develop/adjust_usernames.php index 1afa77af16..4bae774634 100644 --- a/phpBB/develop/adjust_usernames.php +++ b/phpBB/develop/adjust_usernames.php @@ -9,9 +9,9 @@ die("Please read the first lines of this script for instructions on how to enabl set_time_limit(0); define('IN_PHPBB', true); -$phpbb_root_path = './../'; -$phpEx = substr(strrchr(__FILE__, '.'), 1); -include($phpbb_root_path . 'common.'.$phpEx); +define('PHPBB_ROOT_PATH', './../'); +define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1)); +include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT); // Start session management $user->session_begin(); -- cgit v1.2.1 From e85f9f79bc892533e8b67d80ae265167f2e5d4cd Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 24 Dec 2008 13:14:24 +0000 Subject: remove no longer necessary files... hooray git-svn-id: file:///svn/phpbb/trunk@9221 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/develop/adjust_usernames.php | 52 -------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 phpBB/develop/adjust_usernames.php (limited to 'phpBB/develop/adjust_usernames.php') diff --git a/phpBB/develop/adjust_usernames.php b/phpBB/develop/adjust_usernames.php deleted file mode 100644 index 4bae774634..0000000000 --- a/phpBB/develop/adjust_usernames.php +++ /dev/null @@ -1,52 +0,0 @@ -session_begin(); -$auth->acl($user->data); -$user->setup(); - -$echos = 0; - -$sql = 'SELECT user_id, username - FROM ' . USERS_TABLE; -$result = $db->sql_query($sql); - -while ($row = $db->sql_fetchrow($result)) -{ - $sql = 'UPDATE ' . USERS_TABLE . " - SET username_clean = '" . $db->sql_escape(utf8_clean_string($row['username'])) . "' - WHERE user_id = " . $row['user_id']; - $db->sql_query($sql); - - if ($echos > 200) - { - echo '
' . "\n"; - $echos = 0; - } - - echo '.'; - $echos++; - - flush(); -} -$db->sql_freeresult($result); - -echo 'FINISHED'; - -// Done -$db->sql_close(); - -?> \ 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/adjust_usernames.php | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 phpBB/develop/adjust_usernames.php (limited to 'phpBB/develop/adjust_usernames.php') diff --git a/phpBB/develop/adjust_usernames.php b/phpBB/develop/adjust_usernames.php new file mode 100644 index 0000000000..1afa77af16 --- /dev/null +++ b/phpBB/develop/adjust_usernames.php @@ -0,0 +1,52 @@ +session_begin(); +$auth->acl($user->data); +$user->setup(); + +$echos = 0; + +$sql = 'SELECT user_id, username + FROM ' . USERS_TABLE; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $sql = 'UPDATE ' . USERS_TABLE . " + SET username_clean = '" . $db->sql_escape(utf8_clean_string($row['username'])) . "' + WHERE user_id = " . $row['user_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '
' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); +} +$db->sql_freeresult($result); + +echo 'FINISHED'; + +// Done +$db->sql_close(); + +?> \ 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/adjust_usernames.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'phpBB/develop/adjust_usernames.php') diff --git a/phpBB/develop/adjust_usernames.php b/phpBB/develop/adjust_usernames.php index 1afa77af16..111a9a30d7 100644 --- a/phpBB/develop/adjust_usernames.php +++ b/phpBB/develop/adjust_usernames.php @@ -48,5 +48,3 @@ echo 'FINISHED'; // Done $db->sql_close(); - -?> \ No newline at end of file -- cgit v1.2.1