Esempio n. 1
0
 public function getDuplicates()
 {
     wfProfileIn(__METHOD__);
     $img = $this->getDisplayedFile();
     $handler = $img->getHandler();
     if ($handler instanceof VideoHandler && $handler->isBroken()) {
         wfProfileOut(__METHOD__);
         return $this->dupes = array();
     } else {
         $dupes = parent::getDuplicates();
         $finalDupes = array();
         foreach ($dupes as $dupe) {
             if (WikiaFileHelper::isFileTypeVideo($dupe) && $dupe instanceof WikiaLocalFile) {
                 if ($dupe->getProviderName() != $img->getProviderName()) {
                     continue;
                 }
                 if ($dupe->getVideoId() != $img->getVideoId()) {
                     continue;
                 }
                 $finalDupes[] = $dupe;
             }
         }
         wfProfileOut(__METHOD__);
         return $finalDupes;
     }
 }