diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index ab47959b25..74353d4215 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -469,6 +469,7 @@ phutil_register_library_map(array( 'PhabricatorRemarkupRuleMention' => 'infrastructure/markup/remarkup/markuprule/mention', 'PhabricatorRemarkupRuleObjectName' => 'infrastructure/markup/remarkup/markuprule/objectname', 'PhabricatorRemarkupRulePaste' => 'infrastructure/markup/remarkup/markuprule/paste', + 'PhabricatorRemarkupRulePhriction' => 'infrastructure/markup/remarkup/markuprule/phriction', 'PhabricatorRemarkupRuleProxyImage' => 'infrastructure/markup/remarkup/markuprule/proxyimage', 'PhabricatorRemarkupRuleYoutube' => 'infrastructure/markup/remarkup/markuprule/youtube', 'PhabricatorRepository' => 'applications/repository/storage/repository', @@ -980,6 +981,7 @@ phutil_register_library_map(array( 'PhabricatorRemarkupRuleMention' => 'PhutilRemarkupRule', 'PhabricatorRemarkupRuleObjectName' => 'PhutilRemarkupRule', 'PhabricatorRemarkupRulePaste' => 'PhabricatorRemarkupRuleObjectName', + 'PhabricatorRemarkupRulePhriction' => 'PhutilRemarkupRule', 'PhabricatorRemarkupRuleProxyImage' => 'PhutilRemarkupRule', 'PhabricatorRemarkupRuleYoutube' => 'PhutilRemarkupRule', 'PhabricatorRepository' => 'PhabricatorRepositoryDAO', diff --git a/src/applications/markup/engine/PhabricatorMarkupEngine.php b/src/applications/markup/engine/PhabricatorMarkupEngine.php index eeaa4a6616..36d01012dc 100644 --- a/src/applications/markup/engine/PhabricatorMarkupEngine.php +++ b/src/applications/markup/engine/PhabricatorMarkupEngine.php @@ -101,6 +101,7 @@ class PhabricatorMarkupEngine { $rules[] = new PhabricatorRemarkupRulePaste(); $rules[] = new PhabricatorRemarkupRuleImageMacro(); $rules[] = new PhabricatorRemarkupRuleMention(); + $rules[] = new PhabricatorRemarkupRulePhriction(); $custom_rule_classes = $options['custom-inline']; if ($custom_rule_classes) { diff --git a/src/applications/markup/engine/__init__.php b/src/applications/markup/engine/__init__.php index 27712754fd..58c7ea3c83 100644 --- a/src/applications/markup/engine/__init__.php +++ b/src/applications/markup/engine/__init__.php @@ -13,6 +13,7 @@ phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/ phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/maniphest'); phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/mention'); phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/paste'); +phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/phriction'); phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/proxyimage'); phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/youtube'); diff --git a/src/applications/phriction/controller/document/PhrictionDocumentController.php b/src/applications/phriction/controller/document/PhrictionDocumentController.php index 59ea1c2008..2da85b1d31 100644 --- a/src/applications/phriction/controller/document/PhrictionDocumentController.php +++ b/src/applications/phriction/controller/document/PhrictionDocumentController.php @@ -27,6 +27,8 @@ class PhrictionDocumentController public function processRequest() { + $request = $this->getRequest(); + $slug = PhrictionDocument::normalizeSlug($this->slug); if ($slug != $this->slug) { $uri = PhrictionDocument::getSlugURI($slug); @@ -41,19 +43,62 @@ class PhrictionDocumentController $slug); if (!$document) { - $page_content = 'No content here!'; + $create_uri = '/phriction/edit/?slug='.$slug; + + $page_content = + '