1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-04-09 19:08:40 +02:00

Lint fluff.

This commit is contained in:
epriestley 2011-02-06 12:58:01 -08:00
parent 0653270ac2
commit 99aee37866
6 changed files with 19 additions and 14 deletions

View file

@ -48,14 +48,14 @@ class DarkConsoleXHProfPlugin extends DarkConsolePlugin {
'<p>The "xhprof" PHP extension is not available. Install xhprof '. '<p>The "xhprof" PHP extension is not available. Install xhprof '.
'to enable the XHProf plugin.'; 'to enable the XHProf plugin.';
} }
$run = $this->getXHProfRunID(); $run = $this->getXHProfRunID();
if ($run) { if ($run) {
return '<a href="/xhprof/profile/'.$run.'/">View Run</a>'; return '<a href="/xhprof/profile/'.$run.'/">View Run</a>';
} else { } else {
$hidden = array(); $hidden = array();
$data = array('__profile__' => 'page') + $_GET; $data = array('__profile__' => 'page') + $_GET;
foreach ($data as $k => $v) { foreach ($data as $k => $v) {
$hidden[] = phutil_render_tag( $hidden[] = phutil_render_tag(
'input', 'input',
@ -66,8 +66,8 @@ class DarkConsoleXHProfPlugin extends DarkConsolePlugin {
)); ));
} }
$hidden = implode("\n", $hidden); $hidden = implode("\n", $hidden);
return return
'<form method="get">'. '<form method="get">'.
$hidden. $hidden.
@ -132,4 +132,4 @@ class DarkConsoleXHProfPlugin extends DarkConsolePlugin {
} }
} }
*/ */

View file

@ -9,5 +9,7 @@
phutil_require_module('phabricator', 'aphront/console/plugin/base'); phutil_require_module('phabricator', 'aphront/console/plugin/base');
phutil_require_module('phabricator', 'aphront/console/plugin/xhprof/api'); phutil_require_module('phabricator', 'aphront/console/plugin/xhprof/api');
phutil_require_module('phutil', 'markup');
phutil_require_source('DarkConsoleXHProfPlugin.php'); phutil_require_source('DarkConsoleXHProfPlugin.php');

View file

@ -76,7 +76,7 @@ class PhabricatorUserSettingsController extends PhabricatorPeopleController {
$file = PhabricatorFile::newFromPHPUpload($_FILES['profile']); $file = PhabricatorFile::newFromPHPUpload($_FILES['profile']);
$user->setProfileImagePHID($file->getPHID()); $user->setProfileImagePHID($file->getPHID());
} }
$user->save(); $user->save();
return id(new AphrontRedirectResponse()) return id(new AphrontRedirectResponse())
->setURI('/settings/page/account/'); ->setURI('/settings/page/account/');
@ -176,14 +176,14 @@ class PhabricatorUserSettingsController extends PhabricatorPeopleController {
return $notice.$cert->render().$regen->render(); return $notice.$cert->render().$regen->render();
} }
private function renderAccountForm() { private function renderAccountForm() {
$request = $this->getRequest(); $request = $this->getRequest();
$user = $request->getUser(); $user = $request->getUser();
$img_src = PhabricatorFileURI::getViewURIForPHID( $img_src = PhabricatorFileURI::getViewURIForPHID(
$user->getProfileImagePHID()); $user->getProfileImagePHID());
$form = new AphrontFormView(); $form = new AphrontFormView();
$form $form
->setUser($user) ->setUser($user)
@ -223,12 +223,12 @@ class PhabricatorUserSettingsController extends PhabricatorPeopleController {
->appendChild( ->appendChild(
id(new AphrontFormSubmitControl()) id(new AphrontFormSubmitControl())
->setValue('Save')); ->setValue('Save'));
$panel = new AphrontPanelView(); $panel = new AphrontPanelView();
$panel->setHeader('Profile Settings'); $panel->setHeader('Profile Settings');
$panel->setWidth(AphrontPanelView::WIDTH_FORM); $panel->setWidth(AphrontPanelView::WIDTH_FORM);
$panel->appendChild($form); $panel->appendChild($form);
return $panel->render(); return $panel->render();
} }

View file

@ -8,6 +8,8 @@
phutil_require_module('phabricator', 'aphront/response/dialog'); phutil_require_module('phabricator', 'aphront/response/dialog');
phutil_require_module('phabricator', 'aphront/response/redirect'); phutil_require_module('phabricator', 'aphront/response/redirect');
phutil_require_module('phabricator', 'applications/files/storage/file');
phutil_require_module('phabricator', 'applications/files/uri');
phutil_require_module('phabricator', 'applications/people/controller/base'); phutil_require_module('phabricator', 'applications/people/controller/base');
phutil_require_module('phabricator', 'applications/people/storage/user'); phutil_require_module('phabricator', 'applications/people/storage/user');
phutil_require_module('phabricator', 'infrastructure/env'); phutil_require_module('phabricator', 'infrastructure/env');

View file

@ -147,10 +147,10 @@ class PhabricatorXHProfProfileSymbolView extends AphrontView {
return $panel->render(); return $panel->render();
} }
private function formatRows($rows) { private function formatRows($rows) {
$base_uri = $this->baseURI; $base_uri = $this->baseURI;
$result = array(); $result = array();
foreach ($rows as $row) { foreach ($rows as $row) {
$result[] = array( $result[] = array(
@ -167,5 +167,5 @@ class PhabricatorXHProfProfileSymbolView extends AphrontView {
} }
return $result; return $result;
} }
} }

View file

@ -12,6 +12,7 @@ phutil_require_module('phabricator', 'view/control/table');
phutil_require_module('phabricator', 'view/layout/panel'); phutil_require_module('phabricator', 'view/layout/panel');
phutil_require_module('phutil', 'markup'); phutil_require_module('phutil', 'markup');
phutil_require_module('phutil', 'utils');
phutil_require_source('PhabricatorXHProfProfileSymbolView.php'); phutil_require_source('PhabricatorXHProfProfileSymbolView.php');