예제 #1
0
파일: view.php 프로젝트: nemein/openpsa
 /**
  * Checks if a new post has been submitted.
  */
 function _process_post()
 {
     if (!midcom::get('auth')->user && !midcom::get('auth')->request_sudo('net.nehmer.comments')) {
         throw new midcom_error('We were anonymous but could not acquire SUDO privileges, aborting');
     }
     switch ($this->_post_controller->process_form()) {
         case 'save':
             // Check against comment spam
             $this->_new_comment->check_spam($this->_config);
             midcom::get('cache')->invalidate($this->_objectguid);
             // Fall-through intentional
         // Fall-through intentional
         case 'cancel':
             if (!midcom::get('auth')->user) {
                 midcom::get('auth')->drop_sudo();
             }
             $this->_relocate_to_self();
             // This will exit();
     }
 }