@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Authentication

+421 -16
+7
src/__phutil_library_map__.php
··· 18 18 'AphrontDialogResponse' => 'aphront/response/dialog', 19 19 'AphrontDialogView' => 'view/dialog', 20 20 'AphrontErrorView' => 'view/form/error', 21 + 'AphrontException' => 'aphront/exception/base', 21 22 'AphrontFileResponse' => 'aphront/response/file', 22 23 'AphrontFormCheckboxControl' => 'view/form/control/checkbox', 23 24 'AphrontFormControl' => 'view/form/control/base', ··· 41 42 'AphrontQueryObjectMissingException' => 'storage/exception/objectmissing', 42 43 'AphrontQueryParameterException' => 'storage/exception/parameter', 43 44 'AphrontQueryRecoverableException' => 'storage/exception/recoverable', 45 + 'AphrontRedirectException' => 'aphront/exception/redirect', 44 46 'AphrontRedirectResponse' => 'aphront/response/redirect', 45 47 'AphrontRequest' => 'aphront/request', 46 48 'AphrontResponse' => 'aphront/response/base', ··· 84 86 'DifferentialUnitStatus' => 'applications/differential/constants/unitstatus', 85 87 'Javelin' => 'infratructure/javelin/api', 86 88 'LiskDAO' => 'storage/lisk/dao', 89 + 'PhabricatorAuthController' => 'applications/auth/controlller/base', 87 90 'PhabricatorConduitAPIController' => 'applications/conduit/controller/api', 88 91 'PhabricatorConduitConnectionLog' => 'applications/conduit/storage/connectionlog', 89 92 'PhabricatorConduitConsoleController' => 'applications/conduit/controller/console', ··· 112 115 'PhabricatorFileUploadController' => 'applications/files/controller/upload', 113 116 'PhabricatorFileViewController' => 'applications/files/controller/view', 114 117 'PhabricatorLiskDAO' => 'applications/base/storage/lisk', 118 + 'PhabricatorLoginController' => 'applications/auth/controlller/login', 115 119 'PhabricatorMailImplementationAdapter' => 'applications/metamta/adapter/base', 116 120 'PhabricatorMailImplementationPHPMailerLiteAdapter' => 'applications/metamta/adapter/phpmailerlite', 117 121 'PhabricatorMetaMTAController' => 'applications/metamta/controller/base', ··· 191 195 'AphrontQueryObjectMissingException' => 'AphrontQueryException', 192 196 'AphrontQueryParameterException' => 'AphrontQueryException', 193 197 'AphrontQueryRecoverableException' => 'AphrontQueryException', 198 + 'AphrontRedirectException' => 'AphrontException', 194 199 'AphrontRedirectResponse' => 'AphrontResponse', 195 200 'AphrontSideNavView' => 'AphrontView', 196 201 'AphrontTableView' => 'AphrontView', ··· 215 220 'DifferentialRevision' => 'DifferentialDAO', 216 221 'DifferentialRevisionEditController' => 'DifferentialController', 217 222 'DifferentialRevisionListController' => 'DifferentialController', 223 + 'PhabricatorAuthController' => 'PhabricatorController', 218 224 'PhabricatorConduitAPIController' => 'PhabricatorConduitController', 219 225 'PhabricatorConduitConnectionLog' => 'PhabricatorConduitDAO', 220 226 'PhabricatorConduitConsoleController' => 'PhabricatorConduitController', ··· 242 248 'PhabricatorFileUploadController' => 'PhabricatorFileController', 243 249 'PhabricatorFileViewController' => 'PhabricatorFileController', 244 250 'PhabricatorLiskDAO' => 'LiskDAO', 251 + 'PhabricatorLoginController' => 'PhabricatorAuthController', 245 252 'PhabricatorMailImplementationPHPMailerLiteAdapter' => 'PhabricatorMailImplementationAdapter', 246 253 'PhabricatorMetaMTAController' => 'PhabricatorController', 247 254 'PhabricatorMetaMTADAO' => 'PhabricatorLiskDAO',
+4
src/aphront/controller/AphrontController.php
··· 23 23 24 24 private $request; 25 25 26 + public function willBeginExecution() { 27 + return; 28 + } 29 + 26 30 public function willProcessRequest(array $uri_data) { 27 31 return; 28 32 }
+2
src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php
··· 103 103 'lists/edit/(?:(?<id>\d+)/)?$' 104 104 => 'PhabricatorMetaMTAMailingListEditController', 105 105 ), 106 + 107 + '/login/' => 'PhabricatorLoginController', 106 108 ); 107 109 } 108 110
+21
src/aphront/exception/base/AphrontException.php
··· 1 + <?php 2 + 3 + /* 4 + * Copyright 2011 Facebook, Inc. 5 + * 6 + * Licensed under the Apache License, Version 2.0 (the "License"); 7 + * you may not use this file except in compliance with the License. 8 + * You may obtain a copy of the License at 9 + * 10 + * http://www.apache.org/licenses/LICENSE-2.0 11 + * 12 + * Unless required by applicable law or agreed to in writing, software 13 + * distributed under the License is distributed on an "AS IS" BASIS, 14 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 + * See the License for the specific language governing permissions and 16 + * limitations under the License. 17 + */ 18 + 19 + class AphrontException extends Exception { 20 + 21 + }
+10
src/aphront/exception/base/__init__.php
··· 1 + <?php 2 + /** 3 + * This file is automatically generated. Lint this module to rebuild it. 4 + * @generated 5 + */ 6 + 7 + 8 + 9 + 10 + phutil_require_source('AphrontException.php');
+31
src/aphront/exception/redirect/AphrontRedirectException.php
··· 1 + <?php 2 + 3 + /* 4 + * Copyright 2011 Facebook, Inc. 5 + * 6 + * Licensed under the Apache License, Version 2.0 (the "License"); 7 + * you may not use this file except in compliance with the License. 8 + * You may obtain a copy of the License at 9 + * 10 + * http://www.apache.org/licenses/LICENSE-2.0 11 + * 12 + * Unless required by applicable law or agreed to in writing, software 13 + * distributed under the License is distributed on an "AS IS" BASIS, 14 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 + * See the License for the specific language governing permissions and 16 + * limitations under the License. 17 + */ 18 + 19 + class AphrontRedirectException extends AphrontException { 20 + 21 + private $uri; 22 + 23 + public function __construct($uri) { 24 + $this->uri = $uri; 25 + } 26 + 27 + public function getURI() { 28 + return $this->uri; 29 + } 30 + 31 + }
+12
src/aphront/exception/redirect/__init__.php
··· 1 + <?php 2 + /** 3 + * This file is automatically generated. Lint this module to rebuild it. 4 + * @generated 5 + */ 6 + 7 + 8 + 9 + phutil_require_module('phabricator', 'aphront/exception/base'); 10 + 11 + 12 + phutil_require_source('AphrontRedirectException.php');
+34
src/aphront/request/AphrontRequest.php
··· 28 28 private $host; 29 29 private $path; 30 30 private $requestData; 31 + private $user; 31 32 32 33 final public function __construct($host, $path) { 33 34 $this->host = $host; ··· 87 88 final public function isFormPost() { 88 89 return $this->getExists(self::TYPE_FORM) && $this->isHTTPPost(); 89 90 } 91 + 92 + final public function getCookie($name, $default = null) { 93 + return idx($_COOKIE, $name, $default); 94 + } 95 + 96 + final public function clearCookie($name) { 97 + $this->setCookie($name, '', time() - (60 * 60 * 24 * 30)); 98 + } 99 + 100 + final public function setCookie($name, $value, $expire = null) { 101 + if ($expire === null) { 102 + $expire = time() + (60 * 60 * 24 * 365 * 5); 103 + } 104 + setcookie( 105 + $name, 106 + $value, 107 + $expire, 108 + $path = '/', 109 + $domain = '', 110 + $secure = false, 111 + $http_only = true); 112 + } 113 + 114 + final public function setUser($user) { 115 + $this->user = $user; 116 + return $this; 117 + } 118 + 119 + final public function getUser() { 120 + return $this->user; 121 + } 122 + 123 + 90 124 91 125 }
+2
src/aphront/request/__init__.php
··· 6 6 7 7 8 8 9 + phutil_require_module('phutil', 'utils'); 10 + 9 11 10 12 phutil_require_source('AphrontRequest.php');
+33
src/applications/auth/controlller/base/PhabricatorAuthController.php
··· 1 + <?php 2 + 3 + /* 4 + * Copyright 2011 Facebook, Inc. 5 + * 6 + * Licensed under the Apache License, Version 2.0 (the "License"); 7 + * you may not use this file except in compliance with the License. 8 + * You may obtain a copy of the License at 9 + * 10 + * http://www.apache.org/licenses/LICENSE-2.0 11 + * 12 + * Unless required by applicable law or agreed to in writing, software 13 + * distributed under the License is distributed on an "AS IS" BASIS, 14 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 + * See the License for the specific language governing permissions and 16 + * limitations under the License. 17 + */ 18 + 19 + abstract class PhabricatorAuthController extends PhabricatorController { 20 + 21 + public function buildStandardPageResponse($view, array $data) { 22 + $page = $this->buildStandardPageView(); 23 + 24 + $page->setApplicationName('Login'); 25 + $page->setBaseURI('/login/'); 26 + $page->setTitle(idx($data, 'title')); 27 + $page->appendChild($view); 28 + 29 + $response = new AphrontWebpageResponse(); 30 + return $response->setContent($page->render()); 31 + } 32 + 33 + }
+15
src/applications/auth/controlller/base/__init__.php
··· 1 + <?php 2 + /** 3 + * This file is automatically generated. Lint this module to rebuild it. 4 + * @generated 5 + */ 6 + 7 + 8 + 9 + phutil_require_module('phabricator', 'aphront/response/webpage'); 10 + phutil_require_module('phabricator', 'applications/base/controller/base'); 11 + 12 + phutil_require_module('phutil', 'utils'); 13 + 14 + 15 + phutil_require_source('PhabricatorAuthController.php');
+122
src/applications/auth/controlller/login/PhabricatorLoginController.php
··· 1 + <?php 2 + 3 + /* 4 + * Copyright 2011 Facebook, Inc. 5 + * 6 + * Licensed under the Apache License, Version 2.0 (the "License"); 7 + * you may not use this file except in compliance with the License. 8 + * You may obtain a copy of the License at 9 + * 10 + * http://www.apache.org/licenses/LICENSE-2.0 11 + * 12 + * Unless required by applicable law or agreed to in writing, software 13 + * distributed under the License is distributed on an "AS IS" BASIS, 14 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 + * See the License for the specific language governing permissions and 16 + * limitations under the License. 17 + */ 18 + 19 + class PhabricatorLoginController extends PhabricatorAuthController { 20 + 21 + public function shouldRequireLogin() { 22 + return false; 23 + } 24 + 25 + public function processRequest() { 26 + $request = $this->getRequest(); 27 + 28 + $error = false; 29 + $login_name = $request->getCookie('phu'); 30 + if ($request->isFormPost()) { 31 + $login_name = $request->getStr('login'); 32 + 33 + $user = id(new PhabricatorUser())->loadOneWhere( 34 + 'username = %s', 35 + $login_name); 36 + 37 + $user->setPassword('asdf'); 38 + $user->save(); 39 + 40 + $okay = false; 41 + if ($user) { 42 + if ($user->comparePassword($request->getStr('password'))) { 43 + $conn_w = $user->establishConnection('w'); 44 + 45 + $urandom = fopen('/dev/urandom', 'r'); 46 + if (!$urandom) { 47 + throw new Exception("Failed to open /dev/urandom!"); 48 + } 49 + $entropy = fread($urandom, 20); 50 + if (strlen($entropy) != 20) { 51 + throw new Exception("Failed to read /dev/urandom!"); 52 + } 53 + 54 + $session_key = sha1($entropy); 55 + queryfx( 56 + $conn_w, 57 + 'INSERT INTO phabricator_session '. 58 + '(userPHID, type, sessionKey, sessionStart)'. 59 + ' VALUES '. 60 + '(%s, %s, %s, UNIX_TIMESTAMP()) '. 61 + 'ON DUPLICATE KEY UPDATE '. 62 + 'sessionKey = VALUES(sessionKey), '. 63 + 'sessionStart = VALUES(sessionStart)', 64 + $user->getPHID(), 65 + 'web', 66 + $session_key); 67 + 68 + $request->setCookie('phusr', $user->getUsername()); 69 + $request->setCookie('phsid', $session_key); 70 + 71 + return id(new AphrontRedirectResponse()) 72 + ->setURI('/'); 73 + } 74 + } 75 + 76 + if (!$okay) { 77 + $request->clearCookie('phusr'); 78 + $request->clearCookie('phsid'); 79 + } 80 + 81 + $error = true; 82 + } 83 + 84 + $error_view = null; 85 + if ($error) { 86 + $error_view = new AphrontErrorView(); 87 + $error_view->setTitle('Bad username/password.'); 88 + } 89 + 90 + $form = new AphrontFormView(); 91 + $form 92 + ->setAction('/login/') 93 + ->appendChild( 94 + id(new AphrontFormTextControl()) 95 + ->setLabel('Login') 96 + ->setName('login') 97 + ->setValue($login_name)) 98 + ->appendChild( 99 + id(new AphrontFormTextControl()) 100 + ->setLabel('Password') 101 + ->setName('password')) 102 + ->appendChild( 103 + id(new AphrontFormSubmitControl()) 104 + ->setValue('Login')); 105 + 106 + 107 + $panel = new AphrontPanelView(); 108 + $panel->setHeader('Phabricator Login'); 109 + $panel->setWidth(AphrontPanelView::WIDTH_FORM); 110 + $panel->appendChild($form); 111 + 112 + return $this->buildStandardPageResponse( 113 + array( 114 + $error_view, 115 + $panel, 116 + ), 117 + array( 118 + 'title' => 'Login', 119 + )); 120 + } 121 + 122 + }
+21
src/applications/auth/controlller/login/__init__.php
··· 1 + <?php 2 + /** 3 + * This file is automatically generated. Lint this module to rebuild it. 4 + * @generated 5 + */ 6 + 7 + 8 + 9 + phutil_require_module('phabricator', 'aphront/response/redirect'); 10 + phutil_require_module('phabricator', 'applications/auth/controlller/base'); 11 + phutil_require_module('phabricator', 'applications/people/storage/user'); 12 + phutil_require_module('phabricator', 'storage/queryfx'); 13 + phutil_require_module('phabricator', 'view/form/base'); 14 + phutil_require_module('phabricator', 'view/form/control/submit'); 15 + phutil_require_module('phabricator', 'view/form/error'); 16 + phutil_require_module('phabricator', 'view/layout/panel'); 17 + 18 + phutil_require_module('phutil', 'utils'); 19 + 20 + 21 + phutil_require_source('PhabricatorLoginController.php');
+41 -1
src/applications/base/controller/base/PhabricatorController.php
··· 18 18 19 19 abstract class PhabricatorController extends AphrontController { 20 20 21 + public function shouldRequireLogin() { 22 + return true; 23 + } 24 + 25 + final public function willBeginExecution() { 26 + 27 + $request = $this->getRequest(); 28 + 29 + $user = new PhabricatorUser(); 30 + 31 + $phusr = $request->getCookie('phusr'); 32 + $phsid = $request->getCookie('phsid'); 33 + 34 + if ($phusr && $phsid) { 35 + $info = queryfx_one( 36 + $user->establishConnection('r'), 37 + 'SELECT u.* FROM %T u JOIN %T s ON u.phid = s.userPHID 38 + AND s.type = %s AND s.sessionKey = %s', 39 + $user->getTableName(), 40 + 'phabricator_session', 41 + 'web', 42 + $phsid); 43 + if ($info) { 44 + $user->loadFromArray($info); 45 + } 46 + } 47 + 48 + $request->setUser($user); 49 + 50 + if ($this->shouldRequireLogin() && !$user->getPHID()) { 51 + throw new AphrontRedirectException('/login/'); 52 + } 53 + } 54 + 55 + public function buildStandardPageView() { 56 + $view = new PhabricatorStandardPageView(); 57 + $view->setRequest($this->getRequest()); 58 + return $view; 59 + } 60 + 21 61 public function buildStandardPageResponse($view) { 22 - $page = new PhabricatorStandardPageView(); 62 + $page = $this->buildStandardPageView(); 23 63 $page->appendChild($view); 24 64 $response = new AphrontWebpageResponse(); 25 65 $response->setContent($page->render());
+3
src/applications/base/controller/base/__init__.php
··· 7 7 8 8 9 9 phutil_require_module('phabricator', 'aphront/controller'); 10 + phutil_require_module('phabricator', 'aphront/exception/redirect'); 10 11 phutil_require_module('phabricator', 'aphront/response/webpage'); 12 + phutil_require_module('phabricator', 'applications/people/storage/user'); 13 + phutil_require_module('phabricator', 'storage/queryfx'); 11 14 phutil_require_module('phabricator', 'view/page/standard'); 12 15 13 16
+1 -1
src/applications/conduit/controller/base/PhabricatorConduitController.php
··· 19 19 abstract class PhabricatorConduitController extends PhabricatorController { 20 20 21 21 public function buildStandardPageResponse($view, array $data) { 22 - $page = new PhabricatorStandardPageView(); 22 + $page = $this->buildStandardPageView(); 23 23 24 24 $page->setApplicationName('Conduit'); 25 25 $page->setBaseURI('/conduit/');
-1
src/applications/conduit/controller/base/__init__.php
··· 8 8 9 9 phutil_require_module('phabricator', 'aphront/response/webpage'); 10 10 phutil_require_module('phabricator', 'applications/base/controller/base'); 11 - phutil_require_module('phabricator', 'view/page/standard'); 12 11 13 12 phutil_require_module('phutil', 'utils'); 14 13
+1 -1
src/applications/differential/controller/base/DifferentialController.php
··· 22 22 23 23 require_celerity_resource('differential-core-view-css'); 24 24 25 - $page = new PhabricatorStandardPageView(); 25 + $page = $this->buildStandardPageView(); 26 26 27 27 $page->setApplicationName('Differential'); 28 28 $page->setBaseURI('/differential/');
-1
src/applications/differential/controller/base/__init__.php
··· 9 9 phutil_require_module('phabricator', 'aphront/response/webpage'); 10 10 phutil_require_module('phabricator', 'applications/base/controller/base'); 11 11 phutil_require_module('phabricator', 'infratructure/celerity/api'); 12 - phutil_require_module('phabricator', 'view/page/standard'); 13 12 14 13 phutil_require_module('phutil', 'utils'); 15 14
+1 -1
src/applications/directory/controller/base/PhabricatorDirectoryController.php
··· 19 19 abstract class PhabricatorDirectoryController extends PhabricatorController { 20 20 21 21 public function buildStandardPageResponse($view, array $data) { 22 - $page = new PhabricatorStandardPageView(); 22 + $page = $this->buildStandardPageView(); 23 23 24 24 $page->setApplicationName('Directory'); 25 25 $page->setBaseURI('/');
-1
src/applications/directory/controller/base/__init__.php
··· 8 8 9 9 phutil_require_module('phabricator', 'aphront/response/webpage'); 10 10 phutil_require_module('phabricator', 'applications/base/controller/base'); 11 - phutil_require_module('phabricator', 'view/page/standard'); 12 11 13 12 phutil_require_module('phutil', 'utils'); 14 13
+1 -1
src/applications/files/controller/base/PhabricatorFileController.php
··· 19 19 abstract class PhabricatorFileController extends PhabricatorController { 20 20 21 21 public function buildStandardPageResponse($view, array $data) { 22 - $page = new PhabricatorStandardPageView(); 22 + $page = $this->buildStandardPageView(); 23 23 24 24 $page->setApplicationName('Files'); 25 25 $page->setBaseURI('/file/');
-1
src/applications/files/controller/base/__init__.php
··· 8 8 9 9 phutil_require_module('phabricator', 'aphront/response/webpage'); 10 10 phutil_require_module('phabricator', 'applications/base/controller/base'); 11 - phutil_require_module('phabricator', 'view/page/standard'); 12 11 13 12 phutil_require_module('phutil', 'utils'); 14 13
+1 -1
src/applications/metamta/controller/base/PhabricatorMetaMTAController.php
··· 19 19 abstract class PhabricatorMetaMTAController extends PhabricatorController { 20 20 21 21 public function buildStandardPageResponse($view, array $data) { 22 - $page = new PhabricatorStandardPageView(); 22 + $page = $this->buildStandardPageView(); 23 23 24 24 $page->setApplicationName('MetaMTA'); 25 25 $page->setBaseURI('/mail/');
-1
src/applications/metamta/controller/base/__init__.php
··· 8 8 9 9 phutil_require_module('phabricator', 'aphront/response/webpage'); 10 10 phutil_require_module('phabricator', 'applications/base/controller/base'); 11 - phutil_require_module('phabricator', 'view/page/standard'); 12 11 13 12 phutil_require_module('phutil', 'utils'); 14 13
+1 -1
src/applications/people/controller/base/PhabricatorPeopleController.php
··· 19 19 abstract class PhabricatorPeopleController extends PhabricatorController { 20 20 21 21 public function buildStandardPageResponse($view, array $data) { 22 - $page = new PhabricatorStandardPageView(); 22 + $page = $this->buildStandardPageView(); 23 23 24 24 $page->setApplicationName('People'); 25 25 $page->setBaseURI('/people/');
-1
src/applications/people/controller/base/__init__.php
··· 8 8 9 9 phutil_require_module('phabricator', 'aphront/response/webpage'); 10 10 phutil_require_module('phabricator', 'applications/base/controller/base'); 11 - phutil_require_module('phabricator', 'view/page/standard'); 12 11 13 12 phutil_require_module('phutil', 'utils'); 14 13
+25
src/applications/people/storage/user/PhabricatorUser.php
··· 24 24 protected $userName; 25 25 protected $realName; 26 26 protected $email; 27 + protected $passwordSalt; 28 + protected $passwordHash; 27 29 28 30 public function getConfiguration() { 29 31 return array( ··· 33 35 34 36 public function generatePHID() { 35 37 return PhabricatorPHID::generateNewPHID(self::PHID_TYPE); 38 + } 39 + 40 + public function setPassword($password) { 41 + $this->setPasswordSalt(md5(mt_rand())); 42 + $hash = $this->hashPassword($password); 43 + $this->setPasswordHash($hash); 44 + return $this; 45 + } 46 + 47 + public function comparePassword($password) { 48 + $password = $this->hashPassword($password); 49 + return ($password === $this->getPasswordHash()); 50 + } 51 + 52 + private function hashPassword($password) { 53 + $password = $this->getUsername(). 54 + $password. 55 + $this->getPHID(). 56 + $this->getPasswordSalt(); 57 + for ($ii = 0; $ii < 1000; $ii++) { 58 + $password = md5($password); 59 + } 60 + return $password; 36 61 } 37 62 38 63 }
+1 -1
src/applications/phid/controller/base/PhabricatorPHIDController.php
··· 19 19 abstract class PhabricatorPHIDController extends PhabricatorController { 20 20 21 21 public function buildStandardPageResponse($view, array $data) { 22 - $page = new PhabricatorStandardPageView(); 22 + $page = $this->buildStandardPageView(); 23 23 24 24 $page->setApplicationName('PHID'); 25 25 $page->setBaseURI('/phid/');
-1
src/applications/phid/controller/base/__init__.php
··· 8 8 9 9 phutil_require_module('phabricator', 'aphront/response/webpage'); 10 10 phutil_require_module('phabricator', 'applications/base/controller/base'); 11 - phutil_require_module('phabricator', 'view/page/standard'); 12 11 13 12 phutil_require_module('phutil', 'utils'); 14 13
+21
src/view/page/standard/PhabricatorStandardPageView.php
··· 24 24 private $selectedTab; 25 25 private $glyph; 26 26 private $bodyContent; 27 + private $request; 28 + 29 + public function setRequest($request) { 30 + $this->request = $request; 31 + return $this; 32 + } 33 + 34 + public function getRequest() { 35 + return $this->request; 36 + } 27 37 28 38 public function setApplicationName($application_name) { 29 39 $this->applicationName = $application_name; ··· 102 112 $tabs = '<span class="phabricator-head-tabs">'.$tabs.'</span>'; 103 113 } 104 114 115 + $login_stuff = null; 116 + $request = $this->getRequest(); 117 + $user = $request->getUser(); 118 + 119 + if ($user->getPHID()) { 120 + $login_stuff = 'Logged in as '.phutil_escape_html($user->getUsername()); 121 + } 122 + 105 123 return 106 124 '<div class="phabricator-standard-page">'. 107 125 '<div class="phabricator-standard-header">'. 126 + '<div class="phabricator-login-details">'. 127 + $login_stuff. 128 + '</div>'. 108 129 '<a href="/">Phabricator</a> '. 109 130 phutil_render_tag( 110 131 'a',
+6 -1
webroot/index.php
··· 38 38 $request = $application->buildRequest(); 39 39 $application->setRequest($request); 40 40 list($controller, $uri_data) = $application->buildController(); 41 - $controller->willProcessRequest($uri_data); 42 41 try { 42 + $controller->willBeginExecution(); 43 + 44 + $controller->willProcessRequest($uri_data); 43 45 $response = $controller->processRequest(); 46 + } catch (AphrontRedirectException $ex) { 47 + $response = id(new AphrontRedirectResponse()) 48 + ->setURI($ex->getURI()); 44 49 } catch (Exception $ex) { 45 50 $response = $application->handleException($ex); 46 51 }
+4
webroot/rsrc/css/application/base/standard-page-view.css
··· 46 46 padding: 0 1em; 47 47 text-transform: uppercase; 48 48 } 49 + 50 + .phabricator-login-details { 51 + float: right; 52 + }