@@ -9,19 +9,19 @@ |
||
| 9 | 9 | $config = ConfigProvider::getInstance(); |
| 10 | 10 | |
| 11 | 11 | $dirs = array( |
| 12 | - $config->get('app.file.store.dir').'logs', |
|
| 13 | - $config->get('app.file.store.dir').'cache', |
|
| 14 | - $config->get('app.file.store.dir').'cache/html', |
|
| 15 | - $config->get('app.file.store.dir').'cache/images', |
|
| 16 | - $config->get('app.file.store.dir').'cache/pdf', |
|
| 17 | - $config->get('app.file.store.dir').'cache/xls', |
|
| 18 | - $config->get('app.file.store.dir').'attachments', |
|
| 19 | - ); |
|
| 12 | + $config->get('app.file.store.dir').'logs', |
|
| 13 | + $config->get('app.file.store.dir').'cache', |
|
| 14 | + $config->get('app.file.store.dir').'cache/html', |
|
| 15 | + $config->get('app.file.store.dir').'cache/images', |
|
| 16 | + $config->get('app.file.store.dir').'cache/pdf', |
|
| 17 | + $config->get('app.file.store.dir').'cache/xls', |
|
| 18 | + $config->get('app.file.store.dir').'attachments', |
|
| 19 | + ); |
|
| 20 | 20 | |
| 21 | 21 | foreach ($dirs as $dir) { |
| 22 | - if (!file_exists($dir)) { |
|
| 23 | - mkdir($dir, 0774); |
|
| 24 | - } |
|
| 22 | + if (!file_exists($dir)) { |
|
| 23 | + mkdir($dir, 0774); |
|
| 24 | + } |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | ?> |
| 28 | 28 | \ No newline at end of file |
@@ -615,7 +615,7 @@ |
||
| 615 | 615 | } |
| 616 | 616 | } |
| 617 | 617 | |
| 618 | - // route URIs with params missing (will attempt to layer on defaults later on in Request class) |
|
| 618 | + // route URIs with params missing (will attempt to layer on defaults later on in Request class) |
|
| 619 | 619 | foreach ($this->routes as $route => $callback) { |
| 620 | 620 | $pattern = '#^'.$route.'$#s'; |
| 621 | 621 | $pattern = preg_replace('#\/\{\S+\}#', '\/?', $pattern); |
@@ -238,14 +238,14 @@ discard block |
||
| 238 | 238 | self::$logger->debug('<<__construct()'); |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | - /** |
|
| 242 | - * Facade method which will invoke our custom markdown class rather than the standard one. |
|
| 243 | - * |
|
| 244 | - * @since 1.0 |
|
| 245 | - */ |
|
| 246 | - private function markdown($text, $attachURL = '') |
|
| 247 | - { |
|
| 248 | - $config = ConfigProvider::getInstance(); |
|
| 241 | + /** |
|
| 242 | + * Facade method which will invoke our custom markdown class rather than the standard one. |
|
| 243 | + * |
|
| 244 | + * @since 1.0 |
|
| 245 | + */ |
|
| 246 | + private function markdown($text, $attachURL = '') |
|
| 247 | + { |
|
| 248 | + $config = ConfigProvider::getInstance(); |
|
| 249 | 249 | |
| 250 | 250 | /* |
| 251 | 251 | * Initialize the parser and return the result of its transform method. |
@@ -253,9 +253,9 @@ discard block |
||
| 253 | 253 | */ |
| 254 | 254 | static $parser; |
| 255 | 255 | |
| 256 | - if (!isset($parser)) { |
|
| 257 | - $parser = new \Alpha\Util\Extension\Markdown(); |
|
| 258 | - } |
|
| 256 | + if (!isset($parser)) { |
|
| 257 | + $parser = new \Alpha\Util\Extension\Markdown(); |
|
| 258 | + } |
|
| 259 | 259 | |
| 260 | 260 | /* |
| 261 | 261 | * Replace all instances of $sysURL in the text with the app.url setting from config |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | |
| 266 | 266 | // transform text using parser. |
| 267 | 267 | return $parser->transform($text); |
| 268 | - } |
|
| 268 | + } |
|
| 269 | 269 | |
| 270 | 270 | /** |
| 271 | 271 | * Fetter for the content. |
@@ -14,36 +14,36 @@ |
||
| 14 | 14 | use Alpha\View\View; |
| 15 | 15 | |
| 16 | 16 | try {
|
| 17 | - $config = ConfigProvider::getInstance(); |
|
| 17 | + $config = ConfigProvider::getInstance(); |
|
| 18 | 18 | |
| 19 | - set_exception_handler('Alpha\Util\ErrorHandlers::catchException');
|
|
| 20 | - set_error_handler('Alpha\Util\ErrorHandlers::catchError', $config->get('php.error.log.level'));
|
|
| 19 | + set_exception_handler('Alpha\Util\ErrorHandlers::catchException');
|
|
| 20 | + set_error_handler('Alpha\Util\ErrorHandlers::catchError', $config->get('php.error.log.level'));
|
|
| 21 | 21 | |
| 22 | - $front = new FrontController(); |
|
| 22 | + $front = new FrontController(); |
|
| 23 | 23 | |
| 24 | - if ($config->get('security.client.blacklist.filter.enabled')) {
|
|
| 25 | - $front->registerFilter(new ClientBlacklistFilter()); |
|
| 26 | - } |
|
| 24 | + if ($config->get('security.client.blacklist.filter.enabled')) {
|
|
| 25 | + $front->registerFilter(new ClientBlacklistFilter()); |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | - if ($config->get('security.ip.blacklist.filter.enabled')) {
|
|
| 29 | - $front->registerFilter(new IPBlacklistFilter()); |
|
| 30 | - } |
|
| 28 | + if ($config->get('security.ip.blacklist.filter.enabled')) {
|
|
| 29 | + $front->registerFilter(new IPBlacklistFilter()); |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | - if ($config->get('security.client.temp.blacklist.filter.enabled')) {
|
|
| 33 | - $front->registerFilter(new ClientTempBlacklistFilter()); |
|
| 34 | - } |
|
| 32 | + if ($config->get('security.client.temp.blacklist.filter.enabled')) {
|
|
| 33 | + $front->registerFilter(new ClientTempBlacklistFilter()); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | - $request = new Request(); |
|
| 37 | - $response = $front->process($request); |
|
| 36 | + $request = new Request(); |
|
| 37 | + $response = $front->process($request); |
|
| 38 | 38 | |
| 39 | 39 | } catch (ResourceNotFoundException $rnfe) {
|
| 40 | - $response = new Response(404, View::renderErrorPage(404, $rnfe->getMessage(), array('Content-Type' => 'text/html')));
|
|
| 40 | + $response = new Response(404, View::renderErrorPage(404, $rnfe->getMessage(), array('Content-Type' => 'text/html')));
|
|
| 41 | 41 | } catch (ResourceNotAllowedException $rnae) {
|
| 42 | - $response = new Response(403, View::renderErrorPage(403, $rnae->getMessage(), array('Content-Type' => 'text/html')));
|
|
| 42 | + $response = new Response(403, View::renderErrorPage(403, $rnae->getMessage(), array('Content-Type' => 'text/html')));
|
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | if ($config->get('security.http.header.x.frame.options') != '')
|
| 46 | - $response->getHeader('X-Frame-Options', $config->get('security.http.header.x.frame.options'));
|
|
| 46 | + $response->getHeader('X-Frame-Options', $config->get('security.http.header.x.frame.options'));
|
|
| 47 | 47 | |
| 48 | 48 | echo $response->send(); |
| 49 | 49 | |