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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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