/** * Render gallery preview */ public static function renderGalleryPreview() { global $wgRequest; wfProfileIn(__METHOD__); // decode JSON-encoded gallery data $gallery = json_decode($wgRequest->getVal('gallery'), true); if (empty($gallery['params']['rssfeed'])) { $html = WikiaPhotoGalleryHelper::renderGalleryPreview($gallery); } else { $html = WikiaPhotoGalleryHelper::renderFeedGalleryPreview($gallery); } wfProfileOut(__METHOD__); return array('html' => $html); }