@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.

render_tag -> tag: fix more callsites (more view, misc)

Summary: Fixes even more callsites.

Test Plan: See inlines.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

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

+78 -40
+5 -3
src/applications/differential/controller/DifferentialChangesetViewController.php
··· 244 244 $detail->setVsChangesetID($left_source); 245 245 246 246 $panel = new DifferentialPrimaryPaneView(); 247 - $panel->appendChild(phutil_render_tag('div', 247 + $panel->appendChild( 248 + phutil_tag( 249 + 'div', 248 250 array( 249 251 'class' => 'differential-review-stage', 250 252 'id' => 'differential-review-stage', 251 - ), $detail->render()) 252 - ); 253 + ), 254 + $detail->render())); 253 255 254 256 return $this->buildStandardPageResponse( 255 257 array(
+1 -1
src/applications/differential/view/DifferentialDiffTableOfContentsView.php
··· 148 148 149 149 $rows[] = 150 150 '<tr>'. 151 - phutil_render_tag( 151 + phutil_tag( 152 152 'td', 153 153 array( 154 154 'class' => 'differential-toc-char',
+3 -3
src/applications/differential/view/DifferentialLocalCommitsView.php
··· 88 88 $summary = phutil_utf8_shorten($summary, 80); 89 89 90 90 $view = new AphrontMoreView(); 91 - $view->setSome(phutil_escape_html($summary)); 91 + $view->setSome($summary); 92 92 93 93 if ($message && (trim($summary) != trim($message))) { 94 - $view->setMore(nl2br(phutil_escape_html($message))); 94 + $view->setMore(phutil_escape_html_newlines($message)); 95 95 } 96 96 97 - $row[] = phutil_render_tag( 97 + $row[] = phutil_tag( 98 98 'td', 99 99 array( 100 100 'class' => 'summary',
+19 -12
src/applications/differential/view/DifferentialRevisionCommentListView.php
··· 159 159 array( 160 160 'markup' => implode("\n", $hidden), 161 161 )); 162 - $hidden = javelin_render_tag( 162 + $hidden = javelin_tag( 163 163 'div', 164 164 array( 165 165 'sigil' => "differential-all-comments-container", 166 166 ), 167 - '<div class="differential-older-comments-are-hidden">'. 168 - pht('%d older comments are hidden. ', number_format(count($hidden))). 169 - javelin_tag( 170 - 'a', 171 - array( 172 - 'href' => '#', 173 - 'mustcapture' => true, 174 - 'sigil' => 'differential-show-all-comments', 175 - ), 176 - pht('Show all comments.')). 177 - '</div>'); 167 + phutil_tag( 168 + 'div', 169 + array( 170 + 'class' => 'differential-older-comments-are-hidden', 171 + ), 172 + array( 173 + pht( 174 + '%d older comments are hidden. ', 175 + number_format(count($hidden))), 176 + javelin_tag( 177 + 'a', 178 + array( 179 + 'href' => '#', 180 + 'mustcapture' => true, 181 + 'sigil' => 'differential-show-all-comments', 182 + ), 183 + pht('Show all comments.')), 184 + ))); 178 185 } else { 179 186 $hidden = null; 180 187 }
+20 -5
src/applications/diffusion/controller/DiffusionBrowseFileController.php
··· 271 271 'sigil' => 'diffusion-source', 272 272 ), 273 273 implode("\n", $rows)); 274 + 275 + // TODO: [HTML] Major cheating here. 276 + $corpus_table = phutil_safe_html($corpus_table); 277 + 274 278 $corpus = phutil_tag( 275 279 'div', 276 280 array( ··· 723 727 array( 724 728 'target' => 'scroll_target', 725 729 )); 726 - $anchor_text = '<a id="scroll_target"></a>'; 730 + $anchor_text = phutil_tag( 731 + 'a', 732 + array( 733 + 'id' => 'scroll_target', 734 + ), 735 + ''); 727 736 } else { 728 737 $anchor_text = null; 729 738 } 730 739 731 - $blame[] = phutil_render_tag( 740 + $blame[] = phutil_tag( 732 741 'td', 733 742 array( 734 743 ), 735 - $anchor_text. 736 - "\xE2\x80\x8B". // NOTE: See phabricator-oncopy behavior. 737 - $line['data']); 744 + array( 745 + $anchor_text, 746 + 747 + // NOTE: See phabricator-oncopy behavior. 748 + "\xE2\x80\x8B", 749 + 750 + // TODO: [HTML] Not ideal. 751 + phutil_safe_html($line['data']), 752 + )); 738 753 739 754 $rows[] = phutil_tag( 740 755 'tr',
+17 -5
src/applications/diffusion/controller/DiffusionCommitController.php
··· 442 442 foreach ($parents as $parent) { 443 443 $parent_links[] = $handles[$parent->getPHID()]->renderLink(); 444 444 } 445 - $props['Parents'] = implode(' &middot; ', $parent_links); 445 + $props['Parents'] = array_interleave( 446 + " \xC2\xB7 ", 447 + $parent_links); 446 448 } 447 449 448 450 $request = $this->getDiffusionRequest(); 449 451 450 - $props['Branches'] = '<span id="commit-branches">Unknown</span>'; 451 - $props['Tags'] = '<span id="commit-tags">Unknown</span>'; 452 + $props['Branches'] = phutil_tag( 453 + 'span', 454 + array( 455 + 'id' => 'commit-branches', 456 + ), 457 + 'Unknown'); 458 + $props['Tags'] = phutil_tag( 459 + 'span', 460 + array( 461 + 'id' => 'commit-tags', 462 + ), 463 + 'Unknown'); 452 464 453 465 $callsign = $request->getRepository()->getCallsign(); 454 466 $root = '/diffusion/'.$callsign.'/commit/'.$commit->getCommitIdentifier(); ··· 906 918 ), 907 919 $ref); 908 920 } 909 - $ref_links = implode(', ', $ref_links); 910 - return $ref_links; 921 + 922 + return array_interleave(', ', $ref_links); 911 923 } 912 924 913 925 private function buildRawDiffResponse(DiffusionRequest $drequest) {
+2 -2
src/applications/ponder/view/PonderAddCommentView.php
··· 44 44 ->setValue($is_serious ? 'Submit' : 'Editorialize')); 45 45 46 46 $view = id(new AphrontMoreView()) 47 - ->setSome(id(new AphrontNullView())->render()) 48 - ->setMore($form->render()) 47 + ->setSome('') 48 + ->setMore(phutil_safe_html($form->render())) 49 49 ->setExpandText('Add Comment'); 50 50 51 51 return $view->render();
+11 -9
src/view/layout/AphrontMoreView.php
··· 22 22 } 23 23 24 24 public function render() { 25 - $some = $this->some; 26 25 27 - $text = "(Show More\xE2\x80\xA6)"; 28 - if ($this->expandtext !== null) { 29 - $text = $this->expandtext; 30 - } 26 + $content = array(); 27 + $content[] = $this->some; 31 28 32 - $link = null; 33 29 if ($this->more && $this->more != $this->some) { 30 + $text = "(Show More\xE2\x80\xA6)"; 31 + if ($this->expandtext !== null) { 32 + $text = $this->expandtext; 33 + } 34 + 34 35 Javelin::initBehavior('aphront-more'); 35 - $link = ' '.javelin_tag( 36 + $content[] = ' '; 37 + $content[] = javelin_tag( 36 38 'a', 37 39 array( 38 40 'sigil' => 'aphront-more-view-show-more', ··· 45 47 $text); 46 48 } 47 49 48 - return javelin_render_tag( 50 + return javelin_tag( 49 51 'div', 50 52 array( 51 53 'sigil' => 'aphront-more-view', 52 54 ), 53 - $some.$link); 55 + $content); 54 56 } 55 57 }