Пример #1
0
 /**
  * @return string
  */
 function getBody()
 {
     $s = '';
     $this->doQuery();
     if (count($this->mHist)) {
         $list = new ImageHistoryList($this->mImagePage);
         # Generate prev/next links
         $navLink = $this->getNavigationBar();
         $s = $list->beginImageHistoryList($navLink);
         // Skip rows there just for paging links
         for ($i = $this->mRange[0]; $i <= $this->mRange[1]; $i++) {
             $file = $this->mHist[$i];
             $s .= $list->imageHistoryLine(!$file->isOld(), $file);
         }
         $s .= $list->endImageHistoryList($navLink);
         if ($list->getPreventClickjacking()) {
             $this->preventClickjacking();
         }
     }
     return $s;
 }
Пример #2
0
 /**
  * @return string
  */
 function getBody()
 {
     $s = '';
     $this->doQuery();
     if (count($this->mHist)) {
         if ($this->mImg->isLocal()) {
             // Do a batch existence check for user pages and talkpages
             $linkBatch = new LinkBatch();
             for ($i = $this->mRange[0]; $i <= $this->mRange[1]; $i++) {
                 $file = $this->mHist[$i];
                 $user = $file->getUser('text');
                 $linkBatch->add(NS_USER, $user);
                 $linkBatch->add(NS_USER_TALK, $user);
             }
             $linkBatch->execute();
         }
         $list = new ImageHistoryList($this->mImagePage);
         # Generate prev/next links
         $navLink = $this->getNavigationBar();
         $s = $list->beginImageHistoryList($navLink);
         // Skip rows there just for paging links
         for ($i = $this->mRange[0]; $i <= $this->mRange[1]; $i++) {
             $file = $this->mHist[$i];
             $s .= $list->imageHistoryLine(!$file->isOld(), $file);
         }
         $s .= $list->endImageHistoryList($navLink);
         if ($list->getPreventClickjacking()) {
             $this->preventClickjacking();
         }
     }
     return $s;
 }