コード例 #1
0
 /**
  * Returns the blacklist, which is a non-associative array of user NSIDs and path_aliases
  * (the name name which can be seen in the pretty URL). For a given user, usually only one
  * of the NSID and the path_alias will be present; it is the responsibility of the consumers
  * of the blacklist to check it against both.
  * @return array
  */
 public function getBlacklist()
 {
     if (!isset(self::$blacklist)) {
         self::$blacklist = array();
         if ($this->flickrBlacklistPage) {
             $title = Title::newFromText($this->flickrBlacklistPage);
             $page = WikiPage::factory($title);
             $text = ContentHandler::getContentText($page->getContent());
             $text = preg_replace('/^\\s*#.*$/m', '', $text);
             preg_match_all('/\\S+/', $text, $match);
             self::$blacklist = $match[0];
         }
     }
     return self::$blacklist;
 }