Passed
Push — develop ( 94a245...1d94a2 )
by Jens
02:20
created
cloudcontrol/library/cc/Request.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,21 +47,21 @@
 block discarded – undo
47 47
 		{
48 48
 			global $rootPath;
49 49
 			
50
-			self::$subfolders = '/' . str_replace('//', '/', str_replace(str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']), "", $rootPath));
50
+			self::$subfolders = '/'.str_replace('//', '/', str_replace(str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']), "", $rootPath));
51 51
 			self::$subfolders = str_replace('//', '/', self::$subfolders);
52 52
 			if (PHP_SAPI === 'cli') {
53 53
 				global $argv;
54 54
 				array_shift($argv);
55 55
 				self::$queryString = '';
56
-				self::$requestUri = self::$subfolders . implode('/', $argv);
56
+				self::$requestUri = self::$subfolders.implode('/', $argv);
57 57
 			} else {
58 58
 				self::$requestUri = $_SERVER['REQUEST_URI'];
59 59
 				self::$queryString = $_SERVER['QUERY_STRING'];
60 60
 			}
61 61
 			if (self::$subfolders === '/') {
62
-				self::$relativeUri = str_replace('?' . self::$queryString, '', substr(self::$requestUri,1));
62
+				self::$relativeUri = str_replace('?'.self::$queryString, '', substr(self::$requestUri, 1));
63 63
 			} else {
64
-				self::$relativeUri = str_replace('?' . self::$queryString, '', str_replace(self::$subfolders, '', self::$requestUri));
64
+				self::$relativeUri = str_replace('?'.self::$queryString, '', str_replace(self::$subfolders, '', self::$requestUri));
65 65
 			}
66 66
 
67 67
 			self::$requestParameters = explode('/', self::$relativeUri);
Please login to merge, or discard this patch.
cloudcontrol/library/components/LanguageComponent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@
 block discarded – undo
99 99
         $this->sessionValues = $_SESSION['LanguageComponent'];
100 100
 
101 101
         if ($this->forceRedirect === true) {
102
-            if (substr($request::$relativeUri, 0, 2) !== $lang ) {
102
+            if (substr($request::$relativeUri, 0, 2) !== $lang) {
103 103
                 if ($lang !== $this->defaultLanguage) {
104
-                    header('Location: ' . $request::$subfolders . $lang . '/' . $request::$relativeUri);
104
+                    header('Location: '.$request::$subfolders.$lang.'/'.$request::$relativeUri);
105 105
                     exit;
106 106
                 }
107 107
             }
Please login to merge, or discard this patch.
cloudcontrol/templates/cms/documents/document-form-form.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<form method="<?= isset($documentType) ? 'post' : 'get' ?>" onsubmit="return processRtes();" action="<?=isset($formId) ? '#' . $formId : '' ?>">
1
+<form method="<?= isset($documentType) ? 'post' : 'get' ?>" onsubmit="return processRtes();" action="<?=isset($formId) ? '#'.$formId : '' ?>">
2 2
     <? if (!isset($hideTitleAndState)) : ?>
3 3
     <input type="hidden" name="path" value="<?=$request::$get['path']?>" />
4 4
     <? else : ?>
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
                     <input<?=isset($document) && $document->state == 'published' ? ' checked="checked"' : '' ?> type="checkbox" id="state" name="state" placeholder="State" />
21 21
                 </div>
22 22
 			<? endif ?>
23
-			<?$fieldPrefix='fields';?>
23
+			<?$fieldPrefix = 'fields'; ?>
24 24
 			<? foreach ($documentType->fields as $field) : ?>
25 25
 				<div class="form-element">
26 26
 					<label for="<?=$field->slug?>"><?=$field->title?></label>
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 								<a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a>
45 45
 								<div class="form-element">
46 46
 					<? endif ?>
47
-						<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?>
47
+						<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?>
48 48
 					<? if ($field->multiple == true && $field->type != 'Rich Text') : ?>
49 49
 
50 50
 								</div>
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 							<li class="grid-container">
67 67
 								<div class="grid-box-10">
68 68
 									<div class="grid-inner form-element">
69
-										<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?>
69
+										<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?>
70 70
 									</div>
71 71
 								</div>
72 72
 								<div class="grid-box-2">
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 									</div>
77 77
 								</div>
78 78
 							</li>
79
-							<?$value='';?>
79
+							<?$value = ''; ?>
80 80
 							<? endforeach ?>
81 81
 						<? endif ?>
82 82
 					</ul>
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 								<a class="btn error js-deletemultiple"><i class="fa fa-times"></i></a>
94 94
 								<a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a>
95 95
 								<div class="form-element">
96
-								<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?>
96
+								<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?>
97 97
 								</div>
98 98
 							</li>
99
-							<?$value='';?>
99
+							<?$value = ''; ?>
100 100
 						<? endforeach ?>
101 101
 						<? endif ?>
102 102
 						</div>
@@ -105,17 +105,17 @@  discard block
 block discarded – undo
105 105
 					<a class="btn js-addrtemultiple">+</a>
106 106
 					<? endif ?>
107 107
 				</div>
108
-				<?$value='';?>
108
+				<?$value = ''; ?>
109 109
 			<? endforeach ?>
110 110
 			<hr />
111
-			<? $static_brick_nr = 0;?>
111
+			<? $static_brick_nr = 0; ?>
112 112
 			<? foreach ($documentType->bricks as $brick) : ?>
113 113
 			<div class="brick">
114 114
 				<label><?=$brick->title?></label>
115 115
 				<? if ($brick->multiple == 'true') : ?>
116 116
 					<input type="hidden" value="<?=$brick->brickSlug?>"/>
117 117
 					<input type="hidden" value="<?=$brick->slug?>"/>
118
-					<?$myBrickSlug=$brick->slug;?>
118
+					<?$myBrickSlug = $brick->slug; ?>
119 119
 					<ul id="newBrickDropzone_<?=$static_brick_nr?>" class="dynamicBricks sortable">
120 120
 						<? if (isset($document)) : ?>
121 121
 							<? foreach ($document->bricks as $currentBrickSlug => $brickArray) : ?>
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 									<li class="brick form-element">
130 130
 										<label><?=$brick->title?></label>
131 131
 										<?$static = true; ?>
132
-										<?include(__DIR__ . '/brick.php')?>
132
+										<?include(__DIR__.'/brick.php')?>
133 133
 									</li>
134 134
 									<? endif ?>
135 135
 								<? endforeach ?>
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 					<a class="btn" onclick="addDynamicBrick(this, 'true', 'newBrickDropzone_<?=$static_brick_nr?>');">+</a>
140 140
 					<?$static_brick_nr += 1?>
141 141
 				<? else : ?>
142
-					<?$fieldPrefix='bricks[' . $brick->slug . '][fields]';?>
142
+					<?$fieldPrefix = 'bricks['.$brick->slug.'][fields]'; ?>
143 143
 					<input type="hidden" name="bricks[<?=$brick->slug?>][type]" value="<?=$brick->brickSlug?>" />
144 144
 					<? foreach ($brick->structure->fields as $field) : ?>
145 145
 						<div class="form-element">
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 									<a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a>
166 166
 									<div class="form-element">
167 167
 						<? endif ?>
168
-							<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?>
168
+							<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?>
169 169
 						<? if ($field->multiple == true && $field->type != 'Rich Text') : ?>
170 170
 
171 171
 									</div>
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 								<li class="grid-container">
189 189
 									<div class="grid-box-10">
190 190
 										<div class="grid-inner form-element">
191
-											<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?>
191
+											<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?>
192 192
 										</div>
193 193
 									</div>
194 194
 									<div class="grid-box-2">
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 										</div>
199 199
 									</div>
200 200
 								</li>
201
-								<?$value='';?>
201
+								<?$value = ''; ?>
202 202
 								<? endforeach ?>
203 203
 							<? endif ?>
204 204
 						</ul>
@@ -216,10 +216,10 @@  discard block
 block discarded – undo
216 216
 									<a class="btn error js-deletemultiple"><i class="fa fa-times"></i></a>
217 217
 									<a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a>
218 218
 									<div class="form-element">
219
-									<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?>
219
+									<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?>
220 220
 									</div>
221 221
 								</li>
222
-								<?$value='';?>
222
+								<?$value = ''; ?>
223 223
 							<? endforeach ?>
224 224
 							<? endif ?>
225 225
 							</div>
@@ -228,12 +228,12 @@  discard block
 block discarded – undo
228 228
 						<a class="btn js-addrtemultiple">+</a>
229 229
 						<? endif ?>
230 230
 					</div>
231
-					<?$value='';?>
231
+					<?$value = ''; ?>
232 232
 				<? endforeach ?>
233 233
 				<? endif ?>
234 234
 				</div>
235 235
 				<hr />
236
-			<? endforeach;?>
236
+			<? endforeach; ?>
237 237
 
238 238
 
239 239
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 						<li class="brick form-element">
257 257
 							<label><?=$brick->title?></label>
258 258
 							<?$static = false; ?>
259
-							<?include(__DIR__ . '/brick.php')?>
259
+							<?include(__DIR__.'/brick.php')?>
260 260
 						</li>
261 261
 					<? endforeach ?>
262 262
 				<? endif ?>
Please login to merge, or discard this patch.
cloudcontrol/library/components/cms/DocumentRouting.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             if (isset($request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE])) {
46 46
                 if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE], $request::$get[CmsComponent::GET_PARAMETER_PATH])) {
47 47
                     $cmsComponent->storage->addDocument($request::$post);
48
-                    header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents');
48
+                    header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents');
49 49
                     exit;
50 50
                 }
51 51
                 $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT_TYPE, $cmsComponent->storage->getDocumentTypeBySlug($request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE], true));
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             } else {
54 54
                 $documentTypes = $cmsComponent->storage->getDocumentTypes();
55 55
                 if (count($documentTypes) < 1) {
56
-                    throw new \Exception('No Document Types defined yet. <a href="' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/document-types/new">Please do so first.</a>');
56
+                    throw new \Exception('No Document Types defined yet. <a href="'.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/document-types/new">Please do so first.</a>');
57 57
                 }
58 58
                 $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT_TYPES, $documentTypes);
59 59
             }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $cmsComponent->setParameter(CmsComponent::PARAMETER_SMALLEST_IMAGE, $cmsComponent->storage->getSmallestImageSet()->slug);
64 64
             if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
65 65
                 $cmsComponent->storage->saveDocument($request::$post);
66
-                header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents');
66
+                header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents');
67 67
                 exit;
68 68
             }
69 69
             $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT, $cmsComponent->storage->getDocumentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]));
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             die(json_encode($result));
87 87
         } else if ($relativeCmsUri == '/documents/delete-document' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
88 88
             $cmsComponent->storage->deleteDocumentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
89
-            header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents');
89
+            header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents');
90 90
             exit;
91 91
         }
