/**
  * picking right gallery and returning JSON data
  * @author Marooned
  */
 public static function getGalleryData()
 {
     global $wgRequest;
     wfProfileIn(__METHOD__);
     $hash = $wgRequest->getVal('hash');
     $articleId = $wgRequest->getVal('articleId');
     $result = WikiaPhotoGalleryHelper::getGalleryDataByHash($hash, $articleId);
     wfProfileOut(__METHOD__);
     // return JSON as HTML - decode it JS-side
     return json_encode($result);
 }