Passed
Push — develop ( 1bfb65...a01f89 )
by Jens
02:58
created
cloudcontrol/templates/cms/documents/document-form-form.php 2 patches
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.
Braces   +16 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 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
-    <? else : ?>
4
+    <? else {
5
+	: ?>
5 6
     <input type="hidden" name="formId" value="<?=$formId?>" />
6 7
     <a name="<?=$formId?>"></a>
7 8
     <? endif ?>
@@ -20,15 +21,19 @@  discard block
 block discarded – undo
20 21
                     <input<?=isset($document) && $document->state == 'published' ? ' checked="checked"' : '' ?> type="checkbox" id="state" name="state" placeholder="State" />
21 22
                 </div>
22 23
 			<? endif ?>
23
-			<?$fieldPrefix='fields';?>
24
+			<?$fieldPrefix='fields';
25
+}
26
+?>
24 27
 			<? foreach ($documentType->fields as $field) : ?>
25 28
 				<div class="form-element">
26 29
 					<label for="<?=$field->slug?>"><?=$field->title?></label>
27 30
 					<? if (isset($document)) :
28 31
 						$fieldSlug = $field->slug;
29 32
 						$value = isset($document->fields->$fieldSlug) ? current($document->fields->$fieldSlug) : '';
30
-					else :
33
+					else {
34
+						:
31 35
 						$value = '';
36
+					}
32 37
 					endif ?>
33 38
 					<? if ($field->multiple == true && $field->type != 'Rich Text') : ?>
34 39
 					<ul class="grid-wrapper sortable">
@@ -138,8 +143,11 @@  discard block
 block discarded – undo
138 143
 					</ul>
139 144
 					<a class="btn" onclick="addDynamicBrick(this, 'true', 'newBrickDropzone_<?=$static_brick_nr?>');">+</a>
140 145
 					<?$static_brick_nr += 1?>
141
-				<? else : ?>
142
-					<?$fieldPrefix='bricks[' . $brick->slug . '][fields]';?>
146
+				<? else {
147
+	: ?>
148
+					<?$fieldPrefix='bricks[' . $brick->slug . '][fields]';
149
+}
150
+?>
143 151
 					<input type="hidden" name="bricks[<?=$brick->slug?>][type]" value="<?=$brick->brickSlug?>" />
144 152
 					<? foreach ($brick->structure->fields as $field) : ?>
145 153
 						<div class="form-element">
@@ -148,8 +156,10 @@  discard block
 block discarded – undo
148 156
 							$brickSlug = $brick->slug;
149 157
 							$fieldSlug = $field->slug;
150 158
 							$value = isset($document->bricks->$brickSlug->fields->$fieldSlug) ? current($document->bricks->$brickSlug->fields->$fieldSlug) : '';
151
-						else :
159
+						else {
160
+							:
152 161
 							$value = '';
162
+						}
153 163
 						endif ?>
154 164
 						<? if ($field->multiple == true && $field->type != 'Rich Text') : ?>
155 165
 						<ul class="grid-wrapper sortable">
Please login to merge, or discard this patch.
cloudcontrol/library/components/cms/configuration/BricksRouting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_CONFIGURATION);
56 56
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
57 57
 			$cmsComponent->storage->addBrick($request::$post);
58
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/bricks');
58
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/bricks');
59 59
 			exit;
60 60
 		}
61 61
 	}
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		$brick = $cmsComponent->storage->getBrickBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
72 72
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
73 73
 			$cmsComponent->storage->saveBrick($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
74
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/bricks');
74
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/bricks');
75 75
 			exit;
76 76
 		}
77 77
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_BRICK, $brick);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	private function deleteRoute($request, $cmsComponent)
85 85
 	{
86 86
 		$cmsComponent->storage->deleteBrickBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
87
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/bricks');
87
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/bricks');
88 88
 		exit;
89 89
 	}
90 90
 }
