diff --git a/classes/Helper.php b/classes/Helper.php
index 12f8d5b..9c749a3 100644
--- a/classes/Helper.php
+++ b/classes/Helper.php
@@ -9,7 +9,7 @@ class Helper
}
/**
- * TYPES: 'clear','html','js'
+ * TYPES: 'clear','html', 'editor','js'
* @param type $string
* @param type $replaceType
* @return type
@@ -34,14 +34,22 @@ class Helper
switch ($replaceType) {
case 'html':
+ // Используется при отображении страницы точки или статьи
$linkName = $linkName ? $linkName : '';
$string = str_replace($link, '' . $linkName . '', $string);
break;
+ case 'editor':
+ // Используется при редактировании статьи
+ $linkName = $linkName ? $linkName : '';
+ $string = str_replace($link, '' . $linkName . '', $string);
+ break;
case 'js':
+ // Используется при показе описания описания точки НА КАРТЕ
$linkName = $linkName ? $linkName : '';
$string = str_replace($link, '' . $linkName . '', $string);
break;
default:
+ // Для OG и т.п. - без ссылок
$string = str_replace($link, $linkName, $string);
break;
}
diff --git a/controllers/ArticleController.php b/controllers/ArticleController.php
index 957a5d8..97c6d48 100644
--- a/controllers/ArticleController.php
+++ b/controllers/ArticleController.php
@@ -202,7 +202,7 @@ class ArticleController extends Controller
$html = str_replace(array('<','>',"'"), array('<','>','′'), $html);
$html = Markdown::processing($html);
$html = nl2br($html);
- $html = Helper::replaceLinks($html, 'html');
+ $html = Helper::replaceLinks($html, 'editor');
$html = Helper::replaceImgs($html, 'html', 'small');
print $html;