PDA

View Full Version : MassMove Locked Topics


06-26-2001, 10:00 PM
little hack to move your locked topics to an archive forum or whatever.

Streicher
08-31-2001, 07:36 PM
Nice hack, but you have a little error in it:

if ($HTTP_POST_VARS['action']=="movedate") {
$DB_site->query("UPDATE thread SET forumid=$destforumid WHERE $forumcheck thread.lastpost<=$datecut");
} elseif ($HTTP_POST_VARS['action']=="movelockdate") {
$DB_site->query("UPDATE thread SET forumid=$destforumid WHERE open='0'AND $forumcheck thread.lastpost<=$datecut");
}
echo "<p>Posts moved successfully! It is recommend that you <a href=\"misc.php?s=$session[sessionhash]\">update counters</a> now.</p>";
}

must be

if ($HTTP_POST_VARS['action']=="movedate") {
$DB_site->query("UPDATE thread SET forumid=$destforumid WHERE $forumcheck thread.lastpost<=$datecut");
} elseif ($HTTP_POST_VARS['action']=="movelockdate") {
$DB_site->query("UPDATE thread SET forumid=$destforumid WHERE open='0'AND $forumcheck thread.lastpost<=$datecut");
}

Ping Production
09-03-2001, 02:56 PM
with your post going way off the board?

seems like a pretty big bug, that has been overlooked?

Steve Machol
09-03-2001, 03:01 PM
That's not a bug. This is how it's supposed to work when someone uses the [code] or [php] tags. This is to make sure the code is duplicated accurately, without any line feeds, etc.