r56478 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56477‎ | r56478 | r56479 >
Date:01:14, 17 September 2009
Author:aaron
Status:ok
Tags:
Comment:
partial revert on r55573; livePreview() is still used
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -2338,7 +2338,37 @@
23392339 return $buttons;
23402340 }
23412341
 2342+ /**
 2343+ * Output preview text only. This can be sucked into the edit page
 2344+ * via JavaScript, and saves the server time rendering the skin as
 2345+ * well as theoretically being more robust on the client (doesn't
 2346+ * disturb the edit box's undo history, won't eat your text on
 2347+ * failure, etc).
 2348+ *
 2349+ * @todo This doesn't include category or interlanguage links.
 2350+ * Would need to enhance it a bit, <s>maybe wrap them in XML
 2351+ * or something...</s> that might also require more skin
 2352+ * initialization, so check whether that's a problem.
 2353+ */
 2354+ function livePreview() {
 2355+ global $wgOut;
 2356+ $wgOut->disable();
 2357+ header( 'Content-type: text/xml; charset=utf-8' );
 2358+ header( 'Cache-control: no-cache' );
23422359
 2360+ $previewText = $this->getPreviewText();
 2361+ #$categories = $skin->getCategoryLinks();
 2362+
 2363+ $s =
 2364+ '<?xml version="1.0" encoding="UTF-8" ?>' . "\n" .
 2365+ Xml::tags( 'livepreview', null,
 2366+ Xml::element( 'preview', null, $previewText )
 2367+ #. Xml::element( 'category', null, $categories )
 2368+ );
 2369+ echo $s;
 2370+ }
 2371+
 2372+
23432373 /**
23442374 * Get a diff between the current contents of the edit box and the
23452375 * version of the page we're editing from.

Follow-up revisions

RevisionCommit summaryAuthorDate
r56511Merge r56478, EditPage bugfix which we forgot to deploywerdna14:08, 17 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55573Fix live preview copying of existing category linkswerdna15:09, 25 August 2009

Status & tagging log