Пример #1
0
 protected function afterDelete()
 {
     if ($this->aclItem) {
         $this->aclItem->touch();
     }
     return parent::afterDelete();
 }
Пример #2
0
 protected function afterDelete()
 {
     if (\GO::modules()->isInstalled('log')) {
         Log::create(Log::ACTION_DELETE, 'Removed ' . $this->contact->name . ' from addresslist ' . $this->addresslist->name, $this->className(), $this->contact_id . ':' . $this->addresslist_id);
     }
     return parent::afterDelete();
 }
Пример #3
0
 protected function afterDelete()
 {
     $this->deleteReminders();
     Tasklist::versionUp($this->tasklist_id);
     return parent::afterDelete();
 }
Пример #4
0
 protected function afterDelete()
 {
     $this->logFile->delete();
     $this->messageFile->delete();
     $this->removeAllManyMany('contacts');
     $this->removeAllManyMany('companies');
     $campaignModel = $this->campaign;
     if (!empty($campaignModel)) {
         $campaignModel->n_sent -= $this->sent;
         $campaignModel->n_send_errors -= $this->errors;
         $campaignModel->n_total -= $this->total;
         $campaignModel->n_opened -= $this->opened;
         $campaignModel->save();
     }
     return parent::afterDelete();
 }
Пример #5
0
 protected function afterDelete()
 {
     if ($this->event && $this->event->is_organizer) {
         $stmt = $this->getRelatedParticipants();
         foreach ($stmt as $participant) {
             if ($event = $participant->getParticipantEvent()) {
                 if (!$event->is_organizer && $event->calendar->userHasCreatePermission()) {
                     $event->delete(true);
                 }
             }
             $participant->delete();
         }
     }
     return parent::afterDelete();
 }
Пример #6
0
 protected function afterDelete()
 {
     if ($this->moduleManager) {
         $this->moduleManager->uninstall();
     }
     return parent::afterDelete();
 }
Пример #7
0
 protected function afterDelete()
 {
     $this->deleteReminders();
     if ($this->is_organizer) {
         //
         //	This is dangerous: when you first import the same ICS into two different calendars,
         //	and the delete one of the calendars, all the imported events in the other calendars
         //	would be deleted also.
         //
         //			$stmt = $this->getRelatedParticipantEvents();
         //
         //			foreach($stmt as $event){
         //				//prevent loop for invalid is_organizer flag
         //				$event->is_organizer=false;
         //				$event->delete(true);
         //			}
     } else {
         $participants = $this->getParticipantsForUser();
         foreach ($participants as $participant) {
             $participant->status = Participant::STATUS_DECLINED;
             $participant->save();
         }
     }
     return parent::afterDelete();
 }
Пример #8
0
 protected function afterDelete()
 {
     $this->updateAclMtime();
     return parent::afterDelete();
 }
Пример #9
0
 protected function afterDelete()
 {
     $this->_removeQuota();
     if (!File::$deleteInDatabaseOnly) {
         $this->fsFile->delete();
     }
     $versioningFolder = new \GO\Base\Fs\Folder(\GO::config()->file_storage_path . $this->getVersionStoragePath());
     $versioningFolder->delete();
     $this->notifyUsers($this->folder_id, FolderNotificationMessage::DELETE_FILE, $this->path);
     return parent::afterDelete();
 }
Пример #10
0
 protected function afterDelete()
 {
     //delete all acl records
     $stmt = AclUsersGroups::model()->find(array("by" => array(array('user_id', $this->id))));
     while ($r = $stmt->fetch()) {
         $r->delete();
     }
     $defaultModels = AbstractUserDefaultModel::getAllUserDefaultModels();
     foreach ($defaultModels as $model) {
         $model->deleteByAttribute('user_id', $this->id);
     }
     //		deprecated. It's inefficient and can be done with listeners
     //		GO::modules()->callModuleMethod('deleteUser', array(&$this));
     return parent::afterDelete();
 }
Пример #11
0
 protected function afterDelete()
 {
     \GO::debug("after delete " . $this->path . " " . $this->fsFolder->path());
     if (!Folder::$deleteInDatabaseOnly) {
         $this->fsFolder->delete();
     }
     //Read only flag is set for addressbooks, tasklists etc. They share the same acl so deleting it would make addressbooks inaccessible.
     if (!$this->readonly) {
         //normally this is done automatically. But we overide $this->joinAclfield to prevent acl management.
         $acl = \GO\Base\Model\Acl::model()->findByPk($this->{$this->aclField()});
         if ($acl) {
             $acl->delete();
         }
     }
     $this->notifyUsers(array($this->id, $this->parent->id), FolderNotificationMessage::DELETE_FOLDER, $this->getPath());
     return parent::afterDelete();
 }
Пример #12
0
 protected function afterDelete()
 {
     //don't be strict in upgrade process
     \GO::getDbConnection()->query("SET sql_mode=''");
     $sql = "ALTER TABLE `" . $this->category->customfieldsTableName() . "` DROP `" . $this->columnName() . "`";
     try {
         $this->getDbConnection()->query($sql);
     } catch (\Exception $e) {
         trigger_error("Dropping custom field column failed with error: " . $e->getMessage());
     }
     $this->_clearColumnCache();
     return parent::afterDelete();
 }
Пример #13
0
 protected function afterDelete()
 {
     if ($this->getPhotoFile()->exists()) {
         $this->getPhotoFile()->delete();
     }
     return parent::afterDelete();
 }