Пример #1
0
 /**
  * Changes the status according to the value of a certain field.
  *
  * @param int $field  A field number.
  * @param int $status A status code.
  *
  * @return void
  */
 protected function changeStatus($field, $status)
 {
     $articles = Realblog_Article::findArticlesForAutoStatusChange($field, $status);
     foreach ($articles as $article) {
         $article->setStatus($status);
         $article->update();
     }
 }