92 92
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             $cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_DOCUMENTS);
104 104
             if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::GET_PARAMETER_PATH])) {
105 105
                 $cmsComponent->storage->addDocumentFolder($request::$post);
106
-                header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents');
106
+                header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents');
107 107
                 exit;
108 108
             }
109 109
         } else if ($relativeCmsUri == '/documents/edit-folder' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
             array_pop($path);
117 117
             $path = implode('/', $path);
118 118
 
119
-            $request::$get[CmsComponent::GET_PARAMETER_PATH] = '/' . $path;
119
+            $request::$get[CmsComponent::GET_PARAMETER_PATH] = '/'.$path;
120 120
 
121 121
             if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post['content'])) {
122 122
                 $cmsComponent->storage->saveDocumentFolder($request::$post);
123
-                header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents');
123
+                header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents');
124 124
                 exit;
125 125
             }
126 126
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $cmsComponent->setParameter(CmsComponent::PARAMETER_FOLDER, $folder);
129 129
         } else if ($relativeCmsUri == '/documents/delete-folder' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
130 130
             $cmsComponent->storage->deleteDocumentFolderBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
131
-            header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents');
131
+            header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents');
132 132
             exit;
133 133
         }
134 134
     }
Please login to merge, or discard this patch.
cloudcontrol/library/components/cms/ImagesRouting.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@
 block discarded – undo
