Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13994918
D7533.id17022.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D7533.id17022.diff
View Options
Index: src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
===================================================================
--- src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
+++ src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
@@ -248,13 +248,13 @@
$trace = null;
}
- $content = hsprintf(
- '<div class="aphront-unhandled-exception">'.
- '<div class="exception-message">%s</div>'.
- '%s'.
- '</div>',
- $message,
- $trace);
+ $content = phutil_tag(
+ 'div',
+ array('class' => 'aphront-unhandled-exception'),
+ array(
+ phutil_tag('div', array('class' => 'exception-message'), $message),
+ $trace,
+ ));
$dialog = new AphrontDialogView();
$dialog
@@ -384,12 +384,16 @@
'wide',
));
- return hsprintf(
- '<div class="exception-trace">'.
- '<div class="exception-trace-header">Stack Trace</div>'.
- '%s'.
- '</div>',
- $table->render());
+ return phutil_tag(
+ 'div',
+ array('class' => 'exception-trace'),
+ array(
+ phutil_tag(
+ 'div',
+ array('class' => 'exception-trace-header'),
+ pht('Stack Trace')),
+ $table->render(),
+ ));
}
}
Index: src/aphront/console/plugin/DarkConsoleErrorLogPlugin.php
===================================================================
--- src/aphront/console/plugin/DarkConsoleErrorLogPlugin.php
+++ src/aphront/console/plugin/DarkConsoleErrorLogPlugin.php
@@ -90,13 +90,13 @@
$table->setHeaders(array('Error'));
$table->setNoDataString('No errors.');
- return hsprintf(
- '<div>'.
- '<div>%s</div>'.
- '<pre class="PhabricatorMonospaced">%s</pre>'.
- '</div>',
- $table->render(),
- phutil_implode_html('', $details));
+ return phutil_tag(
+ 'div',
+ array(),
+ array(
+ phutil_tag('div', array(), $table->render()),
+ phutil_tag('pre', array('class' => 'PhabricatorMonospaced'), $details),
+ ));
}
}
Index: src/aphront/console/plugin/DarkConsoleEventPlugin.php
===================================================================
--- src/aphront/console/plugin/DarkConsoleEventPlugin.php
+++ src/aphront/console/plugin/DarkConsoleEventPlugin.php
@@ -42,10 +42,10 @@
$out = array();
- $out[] = hsprintf(
- '<div class="dark-console-panel-header">'.
- '<h1>Registered Event Listeners</h1>'.
- '</div>');
+ $out[] = phutil_tag(
+ 'div',
+ array('class' => 'dark-console-panel-header'),
+ phutil_tag('h1', array(), pht('Registered Event Listeners')));
$rows = array();
foreach ($data['listeners'] as $listener) {
@@ -66,10 +66,10 @@
$out[] = $table->render();
- $out[] = hsprintf(
- '<div class="dark-console-panel-header">'.
- '<h1>Event Log</h1>'.
- '</div>');
+ $out[] = phutil_tag(
+ 'div',
+ array('class' => 'dark-console-panel-header'),
+ phutil_tag('h1', array(), pht('Event Log')));
$rows = array();
foreach ($data['events'] as $event) {
Index: src/aphront/console/plugin/DarkConsoleServicesPlugin.php
===================================================================
--- src/aphront/console/plugin/DarkConsoleServicesPlugin.php
+++ src/aphront/console/plugin/DarkConsoleServicesPlugin.php
@@ -149,21 +149,20 @@
$log = $data['log'];
$results = array();
- $results[] = hsprintf(
- '<div class="dark-console-panel-header">'.
- '%s'.
- '<h1>Calls to External Services</h1>'.
- '<div style="clear: both;"></div>'.
- '</div>',
- phutil_tag(
- 'a',
- array(
- 'href' => $data['analyzeURI'],
- 'class' => $data['didAnalyze']
- ? 'disabled button'
- : 'green button',
- ),
- 'Analyze Query Plans'));
+ $results[] = phutil_tag(
+ 'div',
+ array('class' => 'dark-console-panel-header'),
+ array(
+ phutil_tag(
+ 'a',
+ array(
+ 'href' => $data['analyzeURI'],
+ 'class' => $data['didAnalyze'] ? 'disabled button' : 'green button',
+ ),
+ pht('Analyze Query Plans')),
+ phutil_tag('h1', array(), pht('Calls to External Services')),
+ phutil_tag('div', array('style' => 'clear: both;')),
+ ));
$page_total = $data['end'] - $data['start'];
$totals = array();
Index: src/aphront/console/plugin/DarkConsoleXHProfPlugin.php
===================================================================
--- src/aphront/console/plugin/DarkConsoleXHProfPlugin.php
+++ src/aphront/console/plugin/DarkConsoleXHProfPlugin.php
@@ -62,38 +62,41 @@
$result = array();
- $header = hsprintf(
- '<div class="dark-console-panel-header">'.
- '%s'.
- '<h1>XHProf Profiler</h1>'.
- '</div>',
- phutil_tag(
- 'a',
- array(
- 'href' => $profile_uri,
- 'class' => $run
- ? 'disabled button'
- : 'green button',
- ),
- 'Profile Page'));
+ $header = phutil_tag(
+ 'div',
+ array('class' => 'dark-console-panel-header'),
+ array(
+ phutil_tag(
+ 'a',
+ array(
+ 'href' => $profile_uri,
+ 'class' => $run ? 'disabled button' : 'green button',
+ ),
+ pht('Profile Page')),
+ phutil_tag('h1', array(), pht('XHProf Profiler')),
+ ));
$result[] = $header;
if ($run) {
- $result[] = hsprintf(
- '<a href="/xhprof/profile/%s/" '.
- 'class="bright-link" '.
- 'style="float: right; margin: 1em 2em 0 0;'.
- 'font-weight: bold;" '.
- 'target="_blank">Profile Permalink</a>'.
- '<iframe src="/xhprof/profile/%s/?frame=true"></iframe>',
- $run,
- $run);
+ $result[] = phutil_tag(
+ 'a',
+ array(
+ 'href' => "/xhprof/profile/$run/",
+ 'class' => 'bright-link',
+ 'style' => 'float: right; margin: 1em 2em 0 0; font-weight: bold;',
+ 'target' => '_blank',
+ ),
+ pht('Profile Permalink'));
+ $result = phutil_tag(
+ 'iframe',
+ array('src' => "/xhprof/profile/$run/?frame=true"));
} else {
- $result[] = hsprintf(
- '<div class="dark-console-no-content">'.
+ $result[] = phutil_tag(
+ 'div',
+ array('class' => 'dark-console-no-content'),
+ pht(
'Profiling was not enabled for this page. Use the button above '.
- 'to enable it.'.
- '</div>');
+ 'to enable it.'));
}
return phutil_implode_html("\n", $result);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 24, 9:26 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6746241
Default Alt Text
D7533.id17022.diff (6 KB)
Attached To
Mode
D7533: Replace some hsprintf() with phutil_tag()
Attached
Detach File
Event Timeline
Log In to Comment