Ejemplo n.º 1
0
 static function deleteSubsQueue($subscriber_id, $listId = 0)
 {
     $db = JFactory::getDBO();
     if ($listId == 0) {
         $query = 'DELETE FROM `#__jnews_queue` WHERE `subscriber_id` = ' . $subscriber_id . "";
         $db->setQuery($query);
         $db->query();
         return true;
     } else {
         //get mailing id fron the list (listmailing table)
         $mailing_ids = jNews_Mailing::getListMailingToDelete($listId);
         //if not empty $mailing_ids
         if (!empty($mailing_ids)) {
             foreach ($mailing_ids as $mailing_id) {
                 jNews_Queue::_deleteSubsQueuePriv($subscriber_id, $mailing_id, $listId);
             }
         }
     }
 }