r107526 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107525‎ | r107526 | r107527 >
Date:20:48, 28 December 2011
Author:rmoen
Status:resolved (Comments)
Tags:
Comment:
added nbsp to mark as helpful element & response element, parser was removing empty elements in talk page
Modified paths:
  • /trunk/extensions/MoodBar/ApiFeedbackDashboardResponse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/ApiFeedbackDashboardResponse.php
@@ -50,11 +50,11 @@
5151 $api = new ApiMain( new FauxRequest( array(
5252 'action' => 'edit',
5353 'title' => $talkPage->getFullText(),
54 - 'appendtext' => ( $talkPage->exists() ? "\n\n" : '' ) .
55 - $feedback_link . "\n" .
56 - '<span id="feedback-dashboard-response-' . $id . '"></span>' . "\n\n" .
 54+ 'appendtext' => ( $talkPage->exists() ? "\n\n" : '' ) .
 55+ $feedback_link . "\n" .
 56+ '<span id="feedback-dashboard-response-' . $item->getProperty('id') . '">&nbsp;</span>' . "\n\n" .
5757 $response . "\n\n~~~~\n\n" .
58 - '<span class="markashelpful-item" data-markashelpful-item="' . $id . '" data-markashelpful-type="mbresponse"></span>',
 58+ '<span class="markashelpful-item" data-markashelpful-item="' . $item->getProperty('id') . '" data-markashelpful-type="mbresponse">&nbsp;</span>',
5959 'token' => $params['token'],
6060 'summary' => $summary,
6161 'notminor' => true,

Follow-up revisions

RevisionCommit summaryAuthorDate
r107527follow up to r107526 due to code revertrmoen20:53, 28 December 2011

Comments

#Comment by Nikerabbit (talk | contribs)   06:33, 29 December 2011

Since this is API I don't know if it matters, but elsewhere we should use & #160; instead of & nbsp;

Anyone figured way to escape entities in these comments? Neither <pre> nor <nowiki> works.

#Comment by Bawolff (talk | contribs)   06:36, 29 December 2011

You can do &amp;#160; to make &#160;.

Status & tagging log