Ejemplo n.º 1
0
 protected static function upgradeNoticeCreated()
 {
     $score = new Spam_score();
     $score->whereAdd('notice_created IS NULL');
     if ($score->find()) {
         while ($score->fetch()) {
             $notice = Notice::staticGet('id', $score->notice_id);
             if (!empty($notice)) {
                 $orig = clone $score;
                 $score->notice_created = $notice->created;
                 $score->update($orig);
             }
         }
     }
 }