34 34
             $cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_IMAGES);
35 35
             if (isset($_FILES[CmsComponent::FILES_PARAMETER_FILE])) {
36 36
                 $cmsComponent->storage->addImage($_FILES[CmsComponent::FILES_PARAMETER_FILE]);
37
-                header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/images');
37
+                header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/images');
38 38
                 exit;
39 39
             }
40 40
         } elseif ($relativeCmsUri == '/images/delete' && isset($request::$get[CmsComponent::FILES_PARAMETER_FILE])) {
41 41
             $cmsComponent->storage->deleteImageByName($request::$get[CmsComponent::FILES_PARAMETER_FILE]);
42
-            header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/images');
42
+            header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/images');
43 43
             exit;
44 44
         } elseif ($relativeCmsUri == '/images/show' && isset($request::$get[CmsComponent::FILES_PARAMETER_FILE])) {
45 45
             $cmsComponent->subTemplate = 'cms/images/show';
Please login to merge, or discard this patch.
cloudcontrol/library/components/cms/SitemapRouting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             $cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_SITEMAP);
35 35
             if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::POST_PARAMETER_TEMPLATE], $request::$post[CmsComponent::POST_PARAMETER_COMPONENT])) {
36 36
                 $cmsComponent->storage->addSitemapItem($request::$post);
37
-                header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap');
37
+                header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap');
38 38
                 exit;
39 39
             }
