1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +01:00

Remove deprecated javelin_render_tag() and phabricator_render_form()

Summary:
Not removing `phutil_render_tag()` for now as it is still used in Diviner.

@edward, please verify Facebook callsites.

Test Plan: Searched for it.

Reviewers: edward, epriestley

Reviewed By: epriestley

CC: aran, Korvin, wez

Differential Revision: https://secure.phabricator.com/D6494
This commit is contained in:
Jakub Vrana 2013-07-18 13:30:25 -07:00
parent 0b1b988107
commit aa576af434
4 changed files with 5 additions and 50 deletions

View file

@ -1947,7 +1947,6 @@ phutil_register_library_map(array(
'celerity_register_resource_map' => 'infrastructure/celerity/map.php',
'implode_handle_links' => 'applications/phid/handle/view/render.php',
'implode_selected_handle_links' => 'applications/phid/handle/view/render.php',
'javelin_render_tag' => 'infrastructure/javelin/markup.php',
'javelin_tag' => 'infrastructure/javelin/markup.php',
'phabricator_date' => 'view/viewutils.php',
'phabricator_datetime' => 'view/viewutils.php',
@ -1960,7 +1959,6 @@ phutil_register_library_map(array(
'phabricator_on_relative_date' => 'view/viewutils.php',
'phabricator_parse_bytes' => 'view/viewutils.php',
'phabricator_relative_date' => 'view/viewutils.php',
'phabricator_render_form' => 'infrastructure/javelin/markup.php',
'phabricator_time' => 'view/viewutils.php',
'phid_get_subtype' => 'applications/phid/utils.php',
'phid_get_type' => 'applications/phid/utils.php',

View file

@ -23,8 +23,7 @@ from XSS and render correctly. Broadly:
- @{class:AphrontView} subclasses act like tags when rendering.
- @{function:pht} has some special rules.
- There are some other things that you should be aware of.
- Do not use @{function:phutil_render_tag} or @{function:javelin_render_tag},
they are deprecated and unsafe.
- Do not use @{function:phutil_render_tag}, it is deprecated and unsafe.
See below for discussion.
@ -185,11 +184,7 @@ following examples are dangerous:
= Deprecated Functions =
The functions @{function@libphutil:phutil_render_tag} and
@{function:javelin_render_tag} are unsafe versions of
@{function@libphutil:phutil_tag} and @{function:javelin_tag}, are deprecated,
and will be removed in the future. You should avoid their use and convert code
to use @{function@libphutil:phutil_tag} and @{function:javelin_tag}.
The function @{function:phabricator_render_form} is also deprecated, in favor of
@{function:phabricator_form}.
The function @{function@libphutil:phutil_render_tag} is unsafe version of
@{function@libphutil:phutil_tag}, is deprecated, and will be removed in the
future. You should avoid its use and convert code to use
@{function@libphutil:phutil_tag}.

View file

@ -1,21 +1,5 @@
<?php
/**
* @deprecated Use javelin_tag().
*/
function javelin_render_tag(
$tag,
array $attributes = array(),
$content = null) {
if (is_array($content)) {
$content = implode('', $content);
}
$html = javelin_tag($tag, $attributes, phutil_safe_html($content));
return $html->getHTMLContent();
}
function javelin_tag(
$tag,
array $attributes = array(),
@ -81,17 +65,3 @@ function phabricator_form(PhabricatorUser $user, $attributes, $content) {
return javelin_tag('form', $attributes, $body);
}
/**
* @deprecated
*/
function phabricator_render_form(PhabricatorUser $user, $attributes, $content) {
if (is_array($content)) {
$content = implode('', $content);
}
$html = phabricator_form($user, $attributes, phutil_safe_html($content));
return $html->getHTMLContent();
}

View file

@ -14,14 +14,6 @@ class PhabricatorLintEngine extends PhutilLintEngine {
'phutil_escape_html' =>
'The phutil_escape_html() function is deprecated. Raw strings '.
'passed to phutil_tag() or hsprintf() are escaped automatically.',
'javelin_render_tag' =>
'The javelin_render_tag() function is deprecated and unsafe. '.
'Use javelin_tag() instead.',
'phabricator_render_form' =>
'The phabricator_render_form() function is deprecated and unsafe. '.
'Use phabricator_form() instead.',
));
}
}