Beispiel #1
0
 /**
  * Find all instances of files with this key
  *
  * @param $hash String base 36 SHA-1 hash
  * @return Array of File objects
  */
 function findBySha1($hash)
 {
     if (!$this->reposInitialised) {
         $this->initialiseRepos();
     }
     $result = $this->localRepo->findBySha1($hash);
     foreach ($this->foreignRepos as $repo) {
         $result = array_merge($result, $repo->findBySha1($hash));
     }
     return $result;
 }
Beispiel #2
0
 /**
  * Find all instances of files with this key
  *
  * @param $hash String base 36 SHA-1 hash
  * @return Array of File objects
  */
 function findBySha1($hash)
 {
     if (!$this->reposInitialised) {
         $this->initialiseRepos();
     }
     $result = $this->localRepo->findBySha1($hash);
     foreach ($this->foreignRepos as $repo) {
         // Wikia Change
         if (empty($repo->checkDuplicates)) {
             continue;
         }
         // Wikia Change End
         $result = array_merge($result, $repo->findBySha1($hash));
     }
     return $result;
 }