This commit is contained in:
Franck Allimant
2014-01-23 09:34:25 +01:00
1217 changed files with 183 additions and 295 deletions

View File

0
core/lib/Thelia/Controller/Admin/AdminController.php Executable file → Normal file
View File

View File

@@ -56,11 +56,13 @@ class BaseAdminController extends BaseController
*/
private $currentRouter = "router.admin";
protected function getCurrentRouter() {
protected function getCurrentRouter()
{
return $this->currentRouter;
}
protected function setCurrentRouter($routerId) {
protected function setCurrentRouter($routerId)
{
$this->currentRouter = $routerId;
}
@@ -152,9 +154,6 @@ class BaseAdminController extends BaseController
// Log the problem
$this->adminLogAppend(implode(",", $resources), implode(",", $accesses), "User is not granted for resources %s with accesses %s", implode(", ", $resources), implode(", ", $accesses));
// Generate the proper response
$response = new Response();
return $this->errorPage($this->getTranslator()->trans("Sorry, you're not allowed to perform this action"), 403);
}

View File

View File

@@ -242,6 +242,7 @@ class ContentController extends AbstractSeoCrudController
if (null !== $content) {
$content->setLocale($this->getCurrentEditionLocale());
}
return $content;
}

0
core/lib/Thelia/Controller/Admin/CouponController.php Executable file → Normal file
View File

0
core/lib/Thelia/Controller/Admin/FileController.php Executable file → Normal file
View File

View File

@@ -205,6 +205,7 @@ class FolderController extends AbstractSeoCrudController
if (null !== $folder) {
$folder->setLocale($this->getCurrentEditionLocale());
}
return $folder;
}

View File

@@ -278,7 +278,6 @@ class LangController extends BaseAdminController
$data = $form->getData();
$event = new LangUrlEvent();
foreach ($data as $key => $value) {
$pos= strpos($key, LangUrlForm::LANG_PREFIX);
if (false !== strpos($key, LangUrlForm::LANG_PREFIX)) {
$event->addUrl(substr($key,strlen(LangUrlForm::LANG_PREFIX)), $value);
}
@@ -316,8 +315,6 @@ class LangController extends BaseAdminController
{
if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, array(), AccessManager::UPDATE)) return $response;
$error_msg = false;
ConfigQuery::create()
->filterByName('one_domain_foreach_lang')
->update(array('Value' => $activate));

3
core/lib/Thelia/Controller/Admin/SessionController.php Executable file → Normal file
View File

@@ -25,6 +25,7 @@ namespace Thelia\Controller\Admin;
use Thelia\Form\AdminLogin;
use Thelia\Core\Security\Authentication\AdminUsernamePasswordFormAuthenticator;
use Thelia\Form\Exception\FormValidationException;
use Thelia\Model\AdminLog;
use Thelia\Core\Security\Exception\AuthenticationException;
use Thelia\Tools\URL;
@@ -53,7 +54,7 @@ class SessionController extends BaseAdminController
$this->adminLogAppend("admin", "LOGIN", "Successful token authentication");
// Update the cookie
$cookie = $this->createAdminRememberMeCookie($user);
$this->createAdminRememberMeCookie($user);
// Render the home page
return $this->render("home");

View File

@@ -38,8 +38,6 @@ class TranslationsController extends BaseAdminController
{
protected function renderTemplate()
{
// Find modules
$modules = ModuleQuery::create()->joinI18n($this->getCurrentEditionLocale())->orderByPosition()->find();
// Get related strings, if all input data are here
$item_to_translate = $this->getRequest()->get('item_to_translate');

0
core/lib/Thelia/Controller/BaseController.php Executable file → Normal file
View File

View File

0
core/lib/Thelia/Controller/Front/DefaultController.php Executable file → Normal file
View File