/** * Method to insert form data in the object * * and loads error messages if data doesn't fit * * @access private * @return boolean */ private function check_post_data() { $results = array(); $errors = array(); array_push($results, $this->_link->__set('_name', VPost::name())); array_push($results, $this->_link->__set('_link', VPost::url())); array_push($results, $this->_link->__set('_rss_link', VPost::rss())); array_push($results, $this->_link->__set('_notes', VPost::notes())); array_push($results, $this->_link->__set('_priority', VPost::lvl())); foreach ($results as $result) { if ($result !== true) { array_push($errors, '<li>- ' . $result . '</li>'); } } if (!empty($errors)) { $error_msg = 'Check your informations:<br/><ul>' . implode('', $errors) . '</ul>'; $this->_action_msg = ActionMessages::custom_wrong($error_msg); return false; } else { return true; } }