AshDigg,
There is another file I see here as well called admin_links.php.
This seems to be the page that where you actually select publish/discard/cue on and click on the change status.
a code snippet from this page
Code:
// if admin changes the link status
if ($_GET['action'] == "bulkmod") {
if(isset($_POST['submit'])) {
$comment = array();
foreach ($_POST["link"] as $k => $v) {
$comment[intval($k)] = $v;
}
foreach($comment as $key => $value) {
if ($value == "publish") {
$db->query('UPDATE `' . table_links . '` SET `link_status` = "published", link_published_date = now() WHERE `link_id` = "'.$key.'"');
}
elseif ($value == "queued") {
$db->query('UPDATE `' . table_links . '` SET `link_status` = "queued", link_published_date=0 WHERE `link_id` = "'.$key.'"');
}
elseif ($value == "discard") {
$db->query('UPDATE `' . table_links . '` SET `link_status` = "discard" WHERE `link_id` = "'.$key.'"');
}
}
header("Location: ".my_pligg_base."/admin_links.php");
}
} as in linkadmin.php I see you are updating the table_links table but unlinke in linkadmin.php there is no total_regenerate() call. It's not needed in there as well?
PS: If it's the case that a totals_regenerate is needed there, where else in the app is the table_links updated (eg. it may auto update when a story has enough votes to go from upcoming to publish), that may also need a totals_regenerate.