40 40
         } elseif ($relativeCmsUri == '/sitemap/edit' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
             $sitemapItem = $cmsComponent->storage->getSitemapItemBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
44 44
             if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::POST_PARAMETER_TEMPLATE], $request::$post[CmsComponent::POST_PARAMETER_COMPONENT])) {
45 45
                 $cmsComponent->storage->saveSitemapItem($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
46
-                header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap');
46
+                header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap');
47 47
                 exit;
48 48
             }
49 49
             $cmsComponent->setParameter(CmsComponent::PARAMETER_SITEMAP_ITEM, $sitemapItem);
50 50
         } elseif ($relativeCmsUri == '/sitemap/delete' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
51 51
             $cmsComponent->storage->deleteSitemapItemBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
52
-            header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap');
52
+            header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap');
53 53
             exit;
54 54
         }
55 55
     }
Please login to merge, or discard this patch.
cloudcontrol/library/components/CmsComponent.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                 $whitelistIps = explode(',', $this->parameters[self::PARAMETER_WHITELIST_IPS]);
193 193
                 $whitelistIps = array_map("trim", $whitelistIps);
194 194
                 if (!in_array($remoteAddress, $whitelistIps)) {
195
-                    throw new \Exception('Ip address ' . $remoteAddress . ' is not on whitelist');
195
+                    throw new \Exception('Ip address '.$remoteAddress.' is not on whitelist');
196 196
                 }
197 197
             }
198 198
         }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                 $blacklistIps = explode(',', $this->parameters[self::PARAMETER_BLACKLIST_IPS]);
208 208
                 $blacklistIps = array_map("trim", $blacklistIps);
209 209
                 if (in_array($remoteAddress, $blacklistIps)) {
210
-                    throw new \Exception('Ip address ' . $remoteAddress . ' is on blacklist');
210
+                    throw new \Exception('Ip address '.$remoteAddress.' is on blacklist');
211 211
                 }
212 212
             }
213 213
         }
@@ -259,14 +259,14 @@  discard block
 block discarded – undo
259 259
                 $this->parameters[self::PARAMETER_MAIN_NAV_CLASS] = self::PARAMETER_FILES;
260 260
                 if (isset($_FILES[self::FILES_PARAMETER_FILE])) {
261 261
                     $this->storage->addFile($_FILES[self::FILES_PARAMETER_FILE]);
262
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/files');
262
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/files');
263 263
                     exit;
264 264
                 }
265 265
             } elseif ($relativeCmsUri == '/files/get' && isset($request::$get[self::FILES_PARAMETER_FILE])) {
266 266
                 $this->downloadFile($request::$get[self::FILES_PARAMETER_FILE]);
267 267
             } elseif ($relativeCmsUri == '/files/delete' && isset($request::$get[self::FILES_PARAMETER_FILE])) {
268 268
                 $this->storage->deleteFileByName($request::$get[self::FILES_PARAMETER_FILE]);
269
-                header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/files');
269
+                header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/files');
270 270
                 exit;
271 271
             }
272 272
         }
@@ -277,21 +277,21 @@  discard block
 block discarded – undo
277 277
         private function downloadFile($slug)
