Update notice deletion
Changed the errors in notice deletion so it now works. Also, consistently delete records from related tables that refer to the notice.
This commit is contained in:
17
lib/util.php
17
lib/util.php
@@ -1140,23 +1140,6 @@ function common_enqueue_notice($notice)
|
||||
return $result;
|
||||
}
|
||||
|
||||
function common_dequeue_notice($notice)
|
||||
{
|
||||
$qi = Queue_item::staticGet($notice->id);
|
||||
if ($qi) {
|
||||
$result = $qi->delete();
|
||||
if (!$result) {
|
||||
$last_error = &PEAR::getStaticProperty('DB_DataObject','lastError');
|
||||
common_log(LOG_ERR, 'DB error deleting queue item: ' . $last_error->message);
|
||||
return false;
|
||||
}
|
||||
common_log(LOG_DEBUG, 'complete dequeueing notice ID = ' . $notice->id);
|
||||
return $result;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function common_real_broadcast($notice, $remote=false)
|
||||
{
|
||||
$success = true;
|
||||
|
Reference in New Issue
Block a user