コード例 #1
0
 private static function getUCIForPage($pageTitle)
 {
     if (!$pageTitle) {
         return array();
     }
     $dbr = wfGetDB(DB_SLAVE);
     $res = $dbr->select('user_completed_images', '*', array("uci_article_name" => $pageTitle, "uci_upvotes >= " . self::UCI_UPVOTES, "uci_downvotes < " . self::UCI_DOWNVOTES, "uci_copyright_violates = 0", "uci_copyright_checked = 1"), __METHOD__);
     $files = array();
     foreach ($res as $row) {
         $files[$row->uci_article_id] = UCIPatrol::fileFromRow($row);
     }
     return $files;
 }