278 278
         {
279 279
             $file = $this->storage->getFileByName($slug);
280
-            $path = realpath(__DIR__ . '/../../www/files/');
281
-            $quoted = sprintf('"%s"', addcslashes(basename($path . '/' . $file->file), '"\\'));
282
-            $size = filesize($path . '/' . $file->file);
280
+            $path = realpath(__DIR__.'/../../www/files/');
281
+            $quoted = sprintf('"%s"', addcslashes(basename($path.'/'.$file->file), '"\\'));
282
+            $size = filesize($path.'/'.$file->file);
283 283
 
284 284
             header('Content-Description: File Transfer');
285
-            header('Content-Type: ' . $file->type);
286
-            header('Content-Disposition: attachment; filename=' . $quoted);
285
+            header('Content-Type: '.$file->type);
286
+            header('Content-Disposition: attachment; filename='.$quoted);
287 287
             header('Content-Transfer-Encoding: binary');
288 288
             header('Connection: Keep-Alive');
289 289
             header('Expires: 0');
290 290
             header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
291 291
             header('Pragma: public');
292
-            header('Content-Length: ' . $size);
292
+            header('Content-Length: '.$size);
293 293
 
294
-            readfile($path . '/' . $file->file);
294
+            readfile($path.'/'.$file->file);
295 295
             exit;
296 296
         }
297 297
 
@@ -329,12 +329,12 @@  discard block
 block discarded – undo
329 329
                 $this->parameters[self::PARAMETER_MAIN_NAV_CLASS] = 'configuration';
330 330
                 if (isset($_POST[self::POST_PARAMETER_USERNAME])) {
331 331
                     $this->storage->addUser($request::$post);
332
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/users');
332
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/users');
333 333
                     exit;
334 334
                 }
335 335
             } elseif ($relativeCmsUri == '/configuration/users/delete' && isset($request::$get[self::GET_PARAMETER_SLUG])) {
336 336
                 $this->storage->deleteUserBySlug($request::$get[self::GET_PARAMETER_SLUG]);
337
-                header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/users');
337
+                header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/users');
338 338
                 exit;
339 339
             } elseif ($relativeCmsUri == '/configuration/users/edit' && isset($request::$get[self::GET_PARAMETER_SLUG])) {
340 340
                 $this->subTemplate = 'cms/configuration/users-form';
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
                 $this->parameters[self::PARAMETER_USER] = $this->storage->getUserBySlug($request::$get[self::GET_PARAMETER_SLUG]);
343 343
                 if (isset($_POST[self::POST_PARAMETER_USERNAME])) {
344 344
                     $this->storage->saveUser($request::$get[self::GET_PARAMETER_SLUG], $request::$post);
345
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/users');
345
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/users');
346 346
                     exit;
347 347
                 }
348 348
             }
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
                 $bricks = $this->storage->getBricks();
365 365
                 if (isset($request::$post[self::POST_PARAMETER_TITLE])) {
366 366
                     $this->storage->addDocumentType($request::$post);
367
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/document-types');
367
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/document-types');
368 368
                     exit;
369 369
                 }
370 370
                 $this->parameters[self::PARAMETER_BRICKS] = $bricks;
@@ -375,14 +375,14 @@  discard block
 block discarded – undo
375 375
                 $bricks = $this->storage->getBricks();
376 376
                 if (isset($request::$post[self::POST_PARAMETER_TITLE])) {
377 377
                     $this->storage->saveDocumentType($request::$get[self::GET_PARAMETER_SLUG], $request::$post);
378
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/document-types');
378
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/document-types');
379 379
                     exit;
380 380
                 }
381 381
                 $this->parameters[self::PARAMETER_DOCUMENT_TYPE] = $documentType;
382 382
                 $this->parameters[self::PARAMETER_BRICKS] = $bricks;
383 383
             } elseif ($relativeCmsUri == '/configuration/document-types/delete' && isset($request::$get[self::GET_PARAMETER_SLUG])) {
384 384
                 $this->storage->deleteDocumentTypeBySlug($request::$get[self::GET_PARAMETER_SLUG]);
385
-                header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/document-types');
385
+                header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/document-types');
386 386
                 exit;
387 387
             }
388 388
         }
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
                 $this->parameters[self::PARAMETER_MAIN_NAV_CLASS] = 'configuration';
403 403
                 if (isset($request::$post[self::POST_PARAMETER_TITLE])) {
404 404
                     $this->storage->addBrick($request::$post);
405
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/bricks');
405
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/bricks');
406 406
                     exit;
407 407
                 }