91 91
\ No newline at end of file
Please login to merge, or discard this patch.
cloudcontrol/library/components/cms/configuration/ImageSetRouting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$imageSet = $cmsComponent->storage->getImageSetBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
57 57
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
58 58
 			$cmsComponent->storage->saveImageSet($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
59
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/image-set');
59
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/image-set');
60 60
 			exit;
61 61
 		}
62 62
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_IMAGE_SET, $imageSet);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_CONFIGURATION);
73 73
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
74 74
 			$cmsComponent->storage->addImageSet($request::$post);
75
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/image-set');
75
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/image-set');
76 76
 			exit;
77 77
 		}
78 78
 	}
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	private function deleteRoute($request, $cmsComponent)
85 85
 	{
86 86
 		$cmsComponent->storage->deleteImageSetBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
87
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/image-set');
87
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/image-set');
88 88
 		exit;
89 89
 	}
90 90
 }
91 91
\ No newline at end of file
Please login to merge, or discard this patch.
library/components/cms/configuration/ApplicationComponentRouting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_CONFIGURATION);
56 56
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
57 57
 			$cmsComponent->storage->addApplicationComponent($request::$post);
58
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/application-components');
58
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/application-components');
59 59
 			exit;
60 60
 		}
61 61
 	}
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		$applicationComponent = $cmsComponent->storage->getApplicationComponentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
72 72
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
73 73
 			$cmsComponent->storage->saveApplicationComponent($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
74
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/application-components');
74
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/application-components');
75 75
 			exit;
76 76
 		}
77 77
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	private function deleteRoute($request, $cmsComponent)
86 86
 	{
87 87
 		$cmsComponent->storage->deleteApplicationComponentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
88
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/application-components');
88
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/application-components');
89 89
 		exit;
90 90
 	}
91 91
 }
92 92
\ No newline at end of file
Please login to merge, or discard this patch.
cloudcontrol/library/components/cms/configuration/DocumentTypeRouting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$bricks = $cmsComponent->storage->getBricks();
57 57
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
58 58
 			$cmsComponent->storage->addDocumentType($request::$post);
59
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/document-types');
59
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/document-types');
60 60
 			exit;
61 61
 		}
62 62
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_BRICKS, $bricks);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		$bricks = $cmsComponent->storage->getBricks();
75 75
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
76 76
 			$cmsComponent->storage->saveDocumentType($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
77
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/document-types');
77
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/document-types');
78 78
 			exit;
79 79
 		}
80 80
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT_TYPE, $documentType);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	private function deleteRoute($request, $cmsComponent)
89 89
 	{
90 90
 		$cmsComponent->storage->deleteDocumentTypeBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
91
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/document-types');
91
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/document-types');
92 92
 		exit;
93 93
 	}
94 94
 }
95 95
\ No newline at end of file
Please login to merge, or discard this patch.
cloudcontrol/library/components/cms/configuration/UsersRouting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_CONFIGURATION);
57 57
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_USERNAME])) {
58 58
 			$cmsComponent->storage->addUser($request::$post);
59
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/users');
59
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/users');
60 60
 			exit;
61 61
 		}
62 62
 	}
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	private function deleteRoute($request, $cmsComponent)
69 69
 	{
70 70
 		$cmsComponent->storage->deleteUserBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
71
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/users');
71
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/users');
72 72
 		exit;
73 73
 	}
74 74
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_USER, $cmsComponent->storage->getUserBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]));
84 84
 		if (isset($_POST[CmsComponent::POST_PARAMETER_USERNAME])) {
85 85
 			$cmsComponent->storage->saveUser($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
86
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/users');
86
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/users');
87 87
 			exit;
88 88
 		}
89 89
 	}
Please login to merge, or discard this patch.
cloudcontrol/library/components/cms/SitemapRouting.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -14,24 +14,24 @@
 block discarded – undo
14 14
 class SitemapRouting implements CmsRouting
