summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/disk.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2000-12-07 23:16:19 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2000-12-07 23:16:19 +0000
commit0c0b00ab8086c07600680d41e2f8feefe0f8f150 (patch)
tree0da2100a6944b5efed0aa02d950d98a071bec0cc /mdk-stage1/disk.c
parent71d6a65fa155d25fc325d6a9b83a746f5845922e (diff)
downloaddrakx-0c0b00ab8086c07600680d41e2f8feefe0f8f150.tar
drakx-0c0b00ab8086c07600680d41e2f8feefe0f8f150.tar.gz
drakx-0c0b00ab8086c07600680d41e2f8feefe0f8f150.tar.bz2
drakx-0c0b00ab8086c07600680d41e2f8feefe0f8f150.tar.xz
drakx-0c0b00ab8086c07600680d41e2f8feefe0f8f150.zip
'<!-- w --><a href="', ); $with = array( '<!-- l --><a class="postlink-local" href="', '<!-- m --><a class="postlink" href="', '<!-- w --><a class="postlink" href="', ); // Adjust user signatures $sql = 'SELECT user_id, user_sig FROM ' . USERS_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $new_content = str_replace($replace, $with, $row['user_sig']); if ($new_content != $row['user_sig']) { $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig = '" . $db->sql_escape($new_content) . "' WHERE user_id = " . $row['user_id']; $db->sql_query($sql); if ($echos > 200) { echo '<br />' . "\n"; $echos = 0; } echo '.'; $echos++; flush(); } } $db->sql_freeresult($result); // Now adjust posts $sql = 'SELECT post_id, post_text FROM ' . POSTS_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $new_content = str_replace($replace, $with, $row['post_text']); if ($row['post_text'] != $new_content) { $sql = 'UPDATE ' . POSTS_TABLE . " SET post_text = '" . $db->sql_escape($new_content) . "' WHERE post_id = " . $row['post_id']; $db->sql_query($sql); if ($echos > 200) { echo '<br />' . "\n"; $echos = 0; } echo '.'; $echos++; flush(); } } $db->sql_freeresult($result); // Now to the private messages $sql = 'SELECT msg_id, message_text FROM ' . PRIVMSGS_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $new_content = str_replace($replace, $with, $row['message_text']); if ($row['message_text'] != $new_content) { $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($new_content) . "' WHERE msg_id = " . $row['msg_id']; $db->sql_query($sql); if ($echos > 200) { echo '<br />' . "\n"; $echos = 0; } echo '.'; $echos++; flush(); } } $db->sql_freeresult($result); // Done $db->sql_close();