From 065b1fd1682aa51271ebbf640640d9cdf11ffa07 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sat, 8 Aug 2015 15:10:28 +0100 Subject: [PATCH] Removed the FixPermissionsCommand --- .../Commands/FixPermissionsCommand.php | 111 ------------------ app/Console/Kernel.php | 1 - 2 files changed, 112 deletions(-) delete mode 100644 app/Console/Commands/FixPermissionsCommand.php diff --git a/app/Console/Commands/FixPermissionsCommand.php b/app/Console/Commands/FixPermissionsCommand.php deleted file mode 100644 index bc1e9d69..00000000 --- a/app/Console/Commands/FixPermissionsCommand.php +++ /dev/null @@ -1,111 +0,0 @@ -storageDirectory = $storageDirectory; - $this->databaseDirectory = $databaseDirectory; - $this->databasePath = $databasePath; - $this->databaseDefault = $databaseDefault; - - parent::__construct(); - } - - /** - * Execute the console command. - */ - public function fire() - { - $this->recursiveChmod($this->storageDirectory); - - if ($this->databaseDefault === 'sqlite') { - chmod($this->databaseDirectory, 755); - chmod($this->databasePath, 755); - } - } - - /** - * Recursively sets a paths file permissions. - * - * @param string $path - * @param string $mode - */ - protected function recursiveChmod($path, $mode = '0755') - { - $dir = new DirectoryIterator($path); - foreach ($dir as $item) { - if (!$item->isDot()) { - chmod($item->getPathname(), $mode); - } - - if ($item->isDir() && !$item->isDot()) { - $this->recursiveChmod($item->getPathname()); - } - } - } -} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 87172c31..beafef10 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -23,7 +23,6 @@ class Kernel extends ConsoleKernel */ protected $commands = [ 'CachetHQ\Cachet\Console\Commands\DemoSeederCommand', - 'CachetHQ\Cachet\Console\Commands\FixPermissionsCommand', ]; /**