setPageTitle(WT_I18N::translate('Add/edit a journal/news entry')) ->restrictAccess(Auth::isMember()) ->pageHeader(); $action = WT_Filter::get('action', 'compose|save|delete', 'compose'); $news_id = WT_Filter::getInteger('news_id'); $user_id = WT_Filter::get('user_id', WT_REGEX_INTEGER, WT_Filter::post('user_id', WT_REGEX_INTEGER)); $gedcom_id = WT_Filter::get('gedcom_id', WT_REGEX_INTEGER, WT_Filter::post('gedcom_id', WT_REGEX_INTEGER)); $date = WT_Filter::postInteger('date', 0, PHP_INT_MAX, WT_TIMESTAMP); $title = WT_Filter::post('title'); $text = WT_Filter::post('text'); switch ($action) { case 'compose': if (array_key_exists('ckeditor', WT_Module::getActiveModules())) { ckeditor_WT_Module::enableEditor($controller); } echo '