r56511 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56510‎ | r56511 | r56512 >
Date:14:08, 17 September 2009
Author:werdna
Status:ok
Tags:
Comment:
Merge r56478, EditPage bugfix which we forgot to deploy
Modified paths:
  • /branches/wmf-deployment/includes/EditPage.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/includes/EditPage.php
@@ -2332,7 +2332,37 @@
23332333 return $buttons;
23342334 }
23352335
 2336+ /**
 2337+ * Output preview text only. This can be sucked into the edit page
 2338+ * via JavaScript, and saves the server time rendering the skin as
 2339+ * well as theoretically being more robust on the client (doesn't
 2340+ * disturb the edit box's undo history, won't eat your text on
 2341+ * failure, etc).
 2342+ *
 2343+ * @todo This doesn't include category or interlanguage links.
 2344+ * Would need to enhance it a bit, <s>maybe wrap them in XML
 2345+ * or something...</s> that might also require more skin
 2346+ * initialization, so check whether that's a problem.
 2347+ */
 2348+ function livePreview() {
 2349+ global $wgOut;
 2350+ $wgOut->disable();
 2351+ header( 'Content-type: text/xml; charset=utf-8' );
 2352+ header( 'Cache-control: no-cache' );
23362353
 2354+ $previewText = $this->getPreviewText();
 2355+ #$categories = $skin->getCategoryLinks();
 2356+
 2357+ $s =
 2358+ '<?xml version="1.0" encoding="UTF-8" ?>' . "\n" .
 2359+ Xml::tags( 'livepreview', null,
 2360+ Xml::element( 'preview', null, $previewText )
 2361+ #. Xml::element( 'category', null, $categories )
 2362+ );
 2363+ echo $s;
 2364+ }
 2365+
 2366+
23372367 /**
23382368 * Get a diff between the current contents of the edit box and the
23392369 * version of the page we're editing from.
Property changes on: branches/wmf-deployment/includes/EditPage.php
___________________________________________________________________
Name: svn:mergeinfo
23402370 + /branches/REL1_15/phase3/includes/EditPage.php:51646
/branches/wmf-deployment/includes/EditPage.php:53381
/trunk/phase3/includes/EditPage.php:56213,56215-56216,56218,56334-56336,56338,56340,56343,56345,56347,56350,56478

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r56478partial revert on r55573; livePreview() is still usedaaron01:14, 17 September 2009

Status & tagging log