@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | namespace Multidimensional\Subdomains\Routing; |
| 17 | 17 | |
| 18 | -use Cake\Network\Request; |
|
| 18 | +use Cake\Network\Request; |
|
| 19 | 19 | use Cake\Routing\Router; |
| 20 | 20 | use Cake\Core\Configure; |
| 21 | 21 | |
@@ -17,7 +17,6 @@ |
||
| 17 | 17 | |
| 18 | 18 | use Cake\Core\Configure; |
| 19 | 19 | use Cake\Console\Shell; |
| 20 | -use Cake\Console\Helper; |
|
| 21 | 20 | |
| 22 | 21 | class SubdomainsInstallShell extends Shell { |
| 23 | 22 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if ((($first_run) ? (strtolower($this->in('Install Subdomains Plugin?', ['y','n'])) == 'y') : (strtolower($this->in('Update Configuration?', ['y','n'])) == 'y'))) { |
|
| 45 | + if ((($first_run) ? (strtolower($this->in('Install Subdomains Plugin?', ['y', 'n'])) == 'y') : (strtolower($this->in('Update Configuration?', ['y', 'n'])) == 'y'))) { |
|
| 46 | 46 | |
| 47 | 47 | do { |
| 48 | 48 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | $this->out(); |
| 62 | 62 | |
| 63 | - if (strtolower($this->in('Add Another Subdomain?', ['y','n'])) == 'n') { |
|
| 63 | + if (strtolower($this->in('Add Another Subdomain?', ['y', 'n'])) == 'n') { |
|
| 64 | 64 | $addMore = false; |
| 65 | 65 | } |
| 66 | 66 | |
@@ -81,13 +81,13 @@ discard block |
||
| 81 | 81 | $subdomains[] = $subdomain; |
| 82 | 82 | $valid = true; |
| 83 | 83 | $this->out(); |
| 84 | - }else{ |
|
| 84 | + } else { |
|
| 85 | 85 | $valid = false; |
| 86 | 86 | $this->out(); |
| 87 | 87 | $this->_io->out('<error>Invalid Subdomain.</error>'); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | - } while (!$valid || strtolower($this->in('Add Another Subdomain?', ['y','n'])) == 'y'); |
|
| 90 | + } while (!$valid || strtolower($this->in('Add Another Subdomain?', ['y', 'n'])) == 'y'); |
|
| 91 | 91 | |
| 92 | 92 | } |
| 93 | 93 | |
@@ -106,14 +106,14 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | $this->out(); |
| 108 | 108 | |
| 109 | - while (count($subdomains) > 0 && strtolower($this->in('Delete a Subdomain?', ['y','n'])) == 'y') { |
|
| 109 | + while (count($subdomains) > 0 && strtolower($this->in('Delete a Subdomain?', ['y', 'n'])) == 'y') { |
|
| 110 | 110 | |
| 111 | 111 | $this->out(); |
| 112 | 112 | $deleteKey = (int) $this->in('Enter Number to Delete:', array_keys($subdomains)); |
| 113 | 113 | |
| 114 | 114 | if (isset($subdomains[$deleteKey])) { |
| 115 | 115 | $this->out(); |
| 116 | - $this->out('Deleted: ' . $subdomains[$deleteKey], 2); |
|
| 116 | + $this->out('Deleted: ' . $subdomains[$deleteKey], 2); |
|
| 117 | 117 | unset($subdomains[$deleteKey]); |
| 118 | 118 | } |
| 119 | 119 | |
@@ -127,10 +127,10 @@ discard block |
||
| 127 | 127 | $this->_io->out('<error>No Subdomains Configured.</error>', 2); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | - } while (count($subdomains) == 0 && strtolower($this->in('Start Over?', ['y','n'])) == 'y'); |
|
| 130 | + } while (count($subdomains) == 0 && strtolower($this->in('Start Over?', ['y', 'n'])) == 'y'); |
|
| 131 | 131 | |
| 132 | 132 | $this->out(); |
| 133 | - if(count($subdomains) > 0) { |
|
| 133 | + if (count($subdomains) > 0) { |
|
| 134 | 134 | $this->out('Configuration Saved!', 2); |
| 135 | 135 | } else { |
| 136 | 136 | $this->_io->out('<error>Plugin Not Currently Active.</error>', 2); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | private function _modifyArray(array $array) { |
| 143 | 143 | |
| 144 | - return array_combine(range(1, count($array)), array_values($array));; |
|
| 144 | + return array_combine(range(1, count($array)), array_values($array)); ; |
|
| 145 | 145 | |
| 146 | 146 | } |
| 147 | 147 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * If you don't have this file, copy it to your main CakePHP config folder. |
| 23 | 23 | /*/ |
| 24 | 24 | |
| 25 | -return array ( |
|
| 25 | +return array( |
|
| 26 | 26 | 'Multidimensional/Subdomains' => |
| 27 | 27 | array('subdomains' => |
| 28 | 28 | array('{SUBDOMAIN_1}', '{SUBDOMAIN_2}', ... '{SUBDOMAIN_N}') |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | $subdomains = Configure::read('Multidimensional/Subdomains.subdomains'); |
| 26 | 26 | |
| 27 | - if(is_array($subdomains)) { |
|
| 27 | + if (is_array($subdomains)) { |
|
| 28 | 28 | |
| 29 | 29 | foreach ($subdomains AS $prefix) { |
| 30 | 30 | |