mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-29 04:28:12 +01:00
Lint fluff.
This commit is contained in:
parent
0653270ac2
commit
99aee37866
6 changed files with 19 additions and 14 deletions
|
@ -48,14 +48,14 @@ class DarkConsoleXHProfPlugin extends DarkConsolePlugin {
|
|||
'<p>The "xhprof" PHP extension is not available. Install xhprof '.
|
||||
'to enable the XHProf plugin.';
|
||||
}
|
||||
|
||||
|
||||
$run = $this->getXHProfRunID();
|
||||
if ($run) {
|
||||
return '<a href="/xhprof/profile/'.$run.'/">View Run</a>';
|
||||
} else {
|
||||
$hidden = array();
|
||||
$data = array('__profile__' => 'page') + $_GET;
|
||||
|
||||
|
||||
foreach ($data as $k => $v) {
|
||||
$hidden[] = phutil_render_tag(
|
||||
'input',
|
||||
|
@ -66,8 +66,8 @@ class DarkConsoleXHProfPlugin extends DarkConsolePlugin {
|
|||
));
|
||||
}
|
||||
$hidden = implode("\n", $hidden);
|
||||
|
||||
|
||||
|
||||
|
||||
return
|
||||
'<form method="get">'.
|
||||
$hidden.
|
||||
|
@ -132,4 +132,4 @@ class DarkConsoleXHProfPlugin extends DarkConsolePlugin {
|
|||
}
|
||||
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
|
|
@ -9,5 +9,7 @@
|
|||
phutil_require_module('phabricator', 'aphront/console/plugin/base');
|
||||
phutil_require_module('phabricator', 'aphront/console/plugin/xhprof/api');
|
||||
|
||||
phutil_require_module('phutil', 'markup');
|
||||
|
||||
|
||||
phutil_require_source('DarkConsoleXHProfPlugin.php');
|
||||
|
|
|
@ -76,7 +76,7 @@ class PhabricatorUserSettingsController extends PhabricatorPeopleController {
|
|||
$file = PhabricatorFile::newFromPHPUpload($_FILES['profile']);
|
||||
$user->setProfileImagePHID($file->getPHID());
|
||||
}
|
||||
|
||||
|
||||
$user->save();
|
||||
return id(new AphrontRedirectResponse())
|
||||
->setURI('/settings/page/account/');
|
||||
|
@ -176,14 +176,14 @@ class PhabricatorUserSettingsController extends PhabricatorPeopleController {
|
|||
|
||||
return $notice.$cert->render().$regen->render();
|
||||
}
|
||||
|
||||
|
||||
private function renderAccountForm() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
||||
|
||||
$img_src = PhabricatorFileURI::getViewURIForPHID(
|
||||
$user->getProfileImagePHID());
|
||||
|
||||
|
||||
$form = new AphrontFormView();
|
||||
$form
|
||||
->setUser($user)
|
||||
|
@ -223,12 +223,12 @@ class PhabricatorUserSettingsController extends PhabricatorPeopleController {
|
|||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Save'));
|
||||
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader('Profile Settings');
|
||||
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
|
||||
$panel->appendChild($form);
|
||||
|
||||
|
||||
return $panel->render();
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
phutil_require_module('phabricator', 'aphront/response/dialog');
|
||||
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/storage/user');
|
||||
phutil_require_module('phabricator', 'infrastructure/env');
|
||||
|
|
|
@ -147,10 +147,10 @@ class PhabricatorXHProfProfileSymbolView extends AphrontView {
|
|||
|
||||
return $panel->render();
|
||||
}
|
||||
|
||||
|
||||
private function formatRows($rows) {
|
||||
$base_uri = $this->baseURI;
|
||||
|
||||
|
||||
$result = array();
|
||||
foreach ($rows as $row) {
|
||||
$result[] = array(
|
||||
|
@ -167,5 +167,5 @@ class PhabricatorXHProfProfileSymbolView extends AphrontView {
|
|||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ phutil_require_module('phabricator', 'view/control/table');
|
|||
phutil_require_module('phabricator', 'view/layout/panel');
|
||||
|
||||
phutil_require_module('phutil', 'markup');
|
||||
phutil_require_module('phutil', 'utils');
|
||||
|
||||
|
||||
phutil_require_source('PhabricatorXHProfProfileSymbolView.php');
|
||||
|
|
Loading…
Add table
Reference in a new issue