*/ } /** * Check if the keys are set, if not * then set an error.. */ foreach ($keys as $key => $message) { if (!isset($post[$key]) || empty($post[$key])) { $errors[] = 'Error occured, missing: ' . $message; } } $redirect = $post['redirect']; if (empty($errors)) { require_once 'notes/ManualNotes.class.php'; $manualNote = new Manual_Notes(); $added = $manualNote->addComment($post['noteUrl'], $post['user'], $post['note']); if (PEAR::isError($added)) { if (isset($post['noteUrl'])) { /** * If someone tries to access this page * without a noteUrl then it's his problem * to get the comment template without * a noteUrl.. this is recursivly not * going to be working however this check * should not have to be done because * in order to get to this point.. you need * to have. */ $noteUrl = strip_tags($post['noteUrl']); } $errors[] = $added->getMessage() . ' please contact <a href="mailto:' . PEAR_WEBMASTER_EMAIL . '">Webmaster</a> , Thanks';