Пример #1
0
 function getStartBody()
 {
     if (!$this->gallery) {
         // Note that null for mode is taken to mean use default.
         $mode = $this->getRequest()->getVal('gallerymode', null);
         try {
             $this->gallery = ImageGalleryBase::factory($mode);
         } catch (MWException $e) {
             // User specified something invalid, fallback to default.
             $this->gallery = ImageGalleryBase::factory();
         }
         $this->gallery->setContext($this->getContext());
     }
     return '';
 }
Пример #2
0
 function clearCategoryState()
 {
     $this->articles = array();
     $this->articles_start_char = array();
     $this->children = array();
     $this->children_start_char = array();
     if ($this->showGallery) {
         // Note that null for mode is taken to mean use default.
         $mode = $this->getRequest()->getVal('gallerymode', null);
         try {
             $this->gallery = ImageGalleryBase::factory($mode);
         } catch (MWException $e) {
             // User specified something invalid, fallback to default.
             $this->gallery = ImageGalleryBase::factory();
         }
         $this->gallery->setHideBadImages();
         $this->gallery->setContext($this->getContext());
     } else {
         $this->imgsNoGallery = array();
         $this->imgsNoGallery_start_char = array();
     }
 }