diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2005-12-18 22:30:28 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2005-12-18 22:30:28 +0000 |
| commit | 8aa72c09216fff4609f4fc222404aa0620b5f1c1 (patch) | |
| tree | 91ff1661d48fa1ae9b1420276e0dc80c67fb27b6 /LibertyContent.php | |
| parent | df9edaccf6ea14537dbcce9dee550ce23505082b (diff) | |
| download | liberty-8aa72c09216fff4609f4fc222404aa0620b5f1c1.tar.gz liberty-8aa72c09216fff4609f4fc222404aa0620b5f1c1.tar.bz2 liberty-8aa72c09216fff4609f4fc222404aa0620b5f1c1.zip | |
merge recent changes into HEAD
Diffstat (limited to 'LibertyContent.php')
| -rw-r--r-- | LibertyContent.php | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/LibertyContent.php b/LibertyContent.php index 204f1d8..6bc4a8e 100644 --- a/LibertyContent.php +++ b/LibertyContent.php @@ -3,7 +3,7 @@ * Management of Liberty content * * @package liberty -* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.11 2005/12/05 23:53:17 squareing Exp $ +* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.12 2005/12/18 22:30:21 squareing Exp $ * @author spider <spider@steelsun.com> */ @@ -127,6 +127,12 @@ class LibertyContent extends LibertyBase { */ function verify( &$pParamHash ) { global $gLibertySystem, $gBitSystem; + + // It is possible a derived class set this to something different + if( empty( $pParamHash['content_type_guid'] ) ) { + $pParamHash['content_type_guid'] = $this->mContentTypeGuid; + } + if( empty( $pParamHash['user_id'] ) ) { global $gBitUser; $pParamHash['user_id'] = $gBitUser->getUserId(); @@ -284,25 +290,15 @@ class LibertyContent extends LibertyBase { } */ + // Remove individual permissions for this object if they exist + $query = "delete from `".BIT_DB_PREFIX."users_objectpermissions` where `object_id`=? and `object_type`=?"; + $result = $this->mDb->query( $query, array( $this->mContentId, $this->mContentTypeGuid ) ); + $query = "DELETE FROM `".BIT_DB_PREFIX."tiki_content` WHERE `content_id` = ?"; $result = $this->mDb->query( $query, array( $this->mContentId ) ); $this->mDb->CompleteTrans(); $ret = TRUE; } -/* -// ported from gBitSystem - this should probably be execute as well - spiderr - function remove_object($type, $id) { - $this->uncategorize_object($type, $id); - // Now remove comments - $object = $type . $id; - $query = "delete from `".BIT_DB_PREFIX."tiki_comments` where `object`=? and `object_type`=?"; - $result = $this->mDb->query($query, array( $id, $type )); - // Remove individual permissions for this object if they exist - $query = "delete from `".BIT_DB_PREFIX."users_objectpermissions` where `object_id`=? and `object_type`=?"; - $result = $this->mDb->query($query,array((int)$object,$type)); - return true; - } -*/ return $ret; } |
