1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 15:22:41 +01:00

Convert phutil_render_tag(X, Y) to phutil_tag

Summary:
Created with spatch:

  lang=diff
  - phutil_render_tag
  + phutil_tag
    (X, Y)

(and null manually)

Test Plan: Loaded homepage

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4500
This commit is contained in:
vrana 2013-01-17 18:39:02 -08:00
parent 8aea5cda26
commit f8dbfdd59d
35 changed files with 48 additions and 51 deletions

View file

@ -342,7 +342,7 @@ final class DifferentialChangesetTwoUpRenderer
array( array(
'class' => 'differential-image-stage' 'class' => 'differential-image-stage'
), ),
phutil_render_tag( phutil_tag(
'img', 'img',
array( array(
'src' => $old_file->getBestURI(), 'src' => $old_file->getBestURI(),
@ -358,7 +358,7 @@ final class DifferentialChangesetTwoUpRenderer
array( array(
'class' => 'differential-image-stage' 'class' => 'differential-image-stage'
), ),
phutil_render_tag( phutil_tag(
'img', 'img',
array( array(
'src' => $new_file->getBestURI(), 'src' => $new_file->getBestURI(),

View file

@ -79,14 +79,13 @@ final class DifferentialInlineCommentEditView extends AphrontView {
$out = array(); $out = array();
foreach ($this->inputs as $input) { foreach ($this->inputs as $input) {
list($name, $value) = $input; list($name, $value) = $input;
$out[] = phutil_render_tag( $out[] = phutil_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',
'name' => $name, 'name' => $name,
'value' => $value, 'value' => $value,
), ));
null);
} }
return implode('', $out); return implode('', $out);
} }

View file

@ -130,7 +130,7 @@ final class DifferentialRevisionListView extends AphrontView {
$src = '/rsrc/image/icon/fatcow/page_white_edit.png'; $src = '/rsrc/image/icon/fatcow/page_white_edit.png';
$flag = $flag =
'<a href="/D'.$revision->getID().'#comment-preview">'. '<a href="/D'.$revision->getID().'#comment-preview">'.
phutil_render_tag( phutil_tag(
'img', 'img',
array( array(
'src' => celerity_get_resource_uri($src), 'src' => celerity_get_resource_uri($src),

View file

@ -92,7 +92,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
if ($max_id != $id) { if ($max_id != $id) {
$uniq = celerity_generate_unique_node_id(); $uniq = celerity_generate_unique_node_id();
$old_checked = ($this->selectedVersusDiffID == $id); $old_checked = ($this->selectedVersusDiffID == $id);
$old = phutil_render_tag( $old = phutil_tag(
'input', 'input',
array( array(
'type' => 'radio', 'type' => 'radio',

View file

@ -789,7 +789,7 @@ final class DiffusionBrowseFileController extends DiffusionController {
$properties->addProperty( $properties->addProperty(
pht('Image'), pht('Image'),
phutil_render_tag( phutil_tag(
'img', 'img',
array( array(
'src' => $file_uri, 'src' => $file_uri,

View file

@ -301,7 +301,7 @@ final class PhabricatorDirectoryMainController
), ),
'Jump Nav User Guide'); 'Jump Nav User Guide');
$jump_input = phutil_render_tag( $jump_input = phutil_tag(
'input', 'input',
array( array(
'type' => 'text', 'type' => 'text',

View file

@ -141,7 +141,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
// TODO: Clean this up after Pholio (dark backgrounds, standardization, // TODO: Clean this up after Pholio (dark backgrounds, standardization,
// etc.) // etc.)
$image = phutil_render_tag( $image = phutil_tag(
'img', 'img',
array( array(
'src' => $file->getViewURI(), 'src' => $file->getViewURI(),

View file

@ -158,7 +158,7 @@ final class PhabricatorMacroViewController
if ($file) { if ($file) {
$view->addTextContent( $view->addTextContent(
phutil_render_tag( phutil_tag(
'img', 'img',
array( array(
'src' => $file->getViewURI(), 'src' => $file->getViewURI(),

View file

@ -79,25 +79,23 @@ final class ManiphestBatchEditController extends ManiphestController {
foreach ($tasks as $task) { foreach ($tasks as $task) {
$form->appendChild( $form->appendChild(
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',
'name' => 'batch[]', 'name' => 'batch[]',
'value' => $task->getID(), 'value' => $task->getID(),
), )));
null));
} }
$form->appendChild( $form->appendChild(
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',
'name' => 'actions', 'name' => 'actions',
'id' => 'batch-form-actions', 'id' => 'batch-form-actions',
), )));
null));
$form->appendChild('<p>These tasks will be edited:</p>'); $form->appendChild('<p>These tasks will be edited:</p>');
$form->appendChild($list); $form->appendChild($list);
$form->appendChild( $form->appendChild(

View file

@ -40,7 +40,7 @@ final class ManiphestSavedQueryListController extends ManiphestController {
$default = $query; $default = $query;
} }
$rows[] = array( $rows[] = array(
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'type' => 'radio', 'type' => 'radio',
@ -73,7 +73,7 @@ final class ManiphestSavedQueryListController extends ManiphestController {
} }
$rows[] = array( $rows[] = array(
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'type' => 'radio', 'type' => 'radio',

View file

@ -104,7 +104,7 @@ abstract class PhameBasicBlogSkin extends PhameBlogSkin {
$pager = $this->renderOlderPageLink().$this->renderNewerPageLink(); $pager = $this->renderOlderPageLink().$this->renderNewerPageLink();
if ($pager) { if ($pager) {
$pager = phutil_render_tag( $pager = phutil_tag(
'div', 'div',
array( array(
'class' => 'phame-pager', 'class' => 'phame-pager',

View file

@ -18,7 +18,7 @@ final class PhameBasicTemplateBlogSkin extends PhameBasicBlogSkin {
if (!preg_match('/.css$/', $path)) { if (!preg_match('/.css$/', $path)) {
continue; continue;
} }
$this->cssResources[] = phutil_render_tag( $this->cssResources[] = phutil_tag(
'link', 'link',
array( array(
'rel' => 'stylesheet', 'rel' => 'stylesheet',

View file

@ -201,7 +201,7 @@ final class PhamePostView extends AphrontView {
$post = $this->getPost(); $post = $this->getPost();
$disqus_thread = phutil_render_tag('div', $disqus_thread = phutil_tag('div',
array( array(
'id' => 'disqus_thread' 'id' => 'disqus_thread'
) )

View file

@ -106,7 +106,7 @@ final class PhortuneStripePaymentFormView extends AphrontView {
) )
) )
->appendChild( ->appendChild(
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'hidden' => true, 'hidden' => true,

View file

@ -13,7 +13,7 @@ final class PhabricatorXHPASTViewFrameController
$id = $this->id; $id = $this->id;
return $this->buildStandardPageResponse( return $this->buildStandardPageResponse(
phutil_render_tag( phutil_tag(
'iframe', 'iframe',
array( array(
'src' => '/xhpast/frameset/'.$id.'/', 'src' => '/xhpast/frameset/'.$id.'/',

View file

@ -200,7 +200,7 @@ final class PhabricatorProjectProfileEditController
id(new AphrontFormMarkupControl()) id(new AphrontFormMarkupControl())
->setLabel('Profile Image') ->setLabel('Profile Image')
->setValue( ->setValue(
phutil_render_tag( phutil_tag(
'img', 'img',
array( array(
'src' => $img_src, 'src' => $img_src,

View file

@ -145,7 +145,7 @@ final class PhabricatorSearchController
->setUser($user) ->setUser($user)
->setAction('/search/') ->setAction('/search/')
->appendChild( ->appendChild(
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',

View file

@ -179,7 +179,7 @@ final class PhabricatorSettingsPanelProfile
id(new AphrontFormMarkupControl()) id(new AphrontFormMarkupControl())
->setLabel('Profile Image') ->setLabel('Profile Image')
->setValue( ->setValue(
phutil_render_tag( phutil_tag(
'img', 'img',
array( array(
'src' => $img_src, 'src' => $img_src,

View file

@ -261,7 +261,7 @@ final class PhabricatorSlowvotePollController
$checked = null; $checked = null;
} }
$input = phutil_render_tag( $input = phutil_tag(
'input', 'input',
array( array(
'type' => 'radio', 'type' => 'radio',
@ -282,7 +282,7 @@ final class PhabricatorSlowvotePollController
} }
} }
$input = phutil_render_tag( $input = phutil_tag(
'input', 'input',
array( array(
'type' => 'checkbox', 'type' => 'checkbox',
@ -407,7 +407,7 @@ final class PhabricatorSlowvotePollController
'href' => $handle->getURI(), 'href' => $handle->getURI(),
'class' => 'phabricator-slowvote-facepile', 'class' => 'phabricator-slowvote-facepile',
), ),
phutil_render_tag( phutil_tag(
'img', 'img',
array( array(
'src' => $profile_image, 'src' => $profile_image,

View file

@ -106,7 +106,7 @@ final class CelerityStaticResourceResponse {
$uri = PhabricatorEnv::getCDNURI($resource['uri']); $uri = PhabricatorEnv::getCDNURI($resource['uri']);
switch ($resource['type']) { switch ($resource['type']) {
case 'css': case 'css':
return phutil_render_tag( return phutil_tag(
'link', 'link',
array( array(
'rel' => 'stylesheet', 'rel' => 'stylesheet',

View file

@ -46,14 +46,14 @@ function phabricator_render_form(PhabricatorUser $user, $attributes, $content) {
function phabricator_render_form_magic(PhabricatorUser $user) { function phabricator_render_form_magic(PhabricatorUser $user) {
return return
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',
'name' => AphrontRequest::getCSRFTokenName(), 'name' => AphrontRequest::getCSRFTokenName(),
'value' => $user->getCSRFToken(), 'value' => $user->getCSRFToken(),
)). )).
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',

View file

@ -108,7 +108,7 @@ final class PhabricatorRemarkupRuleEmbedFile
} }
require_celerity_resource('lightbox-attachment-css'); require_celerity_resource('lightbox-attachment-css');
$img = phutil_render_tag('img', $data['attrs']); $img = phutil_tag('img', $data['attrs']);
$embed = javelin_render_tag( $embed = javelin_render_tag(
'a', 'a',

View file

@ -35,13 +35,13 @@ final class PhabricatorRemarkupRuleImageMacro
$src_uri = null; $src_uri = null;
} }
$img = phutil_render_tag( $img = phutil_tag(
'img', 'img',
array( array(
'src' => $src_uri, 'src' => $src_uri,
'alt' => $matches[1], 'alt' => $matches[1],
'title' => $matches[1]), 'title' => $matches[1],
null); ));
return $this->getEngine()->storeText($img); return $this->getEngine()->storeText($img);
} else { } else {
return $matches[1]; return $matches[1];

View file

@ -15,7 +15,7 @@ final class AphrontAttachedFileView extends AphrontView {
$file = $this->file; $file = $this->file;
$phid = $file->getPHID(); $phid = $file->getPHID();
$thumb = phutil_render_tag( $thumb = phutil_tag(
'img', 'img',
array( array(
'src' => $file->getThumb60x45URI(), 'src' => $file->getThumb60x45URI(),

View file

@ -75,7 +75,7 @@ final class AphrontTokenizerTemplateView extends AphrontView {
'class' => 'jx-tokenizer-token', 'class' => 'jx-tokenizer-token',
), ),
phutil_escape_html($value). phutil_escape_html($value).
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',

View file

@ -57,7 +57,7 @@ final class AphrontFormInsetView extends AphrontView {
$hidden_inputs = array(); $hidden_inputs = array();
foreach ($this->hidden as $inp) { foreach ($this->hidden as $inp) {
list($key, $value) = $inp; list($key, $value) = $inp;
$hidden_inputs[] = phutil_render_tag( $hidden_inputs[] = phutil_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',

View file

@ -100,7 +100,7 @@ final class AphrontFormView extends AphrontView {
if ($value === null) { if ($value === null) {
continue; continue;
} }
$inputs[] = phutil_render_tag( $inputs[] = phutil_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',

View file

@ -22,7 +22,7 @@ final class AphrontFormCheckboxControl extends AphrontFormControl {
$rows = array(); $rows = array();
foreach ($this->boxes as $box) { foreach ($this->boxes as $box) {
$id = celerity_generate_unique_node_id(); $id = celerity_generate_unique_node_id();
$checkbox = phutil_render_tag( $checkbox = phutil_tag(
'input', 'input',
array( array(
'id' => $id, 'id' => $id,

View file

@ -7,7 +7,7 @@ final class AphrontFormFileControl extends AphrontFormControl {
} }
protected function renderInput() { protected function renderInput() {
return phutil_render_tag( return phutil_tag(
'input', 'input',
array( array(
'type' => 'file', 'type' => 'file',

View file

@ -10,7 +10,7 @@ final class AphrontFormImageControl extends AphrontFormControl {
$id = celerity_generate_unique_node_id(); $id = celerity_generate_unique_node_id();
return return
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'type' => 'file', 'type' => 'file',
@ -18,7 +18,7 @@ final class AphrontFormImageControl extends AphrontFormControl {
'class' => 'image', 'class' => 'image',
)). )).
'<div style="clear: both;">'. '<div style="clear: both;">'.
phutil_render_tag( phutil_tag(
'input', 'input',
array( array(
'type' => 'checkbox', 'type' => 'checkbox',

View file

@ -7,7 +7,7 @@ final class AphrontFormPasswordControl extends AphrontFormControl {
} }
protected function renderInput() { protected function renderInput() {
return phutil_render_tag( return phutil_tag(
'input', 'input',
array( array(
'type' => 'password', 'type' => 'password',

View file

@ -22,7 +22,7 @@ final class AphrontFormRadioButtonControl extends AphrontFormControl {
$rows = array(); $rows = array();
foreach ($this->buttons as $button) { foreach ($this->buttons as $button) {
$id = celerity_generate_unique_node_id(); $id = celerity_generate_unique_node_id();
$radio = phutil_render_tag( $radio = phutil_tag(
'input', 'input',
array( array(
'id' => $id, 'id' => $id,

View file

@ -48,7 +48,7 @@ final class PhabricatorPinboardItemView extends AphrontView {
'href' => $this->uri, 'href' => $this->uri,
'class' => 'phabricator-pinboard-item-image-link', 'class' => 'phabricator-pinboard-item-image-link',
), ),
phutil_render_tag( phutil_tag(
'img', 'img',
array( array(
'src' => $this->imageURI, 'src' => $this->imageURI,

View file

@ -66,7 +66,7 @@ class PhabricatorBarePageView extends AphrontPageView {
$viewport_tag = null; $viewport_tag = null;
if ($this->getDeviceReady()) { if ($this->getDeviceReady()) {
$viewport_tag = phutil_render_tag( $viewport_tag = phutil_tag(
'meta', 'meta',
array( array(
'name' => 'viewport', 'name' => 'viewport',

View file

@ -23,7 +23,7 @@ final class PhabricatorMainMenuSearchView extends AphrontView {
$target_id = celerity_generate_unique_node_id(); $target_id = celerity_generate_unique_node_id();
$search_id = $this->getID(); $search_id = $this->getID();
$input = phutil_render_tag( $input = phutil_tag(
'input', 'input',
array( array(
'type' => 'text', 'type' => 'text',
@ -52,7 +52,7 @@ final class PhabricatorMainMenuSearchView extends AphrontView {
'placeholder' => PhabricatorSearchScope::getScopePlaceholder($scope), 'placeholder' => PhabricatorSearchScope::getScopePlaceholder($scope),
)); ));
$scope_input = phutil_render_tag( $scope_input = phutil_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',