Beispiel #1
0
 /**
  * @return RokGallery_FileDeleteQueue
  */
 public function &getInstance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new RokGallery_Queue_FileDelete();
     }
     return self::$_instance;
 }
Beispiel #2
0
 /**
  * @param Doctrine_Event $event
  */
 public function postTransactionRollback(Doctrine_Event $event)
 {
     RokGallery_Queue_FileDelete::clear();
     RokGallery_Queue_DirectoryDelete::clear();
     RokGallery_Queue_FileCreate::process();
     RokGallery_Queue_DirectoryCreate::process();
 }
Beispiel #3
0
 /**
  * @param Doctrine_Event $event
  */
 public function preDelete(Doctrine_Event $event)
 {
     RokGallery_Model_SliceFilter::cleanThumbInfo();
     // Add slice to be removed
     RokGallery_Queue_FileDelete::add($this->getFullPath());
     // Add thumb to be removed
     RokGallery_Queue_FileDelete::add($this->getThumbFullPath());
     // Remove the admin thumb
     RokGallery_Queue_FileDelete::add($this->getThumbFullPath('admin-thumb'));
     // Remove the admin thumb
     RokGallery_Queue_FileDelete::add($this->getThumbFullPath('mini-admin-thumb'));
 }