partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 0b348f89dba5edd40fedb45b93bb59254591f242
parent 5063c9a1795d62976645822c77efe523fe2518d8
Author: Felicitus <felicitus@felicitus.org>
Date:   Fri, 30 Jan 2015 18:24:34 +0100

Added initial new frontend from sf2 standard edition

Diffstat:
Aweb/app.php | 26++++++++++++++++++++++++++
Aweb/app_dev.php | 30++++++++++++++++++++++++++++++
Aweb/apple-touch-icon.png | 0
Aweb/favicon.ico | 0
Aweb/robots.txt | 4++++
5 files changed, 60 insertions(+), 0 deletions(-)

diff --git a/web/app.php b/web/app.php @@ -0,0 +1,26 @@ +<?php + +use Symfony\Component\ClassLoader\ApcClassLoader; +use Symfony\Component\HttpFoundation\Request; + +$loader = require_once __DIR__.'/../app/bootstrap.php.cache'; + +// Use APC for autoloading to improve performance. +// Change 'sf2' to a unique prefix in order to prevent cache key conflicts +// with other applications also using APC. +/* +$apcLoader = new ApcClassLoader('sf2', $loader); +$loader->unregister(); +$apcLoader->register(true); +*/ + +require_once __DIR__.'/../app/AppKernel.php'; +//require_once __DIR__.'/../app/AppCache.php'; + +$kernel = new AppKernel('prod', false); +$kernel->loadClassCache(); +//$kernel = new AppCache($kernel); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); diff --git a/web/app_dev.php b/web/app_dev.php @@ -0,0 +1,30 @@ +<?php + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Debug\Debug; + +// If you don't want to setup permissions the proper way, just uncomment the following PHP line +// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information +//umask(0000); + +// This check prevents access to debug front controllers that are deployed by accident to production servers. +// Feel free to remove this, extend it, or make something more sophisticated. +if (isset($_SERVER['HTTP_CLIENT_IP']) + || isset($_SERVER['HTTP_X_FORWARDED_FOR']) + || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1')) +) { + header('HTTP/1.0 403 Forbidden'); + exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); +} + +$loader = require_once __DIR__.'/../app/bootstrap.php.cache'; +Debug::enable(); + +require_once __DIR__.'/../app/AppKernel.php'; + +$kernel = new AppKernel('dev', true); +$kernel->loadClassCache(); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); diff --git a/web/apple-touch-icon.png b/web/apple-touch-icon.png Binary files differ. diff --git a/web/favicon.ico b/web/favicon.ico Binary files differ. diff --git a/web/robots.txt b/web/robots.txt @@ -0,0 +1,4 @@ +# www.robotstxt.org/ +# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 + +User-agent: *