private function _review_word_counts($restriction, $basek, $k, $count) { $a = $this->review_cid_int_array($restriction, $basek, $k); if ($a !== false || $count) { return $a; } $result = Dbl::qe("select * from PaperReview where reviewWordCount is null and paperId={$this->paperId}"); $rf = ReviewForm::get(); $qs = []; while ($rrow = edb_orow($result)) { $qs[] = "update PaperReview set reviewWordCount=" . $rf->word_count($rrow) . " where reviewId=" . $rrow->reviewId; } Dbl::free($result); if (count($qs)) { $mresult = Dbl::multi_qe(join(";", $qs)); while ($result = $mresult->next()) { Dbl::free($result); } unset($this->reviewWordCounts, $this->allReviewWordCounts); } return $this->_review_word_counts($restriction, $basek, $k, $count + 1); }