Exemplo n.º 1
0
 public function afterRemove()
 {
     /** @var xPDOFileCache $provider */
     $provider = $this->modx->cacheManager->getCacheProvider('zapier');
     $provider->flush();
     return parent::afterRemove();
 }
Exemplo n.º 2
0
 public function afterRemove()
 {
     if (!$this->modx->getCount('vpRoute', array('event' => $this->getProperty('event')))) {
         /* remove event */
         $this->modx->virtualpage->doEvent('remove', $this->eventName, 'vpEvent', 10);
     }
     return parent::afterRemove();
 }
Exemplo n.º 3
0
 /**
  * @return bool
  */
 public function afterRemove()
 {
     $this->object->clearTicketCache();
     /* @var TicketThread $thread */
     if ($thread = $this->object->getOne('Thread')) {
         $thread->updateLastComment();
     }
     $this->modx->cacheManager->delete('tickets/latest.comments');
     $this->modx->cacheManager->delete('tickets/latest.tickets');
     return parent::afterRemove();
 }
 public function afterRemove()
 {
     /** @var int $deleteFolder */
     $deleteFolder = $this->getProperty('deleteFolder');
     if ($deleteFolder == 1) {
         $this->modx->log(modX::LOG_LEVEL_INFO, 'Removing directory ' . $this->packageFolder);
         $this->modx->gitpackagemanagement->deleteDirectory($this->packageFolder);
     }
     $this->modx->log(modX::LOG_LEVEL_INFO, 'COMPLETED');
     return parent::afterRemove();
 }
Exemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 public function afterRemove()
 {
     try {
         // Удаляем из БД
         $table = $this->modx->escape($this->object->get('name'));
         $sql = "DROP TABLE " . $table;
         if ($stmt = $this->modx->prepare($sql)) {
             $stmt->execute();
         }
     } catch (Exception $e) {
         $this->modx->log(modX::LOG_LEVEL_ERROR, '[dbAdmin] ' . $e->getMessage());
     }
     return parent::afterRemove();
 }
Exemplo n.º 6
0
 public function afterRemove()
 {
     /**
      * Обновляем кэш комментария и темы
      */
     if ($this->modx->modxtalks->mtCache === true) {
         if (!$this->modx->modxtalks->cacheComment($this->comment)) {
             $this->modx->log(xPDO::LOG_LEVEL_ERROR, '[modxTalks web/comment/restore] Error cache the comment with ID ' . $this->comment->id);
         }
         if (!$this->modx->modxtalks->cacheConversation($this->conversation)) {
             $this->modx->log(xPDO::LOG_LEVEL_ERROR, '[modxTalks web/comment/restore] Error cache conversation with ID ' . $this->conversation->id);
         }
     }
     /**
      * Отправляем уведомление о подтверждении комментария пользователю оставившему комментарий
      */
     if (!$this->modx->modxtalks->notifyUser($this->comment)) {
         return $this->modx->lexicon('modxtalks.error');
     }
     $this->success($this->modx->lexicon('modxtalks.comment_approved'));
     return parent::afterRemove();
 }
Exemplo n.º 7
0
 public function afterRemove()
 {
     return parent::afterRemove();
 }
Exemplo n.º 8
0
 public function afterRemove()
 {
     $sql = "UPDATE {$this->modx->getTableName($this->classKey)} SET `rank`=`rank`-1\r\r\n            WHERE `rank`>{$this->object->get('rank')} AND `category_id`={$this->object->get('category_id')}";
     $this->modx->exec($sql);
     return parent::afterRemove();
 }
Exemplo n.º 9
0
 public function afterRemove()
 {
     $this->success($this->modx->lexicon('modxtalks.ip_ban_success'));
     return parent::afterRemove();
 }
Exemplo n.º 10
0
 public function afterRemove()
 {
     $this->modx->cacheManager->refresh(array('default' => array('qsb' => array())));
     return parent::afterRemove();
 }