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;
    }
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;
    }
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 ; }
Performs thread delete with parent forum counters update.
@return bool
@since 0.2
Performs thread delete with parent forum counters update .