コード例 #1
0
ファイル: FileCache.php プロジェクト: ui-libraries/TIRW
 /**
  * Remove some files from the cache, so that their existence will be
  * rechecked.  This is a fairly low-level function, which most users
  * should not need to call.
  * @param array $remove array indexed by DB keys to remove (the values are ignored)
  */
 function clearFiles($remove)
 {
     wfDebug("FileCache clearing data for " . count($remove) . " files\n");
     $this->cache = array_diff_keys($this->cache, $remove);
     $this->notFound = array_diff_keys($this->notFound, $remove);
 }
コード例 #2
0
 function getRecipients($pGroupArray, $validated = TRUE, $pRequeue = FALSE)
 {
     global $gBitUser;
     $ret = array();
     if (is_array($pGroupArray)) {
         foreach ($pGroupArray as $groupId) {
             $ret = array_merge($ret, $gBitUser->getGroupUserData($groupId, array('email', 'uu.user_id', 'login', 'real_name')));
         }
         if (array_search('send_subs', $pGroupArray) !== false) {
             $valid = "";
             $bindvars = array($this->mNewsletter->mNewsletterId);
             if ($validated) {
                 $valid = " AND `is_valid`=?";
                 $bindvars[] = 'y';
             }
             $query = "SELECT * FROM `" . BIT_DB_PREFIX . "mail_subscriptions`\n\t\t\t\t\t  WHERE `content_id`=? AND `unsubscribe_date` IS NULL AND `unsubscribe_all` IS NULL" . $valid;
             $subs = $this->mDb->getArray($query, $bindvars);
             foreach ($subs as $sub) {
                 if (!isset($ret[$sub['email']])) {
                     $ret[$sub['email']] = $sub;
                 }
             }
         }
         if (!$pRequeue) {
             $query = "SELECT `email`, `user_id` FROM `" . BIT_DB_PREFIX . "mail_queue` WHERE `content_id`=?";
             if ($dupes = $this->mDb->getAssoc($query, array($this->mContentId))) {
                 $ret = array_diff_keys($ret, $dupes);
             }
         }
     }
     return $ret;
 }