Beispiel #1
0
 public function verify_modify($question_id, $log_id)
 {
     if (!($unverified_modify = $this->get_unverified_modify($question_id))) {
         return false;
     }
     if (!($action_log = ACTION_LOG::get_action_by_history_id($log_id))) {
         return false;
     }
     if (@in_array($log_id, $unverified_modify['content'])) {
         $this->update('question', array('question_content' => $action_log['associate_content'], 'update_time' => time()), 'question_id = ' . intval($question_id));
         $this->model('search_fulltext')->push_index('question', $action_log['associate_content'], $question_id);
         $this->clean_unverified_modify($question_id, 'content');
         ACTION_LOG::update_action_time_by_history_id($log_id);
     } else {
         if (@in_array($log_id, $unverified_modify['detail'])) {
             $this->update('question', array('question_detail' => $action_log['associate_content'], 'update_time' => time()), 'question_id = ' . intval($question_id));
             $this->clean_unverified_modify($question_id, 'detail');
             ACTION_LOG::update_action_time_by_history_id($log_id);
         }
     }
     return false;
 }