@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Convert more render_tag -> tag

Summary: Mostly straightforward.

Test Plan: Browsed most of the affected interfaces.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4687

+46 -40
+5 -7
src/applications/conpherence/controller/ConpherenceViewController.php
··· 237 237 foreach ($files as $file) { 238 238 $thumb = $file->getThumb60x45URI(); 239 239 $table_data[] = array( 240 - phutil_render_tag( 240 + phutil_tag( 241 241 'img', 242 242 array( 243 243 'src' => $thumb 244 244 ), 245 - '' 246 - ), 247 - $file->getName() 245 + ''), 246 + phutil_escape_html($file->getName()), 248 247 ); 249 248 } 250 249 $header = id(new PhabricatorHeaderView()) ··· 274 273 foreach ($actual_tasks as $task) { 275 274 $data[] = array( 276 275 idx($priority_map, $task->getPriority(), pht('???')), 277 - phutil_render_tag( 276 + phutil_tag( 278 277 'a', 279 278 array( 280 279 'href' => '/T'.$task->getID() 281 280 ), 282 - phutil_escape_html($task->getTitle()) 283 - ) 281 + $task->getTitle()), 284 282 ); 285 283 } 286 284 $table = id(new AphrontTableView($data))
+3 -3
src/applications/diffusion/query/browse/DiffusionBrowseQuery.php
··· 111 111 $readme_content = $content_query->getRawData(); 112 112 113 113 if (preg_match('/\\.txt$/', $readme->getPath())) { 114 - $readme_content = phutil_escape_html($readme_content); 115 - $readme_content = nl2br($readme_content); 114 + $readme_content = phutil_escape_html_newlines($readme_content); 116 115 117 116 $class = null; 118 117 } else if (preg_match('/\\.rainbow$/', $readme->getPath())) { ··· 121 120 ->getHighlightFuture($readme_content) 122 121 ->resolve(); 123 122 $readme_content = nl2br($readme_content); 123 + $readme_content = phutil_safe_html($readme_content); 124 124 125 125 require_celerity_resource('syntax-highlighting-css'); 126 126 $class = 'remarkup-code'; ··· 132 132 $class = 'phabricator-remarkup'; 133 133 } 134 134 135 - $readme_content = phutil_render_tag( 135 + $readme_content = phutil_tag( 136 136 'div', 137 137 array( 138 138 'class' => $class,
+1 -2
src/applications/diffusion/view/DiffusionBranchTableView.php
··· 61 61 $drequest->getRepository(), 62 62 $branch->getHeadCommitIdentifier()), 63 63 $datetime, 64 - AphrontTableView::renderSingleDisplayLine( 65 - phutil_escape_html($details)) 64 + AphrontTableView::renderSingleDisplayLine($details), 66 65 // TODO: etc etc 67 66 ); 68 67 if ($branch->getName() == $current_branch) {
+1 -2
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 59 59 } 60 60 } 61 61 62 - $details = AphrontTableView::renderSingleDisplayLine( 63 - phutil_escape_html($data->getSummary())); 62 + $details = AphrontTableView::renderSingleDisplayLine($data->getSummary()); 64 63 } else { 65 64 $author = ''; 66 65 $details = '';
+1 -2
src/applications/diffusion/view/DiffusionHistoryTableView.php
··· 138 138 $date, 139 139 $time, 140 140 $author, 141 - AphrontTableView::renderSingleDisplayLine( 142 - phutil_escape_html($history->getSummary())), 141 + AphrontTableView::renderSingleDisplayLine($history->getSummary()), 143 142 // TODO: etc etc 144 143 ); 145 144 }
+5 -2
src/applications/directory/controller/PhabricatorDirectoryMainController.php
··· 338 338 private function renderMiniPanel($title, $body) { 339 339 $panel = new AphrontMiniPanelView(); 340 340 $panel->appendChild( 341 - phutil_render_tag( 341 + phutil_tag( 342 342 'p', 343 343 array( 344 344 ), 345 - '<strong>'.$title.':</strong> '.$body)); 345 + array( 346 + phutil_tag('strong', array(), $title.':'), 347 + $body 348 + ))); 346 349 $this->minipanels[] = $panel; 347 350 } 348 351
+14 -12
src/applications/ponder/view/PonderVotableView.php
··· 73 73 'vote' => (int)$this->vote, 74 74 ), 75 75 ), 76 - javelin_render_tag( 77 - 'div', 78 - array( 79 - 'class' => 'ponder-votebox', 80 - ), 81 - $up.$count.$down). 82 - phutil_render_tag( 83 - 'div', 84 - array( 85 - 'class' => 'ponder-votebox-content', 86 - ), 87 - $this->renderChildren())); 76 + array( 77 + javelin_tag( 78 + 'div', 79 + array( 80 + 'class' => 'ponder-votebox', 81 + ), 82 + array($up, $count, $down)), 83 + phutil_render_tag( 84 + 'div', 85 + array( 86 + 'class' => 'ponder-votebox-content', 87 + ), 88 + $this->renderChildren()), 89 + )); 88 90 } 89 91 90 92 }
+7 -4
src/applications/uiexample/examples/JavelinViewExampleServerView.php
··· 1 1 <?php 2 2 3 3 final class JavelinViewExampleServerView extends AphrontView { 4 + 4 5 public function render() { 5 - return phutil_render_tag( 6 + return phutil_tag( 6 7 'div', 7 - array('class' => 'server-view'), 8 - $this->renderChildren() 9 - ); 8 + array( 9 + 'class' => 'server-view', 10 + ), 11 + $this->renderChildren()); 10 12 } 13 + 11 14 }
+9 -6
src/view/control/AphrontTableView.php
··· 311 311 array( 312 312 'class' => 'single-display-line-bounds', 313 313 ), 314 - phutil_render_tag( 315 - 'span', 316 - array( 317 - 'class' => 'single-display-line-content', 318 - ), 319 - $line).'&nbsp;'); 314 + array( 315 + phutil_tag( 316 + 'span', 317 + array( 318 + 'class' => 'single-display-line-content', 319 + ), 320 + $line), 321 + "\xC2\xA0", 322 + )); 320 323 } 321 324 322 325