Hi,
great hack. But I only installed massprune redirects for admins.
There is one problem: If there are to much redirects to delete I get a time out and the script terminates.
My suggestion: Because I can't find any table that points to a redirect-thread and imho it's not nessesary to update counters delete all threads at once.
I have not tested, but the following should work:
in admin-thread-php-addition replace
PHP Code:
while ($thread=$DB_site->fetch_array($threads)) {
deletethread($thread[threadid],0);
}
by
PHP Code:
$threadlist = "";
while ($thread=$DB_site->fetch_array($threads)) {
if ($threadlist == "") {
$threadlist = $thread[threadid];
} else {
$threadlist .= "," . $thread[threadid];
}
}
if ($threadlist != "") {
$DB_site->query("DELETE FROM thread WHERE threadid in (".$threadlist.")");
}
and
PHP Code:
while (list($key,$val)=each($delete)) {
if ($val==1) {
deletethread($key,0);
}
}
by
PHP Code:
$threadlist = "";
while (list($key,$val)=each($delete)) {
if ($val==1) {
if ($threadlist == "") {
$threadlist = $key;
} else {
$threadlist .= "," . $key;
}
}
}
if ($threadlist != "") {
$DB_site->query("DELETE FROM thread WHERE threadid in (".$threadlist.")");
}