mirror of https://github.com/BOINC/boinc.git
svn path=/trunk/boinc/; revision=15434
This commit is contained in:
parent
13319d65f8
commit
e65c5f562e
|
@ -58,7 +58,7 @@ class BoincThread {
|
|||
$db = BoincDb::get();
|
||||
return $db->update($this, 'thread', $clause);
|
||||
}
|
||||
static function enum($clause) {
|
||||
static function enum($clause="") {
|
||||
$db = BoincDb::get();
|
||||
return $db->enum('thread', 'BoincThread', $clause);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
// due to bugs and DB gremlins.
|
||||
// This script repairs some of them.
|
||||
|
||||
ini_set("memory_limit", "1024M");
|
||||
|
||||
require_once("../inc/forum_db.inc");
|
||||
|
||||
function update_thread_timestamps() {
|
||||
|
@ -36,7 +38,7 @@ function update_user_posts() {
|
|||
function update_thread_replies() {
|
||||
$threads = BoincThread::enum();
|
||||
foreach ($threads as $t) {
|
||||
$n = BoincPost::count("thread=$t->id");
|
||||
$n = BoincPost::count("thread=$t->id and hidden=0");
|
||||
$n--;
|
||||
if ($t->replies != $n) {
|
||||
$t->update("replies=$n");
|
||||
|
|
Loading…
Reference in New Issue