@@ -40,7 +40,7 @@ |
||
40 | 40 | return $returnData; |
41 | 41 | } |
42 | 42 | |
43 | - public function updateConfig(int $id, string $param){ |
|
43 | + public function updateConfig(int $id, string $param) { |
|
44 | 44 | echo $id.' - '.$param.'<br>'; |
45 | 45 | //TODO need to push to sql |
46 | 46 | } |
@@ -10,21 +10,21 @@ |
||
10 | 10 | |
11 | 11 | use StringFunctions; |
12 | 12 | |
13 | - public function index(){ |
|
13 | + public function index() { |
|
14 | 14 | echo'TEST'; |
15 | 15 | } |
16 | 16 | |
17 | - public function updateConfig(){ |
|
17 | + public function updateConfig() { |
|
18 | 18 | $this->onlyAdmin(); |
19 | - if(!$this->container->getRequest()->isPost()){ |
|
19 | + if (!$this->container->getRequest()->isPost()) { |
|
20 | 20 | $this->alertBox->setAlert('Only post messages allowed', 'error'); |
21 | 21 | $this->container->getResponse()->redirect('admin'); |
22 | 22 | } |
23 | 23 | $configModel = new ConfigModel($this->container); |
24 | 24 | $posts = $this->container->getRequest()->getDataFull(); |
25 | 25 | |
26 | - foreach($posts as $key=>$config){ |
|
27 | - $configid = $this->removeFromBeginning($key,'config-'); |
|
26 | + foreach ($posts as $key=>$config) { |
|
27 | + $configid = $this->removeFromBeginning($key, 'config-'); |
|
28 | 28 | $configModel->updateConfig($configid, $config); |
29 | 29 | } |
30 | 30 | echo '<pre>'; |