public static function deletePost($sApiKey, $iJournalEntryId, $sUserName, $sPassword) { if (!self::checkLogin($sUserName, $sPassword)) { return self::loginError(); } $oJournalEntry = JournalEntryPeer::retrieveByPk($iJournalEntryId); if ($oJournalEntry === null) { return self::error("No Entry with id {$iJournalEntryId}", 2); } return $oJournalEntry->delete(); }