[pLog-svn] r6462 - plog/trunk/class/dao
mark at devel.lifetype.net
mark at devel.lifetype.net
Wed May 14 03:31:17 EDT 2008
Author: mark
Date: 2008-05-14 03:31:17 -0400 (Wed, 14 May 2008)
New Revision: 6462
Modified:
plog/trunk/class/dao/privatemessages.class.php
Log:
Fixed some bugs of PrivateMessages model.
Modified: plog/trunk/class/dao/privatemessages.class.php
===================================================================
--- plog/trunk/class/dao/privatemessages.class.php 2008-05-14 07:18:04 UTC (rev 6461)
+++ plog/trunk/class/dao/privatemessages.class.php 2008-05-14 07:31:17 UTC (rev 6462)
@@ -1,7 +1,6 @@
<?php
-
-
+ lt_include( PLOG_CLASS_PATH.'class/dao/privatemessagereceiverreadstatus.class.php' );
/**
* \ingroup DAO
@@ -237,7 +236,8 @@
foreach( $privateMessages as $privateMessage ) {
$this->_cache->removeData( $privateMessage->getId(), DaoCacheConstants::CACHE_PRIVATE_MESSAGES );
}
- return( $this->_cache->removeData( $boxId, DaoCacheConstants::CACHE_PRIVATE_MESSAGES_BY_BOX_ID ));
+ $this->_cache->removeData( $boxId, DaoCacheConstants::CACHE_PRIVATE_MESSAGES_BY_BOX_ID );
+ return true;
}
else
return false;
@@ -252,9 +252,11 @@
{
$privateMessages = $this->_getAllUsersPrivateMessagesBySenderId( $senderId );
if( $this->delete( "sender_id", $senderId )) {
- foreach( $privateMessages as $privateMessage ) {
- $this->_cache->removeData( $privateMessage->getId(), DaoCacheConstants::CACHE_PRIVATE_MESSAGES );
- }
+ if( $privateMessages ) {
+ foreach( $privateMessages as $privateMessage ) {
+ $this->_cache->removeData( $privateMessage->getId(), DaoCacheConstants::CACHE_PRIVATE_MESSAGES );
+ }
+ }
return( $this->_cache->removeData( $boxId, DaoCacheConstants::CACHE_PRIVATE_MESSAGES_BY_BOX_ID ));
}
else
@@ -274,7 +276,7 @@
$result = $this->Execute( $query );
if( !$result )
- return $friends;
+ return $result;
while( $row = $result->FetchRow()) {
// use the primary key to retrieve the items via the cache
More information about the pLog-svn
mailing list