Updating config files.

1.10.x
Julio Montoya 12 years ago
parent 8183b55201
commit 92996a8c5d
  1. 16
      app/AppKernel.php
  2. 240
      app/bootstrap.php.cache
  3. 16
      app/config/config.yml
  4. 4
      app/config/parameters.yml.dist
  5. 4
      app/config/security.yml
  6. 12
      app/config/sonata/sonata_admin.yml
  7. 9
      app/config/sonata/sonata_media.yml
  8. 15
      app/config/sonata/sonata_page.yml
  9. 4
      src/ChamiloLMS/CoreBundle/EventListener/LegacyListener.php

@ -126,6 +126,7 @@ class AppKernel extends Kernel
// Chamilo
new ChamiloLMS\CoreBundle\ChamiloLMSCoreBundle(),
new ChamiloLMS\CourseBundle\ChamiloLMSCourseBundle(),
new ChamiloLMS\InstallerBundle\ChamiloLMSInstallerBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle()
);
@ -158,18 +159,21 @@ class AppKernel extends Kernel
// Custom paths
/**
* Returns the real root path
* @return string
*/
public function getRealRootDir()
{
return realpath($this->rootDir.'/../').'/';
}
/**
* Returns the data path
* @return string
*/
public function getDataDir()
{
return $this->getRealRootDir().'/data/';
}
public function getConfigDir()
{
return $this->getRealRootDir().'/config/';
return $this->getRealRootDir().'data/';
}
}

