/** * Handles converting wikitext to richtext and vice versa. * * @param string $text - the text to convert * @return string - the converted text */ public static function getConvertedContent($content = '') { global $wgEnableMiniEditorExtForArticleComments, $wgRequest; if ($wgEnableMiniEditorExtForArticleComments && !empty($content)) { $convertToFormat = $wgRequest->getVal('convertToFormat', ''); if (!empty($convertToFormat)) { $content = MiniEditorHelper::convertContent($content, $convertToFormat); } } return $content; }
/** * Handles converting wikitext to richtext and vice versa. * * @param string $text - the text to convert * @return string - the converted text */ private function getConvertedContent($content = '') { if ($this->wg->EnableMiniEditorExtForWall && !empty($content)) { $convertToFormat = $this->request->getVal('convertToFormat', ''); if (!empty($convertToFormat)) { $content = MiniEditorHelper::convertContent($content, $convertToFormat, $this->response); } } return $content; }