Esempio n. 1
0
 public function handleDelete($postId)
 {
     if (!$this->driverEnabled() || magnify_filter('disable_delete', false, $this->driver, $postId)) {
         return;
     }
     try {
         $this->driver->delete($blogId = $this->getCurrentBlog(), $postId);
         magnify_act('deleted_post', $blogId, $postId);
     } catch (\Exception $e) {
         $this->logException($e, sprintf('deleting post #%d', $postId));
     }
 }
Esempio n. 2
0
 public static function driverEnabled(Driver $driver)
 {
     $e = self::getEnabledDrivers();
     return !empty($e[$driver->getIdentifier()]);
 }
Esempio n. 3
0
 private function keyFor(Driver $driver)
 {
     return $driver->getIdentifier();
 }