Merge branch 'franck' into admin

Conflicts:
	composer.lock
	core/lib/Thelia/Core/Thelia.php
This commit is contained in:
franck
2013-06-10 16:35:49 +02:00
10 changed files with 681 additions and 77 deletions

View File

@@ -21,7 +21,14 @@
"symfony/routing" : "2.2.*", "symfony/routing" : "2.2.*",
"symfony/filesystem" : "2.2.*", "symfony/filesystem" : "2.2.*",
"symfony/yaml" : "2.2.*", "symfony/yaml" : "2.2.*",
"symfony-cmf/routing": "1.0.0" "symfony-cmf/routing": "1.0.0",
"symfony/form": "2.2.*",
"symfony/validator": "2.2.*",
"symfony/security": "2.2.*",
"symfony/templating": "2.2.*",
"smarty/smarty": "v3.1.13"
}, },
"require-dev" : { "require-dev" : {
"fzaninotto/faker": "dev-master" "fzaninotto/faker": "dev-master"
@@ -32,7 +39,7 @@
"bin-dir" : "bin" "bin-dir" : "bin"
}, },
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"": "local/modules/", "": "local/modules/",
"Thelia" : "core/lib/" "Thelia" : "core/lib/"
} }

667
composer.lock generated
View File

@@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state", "This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
], ],
"hash": "70ffc474830be26b4d7e156dd2aa5c31", "hash": "d0f7befd92333c17dbe9fbb5a8e2c77e",
"packages": [ "packages": [
{ {
"name": "ezyang/htmlpurifier", "name": "ezyang/htmlpurifier",
@@ -31,7 +31,7 @@
"library/HTMLPurifier.composer.php" "library/HTMLPurifier.composer.php"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"LGPL" "LGPL"
], ],
@@ -69,14 +69,14 @@
"lib/password.php" "lib/password.php"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [ "authors": [
{ {
"name": "Anthony Ferrara", "name": "Anthony Ferrara",
"email": "ircmaxell@ircmaxell.com", "email": "ircmaxell@php.net",
"homepage": "http://blog.ircmaxell.com" "homepage": "http://blog.ircmaxell.com"
} }
], ],
@@ -114,7 +114,7 @@
"classes/phing/" "classes/phing/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"include-path": [ "include-path": [
"classes" "classes"
], ],
@@ -174,7 +174,7 @@
"generator/lib" "generator/lib"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"include-path": [ "include-path": [
"runtime/lib", "runtime/lib",
"generator/lib" "generator/lib"
@@ -220,7 +220,7 @@
"Psr\\Log\\": "" "Psr\\Log\\": ""
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -238,6 +238,49 @@
], ],
"time": "2012-12-21 11:40:51" "time": "2012-12-21 11:40:51"
}, },
{
"name": "smarty/smarty",
"version": "v3.1.13",
"source": {
"type": "svn",
"url": "http://smarty-php.googlecode.com/svn",
"reference": "/tags/v3.1.13/@4699"
},
"require": {
"php": ">=5.2"
},
"type": "library",
"autoload": {
"classmap": [
"distribution/libs/Smarty.class.php",
"distribution/libs/SmartyBC.class.php"
]
},
"notification-url": "http://packagist.org/downloads/",
"license": [
"LGPL-3.0"
],
"authors": [
{
"name": "Monte Ohrt",
"email": "monte@ohrt.com"
},
{
"name": "Uwe Tews",
"email": "uwe.tews@googlemail.com"
},
{
"name": "Rodney Rehm",
"email": "rodney.rehm@medialize.de"
}
],
"description": "Smarty - the compiling PHP template engine",
"homepage": "http://www.smarty.net",
"keywords": [
"templating"
],
"time": "2013-01-26 12:03:52"
},
{ {
"name": "symfony-cmf/routing", "name": "symfony-cmf/routing",
"version": "1.0.0", "version": "1.0.0",
@@ -269,7 +312,7 @@
"Symfony\\Cmf\\Component\\Routing": "" "Symfony\\Cmf\\Component\\Routing": ""
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -488,17 +531,17 @@
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v2.2.1", "version": "v2.2.2",
"target-dir": "Symfony/Component/EventDispatcher", "target-dir": "Symfony/Component/EventDispatcher",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/EventDispatcher.git", "url": "https://github.com/symfony/EventDispatcher.git",
"reference": "v2.2.1" "reference": "v2.2.2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.1", "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.2",
"reference": "v2.2.1", "reference": "v2.2.2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -587,19 +630,78 @@
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-05-06 20:02:13" "time": "2013-05-06 20:02:13"
}, },
{
"name": "symfony/form",
"version": "v2.2.2",
"target-dir": "Symfony/Component/Form",
"source": {
"type": "git",
"url": "https://github.com/symfony/Form.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Form/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/event-dispatcher": ">=2.1,<3.0",
"symfony/locale": ">=2.0,<3.0",
"symfony/options-resolver": ">=2.1,<2.3-dev",
"symfony/property-access": ">=2.2,<2.3-dev"
},
"require-dev": {
"symfony/http-foundation": ">=2.1,<2.3-dev",
"symfony/validator": ">=2.2,<2.3-dev"
},
"suggest": {
"symfony/http-foundation": "2.2.*",
"symfony/validator": "2.2.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Form\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Form Component",
"homepage": "http://symfony.com",
"time": "2013-06-02 12:05:41"
},
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v2.2.1", "version": "v2.2.2",
"target-dir": "Symfony/Component/HttpFoundation", "target-dir": "Symfony/Component/HttpFoundation",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/HttpFoundation.git", "url": "https://github.com/symfony/HttpFoundation.git",
"reference": "v2.2.1" "reference": "v2.2.2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.2.1", "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.2.2",
"reference": "v2.2.1", "reference": "v2.2.2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -635,7 +737,7 @@
], ],
"description": "Symfony HttpFoundation Component", "description": "Symfony HttpFoundation Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-04-06 10:15:43" "time": "2013-05-27 14:47:40"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
@@ -706,19 +808,301 @@
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-06-02 13:03:09" "time": "2013-06-02 13:03:09"
}, },
{
"name": "symfony/icu",
"version": "v1.0.0",
"target-dir": "Symfony/Component/Icu",
"source": {
"type": "git",
"url": "https://github.com/symfony/Icu.git",
"reference": "v1.0.0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Icu/zipball/v1.0.0",
"reference": "v1.0.0",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/intl": ">=2.3,<3.0"
},
"type": "library",
"autoload": {
"psr-0": {
"Symfony\\Component\\Icu\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Contains an excerpt of the ICU data and classes to load it.",
"homepage": "http://symfony.com",
"keywords": [
"icu",
"intl"
],
"time": "2013-06-03 18:32:07"
},
{
"name": "symfony/intl",
"version": "v2.3.0",
"target-dir": "Symfony/Component/Intl",
"source": {
"type": "git",
"url": "https://github.com/symfony/Intl.git",
"reference": "v2.3.0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Intl/zipball/v2.3.0",
"reference": "v2.3.0",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/icu": ">=1.0-RC,<2.0"
},
"require-dev": {
"symfony/filesystem": ">=2.1"
},
"suggest": {
"ext-intl": "to use the component with locales other than \"en\""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Intl\\": ""
},
"classmap": [
"Symfony/Component/Intl/Resources/stubs"
],
"files": [
"Symfony/Component/Intl/Resources/stubs/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Igor Wiedler",
"email": "igor@wiedler.ch",
"homepage": "http://wiedler.ch/igor/"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
},
{
"name": "Eriksen Costa",
"email": "eriksen.costa@infranology.com.br"
}
],
"description": "A PHP replacement layer for the C intl extension that includes additional data from the ICU library.",
"homepage": "http://symfony.com",
"keywords": [
"i18n",
"icu",
"internationalization",
"intl",
"l10n",
"localization"
],
"time": "2013-05-18 11:21:22"
},
{
"name": "symfony/locale",
"version": "v2.3.0",
"target-dir": "Symfony/Component/Locale",
"source": {
"type": "git",
"url": "https://github.com/symfony/Locale.git",
"reference": "v2.3.0-RC1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Locale/zipball/v2.3.0-RC1",
"reference": "v2.3.0-RC1",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/intl": ">=2.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Locale\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Locale Component",
"homepage": "http://symfony.com",
"time": "2013-04-11 09:29:25"
},
{
"name": "symfony/options-resolver",
"version": "v2.2.2",
"target-dir": "Symfony/Component/OptionsResolver",
"source": {
"type": "git",
"url": "https://github.com/symfony/OptionsResolver.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/OptionsResolver/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\OptionsResolver\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony OptionsResolver Component",
"homepage": "http://symfony.com",
"keywords": [
"config",
"configuration",
"options"
],
"time": "2013-01-17 15:25:59"
},
{
"name": "symfony/property-access",
"version": "v2.2.2",
"target-dir": "Symfony/Component/PropertyAccess",
"source": {
"type": "git",
"url": "https://github.com/symfony/PropertyAccess.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/PropertyAccess/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\PropertyAccess\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony PropertyAccess Component",
"homepage": "http://symfony.com",
"keywords": [
"access",
"array",
"extraction",
"index",
"injection",
"object",
"property",
"property path",
"reflection"
],
"time": "2013-04-07 22:02:49"
},
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v2.2.1", "version": "v2.2.2",
"target-dir": "Symfony/Component/Routing", "target-dir": "Symfony/Component/Routing",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Routing.git", "url": "https://github.com/symfony/Routing.git",
"reference": "v2.2.1" "reference": "v2.2.2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.1", "url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.2",
"reference": "v2.2.1", "reference": "v2.2.2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -762,7 +1146,236 @@
], ],
"description": "Symfony Routing Component", "description": "Symfony Routing Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-03-23 12:03:22" "time": "2013-05-10 16:49:00"
},
{
"name": "symfony/security",
"version": "v2.2.2",
"target-dir": "Symfony/Component/Security",
"source": {
"type": "git",
"url": "https://github.com/symfony/Security.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Security/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/event-dispatcher": ">=2.1,<3.0",
"symfony/http-foundation": ">=2.1,<2.3-dev",
"symfony/http-kernel": ">=2.1,<=2.3-dev"
},
"require-dev": {
"doctrine/common": ">=2.2,<3.0",
"doctrine/dbal": ">=2.2,<3.0",
"psr/log": ">=1.0,<2.0",
"symfony/form": ">=2.0,<3.0",
"symfony/routing": ">=2.2,<2.3-dev",
"symfony/validator": ">=2.2,<2.3-dev"
},
"suggest": {
"doctrine/dbal": "to use the built-in ACL implementation",
"symfony/class-loader": "2.2.*",
"symfony/finder": "2.2.*",
"symfony/form": "2.2.*",
"symfony/routing": "2.2.*",
"symfony/validator": "2.2.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Security\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Security Component",
"homepage": "http://symfony.com",
"time": "2013-05-27 14:47:40"
},
{
"name": "symfony/templating",
"version": "v2.2.2",
"target-dir": "Symfony/Component/Templating",
"source": {
"type": "git",
"url": "https://github.com/symfony/Templating.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Templating/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Templating\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Templating Component",
"homepage": "http://symfony.com",
"time": "2013-04-17 05:27:14"
},
{
"name": "symfony/translation",
"version": "v2.3.0",
"target-dir": "Symfony/Component/Translation",
"source": {
"type": "git",
"url": "https://github.com/symfony/Translation.git",
"reference": "v2.3.0-RC1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Translation/zipball/v2.3.0-RC1",
"reference": "v2.3.0-RC1",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/config": ">=2.0,<3.0",
"symfony/yaml": ">=2.2,<3.0"
},
"suggest": {
"symfony/config": "",
"symfony/yaml": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Translation\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Translation Component",
"homepage": "http://symfony.com",
"time": "2013-05-13 14:36:40"
},
{
"name": "symfony/validator",
"version": "v2.2.2",
"target-dir": "Symfony/Component/Validator",
"source": {
"type": "git",
"url": "https://github.com/symfony/Validator.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Validator/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/translation": ">=2.0,<3.0"
},
"require-dev": {
"symfony/config": ">=2.2,<2.3-dev",
"symfony/http-foundation": ">=2.1,<3.0",
"symfony/locale": ">=2.0,<3.0",
"symfony/yaml": ">=2.0,<3.0"
},
"suggest": {
"doctrine/common": "~2.2",
"symfony/config": "2.2.*",
"symfony/http-foundation": "2.2.*",
"symfony/locale": "2.2.*",
"symfony/yaml": "2.2.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Validator\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Validator Component",
"homepage": "http://symfony.com",
"time": "2013-06-02 12:05:41"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
@@ -819,12 +1432,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fzaninotto/Faker.git", "url": "https://github.com/fzaninotto/Faker.git",
"reference": "fac6c177c87bb5d10d256d9caa6933046fbac999" "reference": "v1.2.0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fac6c177c87bb5d10d256d9caa6933046fbac999", "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/v1.2.0",
"reference": "fac6c177c87bb5d10d256d9caa6933046fbac999", "reference": "v1.2.0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -833,7 +1446,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.1.x-dev" "dev-master": "1.2.x-dev"
} }
}, },
"autoload": { "autoload": {
@@ -857,7 +1470,7 @@
"faker", "faker",
"fixtures" "fixtures"
], ],
"time": "2013-05-31 17:07:37" "time": "2013-06-09 18:05:57"
} }
], ],
"aliases": [ "aliases": [

View File

@@ -5,10 +5,12 @@
* @file * @file
* Functions needed for Thelia bootstrap * Functions needed for Thelia bootstrap
*/ */
define('THELIA_ROOT', realpath(__DIR__ .'/../') . "/"); define('THELIA_ROOT' , rtrim(realpath(__DIR__ .'/../'),'/') . "/");
define('THELIA_CONF_DIR', THELIA_ROOT . '/local/config'); define('THELIA_LOCAL_DIR' , THELIA_ROOT . '/local/');
define('THELIA_MODULE_DIR', THELIA_ROOT . '/local/modules'); define('THELIA_CONF_DIR' , THELIA_LOCAL_DIR . 'config/');
define('THELIA_TEMPLATE_DIR', THELIA_ROOT . 'templates/'); define('THELIA_MODULE_DIR' , THELIA_LOCAL_DIR . 'modules/');
define('THELIA_TEMPLATE_DIR' , THELIA_ROOT . '/web/templates/');
$loader = require __DIR__ . "/vendor/autoload.php"; $loader = require __DIR__ . "/vendor/autoload.php";

View File

@@ -44,7 +44,7 @@
<service id="router.admin" class="%router.class%"> <service id="router.admin" class="%router.class%">
<argument type="service" id="router.admin.xmlLoader"/> <argument type="service" id="router.admin.xmlLoader"/>
<argument>routing.xml</argument> <argument>admin.xml</argument>
<argument type="collection"> <argument type="collection">
<argument key="cache_dir">%kernel.cache_dir%</argument> <argument key="cache_dir">%kernel.cache_dir%</argument>
<argument key="debug">%kernel.debug%</argument> <argument key="debug">%kernel.debug%</argument>
@@ -56,10 +56,12 @@
<call method="setContext"> <call method="setContext">
<argument type="service" id="request.context"/> <argument type="service" id="request.context"/>
</call> </call>
<!--
<call method="add"> <call method="add">
<argument type="service" id="router.default_route"/> <argument type="service" id="router.default_route"/>
<argument>-255</argument> <argument>-255</argument>
</call> </call>
-->
<call method="add"> <call method="add">
<argument type="service" id="router.admin"/> <argument type="service" id="router.admin"/>
<argument>0</argument> <argument>0</argument>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<route id="blog" path="/">
<default key="_controller">Thelia\Controller\Admin</default>
</route>
</routes>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<import resource="admin_routing.xml" prefix="/admin" />
</routes>

View File

@@ -79,19 +79,19 @@ class ViewListener implements EventSubscriberInterface
} catch(ResourceNotFoundException $e) { } catch(ResourceNotFoundException $e) {
$event->setResponse(new Response($e->getMessage(), 404)); $event->setResponse(new Response($e->getMessage(), 404));
} }
} }
public function beforeKernelView(GetResponseForControllerResultEvent $event) public function beforeKernelView(GetResponseForControllerResultEvent $event)
{ {
$request = $this->container->get('request'); $request = $this->container->get('request');
if (!$view = $request->attributes->get('_view')) { if (!$view = $request->attributes->get('_view')) {
$request->attributes->set('_view', $this->findView($request)); $request->attributes->set('_view', $this->findView($request));
} }
} }
public function findView(Request $request) public function findView(Request $request)
{ {
if (! $view = $request->query->get('view')) { if (! $view = $request->query->get('view')) {
@@ -100,7 +100,7 @@ class ViewListener implements EventSubscriberInterface
$view = $request->request->get('view'); $view = $request->request->get('view');
} }
} }
return $view; return $view;
} }
@@ -117,7 +117,7 @@ class ViewListener implements EventSubscriberInterface
KernelEvents::VIEW =>array( KernelEvents::VIEW =>array(
array('onKernelView', 0), array('onKernelView', 0),
array('beforeKernelView', 5) array('beforeKernelView', 5)
) )
); );
} }
} }