@ -95,7 +95,7 @@ public function getInt($key, $default = 0, $deep = false)
{
return (int) $this->get($key, $default, $deep);
}
public function filter($key, $default = null, $deep = false, $filter=FILTER_DEFAULT, $options=array())
public function filter($key, $default = null, $deep = false, $filter = FILTER_DEFAULT, $options = array())
{
$value = $this->get($key, $default, $deep);
if (!is_array($options) && $options) {
@ -120,12 +120,10 @@ namespace Symfony\Component\HttpFoundation
{
class HeaderBag implements \IteratorAggregate, \Countable
{
protected $headers;
protected $cacheControl;
protected $headers = array();
protected $cacheControl = array();
public function __construct(array $headers = array())
{
$this->cacheControl = array();
$this->headers = array();
foreach ($headers as $key => $values) {
$this->set($key, $values);
}
@ -418,6 +416,7 @@ public $headers;
protected $content;
protected $languages;
protected $charsets;
protected $encodings;
protected $acceptableContentTypes;
protected $pathInfo;
protected $requestUri;
@ -429,6 +428,7 @@ protected $session;
protected $locale;
protected $defaultLocale ='en';
protected static $formats;
protected static $requestFactory;
public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
{
$this->initialize($query, $request, $attributes, $cookies, $files, $server, $content);
@ -445,6 +445,7 @@ $this->headers = new HeaderBag($this->server->getHeaders());
$this->content = $content;
$this->languages = null;
$this->charsets = null;
$this->encodings = null;
$this->acceptableContentTypes = null;
$this->pathInfo = null;
$this->requestUri = null;
@ -455,7 +456,7 @@ $this->format = null;
}
public static function createFromGlobals()
{
$request = new static($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);
$request = self::createRequestFromFactory($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);
if (0 === strpos($request->headers->get('CONTENT_TYPE'),'application/x-www-form-urlencoded')
&& in_array(strtoupper($request->server->get('REQUEST_METHOD','GET')), array('PUT','DELETE','PATCH'))
) {
@ -528,7 +529,11 @@ $queryString = http_build_query($query,'','&');
}
$server['REQUEST_URI'] = $components['path'].(''!== $queryString ?'?'.$queryString :'');
$server['QUERY_STRING'] = $queryString;
return new static($query, $request, array(), $cookies, $files, $server, $content);
return self::createRequestFromFactory($query, $request, array(), $cookies, $files, $server, $content);
}
public static function setFactory($callable)
{
self::$requestFactory = $callable;
}
public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null)
{
@ -554,6 +559,7 @@ $dup->headers = new HeaderBag($dup->server->getHeaders());
}
$dup->languages = null;
$dup->charsets = null;
$dup->encodings = null;
$dup->acceptableContentTypes = null;
$dup->pathInfo = null;
$dup->requestUri = null;
@ -832,7 +838,7 @@ $host = $this->server->get('SERVER_ADDR','');
}
$host = strtolower(preg_replace('/:\d+$/','', trim($host)));
if ($host && !preg_match('/^\[?(?:[a-zA-Z0-9-:\]_]+\.?)+$/', $host)) {
throw new \UnexpectedValueException('Invalid Host "'.$host.'"');
throw new \UnexpectedValueException(sprintf('Invalid Host "%s"', $host));
}
if (count(self::$trustedHostPatterns) > 0) {
if (in_array($host, self::$trustedHosts)) {
@ -844,7 +850,7 @@ self::$trustedHosts[] = $host;
return $host;
}
}
throw new \UnexpectedValueException('Untrusted Host "'.$host.'"');
throw new \UnexpectedValueException(sprintf('Untrusted Host "%s"', $host));
}
return $host;
}
@ -1016,6 +1022,13 @@ return $this->charsets;
}
return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all());
}
public function getEncodings()
{
if (null !== $this->encodings) {
return $this->encodings;
}
return $this->encodings = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all());
}
public function getAcceptableContentTypes()
{
if (null !== $this->acceptableContentTypes) {
@ -1160,12 +1173,65 @@ return $match[0];
}
return false;
}
private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
{
if (self::$requestFactory) {
$request = call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content);
if (!$request instanceof Request) {
throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.');
}
return $request;
}
return new static($query, $request, $attributes, $cookies, $files, $server, $content);
}
}
}
namespace Symfony\Component\HttpFoundation
{
class Response
{
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
const HTTP_NON_AUTHORITATIVE_INFORMATION = 203;
const HTTP_NO_CONTENT = 204;
const HTTP_RESET_CONTENT = 205;
const HTTP_PARTIAL_CONTENT = 206;
const HTTP_MULTI_STATUS = 207; const HTTP_ALREADY_REPORTED = 208; const HTTP_IM_USED = 226; const HTTP_MULTIPLE_CHOICES = 300;
const HTTP_MOVED_PERMANENTLY = 301;
const HTTP_FOUND = 302;
const HTTP_SEE_OTHER = 303;
const HTTP_NOT_MODIFIED = 304;
const HTTP_USE_PROXY = 305;
const HTTP_RESERVED = 306;
const HTTP_TEMPORARY_REDIRECT = 307;
const HTTP_PERMANENTLY_REDIRECT = 308; const HTTP_BAD_REQUEST = 400;
const HTTP_UNAUTHORIZED = 401;
const HTTP_PAYMENT_REQUIRED = 402;
const HTTP_FORBIDDEN = 403;
const HTTP_NOT_FOUND = 404;
const HTTP_METHOD_NOT_ALLOWED = 405;
const HTTP_NOT_ACCEPTABLE = 406;
const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407;
const HTTP_REQUEST_TIMEOUT = 408;
const HTTP_CONFLICT = 409;
const HTTP_GONE = 410;
const HTTP_LENGTH_REQUIRED = 411;
const HTTP_PRECONDITION_FAILED = 412;
const HTTP_REQUEST_ENTITY_TOO_LARGE = 413;
const HTTP_REQUEST_URI_TOO_LONG = 414;
const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
const HTTP_EXPECTATION_FAILED = 417;
const HTTP_I_AM_A_TEAPOT = 418; const HTTP_UNPROCESSABLE_ENTITY = 422; const HTTP_LOCKED = 423; const HTTP_FAILED_DEPENDENCY = 424; const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; const HTTP_UPGRADE_REQUIRED = 426; const HTTP_PRECONDITION_REQUIRED = 428; const HTTP_TOO_MANY_REQUESTS = 429; const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; const HTTP_INTERNAL_SERVER_ERROR = 500;
const HTTP_NOT_IMPLEMENTED = 501;
const HTTP_BAD_GATEWAY = 502;
const HTTP_SERVICE_UNAVAILABLE = 503;
const HTTP_GATEWAY_TIMEOUT = 504;
const HTTP_VERSION_NOT_SUPPORTED = 505;
const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; const HTTP_INSUFFICIENT_STORAGE = 507; const HTTP_LOOP_DETECTED = 508; const HTTP_NOT_EXTENDED = 510; const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511;
public $headers;
protected $content;
protected $version;
@ -1283,10 +1349,10 @@ public function sendHeaders()
if (headers_sent()) {
return $this;
}
header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText));
header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode);
foreach ($this->headers->allPreserveCase() as $name => $values) {
foreach ($values as $value) {
header($name.': '.$value, false);
header($name.': '.$value, false, $this->statusCode);
}
}
foreach ($this->headers->getCookies() as $cookie) {
@ -1306,22 +1372,7 @@ $this->sendContent();
if (function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
} elseif ('cli'!== PHP_SAPI) {
$previous = null;
$obStatus = ob_get_status(1);
while (($level = ob_get_level()) > 0 && $level !== $previous) {
$previous = $level;
if ($obStatus[$level - 1]) {
if (version_compare(PHP_VERSION,'5.4','>=')) {
if (isset($obStatus[$level - 1]['flags']) && ($obStatus[$level - 1]['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE)) {
ob_end_flush();
}
} else {
if (isset($obStatus[$level - 1]['del']) && $obStatus[$level - 1]['del']) {
ob_end_flush();
}
}
}
}
static::closeOutputBuffers(0, true);
flush();
}
return $this;
@ -1647,6 +1698,25 @@ public function isEmpty()
{
return in_array($this->statusCode, array(204, 304));
}
public static function closeOutputBuffers($targetLevel, $flush)
{
$status = ob_get_status(true);
$level = count($status);
while ($level-- > $targetLevel
&& (!empty($status[$level]['del'])
|| (isset($status[$level]['flags'])
&& ($status[$level]['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE)
&& ($status[$level]['flags'] & ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE))
)
)
) {
if ($flush) {
ob_end_flush();
} else {
ob_end_clean();
}
}
}
protected function ensureIEOverSSLCompatibility(Request $request)
{
if (false !== stripos($this->headers->get('Content-Disposition'),'attachment') && preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT'), $match) == 1 && true === $request->isSecure()) {
@ -1858,23 +1928,17 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
class Container implements IntrospectableContainerInterface
{
protected $parameterBag;
protected $services;
protected $methodMap;
protected $aliases;
protected $scopes;
protected $scopeChildren;
protected $scopedServices;
protected $scopeStacks;
protected $services = array();
protected $methodMap = array();
protected $aliases = array();
protected $scopes = array();
protected $scopeChildren = array();
protected $scopedServices = array();
protected $scopeStacks = array();
protected $loading = array();
public function __construct(ParameterBagInterface $parameterBag = null)
{
$this->parameterBag = null === $parameterBag ? new ParameterBag() : $parameterBag;
$this->services = array();
$this->aliases = array();
$this->scopes = array();
$this->scopeChildren = array();
$this->scopedServices = array();
$this->scopeStacks = array();
$this->parameterBag = $parameterBag ?: new ParameterBag();
$this->set('service_container', $this);
}
public function compile()
@ -2159,33 +2223,30 @@ use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\Config\Loader\DelegatingLoader;
use Symfony\Component\Config\ConfigCache;
use Symfony\Component\ClassLoader\ClassCollectionLoader;
use Symfony\Component\Filesystem\Filesystem;
abstract class Kernel implements KernelInterface, TerminableInterface
{
protected $bundles;
protected $bundles = array();
protected $bundleMap;
protected $container;
protected $rootDir;
protected $environment;
protected $debug;
protected $booted;
protected $booted = false;
protected $name;
protected $startTime;
protected $loadClassCache;
const VERSION ='2.3.15';
const VERSION_ID ='20315';
const VERSION ='2.5.0';
const VERSION_ID ='20500';
const MAJOR_VERSION ='2';
const MINOR_VERSION ='3';
const RELEASE_VERSION ='15';
const MINOR_VERSION ='5';
const RELEASE_VERSION ='0';
const EXTRA_VERSION ='';
public function __construct($environment, $debug)
{
$this->environment = $environment;
$this->debug = (bool) $debug;
$this->booted = false;
$this->rootDir = $this->getRootDir();
$this->name = $this->getName();
$this->bundles = array();
if ($this->debug) {
$this->startTime = microtime(true);
}
@ -2520,33 +2581,8 @@ $content = $dumper->dump(array('class'=> $class,'base_class'=> $baseClass));
if (!$this->debug) {
$content = static::stripComments($content);
}
$content = $this->removeAbsolutePathsFromContainer($content);
$cache->write($content, $container->getResources());
}
private function removeAbsolutePathsFromContainer($content)
{
if (!class_exists('Symfony\Component\Filesystem\Filesystem')) {
return $content;
}
$rootDir = $this->getRootDir();
$previous = $rootDir;
while (!file_exists($rootDir.'/composer.json')) {
if ($previous === $rootDir = realpath($rootDir.'/..')) {
return $content;
}
$previous = $rootDir;
}
$rootDir = rtrim($rootDir,'/');
$cacheDir = $this->getCacheDir();
$filesystem = new Filesystem();
return preg_replace_callback("{'([^']*)(".preg_quote($rootDir)."[^']*)'}", function ($match) use ($filesystem, $cacheDir) {
$prefix = isset($match[1]) && $match[1] ? "'$match[1]'.__DIR__" :"__DIR__";
if ('.'=== $relativePath = rtrim($filesystem->makePathRelative($match[2], $cacheDir),'/')) {
return $prefix;
}
return $prefix.".'/".$relativePath."'";
}, $content);
}
protected function getContainerLoader(ContainerInterface $container)
{
$locator = new FileLocator($this);
@ -2691,8 +2727,8 @@ use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
abstract class Bundle extends ContainerAware implements BundleInterface
{
protected $name;
protected $reflected;
protected $extension;
protected $path;
public function boot()
{
}
@ -2726,17 +2762,16 @@ return $this->extension;
}
public function getNamespace()
{
if (null === $this->reflected) {
$this->reflected = new \ReflectionObject($this);
}
return $this->reflected->getNamespaceName();
$class = get_class($this);
return substr($class, 0, strrpos($class,'\\'));
}
public function getPath()
{
if (null === $this->reflected) {
$this->reflected = new \ReflectionObject($this);
if (null === $this->path) {
$reflected = new \ReflectionObject($this);
$this->path = dirname($reflected->getFileName());
}
return dirname($this->reflected->getFileName());
return $this->path;
}
public function getParent()
{
@ -2763,7 +2798,14 @@ $ns = $prefix;
if ($relativePath = $file->getRelativePath()) {
$ns .='\\'.strtr($relativePath,'/','\\');
}
$r = new \ReflectionClass($ns.'\\'.$file->getBasename('.php'));
$class = $ns.'\\'.$file->getBasename('.php');
if ($this->container) {
$alias ='console.command.'.strtolower(str_replace('\\','_', $class));
if ($this->container->has($alias)) {
continue;
}
}
$r = new \ReflectionClass($class);
if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract() && !$r->getConstructor()->getNumberOfRequiredParameters()) {
$application->add($r->newInstance());
}
@ -2841,21 +2883,25 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\Event\PostResponseEvent;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class HttpKernel implements HttpKernelInterface, TerminableInterface
{
protected $dispatcher;
protected $resolver;
public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver)
protected $requestStack;
public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, RequestStack $requestStack = null)
{
$this->dispatcher = $dispatcher;
$this->resolver = $resolver;
$this->requestStack = $requestStack ?: new RequestStack();
}
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
@ -2863,6 +2909,7 @@ try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if (false === $catch) {
$this->finishRequest($request, $type);
throw $e;
}
return $this->handleException($e, $request, $type);
@ -2872,8 +2919,19 @@ public function terminate(Request $request, Response $response)
{
$this->dispatcher->dispatch(KernelEvents::TERMINATE, new PostResponseEvent($this, $request, $response));
}
public function terminateWithException(\Exception $exception)
{
if (!$request = $this->requestStack->getMasterRequest()) {
throw new \LogicException('Request stack is empty', 0, $exception);
}
$response = $this->handleException($exception, $request, self::MASTER_REQUEST);
$response->sendHeaders();
$response->sendContent();
$this->terminate($request, $response);
}
private function handleRaw(Request $request, $type = self::MASTER_REQUEST)
{
$this->requestStack->push($request);
$event = new GetResponseEvent($this, $request, $type);
$this->dispatcher->dispatch(KernelEvents::REQUEST, $event);
if ($event->hasResponse()) {
@ -2907,14 +2965,21 @@ private function filterResponse(Response $response, Request $request, $type)
{
$event = new FilterResponseEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::RESPONSE, $event);
$this->finishRequest($request, $type);
return $event->getResponse();
}
private function finishRequest(Request $request, $type)
{
$this->dispatcher->dispatch(KernelEvents::FINISH_REQUEST, new FinishRequestEvent($this, $request, $type));
$this->requestStack->pop();
}
private function handleException(\Exception $e, $request, $type)
{
$event = new GetResponseForExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch(KernelEvents::EXCEPTION, $event);
$e = $event->getException();
if (!$event->hasResponse()) {
$this->finishRequest($request, $type);
throw $e;
}
$response = $event->getResponse();
@ -2966,6 +3031,7 @@ return (string) $var;
namespace Symfony\Component\HttpKernel\DependencyInjection
{
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
@ -2975,9 +3041,9 @@ use Symfony\Component\DependencyInjection\Scope;
class ContainerAwareHttpKernel extends HttpKernel
{
protected $container;
public function __construct(EventDispatcherInterface $dispatcher, ContainerInterface $container, ControllerResolverInterface $controllerResolver)
public function __construct(EventDispatcherInterface $dispatcher, ContainerInterface $container, ControllerResolverInterface $controllerResolver, RequestStack $requestStack = null)
{
parent::__construct($dispatcher, $controllerResolver);
parent::__construct($dispatcher, $controllerResolver, $requestStack);
$this->container = $container;
if (!$container->hasScope('request')) {
$container->addScope(new Scope('request'));

@ -159,6 +159,9 @@ doctrine:
auto_mapping: true
mappings: ~
#metadata_cache_driver: apc # default "array" "apc", "memcache", "memcached", "xcache"
#query_cache_driver: apc
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
@ -205,8 +208,19 @@ nelmio_api_doc: ~
sensio_framework_extra:
view: { annotations: false }
router: { annotations: true }
request: { converters: true }
request:
converters: true
# Doctrine extensions configuration
stof_doctrine_extensions:
default_locale: "%locale%"
translation_fallback: true
orm:
default:
tree: true
timestampable: true
sluggable: true
avanzu_admin_theme:
bower_bin: /usr/bin/bower # that's the default value

@ -15,7 +15,6 @@ parameters:
path.temp: null
path.courses: null
path.logs: null
session_lifetime: null
security_key: null
password_encryption: sha1
deny_delete_users: false
@ -32,4 +31,5 @@ parameters:
sonata_news.comment.email_from: no-reply@example.org
sonata_media.cdn.host: /uploads/media
sonata_user.google_authenticator.server: demo.sonata-project.org
sonata_page.varnish.command: if [ ! -r "/etc/varnish/secret" ]; then echo "VALID ERROR :/"; else varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 {{ COMMAND }} "{{ EXPRESSION }}"; fi; # you need to adapt this line to work with your configuration
sonata_page.varnish.command: 'if [ ! -r "/etc/varnish/secret" ]; then echo "VALID ERROR :/"; else varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 {{ COMMAND }} "{{ EXPRESSION }}"; fi;'

@ -23,10 +23,6 @@ security:
ROLE_STUDENT: [ROLE_STUDENT]
ROLE_ANONYMOUS: [ROLE_ANONYMOUS]
SONATA:
- ROLE_SONATA_PAGE_ADMIN_PAGE_EDIT # if you are not using acl then this line must be uncommented
- ROLE_SONATA_PAGE_ADMIN_BLOCK_EDIT
access_decision_manager:
strategy: unanimous

@ -38,6 +38,9 @@ sonata_admin:
#- { position: right, type: sonata.block.service.rss, settings: { title: Sonata Project's Feeds, url: http://sonata-project.org/blog/archive.rss }}
groups:
# sonata_page:
# items:
# - sonata.page.admin.page
sonata.admin.group.content:
label: sonata_content
label_catalogue: SonataDemoBundle
@ -89,6 +92,7 @@ sonata_admin:
items:
- sonata.admin.course
- sonata.admin.session
- sonata.admin.access_url
assets:
stylesheets:
@ -101,10 +105,10 @@ sonata_admin:
- assetic/sonata_jqueryui_css.css
- bundles/sonatademo/css/demo.css
# - bundles/sonataformatter/markitup/skins/sonata/style.css
# - bundles/sonataformatter/markitup/sets/markdown/style.css
# - bundles/sonataformatter/markitup/sets/html/style.css
# - bundles/sonataformatter/markitup/sets/textile/style.css
- bundles/sonataformatter/markitup/skins/sonata/style.css
- bundles/sonataformatter/markitup/sets/markdown/style.css
- bundles/sonataformatter/markitup/sets/html/style.css
- bundles/sonataformatter/markitup/sets/textile/style.css
# - bundles/sonataadmin/vendor/bootstrap/dist/css/bootstrap.min.css
# - bundles/sonataadmin/vendor/AdminLTE/css/font-awesome.min.css
# - bundles/sonataadmin/vendor/AdminLTE/css/ionicons.min.css

@ -45,15 +45,6 @@ sonata_media:
preview: { width: 100, quality: 100}
wide: { width: 820, quality: 100}
sonata_product:
providers:
- sonata.media.provider.image
formats:
preview: { width: 100, quality: 100}
small: { width: 300, quality: 100}
large: { width: 750, quality: 100}
cdn:
# define the public base url for the uploaded media
server:

@ -1,6 +1,5 @@
#
# more information can be found here http://sonata-project.org/bundles/page
#
cmf_routing:
chain:
routers_by_id:
@ -11,27 +10,24 @@ cmf_routing:
router.default: 100
sonata_page:
multisite: host_with_path_by_locale # host
multisite: host_with_path_by_locale # host
use_streamed_response: false # set the value to false in debug mode or if the reverse proxy does not handle streamed response
ignore_uri_patterns:
- ^/admin(.*)
- ^/api/(.*)
- ^demo-admin/(.*)
- ^avanzu_admin
ignore_route_patterns:
- (.*)admin(.*) # ignore admin route, ie route containing 'admin'
- ^_(.*) # ignore symfony routes
- index
- (.*)avanzu_admin(.*)
- login
ignore_routes:
- sonata_page_cache_esi
- sonata_page_cache_ssi
- sonata_page_js_sync_cache
- sonata_page_js_async_cache
- sonata_cache_esi
- sonata_cache_es
- sonata_cache_ssi
- sonata_cache_js_async
- sonata_cache_js_sync
@ -53,7 +49,8 @@ sonata_page:
default_template: default
templates:
default:
path: 'ApplicationSonataPageBundle::default_layout.html.twig'
#path: 'ApplicationSonataPageBundle::default_layout.html.twig'
path: 'ChamiloLMSCoreBundle::main_layout.html.twig'
name: 'default'
containers:
header:

@ -36,7 +36,7 @@ class LegacyListener
Session::setSession($request->getSession());
$dbConnection = $this->container->get('database_connection');
$database = new \Database($dbConnection, array());
\Database::setManager($this->container->get('doctrine')->getManager());
Session::$urlGenerator = $this->container->get('router');
Session::$security = $this->container->get('security.context');
@ -46,7 +46,7 @@ class LegacyListener
Session::$dataDir = $this->container->get('kernel')->getDataDir();
Session::$tempDir = $this->container->get('kernel')->getCacheDir();
Session::$courseDir = $this->container->get('kernel')->getDataDir();
Session::$configDir = $this->container->get('kernel')->getConfigDir();
//Session::$configDir = $this->container->get('kernel')->getConfigDir();
Session::$assets = $this->container->get('templating.helper.assets');
Session::$htmlEditor = $this->container->get('html_editor');

Loading…
Cancel
Save