aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop/convert_avatars.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-02-25 15:46:36 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-02-25 15:46:36 +0000
commitca791961aa9664a6138954015f48bd417d372150 (patch)
tree9f4be3812d47d4d2c7ca858ced63383f05a88696 /phpBB/develop/convert_avatars.php
parent1e5de88c6f888da18b6745975d0aa5711787781d (diff)
downloadforums-ca791961aa9664a6138954015f48bd417d372150.tar
forums-ca791961aa9664a6138954015f48bd417d372150.tar.gz
forums-ca791961aa9664a6138954015f48bd417d372150.tar.bz2
forums-ca791961aa9664a6138954015f48bd417d372150.tar.xz
forums-ca791961aa9664a6138954015f48bd417d372150.zip
Not relevant to the 2.2 branch
git-svn-id: file:///svn/phpbb/trunk@3523 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/develop/convert_avatars.php')
-rw-r--r--phpBB/develop/convert_avatars.php65
1 files changed, 0 insertions, 65 deletions
diff --git a/phpBB/develop/convert_avatars.php b/phpBB/develop/convert_avatars.php
deleted file mode 100644
index 4f090451d6..0000000000
--- a/phpBB/develop/convert_avatars.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
-//
-// Security message:
-//
-// This script is potentially dangerous.
-// Remove or comment the next line (die(".... ) to enable this script.
-// Do NOT FORGET to either remove this script or disable it after you have used it.
-//
-die("Please read the first lines of this script for instructions on how to enable it");
-
-//
-// Do not change anything below this line.
-//
-
-
-$phpbb_root_path = "../";
-
-include($phpbb_root_path . 'extension.inc');
-include($phpbb_root_path . 'config.'.$phpEx);
-include($phpbb_root_path . 'includes/constants.'.$phpEx);
-include($phpbb_root_path . 'includes/db.'.$phpEx);
-
-
-$sql = "ALTER TABLE " . USERS_TABLE . "
- ADD user_avatar_type TINYINT(4) DEFAULT '0' NOT NULL";
-if( !$result = $db->sql_query($sql) )
-{
- die("Couldn't alter users table");
-}
-
-$sql = "SELECT user_id, user_avatar
- FROM " . USERS_TABLE;
-if( $result = $db->sql_query($sql) )
-{
- $rowset = $db->sql_fetchrowset($result);
-
- for($i = 0; $i < count($rowset); $i++)
- {
- if( ereg("^http", $rowset[$i]['user_avatar']))
- {
- $sql_type = USER_AVATAR_REMOTE;
- }
- else if( $rowset[$i]['user_avatar'] != "" )
- {
- $sql_type = USER_AVATAR_UPLOAD;
- }
- else
- {
- $sql_type = USER_AVATAR_NONE;
- }
-
- $sql = "UPDATE " . USERS_TABLE . "
- SET user_avatar_type = $sql_type
- WHERE user_id = " . $rowset[$i]['user_id'];
- if( !$result = $db->sql_query($sql) )
- {
- die("Couldn't update users table- " . $i);
- }
- }
-}
-
-echo "<BR><BR>COMPLETE<BR>";
-
-?>