View File

@@ -60,7 +60,7 @@ class Thelia extends Kernel
const THELIA_VERSION = 0.1; const THELIA_VERSION = 0.1;
protected $tpexConfig; protected $tpexConfig;
public function init() public function init()
{ {
parent::init(); parent::init();
@@ -69,7 +69,7 @@ class Thelia extends Kernel
} }
$this->initPropel(); $this->initPropel();
} }
protected function initPropel() protected function initPropel()
{ {
if (file_exists(THELIA_ROOT . '/local/config/database.yml') === false) { if (file_exists(THELIA_ROOT . '/local/config/database.yml') === false) {
@@ -106,10 +106,10 @@ class Thelia extends Kernel
} }
/** /**
* *
* Load some configuration * Load some configuration
* Initialize all plugins * Initialize all plugins
* *
*/ */
protected function loadConfiguration(ContainerBuilder $container) protected function loadConfiguration(ContainerBuilder $container)
{ {
@@ -123,23 +123,23 @@ class Thelia extends Kernel
foreach ($modules as $module) { foreach ($modules as $module) {
try { try {
$loader = new XmlFileLoader($container, new FileLocator(THELIA_MODULE_DIR . "/" . ucfirst($module->getCode()) . "/Config")); $loader = new XmlFileLoader($container, new FileLocator(THELIA_MODULE_DIR . "/" . ucfirst($module->getCode()) . "/Config"));
$loader->load("config.xml"); $loader->load("config.xml");
} catch(\InvalidArgumentException $e) { }
catch(\InvalidArgumentException $e) {
} // FIXME: process module configuration exception
} }
} }
} }
/** /**
* *
* initialize session in Request object * initialize session in Request object
* *
* All param must be change in Config table * All param must be change in Config table
* *
* @param \Symfony\Component\HttpFoundation\Request $request * @param \Symfony\Component\HttpFoundation\Request $request
*/ */
@@ -229,7 +229,7 @@ class Thelia extends Kernel
{ {
$bundles = array( $bundles = array(
/* TheliaBundle contain all the dependency injection description */ /* TheliaBundle contain all the dependency injection description */
new Bundle\TheliaBundle() new Bundle\TheliaBundle(),
); );
/** /**

View File

@@ -1,5 +1,4 @@
<?php <?php
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Thelia\Core\Thelia; use Thelia\Core\Thelia;

View File

@@ -1,5 +1,4 @@
<?php <?php
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Thelia\Core\Thelia; use Thelia\Core\Thelia;