15 15
 {
16 16
 
17
-    /**
18
-     * SitemapRouting constructor.
19
-     * @param \library\cc\Request $request
20
-     * @param mixed|string $relativeCmsUri
21
-     * @param CmsComponent $cmsComponent
22
-     */
23
-    public function __construct($request, $relativeCmsUri, $cmsComponent)
24
-    {
25
-        if ($relativeCmsUri == '/sitemap') {
17
+	/**
18
+	 * SitemapRouting constructor.
19
+	 * @param \library\cc\Request $request
20
+	 * @param mixed|string $relativeCmsUri
21
+	 * @param CmsComponent $cmsComponent
22
+	 */
23
+	public function __construct($request, $relativeCmsUri, $cmsComponent)
24
+	{
25
+		if ($relativeCmsUri == '/sitemap') {
26 26
 			$this->overviewRoute($request, $cmsComponent);
27
-        } elseif ($relativeCmsUri == '/sitemap/new') {
27
+		} elseif ($relativeCmsUri == '/sitemap/new') {
28 28
 			$this->newRoute($request, $cmsComponent);
29
-        } elseif ($relativeCmsUri == '/sitemap/edit' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
29
+		} elseif ($relativeCmsUri == '/sitemap/edit' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
30 30
 			$this->editRoute($request, $cmsComponent);
31
-        } elseif ($relativeCmsUri == '/sitemap/delete' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
31
+		} elseif ($relativeCmsUri == '/sitemap/delete' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
32 32
 			$this->deleteRoute($request, $cmsComponent);
33
-        }
34
-    }
33
+		}
34
+	}
35 35
 
36 36
 	/**
37 37
 	 * @param $request
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_SITEMAP);
58 58
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::POST_PARAMETER_TEMPLATE], $request::$post[CmsComponent::POST_PARAMETER_COMPONENT])) {
59 59
 			$cmsComponent->storage->addSitemapItem($request::$post);
60
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap');
60
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap');
61 61
 			exit;
62 62
 		}
63 63
 	}
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		$sitemapItem = $cmsComponent->storage->getSitemapItemBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
74 74
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::POST_PARAMETER_TEMPLATE], $request::$post[CmsComponent::POST_PARAMETER_COMPONENT])) {
75 75
 			$cmsComponent->storage->saveSitemapItem($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
76
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap');
76
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap');
77 77
 			exit;
78 78
 		}
79 79
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_SITEMAP_ITEM, $sitemapItem);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	private function deleteRoute($request, $cmsComponent)
87 87
 	{
88 88
 		$cmsComponent->storage->deleteSitemapItemBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
89
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap');
89
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap');
90 90
 		exit;
91 91
 	}
92 92
 }
93 93
\ No newline at end of file
Please login to merge, or discard this patch.
cloudcontrol/library/components/cms/FilesRouting.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,21 +39,21 @@  discard block
 block discarded – undo
39 39
 	private function downloadRoute($slug, $cmsComponent)
40 40
 	{
41 41
 		$file = $cmsComponent->storage->getFileByName($slug);
42
-		$path = realpath(__DIR__ . '/../../../www/files/');
43
-		$quoted = sprintf('"%s"', addcslashes(basename($path . '/' . $file->file), '"\\'));
44
-		$size = filesize($path . '/' . $file->file);
42
+		$path = realpath(__DIR__.'/../../../www/files/');
43
+		$quoted = sprintf('"%s"', addcslashes(basename($path.'/'.$file->file), '"\\'));
44
+		$size = filesize($path.'/'.$file->file);
45 45
 
46 46
 		header('Content-Description: File Transfer');
47
-		header('Content-Type: ' . $file->type);
48
-		header('Content-Disposition: attachment; filename=' . $quoted);
47
+		header('Content-Type: '.$file->type);
48
+		header('Content-Disposition: attachment; filename='.$quoted);
49 49
 		header('Content-Transfer-Encoding: binary');
50 50
 		header('Connection: Keep-Alive');
51 51
 		header('Expires: 0');
52 52
 		header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
53 53
 		header('Pragma: public');
54
-		header('Content-Length: ' . $size);
54
+		header('Content-Length: '.$size);
55 55
 
56
-		readfile($path . '/' . $file->file);
56
+		readfile($path.'/'.$file->file);
57 57
 		exit;
58 58
 	}
59 59
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_FILES);
78 78
 		if (isset($_FILES[CmsComponent::FILES_PARAMETER_FILE])) {
79 79
 			$cmsComponent->storage->addFile($_FILES[CmsComponent::FILES_PARAMETER_FILE]);
80
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/files');
80
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/files');
81 81
 			exit;
82 82
 		}
83 83
 	}
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	private function deleteRoute($request, $cmsComponent)
90 90
 	{
91 91
 		$cmsComponent->storage->deleteFileByName($request::$get[CmsComponent::FILES_PARAMETER_FILE]);
92
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/files');
92
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/files');
93 93
 		exit;
94 94
 	}
95 95
 
Please login to merge, or discard this patch.
cloudcontrol/library/components/cms/ImagesRouting.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -13,26 +13,26 @@
 block discarded – undo
13 13
 class ImagesRouting implements CmsRouting
14 14
 {
15 15
 
16
-    /**
17
-     * ImagesRouting constructor.
18
-     * @param \library\cc\Request $request
19
-     * @param mixed|string $relativeCmsUri
20
-     * @param CmsComponent $cmsComponent
21
-     */
22
-    public function __construct($request, $relativeCmsUri, $cmsComponent)
23
-    {
24
-        if ($relativeCmsUri == '/images') {
16
+	/**
17
+	 * ImagesRouting constructor.
18
+	 * @param \library\cc\Request $request
19
+	 * @param mixed|string $relativeCmsUri
20
+	 * @param CmsComponent $cmsComponent
21
+	 */
22
+	public function __construct($request, $relativeCmsUri, $cmsComponent)
23
+	{
24
+		if ($relativeCmsUri == '/images') {
25 25
 			$this->overviewRoute($cmsComponent);
26
-        } elseif ($relativeCmsUri == '/images.json') {
26
+		} elseif ($relativeCmsUri == '/images.json') {
27 27
 			$this->jsonRoute($cmsComponent);
28
-        } elseif ($relativeCmsUri == '/images/new') {
28
+		} elseif ($relativeCmsUri == '/images/new') {
29 29
 			$this->newRoute($request, $cmsComponent);
30
-        } elseif ($relativeCmsUri == '/images/delete' && isset($request::$get[CmsComponent::FILES_PARAMETER_FILE])) {
30
+		} elseif ($relativeCmsUri == '/images/delete' && isset($request::$get[CmsComponent::FILES_PARAMETER_FILE])) {
31 31
 			$this->deleteRoute($request, $cmsComponent);
32
-        } elseif ($relativeCmsUri == '/images/show' && isset($request::$get[CmsComponent::FILES_PARAMETER_FILE])) {
32
+		} elseif ($relativeCmsUri == '/images/show' && isset($request::$get[CmsComponent::FILES_PARAMETER_FILE])) {
33 33
 			$this->showRoute($request, $cmsComponent);
34
-        }
35
-    }
34
+		}
35
+	}
36 36
 
37 37
 	/**
38 38
 	 * @param $cmsComponent
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_IMAGES);
65 65
 		if (isset($_FILES[CmsComponent::FILES_PARAMETER_FILE])) {
66 66
 			$cmsComponent->storage->addImage($_FILES[CmsComponent::FILES_PARAMETER_FILE]);
67
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/images');
67
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/images');
68 68
 			exit;
69 69
 		}
70 70
 	}
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	private function deleteRoute($request, $cmsComponent)
77 77
 	{
78 78
 		$cmsComponent->storage->deleteImageByName($request::$get[CmsComponent::FILES_PARAMETER_FILE]);
79
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/images');
79
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/images');
80 80
 		exit;
81 81
 	}
82 82
 
Please login to merge, or discard this patch.