Wicked_Driver::removeAllVersions PHP Method

removeAllVersions() public method

public removeAllVersions ( $pagename )
    public function removeAllVersions($pagename)
    {
        /* When deleting a page, also delete all its attachments. */
        $this->removeAllAttachments($this->getPageId($pagename));
    }

Usage Example

Esempio n. 1
0
 /**
  */
 public function removeAllVersions($pagename)
 {
     /* Remove attachments and do other cleanup. */
     parent::removeAllVersions($pagename);
     $this->_pageNames = null;
     try {
         $this->_db->beginDbTransaction();
         $this->_db->delete('DELETE FROM ' . $this->_params['table'] . ' WHERE page_name = ?', array($this->_convertToDriver($pagename)));
         $this->_db->delete('DELETE FROM ' . $this->_params['historytable'] . ' WHERE page_name = ?', array($this->_convertToDriver($pagename)));
         $this->_db->commitDbTransaction();
     } catch (Horde_Db_Exception $e) {
         $this->_db->rollbackDbTransaction();
         throw new Wicked_Exception($e);
     }
 }