コード例 #1
0
 /**
  * Purge the attachments from FS and DB
  *
  * @param Integer $time
  *
  * @return Boolean
  */
 public function purgeAttachments($time)
 {
     $dao = $this->getDao();
     $dar = $dao->searchAttachmentToPurge($time);
     if ($dar && !$dar->isError()) {
         $purgeState = true;
         if ($dar->rowCount() > 0) {
             foreach ($dar as $row) {
                 $attachment = new WikiAttachment($this->gid);
                 $attachment->setFromRow($row);
                 $purgeState = $purgeState & $attachment->purgeAttachment();
             }
         }
         return $purgeState;
     }
     return false;
 }