Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / phame / application / PhabricatorPhameApplication.php
blobcd2eb4b487f9097bc012f7aba008c6609bf5919d
1 <?php
3 final class PhabricatorPhameApplication extends PhabricatorApplication {
5 public function getName() {
6 return pht('Phame');
9 public function getBaseURI() {
10 return '/phame/';
13 public function getIcon() {
14 return 'fa-feed';
17 public function getShortDescription() {
18 return pht('Internal and External Blogs');
21 public function getTitleGlyph() {
22 return "\xe2\x9c\xa9";
25 public function getHelpDocumentationArticles(PhabricatorUser $viewer) {
26 return array(
27 array(
28 'name' => pht('Phame User Guide'),
29 'href' => PhabricatorEnv::getDoclink('Phame User Guide'),
34 public function getRoutes() {
35 return array(
36 '/J(?P<id>[1-9]\d*)' => 'PhamePostViewController',
37 '/phame/' => array(
38 '' => 'PhameHomeController',
40 // NOTE: The live routes include an initial "/", so leave it off
41 // this route.
42 '(?P<live>live)/(?P<blogID>\d+)' => $this->getLiveRoutes(),
43 'post/' => array(
44 '(?:query/(?P<queryKey>[^/]+)/)?' => 'PhamePostListController',
45 'blogger/(?P<bloggername>[\w\.-_]+)/' => 'PhamePostListController',
46 $this->getEditRoutePattern('edit/')
47 => 'PhamePostEditController',
48 'history/(?P<id>\d+)/' => 'PhamePostHistoryController',
49 'view/(?P<id>\d+)/(?:(?P<slug>[^/]+)/)?' => 'PhamePostViewController',
50 '(?P<action>publish|unpublish)/(?P<id>\d+)/'
51 => 'PhamePostPublishController',
52 'preview/' => 'PhabricatorMarkupPreviewController',
53 'move/(?P<id>\d+)/' => 'PhamePostMoveController',
54 'archive/(?P<id>\d+)/' => 'PhamePostArchiveController',
55 'header/(?P<id>[1-9]\d*)/' => 'PhamePostHeaderPictureController',
57 'blog/' => array(
58 '(?:query/(?P<queryKey>[^/]+)/)?' => 'PhameBlogListController',
59 'archive/(?P<id>[^/]+)/' => 'PhameBlogArchiveController',
60 $this->getEditRoutePattern('edit/')
61 => 'PhameBlogEditController',
62 'view/(?P<blogID>\d+)/' => 'PhameBlogViewController',
63 'manage/(?P<id>[^/]+)/' => 'PhameBlogManageController',
64 'feed/(?P<id>[^/]+)/' => 'PhameBlogFeedController',
65 'picture/(?P<id>[1-9]\d*)/' => 'PhameBlogProfilePictureController',
66 'header/(?P<id>[1-9]\d*)/' => 'PhameBlogHeaderPictureController',
72 public function getBlogRoutes() {
73 return $this->getLiveRoutes() + array(
74 '/status/' => 'PhabricatorStatusController',
75 '/favicon.ico' => 'PhabricatorFaviconController',
76 '/robots.txt' => 'PhabricatorRobotsBlogController',
80 private function getLiveRoutes() {
81 return array(
82 '/' => array(
83 '' => 'PhameBlogViewController',
84 'post/(?P<id>\d+)/(?:(?P<slug>[^/]+)/)?' => 'PhamePostViewController',
90 public function getQuicksandURIPatternBlacklist() {
91 return array(
92 '/phame/live/.*',
96 public function getRemarkupRules() {
97 return array(
98 new PhamePostRemarkupRule(),
103 protected function getCustomCapabilities() {
104 return array(
105 PhameBlogCreateCapability::CAPABILITY => array(
106 'default' => PhabricatorPolicies::POLICY_USER,
107 'caption' => pht('Default create policy for blogs.'),