$errorPage->Render(); return; } } switch ($path[2]) { case "journals": if ($path[4] == "entries.rss" || $path[4] == "entries.atom") { require "journal/detail.inc.php"; return; } else { if ($path[4] == "entries" && $path[6] == "comment") { $journal = Journal::GetByIDOrName($path[3]); if ($journal == null) { return; } $entry = JournalEntry::GetByIDOrName($path[5]); $entryUrl = System::ExpandRelativePath("~/community/members/" . $thisuser->ShortName . "/journals/" . $journal->Name . "/entries/" . $entry->Name); switch ($path[6]) { case "comment": if ($_SERVER["REQUEST_METHOD"] == "POST") { $reply_to = null; if ($_POST["reply_comment_id"] != null) { $reply_to = JournalEntryComment::GetByID($_POST["reply_comment_id"]); } $title = $_POST["comment_title"]; $content = $_POST["comment_content"]; if (!$entry->AddComment($title, $content, $reply_to)) { $page = new ErrorPage(); $page->ErrorCode = mysql_errno(); $page->ErrorDescription = mysql_error(); $page->Render();