diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-02-25 15:46:36 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-02-25 15:46:36 +0000 |
| commit | ca791961aa9664a6138954015f48bd417d372150 (patch) | |
| tree | 9f4be3812d47d4d2c7ca858ced63383f05a88696 /phpBB/develop/convert_sigs.php | |
| parent | 1e5de88c6f888da18b6745975d0aa5711787781d (diff) | |
| download | forums-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_sigs.php')
| -rw-r--r-- | phpBB/develop/convert_sigs.php | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/phpBB/develop/convert_sigs.php b/phpBB/develop/convert_sigs.php deleted file mode 100644 index 501106fc10..0000000000 --- a/phpBB/develop/convert_sigs.php +++ /dev/null @@ -1,93 +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 = "SELECT post_id, post_text - FROM " . POSTS_TEXT_TABLE; -if( $result = $db->sql_query($sql) ) -{ - $rowset = $db->sql_fetchrowset($result); - - $attach_sql = ""; - $non_attach_sql = ""; - - for($i = 0; $i < count($rowset); $i++) - { - if( ereg("\[addsig]$", $rowset[$i]['post_text'])) - { - if( $attach_sql != "" ) - { - $attach_sql .= ", "; - } - $attach_sql .= $rowset[$i]['post_id']; - - $sql = "UPDATE " . POSTS_TEXT_TABLE . " - SET post_text = '" . addslashes(preg_replace("/\[addsig\]/is", "", $rowset[$i]['post_text'])) . "' - WHERE post_id = " . $rowset[$i]['post_id']; - if( !$result = $db->sql_query($sql) ) - { - die("Couldn't update post_text - " . $i); - } - - } - else - { - if( $non_attach_sql != "" ) - { - $non_attach_sql .= ", "; - } - $non_attach_sql .= $rowset[$i]['post_id']; - } - } - - echo "<BR>"; - - if( $attach_sql != "" ) - { - echo $sql = "UPDATE " . POSTS_TABLE . " - SET enable_sig = 1 - WHERE post_id IN ($attach_sql)"; - if( !$result = $db->sql_query($sql) ) - { - die("Couldn't update post table attach_sig - "); - } - } - - echo "<BR>"; - - if( $non_attach_sql != "" ) - { - echo $sql = "UPDATE " . POSTS_TABLE . " - SET enable_sig = 0 - WHERE post_id IN ($non_attach_sql)"; - if( !$result = $db->sql_query($sql) ) - { - die("Couldn't update post table non_attach_sig - "); - } - } - -} - -$db->sql_close(); - - echo "<BR><BR>COMPLETE<BR>"; - -?> |
