summaryrefslogtreecommitdiff
path: root/BitNewsletterEdition.php
diff options
context:
space:
mode:
authorStephan Borg <wolff_borg@users.sourceforge.net>2006-01-31 11:51:50 +0000
committerStephan Borg <wolff_borg@users.sourceforge.net>2006-01-31 11:51:50 +0000
commitce2bfa90566655cdba4c9e4a6b01595195fc7243 (patch)
tree58904c11584364fc0ec749d62679b672967bebee /BitNewsletterEdition.php
parent803bf3846ba281024e50231223b44a32278c1538 (diff)
downloadnewsletters-ce2bfa90566655cdba4c9e4a6b01595195fc7243.tar.gz
newsletters-ce2bfa90566655cdba4c9e4a6b01595195fc7243.tar.bz2
newsletters-ce2bfa90566655cdba4c9e4a6b01595195fc7243.zip
Fixed expunge function
Diffstat (limited to 'BitNewsletterEdition.php')
-rw-r--r--BitNewsletterEdition.php23
1 files changed, 17 insertions, 6 deletions
diff --git a/BitNewsletterEdition.php b/BitNewsletterEdition.php
index 7216372..b8fe572 100644
--- a/BitNewsletterEdition.php
+++ b/BitNewsletterEdition.php
@@ -1,12 +1,12 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_newsletters/BitNewsletterEdition.php,v 1.15 2006/01/22 20:21:56 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_newsletters/BitNewsletterEdition.php,v 1.16 2006/01/31 11:51:50 wolff_borg Exp $
*
* Copyright (c) 2004 bitweaver.org
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitNewsletterEdition.php,v 1.15 2006/01/22 20:21:56 spiderr Exp $
+ * $Id: BitNewsletterEdition.php,v 1.16 2006/01/31 11:51:50 wolff_borg Exp $
*
* Class that handles editions of newsletters
* @package newsletters
@@ -15,7 +15,7 @@
*
* @author spiderr <spider@steelsun.com>
*
- * @version $Revision: 1.15 $ $Date: 2006/01/22 20:21:56 $ $Author: spiderr $
+ * @version $Revision: 1.16 $ $Date: 2006/01/31 11:51:50 $ $Author: wolff_borg $
*/
/**
@@ -170,9 +170,20 @@ class BitNewsletterEdition extends LibertyAttachable {
return $ret;
}
- function expunge($edition_id) {
- $query = "delete from `".BIT_DB_PREFIX."tiki_newsletters_editions` where `edition_id`=$edition_id";
- $result = $this->mDb->query($query,array((int)$edition_id));
+ function expunge() {
+ $ret = FALSE;
+ if( $this->isValid() ) {
+ $this->mDb->StartTrans();
+ $query = "delete from `".BIT_DB_PREFIX."tiki_newsletters_editions` where `edition_id`=?";
+ $result = $this->mDb->query( $query, array( $this->mContentId ) );
+ if( LibertyAttachable::expunge() ) {
+ $ret = TRUE;
+ $this->mDb->CompleteTrans();
+ } else {
+ $this->mDb->RollbackTrans();
+ }
+ }
+ return $ret;
}
function isDraft() {