Removes threads subscriptions of given IDs.
@param array $threads thread IDs
@return bool
@since 0.2
764110
public static function remove($threads = [])
    {
        try {
            if (!empty($threads)) {
                return Podium::getInstance()->db->createCommand()->delete(
                        Subscription::tableName(), ['id' => $threads, 'user_id' => User::loggedId()]
                    )->execute();
            }
        } catch (Exception $e) {
            Log::error($e->getMessage(), null, __METHOD__);
        }
        return false;
    }
97135
public function delete(array $keys) {
		foreach ($keys as $key) {
			if (!isset($this->_cache[$key])) {
				return false;
			}
			unset($this->_cache[$key]);
		}
		return true;
	}
287079
protected function sort_threads($threads)
    {
        if ($threads->is_empty()) {
            return;
        }

        // THREAD=ORDEREDSUBJECT: sorting by sent date of root message
        // THREAD=REFERENCES:     sorting by sent date of root message
        // THREAD=REFS:           sorting by the most recent date in each thread

        if ($this->threading != 'REFS' || ($this->sort_field && $this->sort_field != 'date')) {
            $sortby = $this->sort_field ? $this->sort_field : 'date';
            $index  = $this->index($this->folder, $sortby, $this->sort_order, true, true);

            if (!$index->is_empty()) {
                $threads->sort($index);
            }
        }
        else if ($this->sort_order != $threads->get_parameters('ORDER')) {
            $threads->revert();
        }
    }
493798
public function delete_many(array $keys) {
        $count = 0;
        foreach ($keys as $key) {
            if (!is_array($key)) {
                $key = array('key' => $key);
            }
            $key = $key['key'];
            if (isset($this->store[$key])) {
                $count++;
            }
            unset($this->store[$key]);
        }
        if ($this->maxsize !== false) {
            $this->storecount -= $count;
        }
        return $count;
    }
680972
public function delete_many(array $keys) {
        if ($this->clustered) {
            // Get the minimum deleted from any of the connections.
            $count = count($keys);
            foreach ($this->setconnections as $connection) {
                $count = min($this->delete_many_connection($connection, $keys), $count);
            }
            return $count;
        }

        return $this->delete_many_connection($this->connection, $keys);
    }
1129659
@Override
    protected IAbortable removeThread(IAbortable thread) {
        super.removeThread(thread);

        if (!hasActiveThreads()) {
            showBusy(null);
        }

        return thread;
    }
574896
public function removeTracks(array $positions): bool
    {
        $ranges = [];
        $key = 0;
        $last = -1;
        sort($positions);
        foreach ($positions as $position) {
            $position++;
            if ($last > -1) {
                if ($position === $last + 1) {
                    $ranges[$key]++;
                    $last = $position;
                    continue;
                }
            }
            $key = $position;
            $ranges[$key] = 1;
            $last = $position;
        }

        $offset = 0;
        foreach ($ranges as $position => $limit) {
            $position -= $offset;
            $data = $this->soap("AVTransport", "RemoveTrackRangeFromQueue", [
                "UpdateID"          =>  $this->getUpdateID(),
                "StartingIndex"     =>  $position,
                "NumberOfTracks"    =>  $limit,
            ]);
            $this->updateId = $data;
            $offset += $limit;
        }
        return true;
    }
1338185
public function podiumDelete()
    {
        $transaction = Thread::getDb()->beginTransaction();
        try {
            if (!$this->delete()) {
                throw new Exception('Thread deleting error!');
            }
            $this->forum->updateCounters([
                'threads' => -1,
                'posts'   => -$this->postsCount
            ]);
            $transaction->commit();
            PodiumCache::clearAfter('threadDelete');
            Log::info('Thread deleted', $this->id, __METHOD__);
            return true;
        } catch (Exception $e) {
            $transaction->rollBack();
            Log::error($e->getMessage(), null, __METHOD__);
        }
        return false;
    }
1344917
public function delete(array $keys) {
		if (count($keys) > 1) {
			return $this->connection->deleteMulti($keys);
		}
		return $this->connection->delete(current($keys));
	}
1152695
protected function __remove( $tokens )
	{
		$updated = false;

		foreach ( $tokens as $token ) {
			if ( $this->__contains( $token ) ) {

			if ( false !== ( $index = array_search( $token, $this->tokens, true ) ) )
				unset( $this->tokens[ $index ] );
				$updated = true;
			}
		}

		if ( $updated ) {
			$this->__update();
		}

		return $this;
	}
1075356
public function removeSerie($Series)
    {
        if (!is_array($Series)) {
            $Series = $this->convertToArray($Series);
        }
        foreach ($Series as $Serie) {
            if (isset($this->Data["Series"][$Serie])) {
                unset($this->Data["Series"][$Serie]);
            }
        }
    }
190581
public function removePermission($ids)
    {
        $ids = is_array($ids) ? $ids : func_get_args();

        $this->permissions()->detach($ids);
    }
187116
public function deleteItems(array $keys)
    {
        foreach ($keys as $key) {
            $this->_cacheEngine->delete($key);
            $this->removeElementFromBuffer($key);
        }
        
        return true;
    }
515612
public function remove($class, array $id)
    {
        if (!$this->isEnabled()) {
            return false;
        }

        $key = self::key($class, $id);
        unset($this->members[$key]);
    }
543049
public function threadsWithNewMessages()
    {
        return $this->threads()
            ->where(function (Builder $q) {
                $q->whereIn(Models::table('threads') . '.id', $this->unreadMessages()->pluck('thread_id'));
            })
            ->get();
    }
1353044
public static function activate_subscriptions(array $ids) {
        global $DB;
        if (!empty($ids)) {
            list($sql, $params) = $DB->get_in_or_equal($ids);
            $success = $DB->set_field_select('tool_monitor_subscriptions', 'inactivedate', '0', 'id ' . $sql, $params);
            return $success;
        }
        return false;
    }
1156800
protected function delete(array $keys)
    {
        foreach ($keys as $k) {
            $k = sha1($k);
            $this->memcache->delete($k);
        }

        return true;
    }