@@ -2,7 +2,7 @@ |
||
| 2 | 2 | <div class="grid-container"> |
| 3 | 3 | <div class="grid-box-2"> |
| 4 | 4 | <div class="grid-inner"> |
| 5 | - <div<?= isset($value) ? ' style="background-image:url(\'' . $request::$subfolders . 'images/' . $value . '\');"' : '' ?> class="selected-image" id="<?= $field->slug ?>_selectedImage"></div> |
|
| 5 | + <div<?= isset($value) ? ' style="background-image:url(\''.$request::$subfolders.'images/'.$value.'\');"' : '' ?> class="selected-image" id="<?= $field->slug ?>_selectedImage"></div> |
|
| 6 | 6 | </div> |
| 7 | 7 | </div> |
| 8 | 8 | <div class="grid-box-10"> |
@@ -6,12 +6,12 @@ discard block |
||
| 6 | 6 | } |
| 7 | 7 | ?> |
| 8 | 8 | <div class="rte"> |
| 9 | - <div id="summernote_<?= str_replace(']', '-', str_replace('[', '-', $fieldPrefix)) . $field->slug ?>_rte_<?= $summernoteInstances ?>" class="summernote"><?= isset($value) ? $value : '' ?></div> |
|
| 9 | + <div id="summernote_<?= str_replace(']', '-', str_replace('[', '-', $fieldPrefix)).$field->slug ?>_rte_<?= $summernoteInstances ?>" class="summernote"><?= isset($value) ? $value : '' ?></div> |
|
| 10 | 10 | </div> |
| 11 | 11 | <textarea style="display:none;" id="summernote_<?= $field->slug ?>_container_<?= $summernoteInstances ?>" name="<?= $fieldPrefix ?>[<?= $field->slug ?>][]"></textarea> |
| 12 | 12 | <script> |
| 13 | 13 | $(document).ready(function () { |
| 14 | - $('#summernote_<?=str_replace(']', '-', str_replace('[', '-', $fieldPrefix)) . $field->slug?>_rte_<?=$summernoteInstances?>').summernote({ |
|
| 14 | + $('#summernote_<?=str_replace(']', '-', str_replace('[', '-', $fieldPrefix)).$field->slug?>_rte_<?=$summernoteInstances?>').summernote({ |
|
| 15 | 15 | height: 300, |
| 16 | 16 | toolbar: [ |
| 17 | 17 | /*[groupname, [button list]]*/ |
@@ -28,4 +28,4 @@ discard block |
||
| 28 | 28 | if (!isset($GLOBALS['rteList'])) { |
| 29 | 29 | $GLOBALS['rteList'] = array(); |
| 30 | 30 | } |
| 31 | -$GLOBALS['rteList'][] = 'summernote_' . str_replace(']', '-', str_replace('[', '-', $fieldPrefix)) . $field->slug . '_rte_' . $summernoteInstances ?> |
|
| 31 | +$GLOBALS['rteList'][] = 'summernote_'.str_replace(']', '-', str_replace('[', '-', $fieldPrefix)).$field->slug.'_rte_'.$summernoteInstances ?> |
|
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | { ?> |
| 11 | 11 | <div class="grid-box-8"> |
| 12 | 12 | <h3> |
| 13 | - <a class="btn documentTitle openFolder" data-slug="<?= $slugPrefix . $document->slug ?>" title="Open"> |
|
| 13 | + <a class="btn documentTitle openFolder" data-slug="<?= $slugPrefix.$document->slug ?>" title="Open"> |
|
| 14 | 14 | <i class="fa fa-folder-o "></i> <?= $document->title ?> |
| 15 | 15 | </a> |
| 16 | 16 | </h3> |
@@ -18,11 +18,11 @@ discard block |
||
| 18 | 18 | <div class="documentActions grid-box-4"> |
| 19 | 19 | <? renderAction('Edit', |
| 20 | 20 | '', |
| 21 | - $request::$subfolders . $cmsPrefix . '/documents/edit-folder?slug=' . $slugPrefix . $document->slug, |
|
| 21 | + $request::$subfolders.$cmsPrefix.'/documents/edit-folder?slug='.$slugPrefix.$document->slug, |
|
| 22 | 22 | 'pencil'); ?> |
| 23 | 23 | <? renderAction('Delete', |
| 24 | 24 | 'error', |
| 25 | - $request::$subfolders . $cmsPrefix . '/documents/delete-folder?slug=' . $slugPrefix . $document->slug, |
|
| 25 | + $request::$subfolders.$cmsPrefix.'/documents/delete-folder?slug='.$slugPrefix.$document->slug, |
|
| 26 | 26 | 'trash', |
| 27 | 27 | 'return confirm(\'Are you sure you want to delete this document?\');'); ?> |
| 28 | 28 | </div> |
@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | <? foreach ($document->getContent() as $subDocument) : ?> |
| 31 | 31 | <li class="grid-container"> |
| 32 | 32 | <? if ($subDocument->type == 'document') : ?> |
| 33 | - <? renderDocument($subDocument, $cmsPrefix, $slugPrefix . $document->slug . '/', $request); ?> |
|
| 33 | + <? renderDocument($subDocument, $cmsPrefix, $slugPrefix.$document->slug.'/', $request); ?> |
|
| 34 | 34 | <? elseif ($subDocument->type == 'folder') : ?> |
| 35 | - <? renderFolder($subDocument, $cmsPrefix, $slugPrefix . $document->slug . '/', false, $request); ?> |
|
| 35 | + <? renderFolder($subDocument, $cmsPrefix, $slugPrefix.$document->slug.'/', false, $request); ?> |
|
| 36 | 36 | <? endif ?> |
| 37 | 37 | </li> |
| 38 | 38 | <? endforeach ?> |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | <? foreach ($image->set as $key => $set) : ?> |
| 26 | 26 | <div class="sets"> |
| 27 | 27 | <label><?= $key ?></label> |
| 28 | - <img src="<?= $request::$subfolders . 'images/' . $set ?>"/> |
|
| 28 | + <img src="<?= $request::$subfolders.'images/'.$set ?>"/> |
|
| 29 | 29 | </div> |
| 30 | 30 | <? endforeach ?> |
| 31 | 31 | <? endif ?> |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | </main> |
| 98 | 98 | <script> |
| 99 | 99 | var subfolders = '<?=$request::$subfolders?>', |
| 100 | - cmsSubfolders = '<?=$request::$subfolders . $cmsPrefix?>'; |
|
| 100 | + cmsSubfolders = '<?=$request::$subfolders.$cmsPrefix?>'; |
|
| 101 | 101 | </script> |
| 102 | 102 | <script src="<?= $request::$subfolders ?>js/cms.js"></script> |
| 103 | 103 | </body> |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | <? include('documents/function.renderFolder.php'); ?> |
| 4 | 4 | <script>window.onload = function () { |
| 5 | 5 | History.init(); |
| 6 | - History.replaceState(null, 'Cloud Control CMS', '/<?=$request::$subfolders . $cmsPrefix?>/documents?path=/'); |
|
| 6 | + History.replaceState(null, 'Cloud Control CMS', '/<?=$request::$subfolders.$cmsPrefix?>/documents?path=/'); |
|
| 7 | 7 | };</script> |
| 8 | 8 | <section class="documents"> |
| 9 | 9 | <h2><i class="fa fa-file-text-o"></i> Documents</h2> |
@@ -99,9 +99,9 @@ |
||
| 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 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | private function showJson($obj, $httpHeader = 'HTTP/1.0 200 OK') { |
| 75 | - header($_SERVER['SERVER_PROTOCOL'] . $httpHeader, true); |
|
| 75 | + header($_SERVER['SERVER_PROTOCOL'].$httpHeader, true); |
|
| 76 | 76 | header('Content-type: application/json'); |
| 77 | 77 | die(json_encode($obj)); |
| 78 | 78 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | private function stepRouting($step, $cmsComponent, $indexer) |
| 86 | 86 | { |
| 87 | - switch($step) { |
|
| 87 | + switch ($step) { |
|
| 88 | 88 | case 'resetIndex': $indexer->resetIndex(); break; |
| 89 | 89 | case 'cleanPublishedDeletedDocuments': $cmsComponent->storage->getDocuments()->cleanPublishedDeletedDocuments(); break; |
| 90 | 90 | case 'createDocumentTermCount': |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | case 'createTermFieldLengthNorm': $indexer->createTermFieldLengthNorm(); break; |
| 96 | 96 | case 'createInverseDocumentFrequency': $indexer->createInverseDocumentFrequency(); break; |
| 97 | 97 | case 'replaceOldIndex': $indexer->replaceOldIndex(); break; |
| 98 | - default : $this->showJson('Invalid step: ' . $step . '.', 'HTTP/1.0 500 Internal Server Error'); break; |
|
| 98 | + default : $this->showJson('Invalid step: '.$step.'.', 'HTTP/1.0 500 Internal Server Error'); break; |
|
| 99 | 99 | } |
| 100 | 100 | $this->showJson('done'); |
| 101 | 101 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | { |
| 42 | 42 | if ($relativeCmsUri == '/documents/new-document' && isset($request::$get[CmsComponent::GET_PARAMETER_PATH])) { |
| 43 | 43 | $this->documentNewRoute($request, $cmsComponent); |
| 44 | - } elseif (isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])){ |
|
| 44 | + } elseif (isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 45 | 45 | switch ($relativeCmsUri) { |
| 46 | 46 | case '/documents/edit-document': $this->editDocumentRoute($request, $cmsComponent); break; |
| 47 | 47 | case '/documents/get-brick': $this->getBrickRoute($request, $cmsComponent); break; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | if (isset($request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE])) { |
| 96 | 96 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE], $request::$get[CmsComponent::GET_PARAMETER_PATH])) { |
| 97 | 97 | $cmsComponent->storage->getDocuments()->addDocument($request::$post); |
| 98 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 98 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 99 | 99 | exit; |
| 100 | 100 | } |
| 101 | 101 | $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT_TYPE, $cmsComponent->storage->getDocumentTypes()->getDocumentTypeBySlug($request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE], true)); |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | } else { |
| 104 | 104 | $documentTypes = $cmsComponent->storage->getDocumentTypes()->getDocumentTypes(); |
| 105 | 105 | if (count($documentTypes) < 1) { |
| 106 | - 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>'); |
|
| 106 | + 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>'); |
|
| 107 | 107 | } |
| 108 | 108 | $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT_TYPES, $documentTypes); |
| 109 | 109 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $cmsComponent->setParameter(CmsComponent::PARAMETER_SMALLEST_IMAGE, $cmsComponent->storage->getImageSet()->getSmallestImageSet()->slug); |
| 121 | 121 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
| 122 | 122 | $cmsComponent->storage->getDocuments()->saveDocument($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 | $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT, $cmsComponent->storage->getDocuments()->getDocumentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG], 'unpublished')); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | private function deleteDocumentRoute($request, $cmsComponent) |
| 158 | 158 | { |
| 159 | 159 | $cmsComponent->storage->getDocuments()->deleteDocumentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]); |
| 160 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 160 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 161 | 161 | exit; |
| 162 | 162 | } |
| 163 | 163 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_DOCUMENTS); |
| 172 | 172 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::GET_PARAMETER_PATH])) { |
| 173 | 173 | $cmsComponent->storage->addDocumentFolder($request::$post); |
| 174 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 174 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 175 | 175 | exit; |
| 176 | 176 | } |
| 177 | 177 | } |
@@ -190,11 +190,11 @@ discard block |
||
| 190 | 190 | array_pop($path); |
| 191 | 191 | $path = implode('/', $path); |
| 192 | 192 | |
| 193 | - $request::$get[CmsComponent::GET_PARAMETER_PATH] = '/' . $path; |
|
| 193 | + $request::$get[CmsComponent::GET_PARAMETER_PATH] = '/'.$path; |
|
| 194 | 194 | |
| 195 | 195 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post['content'])) { |
| 196 | 196 | $cmsComponent->storage->saveDocumentFolder($request::$post); |
| 197 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 197 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 198 | 198 | exit; |
| 199 | 199 | } |
| 200 | 200 | |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | private function deleteFolderRoute($request, $cmsComponent) |
| 210 | 210 | { |
| 211 | 211 | $cmsComponent->storage->deleteDocumentFolderBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]); |
| 212 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 212 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 213 | 213 | exit; |
| 214 | 214 | } |
| 215 | 215 | |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | private function publishDocumentRoute($request, $cmsComponent) |
| 221 | 221 | { |
| 222 | 222 | $cmsComponent->storage->publishDocumentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]); |
| 223 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 223 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 224 | 224 | exit; |
| 225 | 225 | } |
| 226 | 226 | |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | private function unpublishDocumentRoute($request, $cmsComponent) |
| 232 | 232 | { |
| 233 | 233 | $cmsComponent->storage->unpublishDocumentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]); |
| 234 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 234 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 235 | 235 | exit; |
| 236 | 236 | } |
| 237 | 237 | |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | $cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_DOCUMENTS); |
| 249 | 249 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) { |
| 250 | 250 | $cmsComponent->storage->getValuelists()->addValuelist($request::$post); |
| 251 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents/valuelists'); |
|
| 251 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents/valuelists'); |
|
| 252 | 252 | exit; |
| 253 | 253 | } |
| 254 | 254 | } |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | |
| 261 | 261 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
| 262 | 262 | $cmsComponent->storage->getValuelists()->saveValuelist($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post); |
| 263 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents/valuelists'); |
|
| 263 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents/valuelists'); |
|
| 264 | 264 | exit; |
| 265 | 265 | } |
| 266 | 266 | |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | private function deleteValuelistRoute($request, $cmsComponent) |
| 272 | 272 | { |
| 273 | 273 | $cmsComponent->storage->getValuelists()->deleteValuelistBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]); |
| 274 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents/valuelists'); |
|
| 274 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents/valuelists'); |
|
| 275 | 275 | exit; |
| 276 | 276 | } |
| 277 | 277 | } |
| 278 | 278 | \ No newline at end of file |