- Модуль: wiki
- Путь к файлу: ~/bitrix/modules/wiki/classes/general/wiki_parser.php
- Класс: CWikiParser
- Вызов: CWikiParser::parseBeforeSave
function parseBeforeSave($text, &$arCat = array(), $nameTemplate = "")
{
$userLogin = CWikiUtils::GetUserLogin(array(), $nameTemplate);
//$text = preg_replace_callback('/((.*))/isU'.BX_UTF_PCRE_MODIFIER, array(&$this, '_noWikiCallback'), $text);
// Subscribe
$text = preg_replace( '/--~~~~*/'.BX_UTF_PCRE_MODIFIER, '\1--'.$userLogin.' '.ConvertTimeStamp(false, 'FULL'), $text );
// Category
$matches = array();
$textWithoutNowiki = preg_replace('/((.*))/isU'.BX_UTF_PCRE_MODIFIER, '', $text);
if (preg_match_all('/[[(Category|'.GetMessage('CATEGORY_NAME').'):(.+)]]/iU'.BX_UTF_PCRE_MODIFIER, $textWithoutNowiki, $matches))
$arCat = array_unique($matches[2]);
//$text = preg_replace_callback('/(##NOWIKI(d+)##)/isU'.BX_UTF_PCRE_MODIFIER, array(&$this, '_noWikiReturn2Callback'), $text);
return $text;
}