. $cli_only = true; require_once("../inc/util_ops.inc"); require_once('../inc/bbcode_convert.inc'); db_init(); set_time_limit(0); function fix_forum_preferences($forum_preferences) { $text = html_to_bbcode($forum_preferences->signature); if ($text != $forum_preferences->signature) { $query = "update forum_preferences set signature = '".mysql_escape_string($text)."' where userid=".$forum_preferences->userid; //echo "$forum_preferences->signature\n\n"; //echo "$forum_preferences->thread $query\n\n"; $retval = mysql_query($query); if (!$retval) { echo mysql_error(); exit(); } } } function fix_forum_preferencess() { $start_id = 0; //Set this to something else if you like $forum_preferencess = mysql_query("select * from forum_preferences where userid>$start_id order by userid"); echo mysql_error(); $i=0; while ($forum_preferences = mysql_fetch_object($forum_preferencess)){ $i++; if ($i%100 == 0) { //For every 100 forum_preferencess echo $forum_preferences->userid.". "; flush(); // print out where we are //usleep(200000); } if ($forum_preferences->userid > $start_id){ fix_forum_preferences($forum_preferences); } } } // use this to patch problem cases; hand-edit function fix_fix() { $forum_preferencess = mysql_query("select * from forum_preferences where id=99"); $forum_preferences = mysql_fetch_object($forum_preferencess); fix_forum_preferences($forum_preferences); } fix_forum_preferencess(); //fix_fix(); ?>