| @@ -111,7 +111,7 @@ discard block | ||
| 111 | 111 | * @param array $replace | 
| 112 | 112 | * @param string $delimiter | 
| 113 | 113 | * | 
| 114 | - * @return mixed|string | |
| 114 | + * @return string | |
| 115 | 115 | */ | 
| 116 | 116 |  function slugify($str, $replace=array(), $delimiter='-') { | 
| 117 | 117 |  	if( !empty($replace) ) { | 
| @@ -130,7 +130,6 @@ discard block | ||
| 130 | 130 | * Dumps a var_dump of the passed arguments with <pre> tags surrounding it. | 
| 131 | 131 | * Dies afterwards | 
| 132 | 132 | * | 
| 133 | - * @param mixed $data The data to be displayed | |
| 134 | 133 | */ | 
| 135 | 134 | function dump() | 
| 136 | 135 |  { | 
| @@ -34,14 +34,14 @@ discard block | ||
| 34 | 34 | return '0 seconds'; | 
| 35 | 35 | } | 
| 36 | 36 | |
| 37 | - $a = array( 365 * 24 * 60 * 60 => 'year', | |
| 37 | + $a = array(365 * 24 * 60 * 60 => 'year', | |
| 38 | 38 | 30 * 24 * 60 * 60 => 'month', | 
| 39 | 39 | 24 * 60 * 60 => 'day', | 
| 40 | 40 | 60 * 60 => 'hour', | 
| 41 | 41 | 60 => 'minute', | 
| 42 | 42 | 1 => 'second' | 
| 43 | 43 | ); | 
| 44 | - $a_plural = array( 'year' => 'years', | |
| 44 | +	$a_plural = array('year'   => 'years', | |
| 45 | 45 | 'month' => 'months', | 
| 46 | 46 | 'day' => 'days', | 
| 47 | 47 | 'hour' => 'hours', | 
| @@ -55,18 +55,18 @@ discard block | ||
| 55 | 55 | if ($d >= 1) | 
| 56 | 56 |  		{ | 
| 57 | 57 | $r = round($d); | 
| 58 | - return $r . ' ' . ($r > 1 ? $a_plural[$str] : $str) . ' ago'; | |
| 58 | + return $r.' '.($r > 1 ? $a_plural[$str] : $str).' ago'; | |
| 59 | 59 | } | 
| 60 | 60 | } | 
| 61 | 61 | } | 
| 62 | 62 | |
| 63 | -function humanFileSize($size,$unit="") { | |
| 64 | - if( (!$unit && $size >= 1<<30) || $unit == "GB") | |
| 65 | - return number_format($size/(1<<30),2)."GB"; | |
| 66 | - if( (!$unit && $size >= 1<<20) || $unit == "MB") | |
| 67 | - return number_format($size/(1<<20),2)."MB"; | |
| 68 | - if( (!$unit && $size >= 1<<10) || $unit == "KB") | |
| 69 | - return number_format($size/(1<<10),2)."KB"; | |
| 63 | +function humanFileSize($size, $unit = "") { | |
| 64 | + if ((!$unit && $size >= 1 << 30) || $unit == "GB") | |
| 65 | + return number_format($size / (1 << 30), 2)."GB"; | |
| 66 | + if ((!$unit && $size >= 1 << 20) || $unit == "MB") | |
| 67 | + return number_format($size / (1 << 20), 2)."MB"; | |
| 68 | + if ((!$unit && $size >= 1 << 10) || $unit == "KB") | |
| 69 | + return number_format($size / (1 << 10), 2)."KB"; | |
| 70 | 70 | return number_format($size)." bytes"; | 
| 71 | 71 | } | 
| 72 | 72 | |
| @@ -113,9 +113,9 @@ discard block | ||
| 113 | 113 | * | 
| 114 | 114 | * @return mixed|string | 
| 115 | 115 | */ | 
| 116 | -function slugify($str, $replace=array(), $delimiter='-') { | |
| 117 | -	if( !empty($replace) ) { | |
| 118 | - $str = str_replace((array)$replace, ' ', $str); | |
| 116 | +function slugify($str, $replace = array(), $delimiter = '-') { | |
| 117 | +	if (!empty($replace)) { | |
| 118 | + $str = str_replace((array) $replace, ' ', $str); | |
| 119 | 119 | } | 
| 120 | 120 | |
| 121 | 121 |  	$clean = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $str); | 
| @@ -136,13 +136,13 @@ discard block | ||
| 136 | 136 |  { | 
| 137 | 137 | $debug_backtrace = current(debug_backtrace()); | 
| 138 | 138 |  	if (PHP_SAPI == 'cli') { | 
| 139 | - echo 'Dump: ' . $debug_backtrace['file'] . ':' . $debug_backtrace['line'] . "\n"; | |
| 139 | + echo 'Dump: '.$debug_backtrace['file'].':'.$debug_backtrace['line']."\n"; | |
| 140 | 140 |  		foreach (func_get_args() as $data) { | 
| 141 | 141 | var_dump($data); | 
| 142 | 142 | } | 
| 143 | 143 |  	} else { | 
| 144 | 144 | ob_clean(); | 
| 145 | - echo '<div>Dump: ' . $debug_backtrace['file'] . ':<b>' . $debug_backtrace['line'] . "</b></div>"; | |
| 145 | + echo '<div>Dump: '.$debug_backtrace['file'].':<b>'.$debug_backtrace['line']."</b></div>"; | |
| 146 | 146 | echo '<pre>'; | 
| 147 | 147 |  		foreach (func_get_args() as $data) { | 
| 148 | 148 | echo "<code>"; | 
| @@ -61,12 +61,15 @@ | ||
| 61 | 61 | } | 
| 62 | 62 | |
| 63 | 63 |  function humanFileSize($size,$unit="") { | 
| 64 | - if( (!$unit && $size >= 1<<30) || $unit == "GB") | |
| 65 | - return number_format($size/(1<<30),2)."GB"; | |
| 66 | - if( (!$unit && $size >= 1<<20) || $unit == "MB") | |
| 67 | - return number_format($size/(1<<20),2)."MB"; | |
| 68 | - if( (!$unit && $size >= 1<<10) || $unit == "KB") | |
| 69 | - return number_format($size/(1<<10),2)."KB"; | |
| 64 | +	if( (!$unit && $size >= 1<<30) || $unit == "GB") { | |
| 65 | + return number_format($size/(1<<30),2)."GB"; | |
| 66 | + } | |
| 67 | +	if( (!$unit && $size >= 1<<20) || $unit == "MB") { | |
| 68 | + return number_format($size/(1<<20),2)."MB"; | |
| 69 | + } | |
| 70 | +	if( (!$unit && $size >= 1<<10) || $unit == "KB") { | |
| 71 | + return number_format($size/(1<<10),2)."KB"; | |
| 72 | + } | |
| 70 | 73 | return number_format($size)." bytes"; | 
| 71 | 74 | } | 
| 72 | 75 | |
| @@ -17,7 +17,7 @@ discard block | ||
| 17 | 17 | /** | 
| 18 | 18 | * JsonStorage constructor. | 
| 19 | 19 | * | 
| 20 | - * @param $storagePath | |
| 20 | + * @param string $storagePath | |
| 21 | 21 | */ | 
| 22 | 22 | public function __construct($storagePath) | 
| 23 | 23 |  		{ | 
| @@ -837,6 +837,9 @@ discard block | ||
| 837 | 837 | } | 
| 838 | 838 | } | 
| 839 | 839 | |
| 840 | + /** | |
| 841 | + * @param string $path | |
| 842 | + */ | |
| 840 | 843 | private function validateFilename($filename, $path) | 
| 841 | 844 |  		{ | 
| 842 | 845 |  			$fileParts = explode('.', $filename); | 
| @@ -33,7 +33,7 @@ discard block | ||
| 33 | 33 | */ | 
| 34 | 34 | private function config() | 
| 35 | 35 |  		{ | 
| 36 | - $storagePath = __DIR__ . $this->storagePath; | |
| 36 | + $storagePath = __DIR__.$this->storagePath; | |
| 37 | 37 |  			if (realpath($storagePath) !== false) { | 
| 38 | 38 | $jsonString = file_get_contents($storagePath); | 
| 39 | 39 | $this->repository = json_decode($jsonString); | 
| @@ -189,7 +189,7 @@ discard block | ||
| 189 | 189 | */ | 
| 190 | 190 | public function getDocumentBySlug($slug) | 
| 191 | 191 |  		{ | 
| 192 | -			$documentContainer = $this->getDocumentContainerByPath('/' . $slug); | |
| 192 | +			$documentContainer = $this->getDocumentContainerByPath('/'.$slug); | |
| 193 | 193 | $indices = $documentContainer['indices']; | 
| 194 | 194 | |
| 195 | 195 | $folder = $this->repository->documents; | 
| @@ -226,7 +226,7 @@ discard block | ||
| 226 | 226 | // Check for duplicates | 
| 227 | 227 |  				foreach ($this->repository->documents as $index => $document) { | 
| 228 | 228 |  					if (end($indices) !== $index && $document->slug == $documentFolderObject->slug && $document->type == 'document') { | 
| 229 | -						throw new \Exception('Duplicate slug: ' . $document->slug . ' in folder ' . $postValues['path']); | |
| 229 | +						throw new \Exception('Duplicate slug: '.$document->slug.' in folder '.$postValues['path']); | |
| 230 | 230 | } | 
| 231 | 231 | } | 
| 232 | 232 | $this->repository->documents[end($indices)] = $documentFolderObject; | 
| @@ -234,10 +234,10 @@ discard block | ||
| 234 | 234 | // Check for duplicates | 
| 235 | 235 |  				foreach ($previousFolder->content as $index => $document) { | 
| 236 | 236 |  					if (end($indices) !== $index && $document->slug == $documentFolderObject->slug && $document->type == 'document') { | 
| 237 | -						throw new \Exception('Duplicate slug: ' . $document->slug . ' in folder ' . $postValues['path']); | |
| 237 | +						throw new \Exception('Duplicate slug: '.$document->slug.' in folder '.$postValues['path']); | |
| 238 | 238 | } | 
| 239 | 239 | } | 
| 240 | - $previousFolder->content[end($indices)] = $documentFolderObject ; | |
| 240 | + $previousFolder->content[end($indices)] = $documentFolderObject; | |
| 241 | 241 | } | 
| 242 | 242 | |
| 243 | 243 | $this->save(); | 
| @@ -251,7 +251,7 @@ discard block | ||
| 251 | 251 |  				foreach ($this->repository->documents as $document) { | 
| 252 | 252 |  					if ($document->slug == $documentFolderObject->slug && $document->type == 'document') { | 
| 253 | 253 | // TODO make it so it doesnt throw an exception, but instead shows a warning | 
| 254 | -						throw new \Exception('Duplicate slug: ' . $document->slug . ' in folder ' . $postValues['path']); | |
| 254 | +						throw new \Exception('Duplicate slug: '.$document->slug.' in folder '.$postValues['path']); | |
| 255 | 255 | } | 
| 256 | 256 | } | 
| 257 | 257 | $this->repository->documents[] = $documentFolderObject; | 
| @@ -273,7 +273,7 @@ discard block | ||
| 273 | 273 |  					foreach ($containerFolder->content as $document) { | 
| 274 | 274 |  						if ($document->slug == $documentFolderObject->slug && $document->type == 'document') { | 
| 275 | 275 | // TODO make it so it doesnt throw an exception, but instead shows a warning | 
| 276 | -							throw new \Exception('Duplicate slug: ' . $document->slug . ' in folder ' . $postValues['path']); | |
| 276 | +							throw new \Exception('Duplicate slug: '.$document->slug.' in folder '.$postValues['path']); | |
| 277 | 277 | } | 
| 278 | 278 | } | 
| 279 | 279 | } | 
| @@ -356,7 +356,7 @@ discard block | ||
| 356 | 356 |  				foreach ($this->repository->documents as $document) { | 
| 357 | 357 |  					if ($document->slug == $documentFolderObject->slug && $document->type == 'folder') { | 
| 358 | 358 | // TODO make it so it doesnt throw an exception, but instead shows a warning | 
| 359 | -						throw new \Exception('Duplicate slug: ' . $document->slug . ' in folder ' . $postValues['path']); | |
| 359 | +						throw new \Exception('Duplicate slug: '.$document->slug.' in folder '.$postValues['path']); | |
| 360 | 360 | } | 
| 361 | 361 | } | 
| 362 | 362 | $this->repository->documents[] = $documentFolderObject; | 
| @@ -377,7 +377,7 @@ discard block | ||
| 377 | 377 |  				foreach ($containerFolder->content as $document) { | 
| 378 | 378 |  					if ($document->slug == $documentFolderObject->slug && $document->type == 'folder') { | 
| 379 | 379 | // TODO make it so it doesnt throw an exception, but instead shows a warning | 
| 380 | -						throw new \Exception('Duplicate slug: ' . $document->slug . ' in folder ' . $postValues['path']); | |
| 380 | +						throw new \Exception('Duplicate slug: '.$document->slug.' in folder '.$postValues['path']); | |
| 381 | 381 | } | 
| 382 | 382 | } | 
| 383 | 383 | $folder->content[] = $documentFolderObject; | 
| @@ -429,7 +429,7 @@ discard block | ||
| 429 | 429 | */ | 
| 430 | 430 | public function getDocumentFolderBySlug($slug) | 
| 431 | 431 |  		{ | 
| 432 | -			$documentContainer = $this->getDocumentContainerByPath('/' . $slug); | |
| 432 | +			$documentContainer = $this->getDocumentContainerByPath('/'.$slug); | |
| 433 | 433 | $indices = $documentContainer['indices']; | 
| 434 | 434 | |
| 435 | 435 | $folder = $this->repository->documents; | 
| @@ -473,7 +473,7 @@ discard block | ||
| 473 | 473 | // Check for duplicates | 
| 474 | 474 |  				foreach ($this->repository->documents as $index => $document) { | 
| 475 | 475 |  					if (end($indices) !== $index && $document->slug == $documentFolderObject->slug && $document->type == 'folder') { | 
| 476 | -						throw new \Exception('Duplicate slug: ' . $document->slug . ' in folder ' . $postValues['path']); | |
| 476 | +						throw new \Exception('Duplicate slug: '.$document->slug.' in folder '.$postValues['path']); | |
| 477 | 477 | } | 
| 478 | 478 | } | 
| 479 | 479 | $this->repository->documents[end($indices)] = $documentFolderObject; | 
| @@ -481,10 +481,10 @@ discard block | ||
| 481 | 481 | // Check for duplicates | 
| 482 | 482 |  				foreach ($previousFolder->content as $index => $document) { | 
| 483 | 483 |  					if (end($indices) !== $index && $document->slug == $documentFolderObject->slug && $document->type == 'folder') { | 
| 484 | -						throw new \Exception('Duplicate slug: ' . $document->slug . ' in folder ' . $postValues['path']); | |
| 484 | +						throw new \Exception('Duplicate slug: '.$document->slug.' in folder '.$postValues['path']); | |
| 485 | 485 | } | 
| 486 | 486 | } | 
| 487 | - $previousFolder->content[end($indices)] = $documentFolderObject ; | |
| 487 | + $previousFolder->content[end($indices)] = $documentFolderObject; | |
| 488 | 488 | } | 
| 489 | 489 | |
| 490 | 490 | $this->save(); | 
| @@ -536,7 +536,7 @@ discard block | ||
| 536 | 536 |  				if ($matched === true) { | 
| 537 | 537 | $noMatches += 1; | 
| 538 | 538 |  				} else { | 
| 539 | -					throw new \Exception('Unknown folder "' . $slug . '" in path: ' . $path); | |
| 539 | +					throw new \Exception('Unknown folder "'.$slug.'" in path: '.$path); | |
| 540 | 540 | } | 
| 541 | 541 | $i += 1; | 
| 542 | 542 | } | 
| @@ -548,7 +548,7 @@ discard block | ||
| 548 | 548 | 'previousDocument' => $previousDocument | 
| 549 | 549 | ); | 
| 550 | 550 |  			} else { | 
| 551 | -				throw new \Exception('Invalid path: ' . $path); | |
| 551 | +				throw new \Exception('Invalid path: '.$path); | |
| 552 | 552 | } | 
| 553 | 553 | } | 
| 554 | 554 | |
| @@ -732,13 +732,13 @@ discard block | ||
| 732 | 732 | |
| 733 | 733 | public function addImage($postValues) | 
| 734 | 734 |  		{ | 
| 735 | - $destinationPath = realpath(__DIR__ . '/../../www/images/'); | |
| 735 | + $destinationPath = realpath(__DIR__.'/../../www/images/'); | |
| 736 | 736 | |
| 737 | 737 | $filename = $this->validateFilename($postValues['name'], $destinationPath); | 
| 738 | - $destination = $destinationPath . '/' . $filename; | |
| 738 | + $destination = $destinationPath.'/'.$filename; | |
| 739 | 739 | |
| 740 | 740 |  			if ($postValues['error'] != '0') { | 
| 741 | -				throw new \Exception('Error uploading file. Error code: ' . $postValues['error']); | |
| 741 | +				throw new \Exception('Error uploading file. Error code: '.$postValues['error']); | |
| 742 | 742 | } | 
| 743 | 743 | |
| 744 | 744 |  			if (move_uploaded_file($postValues['tmp_name'], $destination)) { | 
| @@ -760,14 +760,14 @@ discard block | ||
| 760 | 760 | |
| 761 | 761 | public function deleteImageByName($filename) | 
| 762 | 762 |  		{ | 
| 763 | - $destinationPath = realpath(__DIR__ . '/../../www/images/'); | |
| 763 | + $destinationPath = realpath(__DIR__.'/../../www/images/'); | |
| 764 | 764 | |
| 765 | 765 | $images = $this->getImages(); | 
| 766 | 766 | |
| 767 | 767 |  			foreach ($images as $key => $image) { | 
| 768 | 768 |  				if ($image->file == $filename) { | 
| 769 | 769 |  					foreach ($image->set as $imageSetFilename) { | 
| 770 | - $destination = $destinationPath . '/' . $imageSetFilename; | |
| 770 | + $destination = $destinationPath.'/'.$imageSetFilename; | |
| 771 | 771 |  						if (file_exists($destination)) { | 
| 772 | 772 | unlink($destination); | 
| 773 | 773 |  						} else { | 
| @@ -804,7 +804,7 @@ discard block | ||
| 804 | 804 | */ | 
| 805 | 805 | public function getFiles() | 
| 806 | 806 |  		{ | 
| 807 | - $files = $this->repository->files; | |
| 807 | + $files = $this->repository->files; | |
| 808 | 808 | usort($files, array($this, 'compareFiles')); | 
| 809 | 809 | return $files; | 
| 810 | 810 | } | 
| @@ -816,13 +816,13 @@ discard block | ||
| 816 | 816 | |
| 817 | 817 | public function addFile($postValues) | 
| 818 | 818 |  		{ | 
| 819 | - $destinationPath = realpath(__DIR__ . '/../../www/files/'); | |
| 819 | + $destinationPath = realpath(__DIR__.'/../../www/files/'); | |
| 820 | 820 | |
| 821 | 821 | $filename = $this->validateFilename($postValues['name'], $destinationPath); | 
| 822 | - $destination = $destinationPath . '/' . $filename; | |
| 822 | + $destination = $destinationPath.'/'.$filename; | |
| 823 | 823 | |
| 824 | 824 |  			if ($postValues['error'] != '0') { | 
| 825 | -				throw new \Exception('Error uploading file. Error code: ' . $postValues['error']); | |
| 825 | +				throw new \Exception('Error uploading file. Error code: '.$postValues['error']); | |
| 826 | 826 | } | 
| 827 | 827 | |
| 828 | 828 |  			if (move_uploaded_file($postValues['tmp_name'], $destination)) { | 
| @@ -846,23 +846,23 @@ discard block | ||
| 846 | 846 | array_pop($fileParts); | 
| 847 | 847 |  				$fileNameWithoutExtension = implode('-', $fileParts); | 
| 848 | 848 | $fileNameWithoutExtension = slugify($fileNameWithoutExtension); | 
| 849 | - $filename = $fileNameWithoutExtension . '.' . $extension; | |
| 849 | + $filename = $fileNameWithoutExtension.'.'.$extension; | |
| 850 | 850 |  			} else { | 
| 851 | 851 | $filename = slugify($filename); | 
| 852 | 852 | } | 
| 853 | 853 | |
| 854 | -			if (file_exists($path . '/' . $filename)) { | |
| 854 | +			if (file_exists($path.'/'.$filename)) { | |
| 855 | 855 |  				$fileParts = explode('.', $filename); | 
| 856 | 856 |  				if (count($fileParts) > 1) { | 
| 857 | 857 | $extension = end($fileParts); | 
| 858 | 858 | array_pop($fileParts); | 
| 859 | 859 |  					$fileNameWithoutExtension = implode('-', $fileParts); | 
| 860 | 860 | $fileNameWithoutExtension .= '-copy'; | 
| 861 | - $filename = $fileNameWithoutExtension . '.' . $extension; | |
| 861 | + $filename = $fileNameWithoutExtension.'.'.$extension; | |
| 862 | 862 |  				} else { | 
| 863 | 863 | $filename .= '-copy'; | 
| 864 | 864 | } | 
| 865 | - return $this->validateFilename($filename,$path); | |
| 865 | + return $this->validateFilename($filename, $path); | |
| 866 | 866 | } | 
| 867 | 867 | return $filename; | 
| 868 | 868 | } | 
| @@ -879,8 +879,8 @@ discard block | ||
| 879 | 879 | |
| 880 | 880 | public function deleteFileByName($filename) | 
| 881 | 881 |  		{ | 
| 882 | - $destinationPath = realpath(__DIR__ . '/../../www/files/'); | |
| 883 | - $destination = $destinationPath . '/' . $filename; | |
| 882 | + $destinationPath = realpath(__DIR__.'/../../www/files/'); | |
| 883 | + $destination = $destinationPath.'/'.$filename; | |
| 884 | 884 | |
| 885 | 885 |  			if (file_exists($destination)) { | 
| 886 | 886 | $files = $this->getFiles(); | 
| @@ -1173,11 +1173,11 @@ discard block | ||
| 1173 | 1173 | * @throws \Exception | 
| 1174 | 1174 | */ | 
| 1175 | 1175 |  		private function save() { | 
| 1176 | - $storagePath = __DIR__ . $this->storagePath; | |
| 1176 | + $storagePath = __DIR__.$this->storagePath; | |
| 1177 | 1177 |  			if (realpath($storagePath) !== false) { | 
| 1178 | 1178 | file_put_contents($storagePath, json_encode($this->repository)); | 
| 1179 | 1179 |  			} else { | 
| 1180 | -				throw new \Exception('Couldnt find storagePath ' . $storagePath); | |
| 1180 | +				throw new \Exception('Couldnt find storagePath '.$storagePath); | |
| 1181 | 1181 | } | 
| 1182 | 1182 | } | 
| 1183 | 1183 | |
| @@ -786,7 +786,7 @@ discard block | ||
| 786 | 786 | /** | 
| 787 | 787 | * @param $filename | 
| 788 | 788 | * @return null | 
| 789 | - */ | |
| 789 | + */ | |
| 790 | 790 | public function getImageByName($filename) | 
| 791 | 791 |  		{ | 
| 792 | 792 | $images = $this->getImages(); | 
| @@ -876,7 +876,7 @@ discard block | ||
| 876 | 876 | /** | 
| 877 | 877 | * @param $filename | 
| 878 | 878 | * @return null | 
| 879 | - */ | |
| 879 | + */ | |
| 880 | 880 | public function getFileByName($filename) | 
| 881 | 881 |  		{ | 
| 882 | 882 | $files = $this->getFiles(); | 
| @@ -891,7 +891,7 @@ discard block | ||
| 891 | 891 | /** | 
| 892 | 892 | * @param $filename | 
| 893 | 893 | * @throws \Exception | 
| 894 | - */ | |
| 894 | + */ | |
| 895 | 895 | public function deleteFileByName($filename) | 
| 896 | 896 |  		{ | 
| 897 | 897 | $destinationPath = realpath(__DIR__ . '/../../www/files/'); | 
| @@ -2,7 +2,7 @@ discard block | ||
| 2 | 2 | <a class="btn error js-deletemultiple"><i class="fa fa-times"></i></a> | 
| 3 | 3 | <a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a> | 
| 4 | 4 | </div> | 
| 5 | -<?$fieldPrefix = 'dynamicBricks[' . $brick->slug . '][' . time() . ']'?> | |
| 5 | +<?$fieldPrefix = 'dynamicBricks['.$brick->slug.']['.time().']'?> | |
| 6 | 6 | <? foreach ($brick->fields as $field) : ?> | 
| 7 | 7 | <div class="form-element"> | 
| 8 | 8 | <label for="<?=$field->slug?>"><?=$field->title?></label> | 
| @@ -26,7 +26,7 @@ discard block | ||
| 26 | 26 | <a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a> | 
| 27 | 27 | <div class="form-element"> | 
| 28 | 28 | <? endif ?> | 
| 29 | -					<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> | |
| 29 | +					<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?> | |
| 30 | 30 | <? if ($field->multiple == true && $field->type != 'Rich Text') : ?> | 
| 31 | 31 | |
| 32 | 32 | </div> | 
| @@ -48,7 +48,7 @@ discard block | ||
| 48 | 48 | <li class="grid-container"> | 
| 49 | 49 | <div class="grid-box-10"> | 
| 50 | 50 | <div class="grid-inner form-element"> | 
| 51 | -									<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> | |
| 51 | +									<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?> | |
| 52 | 52 | </div> | 
| 53 | 53 | </div> | 
| 54 | 54 | <div class="grid-box-2"> | 
| @@ -58,7 +58,7 @@ discard block | ||
| 58 | 58 | </div> | 
| 59 | 59 | </div> | 
| 60 | 60 | </li> | 
| 61 | - <?$value='';?> | |
| 61 | + <?$value = ''; ?> | |
| 62 | 62 | <? endforeach ?> | 
| 63 | 63 | <? endif ?> | 
| 64 | 64 | </ul> | 
| @@ -75,10 +75,10 @@ discard block | ||
| 75 | 75 | <a class="btn error js-deletemultiple"><i class="fa fa-times"></i></a> | 
| 76 | 76 | <a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a> | 
| 77 | 77 | <div class="form-element"> | 
| 78 | -							<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> | |
| 78 | +							<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?> | |
| 79 | 79 | </div> | 
| 80 | 80 | </li> | 
| 81 | - <?$value='';?> | |
| 81 | + <?$value = ''; ?> | |
| 82 | 82 | <? endforeach ?> | 
| 83 | 83 | <? endif ?> | 
| 84 | 84 | </div> | 
| @@ -87,5 +87,5 @@ discard block | ||
| 87 | 87 | <a class="btn js-addrtemultiple">+</a> | 
| 88 | 88 | <? endif ?> | 
| 89 | 89 | </div> | 
| 90 | - <?$value='';?> | |
| 90 | + <?$value = ''; ?> | |
| 91 | 91 | <? endforeach ?> | 
| @@ -9,8 +9,10 @@ | ||
| 9 | 9 | <? if (isset($dynamicBrick)) : | 
| 10 | 10 | $fieldSlug = $field->slug; | 
| 11 | 11 | $value = isset($dynamicBrick->fields->$fieldSlug) ? current($dynamicBrick->fields->$fieldSlug) : ''; | 
| 12 | - else : | |
| 12 | +				else { | |
| 13 | + : | |
| 13 | 14 | $value = ''; | 
| 15 | + } | |
| 14 | 16 | endif ?> | 
| 15 | 17 | <? if ($field->multiple == true && $field->type != 'Rich Text') : ?> | 
| 16 | 18 | <ul class="grid-wrapper sortable"> | 
| @@ -3,7 +3,7 @@ discard block | ||
| 3 | 3 | <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.1/js/bootstrap.min.js"></script> | 
| 4 | 4 | <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet"> | 
| 5 | 5 | <script>var smallestImage = '<?=$smallestImage?>';</script> | 
| 6 | -<?$copyable=''?> | |
| 6 | +<?$copyable = ''?> | |
| 7 | 7 | <section class="documents"> | 
| 8 | 8 | <h2><i class="fa fa-file-text-o"></i> Documents</h2> | 
| 9 | 9 | <nav class="actions"> | 
| @@ -38,7 +38,7 @@ discard block | ||
| 38 | 38 | <label for="state">Published</label> | 
| 39 | 39 | <input<?=isset($document) && $document->state == 'published' ? ' checked="checked"' : '' ?> type="checkbox" id="state" name="state" placeholder="State" /> | 
| 40 | 40 | </div> | 
| 41 | - <?$fieldPrefix='fields';?> | |
| 41 | + <?$fieldPrefix = 'fields'; ?> | |
| 42 | 42 | <? foreach ($documentType->fields as $field) : ?> | 
| 43 | 43 | <div class="form-element"> | 
| 44 | 44 | <label for="<?=$field->slug?>"><?=$field->title?></label> | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | <a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a> | 
| 63 | 63 | <div class="form-element"> | 
| 64 | 64 | <? endif ?> | 
| 65 | -						<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> | |
| 65 | +						<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?> | |
| 66 | 66 | <? if ($field->multiple == true && $field->type != 'Rich Text') : ?> | 
| 67 | 67 | |
| 68 | 68 | </div> | 
| @@ -84,7 +84,7 @@ discard block | ||
| 84 | 84 | <li class="grid-container"> | 
| 85 | 85 | <div class="grid-box-10"> | 
| 86 | 86 | <div class="grid-inner form-element"> | 
| 87 | -										<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> | |
| 87 | +										<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?> | |
| 88 | 88 | </div> | 
| 89 | 89 | </div> | 
| 90 | 90 | <div class="grid-box-2"> | 
| @@ -94,7 +94,7 @@ discard block | ||
| 94 | 94 | </div> | 
| 95 | 95 | </div> | 
| 96 | 96 | </li> | 
| 97 | - <?$value='';?> | |
| 97 | + <?$value = ''; ?> | |
| 98 | 98 | <? endforeach ?> | 
| 99 | 99 | <? endif ?> | 
| 100 | 100 | </ul> | 
| @@ -111,10 +111,10 @@ discard block | ||
| 111 | 111 | <a class="btn error js-deletemultiple"><i class="fa fa-times"></i></a> | 
| 112 | 112 | <a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a> | 
| 113 | 113 | <div class="form-element"> | 
| 114 | -								<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> | |
| 114 | +								<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?> | |
| 115 | 115 | </div> | 
| 116 | 116 | </li> | 
| 117 | - <?$value='';?> | |
| 117 | + <?$value = ''; ?> | |
| 118 | 118 | <? endforeach ?> | 
| 119 | 119 | <? endif ?> | 
| 120 | 120 | </div> | 
| @@ -123,13 +123,13 @@ discard block | ||
| 123 | 123 | <a class="btn js-addrtemultiple">+</a> | 
| 124 | 124 | <? endif ?> | 
| 125 | 125 | </div> | 
| 126 | - <?$value='';?> | |
| 126 | + <?$value = ''; ?> | |
| 127 | 127 | <? endforeach ?> | 
| 128 | 128 | <hr /> | 
| 129 | 129 | <? foreach ($documentType->bricks as $brick) : ?> | 
| 130 | 130 | <div class="brick"> | 
| 131 | 131 | <label><?=$brick->title?></label> | 
| 132 | - <?$fieldPrefix='bricks[' . $brick->slug . '][fields]';?> | |
| 132 | + <?$fieldPrefix = 'bricks['.$brick->slug.'][fields]'; ?> | |
| 133 | 133 | <input type="hidden" name="bricks[<?=$brick->slug?>][type]" value="<?=$brick->brickSlug?>" /> | 
| 134 | 134 | <? foreach ($brick->structure->fields as $field) : ?> | 
| 135 | 135 | <div class="form-element"> | 
| @@ -155,7 +155,7 @@ discard block | ||
| 155 | 155 | <a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a> | 
| 156 | 156 | <div class="form-element"> | 
| 157 | 157 | <? endif ?> | 
| 158 | -						<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> | |
| 158 | +						<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?> | |
| 159 | 159 | <? if ($field->multiple == true && $field->type != 'Rich Text') : ?> | 
| 160 | 160 | |
| 161 | 161 | </div> | 
| @@ -178,7 +178,7 @@ discard block | ||
| 178 | 178 | <li class="grid-container"> | 
| 179 | 179 | <div class="grid-box-10"> | 
| 180 | 180 | <div class="grid-inner form-element"> | 
| 181 | -										<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> | |
| 181 | +										<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?> | |
| 182 | 182 | </div> | 
| 183 | 183 | </div> | 
| 184 | 184 | <div class="grid-box-2"> | 
| @@ -188,7 +188,7 @@ discard block | ||
| 188 | 188 | </div> | 
| 189 | 189 | </div> | 
| 190 | 190 | </li> | 
| 191 | - <?$value='';?> | |
| 191 | + <?$value = ''; ?> | |
| 192 | 192 | <? endforeach ?> | 
| 193 | 193 | <? endif ?> | 
| 194 | 194 | </ul> | 
| @@ -206,10 +206,10 @@ discard block | ||
| 206 | 206 | <a class="btn error js-deletemultiple"><i class="fa fa-times"></i></a> | 
| 207 | 207 | <a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a> | 
| 208 | 208 | <div class="form-element"> | 
| 209 | -								<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> | |
| 209 | +								<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?> | |
| 210 | 210 | </div> | 
| 211 | 211 | </li> | 
| 212 | - <?$value='';?> | |
| 212 | + <?$value = ''; ?> | |
| 213 | 213 | <? endforeach ?> | 
| 214 | 214 | <? endif ?> | 
| 215 | 215 | </div> | 
| @@ -218,11 +218,11 @@ discard block | ||
| 218 | 218 | <a class="btn js-addrtemultiple">+</a> | 
| 219 | 219 | <? endif ?> | 
| 220 | 220 | </div> | 
| 221 | - <?$value='';?> | |
| 221 | + <?$value = ''; ?> | |
| 222 | 222 | <? endforeach ?> | 
| 223 | 223 | </div> | 
| 224 | 224 | <hr /> | 
| 225 | - <? endforeach;?> | |
| 225 | + <? endforeach; ?> | |
| 226 | 226 | <? if (count($documentType->dynamicBricks) > 0) : ?> | 
| 227 | 227 | <div class="dynamicBrickWrapper"> | 
| 228 | 228 | <label>Dynamic Bricks</label> | 
| @@ -241,7 +241,7 @@ discard block | ||
| 241 | 241 | endforeach ?> | 
| 242 | 242 | <li class="brick form-element"> | 
| 243 | 243 | <label><?=$brick->title?></label> | 
| 244 | - <?include(__DIR__ . '/brick.php')?> | |
| 244 | + <?include(__DIR__.'/brick.php')?> | |
| 245 | 245 | </li> | 
| 246 | 246 | <? endforeach ?> | 
| 247 | 247 | <? endif ?> | 
| @@ -45,8 +45,10 @@ discard block | ||
| 45 | 45 | <? if (isset($document)) : | 
| 46 | 46 | $fieldSlug = $field->slug; | 
| 47 | 47 | $value = isset($document->fields->$fieldSlug) ? current($document->fields->$fieldSlug) : ''; | 
| 48 | - else : | |
| 48 | +					else { | |
| 49 | + : | |
| 49 | 50 | $value = ''; | 
| 51 | + } | |
| 50 | 52 | endif ?> | 
| 51 | 53 | <? if ($field->multiple == true && $field->type != 'Rich Text') : ?> | 
| 52 | 54 | <ul class="grid-wrapper sortable"> | 
| @@ -138,8 +140,10 @@ discard block | ||
| 138 | 140 | $brickSlug = $brick->slug; | 
| 139 | 141 | $fieldSlug = $field->slug; | 
| 140 | 142 | $value = isset($document->bricks->$brickSlug->fields->$fieldSlug) ? current($document->bricks->$brickSlug->fields->$fieldSlug) : ''; | 
| 141 | - else : | |
| 143 | +					else { | |
| 144 | + : | |
| 142 | 145 | $value = ''; | 
| 146 | + } | |
| 143 | 147 | endif ?> | 
| 144 | 148 | <? if ($field->multiple == true && $field->type != 'Rich Text') : ?> | 
| 145 | 149 | <ul class="grid-wrapper sortable"> | 
| @@ -6,12 +6,12 @@ | ||
| 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]] | 
| @@ -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"> | 
| @@ -10,22 +10,22 @@ | ||
| 10 | 10 | <div class="show-image"> | 
| 11 | 11 | <label>File</label> | 
| 12 | 12 | <div class="value"> | 
| 13 | - <?=isset($image)? $image->file : '' ?> | |
| 13 | + <?=isset($image) ? $image->file : '' ?> | |
| 14 | 14 | </div> | 
| 15 | 15 | <label>Type</label> | 
| 16 | 16 | <div class="value"> | 
| 17 | - <?=isset($image)? $image->type : '' ?> | |
| 17 | + <?=isset($image) ? $image->type : '' ?> | |
| 18 | 18 | </div> | 
| 19 | 19 | <label>Size</label> | 
| 20 | 20 | <div class="value"> | 
| 21 | - <?=isset($image)? humanFileSize($image->size) : '' ?> | |
| 21 | + <?=isset($image) ? humanFileSize($image->size) : '' ?> | |
| 22 | 22 | </div> | 
| 23 | 23 | <label>Set</label> | 
| 24 | 24 | <? if (isset($image)) : ?> | 
| 25 | 25 | <? foreach ($image->set as $key => $set) : ?> | 
| 26 | 26 | <div class="sets"> | 
| 27 | 27 | <label><?=$key?></label> | 
| 28 | - <img src="<?=\library\cc\Request::$subfolders . 'images/' . $set?>" /> | |
| 28 | + <img src="<?=\library\cc\Request::$subfolders.'images/'.$set?>" /> | |
| 29 | 29 | </div> | 
| 30 | 30 | <? endforeach ?> | 
| 31 | 31 | <? endif ?> | 
| @@ -1,4 +1,4 @@ discard block | ||
| 1 | -<script>window.onload=function(){History.init();History.replaceState(null, 'Cloud Control CMS', '/<?=$request::$subfolders . $cmsPrefix?>/documents?path=/');};</script> | |
| 1 | +<script>window.onload=function(){History.init();History.replaceState(null, 'Cloud Control CMS', '/<?=$request::$subfolders.$cmsPrefix?>/documents?path=/');};</script> | |
| 2 | 2 | <section class="documents"> | 
| 3 | 3 | <h2><i class="fa fa-file-text-o"></i> Documents</h2> | 
| 4 | 4 | <nav class="actions"> | 
| @@ -24,9 +24,9 @@ discard block | ||
| 24 | 24 | <? foreach ($documents as $document) : ?> | 
| 25 | 25 | <li class="grid-container"> | 
| 26 | 26 | <? if ($document->type == 'document') : ?> | 
| 27 | - <?renderDocument($document, $cmsPrefix);?> | |
| 27 | + <?renderDocument($document, $cmsPrefix); ?> | |
| 28 | 28 | <? elseif ($document->type == 'folder') : ?> | 
| 29 | - <?renderFolder($document, $cmsPrefix, '', true);?> | |
| 29 | + <?renderFolder($document, $cmsPrefix, '', true); ?> | |
| 30 | 30 | <? endif ?> | 
| 31 | 31 | </li> | 
| 32 | 32 | |
| @@ -37,7 +37,7 @@ discard block | ||
| 37 | 37 |  <? function renderDocument($document, $cmsPrefix, $slugPrefix = '') {?> | 
| 38 | 38 | <div class="grid-box-10"> | 
| 39 | 39 | <h3> | 
| 40 | - <a class="btn documentTitle" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-document?slug=<?=$slugPrefix . $document->slug?>" title="Edit"> | |
| 40 | + <a class="btn documentTitle" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-document?slug=<?=$slugPrefix.$document->slug?>" title="Edit"> | |
| 41 | 41 | <i class="fa fa-file-text-o"></i> <?=$document->title?> | 
| 42 | 42 | </a> | 
| 43 | 43 | <small class="small state <?=strtolower($document->state)?>"><?=ucfirst($document->state)?></small> | 
| @@ -53,29 +53,29 @@ discard block | ||
| 53 | 53 | </h3> | 
| 54 | 54 | </div> | 
| 55 | 55 | <div class="documentActions grid-box-2"> | 
| 56 | - <a class="btn" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-document?slug=<?=$slugPrefix . $document->slug?>" title="Edit"><i class="fa fa-pencil"></i></a> | |
| 57 | -	<a onclick="return confirm('Are you sure you want to delete this item?');" class="btn error" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/delete-document?slug=<?=$slugPrefix . $document->slug?>" title="Delete"><i class="fa fa-times"></i></a> | |
| 56 | + <a class="btn" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-document?slug=<?=$slugPrefix.$document->slug?>" title="Edit"><i class="fa fa-pencil"></i></a> | |
| 57 | +	<a onclick="return confirm('Are you sure you want to delete this item?');" class="btn error" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/delete-document?slug=<?=$slugPrefix.$document->slug?>" title="Delete"><i class="fa fa-times"></i></a> | |
| 58 | 58 | </div> | 
| 59 | 59 | <?}?> | 
| 60 | -<? function renderFolder($document, $cmsPrefix, $slugPrefix ='', $root = false) {?> | |
| 60 | +<? function renderFolder($document, $cmsPrefix, $slugPrefix = '', $root = false) {?> | |
| 61 | 61 | <div class="grid-box-8"> | 
| 62 | 62 | <h3> | 
| 63 | - <a class="btn documentTitle openFolder" data-slug="<?=$slugPrefix . $document->slug?>" title="Open"> | |
| 63 | + <a class="btn documentTitle openFolder" data-slug="<?=$slugPrefix.$document->slug?>" title="Open"> | |
| 64 | 64 | <i class="fa fa-folder-o "></i> <?=$document->title?> | 
| 65 | 65 | </a> | 
| 66 | 66 | </h3> | 
| 67 | 67 | </div> | 
| 68 | 68 | <div class="documentActions grid-box-4"> | 
| 69 | - <a class="btn" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-folder?slug=<?=$slugPrefix . $document->slug?>" title="Edit"><i class="fa fa-pencil"></i></a> | |
| 70 | -	<a onclick="return confirm('Are you sure you want to delete this item?');" class="btn error" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/delete-folder?slug=<?=$slugPrefix . $document->slug?>" title="Delete"><i class="fa fa-times"></i></a> | |
| 69 | + <a class="btn" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-folder?slug=<?=$slugPrefix.$document->slug?>" title="Edit"><i class="fa fa-pencil"></i></a> | |
| 70 | +	<a onclick="return confirm('Are you sure you want to delete this item?');" class="btn error" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/delete-folder?slug=<?=$slugPrefix.$document->slug?>" title="Delete"><i class="fa fa-times"></i></a> | |
| 71 | 71 | </div> | 
| 72 | 72 | <ul class="documents grid-wrapper nested<?=$root ? ' root' : '' ?>"> | 
| 73 | 73 | <? foreach ($document->content as $subDocument) : ?> | 
| 74 | 74 | <li class="grid-container"> | 
| 75 | 75 | <? if ($subDocument->type == 'document') : ?> | 
| 76 | - <?renderDocument($subDocument, $cmsPrefix, $slugPrefix . $document->slug . '/');?> | |
| 76 | + <?renderDocument($subDocument, $cmsPrefix, $slugPrefix.$document->slug.'/'); ?> | |
| 77 | 77 | <? elseif ($subDocument->type == 'folder') : ?> | 
| 78 | - <?renderFolder($subDocument, $cmsPrefix, $slugPrefix . $document->slug . '/');?> | |
| 78 | + <?renderFolder($subDocument, $cmsPrefix, $slugPrefix.$document->slug.'/'); ?> | |
| 79 | 79 | <? endif ?> | 
| 80 | 80 | </li> | 
| 81 | 81 | <? endforeach ?> | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | </li> | 
| 63 | 63 | <? $nrOfMenuItems += 1 ?> | 
| 64 | 64 | <? endif ?> | 
| 65 | - <li class="grid-box-<?=6 + (5-$nrOfMenuItems)?> log-off-box"> | |
| 65 | + <li class="grid-box-<?=6 + (5 - $nrOfMenuItems)?> log-off-box"> | |
| 66 | 66 | <a class="btn log-off grid-inner" href="<?=$request::$subfolders?><?=$cmsPrefix?>/log-off"> | 
| 67 | 67 | <i class="fa fa-power-off"></i> | 
| 68 | 68 | <span>Log off</span> | 
| @@ -86,7 +86,7 @@ discard block | ||
| 86 | 86 | </main> | 
| 87 | 87 | <script> | 
| 88 | 88 | var subfolders = '<?=$request::$subfolders?>', | 
| 89 | - cmsSubfolders = '<?=$request::$subfolders . $cmsPrefix?>'; | |
| 89 | + cmsSubfolders = '<?=$request::$subfolders.$cmsPrefix?>'; | |
| 90 | 90 | </script> | 
| 91 | 91 | <script src="<?=$request::$subfolders?>js/cms.js"></script> | 
| 92 | 92 | </body> |