Pastoid

The page you are looking at now is at this URL: http://pastoid.com/bz9

This paste was last updated on February 16, 2010 at 11:04 pm.

Pasted Coderaw

       /**
         * Temporarily set a term and its descendants aside from the rest of a vocabulary.
         * If this is not done a second time, corruption will result.
         *
         **/
        private function displace_term( $term )
        {
                // took this from delete_term below
                if ( is_string( $term ) ) {
			$term = $this->get_term( $term );
                }
 
                $params = array($this->id, $term->mptt_left, $term->mptt_right);
                DB::query( 'UPDATE {terms} SET mptt_left = -mptt_left, mptt_right= -mptt_right WHERE vocabulary_id = ? AND mptt_left BETWEEN ? AND ?', $params );
	}
 

Toggle wordwrap

Referring DomainHits
Unknown Referer 127
pastoid.com 3
Is this paste spam?
<Hide