@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * option -p [portail] |
52 | 52 | */ |
53 | - if (isset($aOptions['p'])) { $sPortal = $aOptions['p']; } |
|
54 | - else { $sPortal = 'Batch'; } |
|
53 | + if (isset($aOptions['p'])) { $sPortal = $aOptions['p']; } else { $sPortal = 'Batch'; } |
|
55 | 54 | |
56 | 55 | if (!preg_match('/^[a-zA-Z0-9]+$/', $sPortal)) { |
57 | 56 | |
@@ -67,16 +66,14 @@ discard block |
||
67 | 66 | |
68 | 67 | echo 'The batch can`t create public folders for '.$sPortal.'! Please check the rights.'; |
69 | 68 | throw new \Exception('The batch can`t create public folders for '.$sPortal.'! Please check the rights.'); |
70 | - } |
|
71 | - else { |
|
69 | + } else { |
|
72 | 70 | |
73 | 71 | if (!file_exists($sPrivatePath.'Controller')) { |
74 | 72 | |
75 | 73 | mkdir($sPublicPath . 'css', 0777, true); |
76 | 74 | mkdir($sPublicPath . 'js', 0777, true); |
77 | 75 | mkdir($sPublicPath . 'img', 0777, true); |
78 | - } |
|
79 | - else { |
|
76 | + } else { |
|
80 | 77 | |
81 | 78 | echo 'The Project (public part) ' . $sPrivatePath . " exists\n"; |
82 | 79 | } |
@@ -86,8 +83,7 @@ discard block |
||
86 | 83 | |
87 | 84 | echo 'The batch can`t create private folders for '.$sPortal.'! Please check the rights.'; |
88 | 85 | throw new \Exception('The batch can`t create private folders for '.$sPortal.'! Please check the rights.'); |
89 | - } |
|
90 | - else { |
|
86 | + } else { |
|
91 | 87 | |
92 | 88 | if (!file_exists($sPrivatePath.'Controller')) { |
93 | 89 | |
@@ -130,8 +126,7 @@ discard block |
||
130 | 126 | "; |
131 | 127 | |
132 | 128 | file_put_contents($sPrivatePath.'Controller'.DIRECTORY_SEPARATOR.$sPortal.'.php', $content); |
133 | - } |
|
134 | - else { |
|
129 | + } else { |
|
135 | 130 | |
136 | 131 | echo 'The Project (private part) ' . $sPrivatePath . " exists\n"; |
137 | 132 | } |
@@ -195,8 +195,7 @@ discard block |
||
195 | 195 | if ($mReturn === 403) { |
196 | 196 | |
197 | 197 | $this->_getPage403(); |
198 | - } |
|
199 | - else if ($mReturn === true) { |
|
198 | + } else if ($mReturn === true) { |
|
200 | 199 | |
201 | 200 | if (isset($oRoute->cache)) { $this->_checkCache($oRoute->cache); } |
202 | 201 | |
@@ -211,8 +210,7 @@ discard block |
||
211 | 210 | } |
212 | 211 | } else if (Request::isCliRequest()) { |
213 | 212 | |
214 | - if (isset($_SERVER['argv'])) { $aArguments = $_SERVER['argv']; } |
|
215 | - else { $aArguments = []; } |
|
213 | + if (isset($_SERVER['argv'])) { $aArguments = $_SERVER['argv']; } else { $aArguments = []; } |
|
216 | 214 | |
217 | 215 | define('PORTAL', 'Batch'); |
218 | 216 | set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public'); |
@@ -314,8 +312,7 @@ discard block |
||
314 | 312 | } |
315 | 313 | } |
316 | 314 | } |
317 | - } |
|
318 | - else if (defined('STDIN')) { |
|
315 | + } else if (defined('STDIN')) { |
|
319 | 316 | |
320 | 317 | $oBatch = Config::get('Route')->batch->script->{$sRoute}; |
321 | 318 | echo $this->_loadController($oBatch->controller, $oBatch->action, $aParams); |
@@ -377,8 +374,7 @@ discard block |
||
377 | 374 | }, |
378 | 375 | $sRoute |
379 | 376 | ); |
380 | - } |
|
381 | - else { |
|
377 | + } else { |
|
382 | 378 | |
383 | 379 | $sFinalRoute = '.*'; |
384 | 380 | } |
@@ -428,8 +424,7 @@ discard block |
||
428 | 424 | |
429 | 425 | $oMobileDetect = new \Mobile_Detect; |
430 | 426 | |
431 | - if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } |
|
432 | - else { $sCacheExt = ''; } |
|
427 | + if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } else { $sCacheExt = ''; } |
|
433 | 428 | |
434 | 429 | $mCacheReturn = Cache::get($RequestUri.$sCacheExt, $oRoute->cache->max_age); |
435 | 430 | |
@@ -459,8 +454,7 @@ discard block |
||
459 | 454 | |
460 | 455 | header('Content-type: image/jpeg'); |
461 | 456 | } |
462 | - } |
|
463 | - else { |
|
457 | + } else { |
|
464 | 458 | |
465 | 459 | header('Content-type: text/html; charset='.$sCharset.''); |
466 | 460 | } |
@@ -503,8 +497,7 @@ discard block |
||
503 | 497 | $mReturn = $this->_loadController($oController, $sActionName, $aEntries); |
504 | 498 | |
505 | 499 | } |
506 | - } |
|
507 | - else { |
|
500 | + } else { |
|
508 | 501 | |
509 | 502 | $mReturn = $this->_loadController($oController, $sActionName, $aEntries); |
510 | 503 | } |
@@ -516,8 +509,7 @@ discard block |
||
516 | 509 | $mReturn = json_encode($mReturn, JSON_PRETTY_PRINT); |
517 | 510 | } |
518 | 511 | } |
519 | - } |
|
520 | - else if (isset($oRoute->template) && isset($oRoute->layout) && $oRoute->layout === true) { |
|
512 | + } else if (isset($oRoute->template) && isset($oRoute->layout) && $oRoute->layout === true) { |
|
521 | 513 | |
522 | 514 | define('PORTAL', preg_replace('/^\\\\Venus\\\\src\\\\([a-zA-Z0-9_]+)\\\\.+$/', '$1', $oRoute->template)); |
523 | 515 | set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public'); |
@@ -534,8 +526,7 @@ discard block |
||
534 | 526 | |
535 | 527 | $mReturn = $oLayout->assign('model', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.PORTAL.DIRECTORY_SEPARATOR.'View'.DIRECTORY_SEPARATOR.$oRoute->template.'.tpl') |
536 | 528 | ->fetch(); |
537 | - } |
|
538 | - else if (isset($oRoute->template)) { |
|
529 | + } else if (isset($oRoute->template)) { |
|
539 | 530 | |
540 | 531 | define('PORTAL', preg_replace('/^\\\\Venus\\\\src\\\\([a-zA-Z0-9_]+)\\\\.+$/', '$1', $oRoute->template)); |
541 | 532 | set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public'); |
@@ -559,8 +550,7 @@ discard block |
||
559 | 550 | |
560 | 551 | $oMobileDetect = new \Mobile_Detect; |
561 | 552 | |
562 | - if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } |
|
563 | - else { $sCacheExt = ''; } |
|
553 | + if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } else { $sCacheExt = ''; } |
|
564 | 554 | |
565 | 555 | if (defined('COMPRESS_HTML') && COMPRESS_HTML) { |
566 | 556 | |
@@ -614,8 +604,7 @@ discard block |
||
614 | 604 | |
615 | 605 | $oMobileDetect = new \Mobile_Detect; |
616 | 606 | |
617 | - if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } |
|
618 | - else { $sCacheExt = ''; } |
|
607 | + if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } else { $sCacheExt = ''; } |
|
619 | 608 | |
620 | 609 | $mCacheReturn = Cache::get($sActionName.$sCacheExt, $aPhpDoc['Cache']['maxage']); |
621 | 610 | |
@@ -656,8 +645,7 @@ discard block |
||
656 | 645 | |
657 | 646 | $oMobileDetect = new \Mobile_Detect; |
658 | 647 | |
659 | - if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } |
|
660 | - else { $sCacheExt = ''; } |
|
648 | + if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } else { $sCacheExt = ''; } |
|
661 | 649 | |
662 | 650 | if (defined('COMPRESS_HTML') && COMPRESS_HTML) { |
663 | 651 |