408 408
             } elseif ($relativeCmsUri == '/configuration/bricks/edit' && isset($request::$get[self::GET_PARAMETER_SLUG])) {
@@ -411,13 +411,13 @@  discard block
 block discarded – undo
411 411
                 $brick = $this->storage->getBrickBySlug($request::$get[self::GET_PARAMETER_SLUG]);
412 412
                 if (isset($request::$post[self::POST_PARAMETER_TITLE])) {
413 413
                     $this->storage->saveBrick($request::$get[self::GET_PARAMETER_SLUG], $request::$post);
414
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/bricks');
414
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/bricks');
415 415
                     exit;
416 416
                 }
417 417
                 $this->parameters[self::PARAMETER_BRICK] = $brick;
418 418
             } elseif ($relativeCmsUri == '/configuration/bricks/delete' && isset($request::$get[self::GET_PARAMETER_SLUG])) {
419 419
                 $this->storage->deleteBrickBySlug($request::$get[self::GET_PARAMETER_SLUG]);
420
-                header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/bricks');
420
+                header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/bricks');
421 421
                 exit;
422 422
             } elseif ($relativeCmsUri == '/configuration/image-set') {
423 423
                 $this->subTemplate = 'cms/configuration/image-set';
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
                 $imageSet = $this->storage->getImageSetBySlug($request::$get[self::GET_PARAMETER_SLUG]);
443 443
                 if (isset($request::$post[self::POST_PARAMETER_TITLE])) {
444 444
                     $this->storage->saveImageSet($request::$get[self::GET_PARAMETER_SLUG], $request::$post);
445
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/image-set');
445
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/image-set');
446 446
                     exit;
447 447
                 }
448 448
                 $this->parameters[self::PARAMETER_IMAGE_SET] = $imageSet;
@@ -451,12 +451,12 @@  discard block
 block discarded – undo
451 451
                 $this->parameters[self::PARAMETER_MAIN_NAV_CLASS] = 'configuration';
452 452
                 if (isset($request::$post[self::POST_PARAMETER_TITLE])) {
453 453
                     $this->storage->addImageSet($request::$post);
454
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/image-set');
454
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/image-set');
455 455
                     exit;
456 456
                 }
457 457
             } elseif ($relativeCmsUri == '/configuration/image-set/delete' && isset($request::$get[self::GET_PARAMETER_SLUG])) {
458 458
                 $this->storage->deleteImageSetBySlug($request::$get[self::GET_PARAMETER_SLUG]);
459
-                header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/image-set');
459
+                header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/image-set');
460 460
                 exit;
461 461
             }
462 462
         }
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
                 $this->parameters[self::PARAMETER_MAIN_NAV_CLASS] = 'configuration';
477 477
                 if (isset($request::$post[self::POST_PARAMETER_TITLE])) {
478 478
                     $this->storage->addApplicationComponent($request::$post);
479
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/application-components');
479
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/application-components');
480 480
                     exit;
481 481
                 }
482 482
             } elseif ($relativeCmsUri == '/configuration/application-components/edit' && isset($request::$get[self::GET_PARAMETER_SLUG])) {
@@ -485,13 +485,13 @@  discard block
 block discarded – undo
485 485
                 $applicationComponent = $this->storage->getApplicationComponentBySlug($request::$get[self::GET_PARAMETER_SLUG]);
486 486
                 if (isset($request::$post[self::POST_PARAMETER_TITLE])) {
487 487
                     $this->storage->saveApplicationComponent($request::$get[self::GET_PARAMETER_SLUG], $request::$post);
488
-                    header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/application-components');
488
+                    header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/application-components');
489 489
                     exit;
490 490
                 }
491 491
                 $this->parameters['applicationComponent'] = $applicationComponent;
492 492
             } elseif ($relativeCmsUri == '/configuration/application-components/delete' && isset($request::$get[self::GET_PARAMETER_SLUG])) {
493 493
                 $this->storage->deleteApplicationComponentBySlug($request::$get[self::GET_PARAMETER_SLUG]);
494
-                header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX] . '/configuration/application-components');
494
+                header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX].'/configuration/application-components');
495 495
                 exit;
496 496
             }
497 497
         }
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
             if ($relativeCmsUri == '/log-off') {
502 502
                 $_SESSION[self::SESSION_PARAMETER_CLOUD_CONTROL] = null;
503 503
                 unset($_SESSION[self::SESSION_PARAMETER_CLOUD_CONTROL]);
504
-                header('Location: ' . $request::$subfolders . $this->parameters[self::PARAMETER_CMS_PREFIX]);
504
+                header('Location: '.$request::$subfolders.$this->parameters[self::PARAMETER_CMS_PREFIX]);
505 505
                 exit;
506 506
             }
507 507
         }
Please login to merge, or discard this patch.