Skip to content

Commit

Permalink
fixed locale issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rallek committed Apr 23, 2017
1 parent 03182b8 commit 7e8f4b4
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 32 deletions.
10 changes: 5 additions & 5 deletions src/modules/RK/HelperModule/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ before_install:
install:
- composer install
- zip -qr RKHelperModule.zip .
- wget http://ci.zikula.org/job/Zikula_Core-1.4.6/119/artifact/build/archive/Zikula_Core-1.4.6.build119.tar.gz
- tar -xpzf Zikula_Core-1.4.6.build119.tar.gz
- rm Zikula_Core-1.4.6.build119.tar.gz
- cd Zikula_Core-1.4.6
- wget http://ci.zikula.org/job/Zikula_Core-2.0.0/lastSuccessfulBuild/artifact/build/archive/Zikula_Core-2.0.0.tar.gz
- tar -xpzf Zikula_Core-2.0.0.tar.gz
- rm Zikula_Core-2.0.0.tar.gz
- cd Zikula_Core-2.0.0
- php app/console zikula:install:start -n --database_user=root --database_name=zk_test --password=12345678 --email=admin@example.com --router:request_context:host=localhost
- php app/console zikula:install:finish
- cd modules
Expand All @@ -47,7 +47,7 @@ install:
- unzip -q ../../../../RKHelperModule
- cd ../../..
- php app/console bootstrap:bundles
- mysql -e "INSERT INTO zk_test.modules (id, name, type, displayname, url, description, directory, version, capabilities, state, securityschema, core_min, core_max) VALUES (NULL, 'RKHelperModule', '3', 'Helper', 'helper', 'here you can find the helpers for this site e.g. carousel, linker, simple info pages or images', 'rk/helper-module', '1.0.1', 'N;', '3', 'N;', '1.4.6', '2.0.0');"
- mysql -e "INSERT INTO zk_test.modules (id, name, type, displayname, url, description, directory, version, capabilities, state, securityschema, core_min, core_max) VALUES (NULL, 'RKHelperModule', '3', 'Helper', 'helper', 'here you can find the helpers for this site e.g. carousel, linker, simple info pages or images', 'rk/helper-module', '1.0.1', 'N;', '3', 'N;', '2.0.0', '3.0.0');"
- php app/console cache:warmup

script:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ protected function createDefaultData()
$entityManager = $this->container->get('doctrine.orm.default_entity_manager');
$logger = $this->container->get('logger');
$request = $this->container->get('request_stack')->getCurrentRequest();
$adminUser = $this->container->get('zikula_users_module.user_repository')->find(2);

$entityClass = 'RK\HelperModule\Entity\LinkerEntity';
$entityManager->getRepository($entityClass)->truncateTable($logger);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/RK/HelperModule/Base/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ralf Koester <ralf@familie-koester.de>.
* @link http://k62.de
* @link http://zikula.org
* @version Generated by ModuleStudio 0.7.4 (http://modulestudio.de) at Sun Apr 23 11:15:08 CEST 2017.
* @version Generated by ModuleStudio 0.7.4 (http://modulestudio.de) at Sun Apr 23 13:08:45 CEST 2017.
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ protected function viewInternal(Request $request, $sort, $sortdir, $pos, $num, $
$controllerHelper = $this->get('rk_helper_module.controller_helper');
$viewHelper = $this->get('rk_helper_module.view_helper');

// parameter for used sort order
$sortdir = strtolower($sortdir);
$request->query->set('sort', $sort);
$request->query->set('sortdir', $sortdir);
$request->query->set('pos', $pos);

$sortableColumns = new SortableColumns($this->get('router'), 'rkhelpermodule_carousel_' . ($isAdmin ? 'admin' : '') . 'view', 'sort', 'sortdir');
Expand All @@ -153,6 +149,7 @@ protected function viewInternal(Request $request, $sort, $sortdir, $pos, $num, $
new Column('updatedBy'),
new Column('updatedDate'),
]);
$sortableColumns->setOrderBy($sortableColumns->getColumn($sort), strtoupper($sortdir));

$templateParameters = $controllerHelper->processViewActionParameters($objectType, $sortableColumns, $templateParameters, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@ protected function viewInternal(Request $request, $sort, $sortdir, $pos, $num, $
$controllerHelper = $this->get('rk_helper_module.controller_helper');
$viewHelper = $this->get('rk_helper_module.view_helper');

// parameter for used sort order
$sortdir = strtolower($sortdir);
$request->query->set('sort', $sort);
$request->query->set('sortdir', $sortdir);
$request->query->set('pos', $pos);

$sortableColumns = new SortableColumns($this->get('router'), 'rkhelpermodule_carouselitem_' . ($isAdmin ? 'admin' : '') . 'view', 'sort', 'sortdir');
Expand All @@ -222,6 +218,7 @@ protected function viewInternal(Request $request, $sort, $sortdir, $pos, $num, $
new Column('updatedBy'),
new Column('updatedDate'),
]);
$sortableColumns->setOrderBy($sortableColumns->getColumn($sort), strtoupper($sortdir));

$templateParameters = $controllerHelper->processViewActionParameters($objectType, $sortableColumns, $templateParameters, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ protected function viewInternal(Request $request, $sort, $sortdir, $pos, $num, $
$controllerHelper = $this->get('rk_helper_module.controller_helper');
$viewHelper = $this->get('rk_helper_module.view_helper');

// parameter for used sort order
$sortdir = strtolower($sortdir);
$request->query->set('sort', $sort);
$request->query->set('sortdir', $sortdir);
$request->query->set('pos', $pos);

$sortableColumns = new SortableColumns($this->get('router'), 'rkhelpermodule_image_' . ($isAdmin ? 'admin' : '') . 'view', 'sort', 'sortdir');
Expand All @@ -151,6 +147,7 @@ protected function viewInternal(Request $request, $sort, $sortdir, $pos, $num, $
new Column('updatedBy'),
new Column('updatedDate'),
]);
$sortableColumns->setOrderBy($sortableColumns->getColumn($sort), strtoupper($sortdir));

$templateParameters = $controllerHelper->processViewActionParameters($objectType, $sortableColumns, $templateParameters, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ protected function viewInternal(Request $request, $sort, $sortdir, $pos, $num, $
$controllerHelper = $this->get('rk_helper_module.controller_helper');
$viewHelper = $this->get('rk_helper_module.view_helper');

// parameter for used sort order
$sortdir = strtolower($sortdir);
$request->query->set('sort', $sort);
$request->query->set('sortdir', $sortdir);
$request->query->set('pos', $pos);

$sortableColumns = new SortableColumns($this->get('router'), 'rkhelpermodule_info_' . ($isAdmin ? 'admin' : '') . 'view', 'sort', 'sortdir');
Expand All @@ -150,6 +146,7 @@ protected function viewInternal(Request $request, $sort, $sortdir, $pos, $num, $
new Column('updatedBy'),
new Column('updatedDate'),
]);
$sortableColumns->setOrderBy($sortableColumns->getColumn($sort), strtoupper($sortdir));

$templateParameters = $controllerHelper->processViewActionParameters($objectType, $sortableColumns, $templateParameters, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ protected function viewInternal(Request $request, $sort, $sortdir, $pos, $num, $
$controllerHelper = $this->get('rk_helper_module.controller_helper');
$viewHelper = $this->get('rk_helper_module.view_helper');

// parameter for used sort order
$sortdir = strtolower($sortdir);
$request->query->set('sort', $sort);
$request->query->set('sortdir', $sortdir);
$request->query->set('pos', $pos);

$sortableColumns = new SortableColumns($this->get('router'), 'rkhelpermodule_linker_' . ($isAdmin ? 'admin' : '') . 'view', 'sort', 'sortdir');
Expand All @@ -155,6 +151,7 @@ protected function viewInternal(Request $request, $sort, $sortdir, $pos, $num, $
new Column('updatedBy'),
new Column('updatedDate'),
]);
$sortableColumns->setOrderBy($sortableColumns->getColumn($sort), strtoupper($sortdir));

$templateParameters = $controllerHelper->processViewActionParameters($objectType, $sortableColumns, $templateParameters, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function initLinker(LinkerEntity $entity)
*/
public function initCarouselItem(CarouselItemEntity $entity)
{
$entity->setItemStartDate(\DateTime::createFromFormat('Y-m-d'));
$entity->setItemStartDate(\DateTime::createFromFormat('Y-m-d', date('Y-m-d')));
$entity->setIntemEndDate(new \DateTime('2099-12-31'));
return $entity;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,8 @@ public function processViewActionParameters($objectType, SortableColumns $sortab
}
}
}
$sort = $request->query->get('sort');
$sortdir = $request->query->get('sortdir');
$sortableColumns->setOrderBy($sortableColumns->getColumn($sort), strtoupper($sortdir));
$sort = $sortableColumns->getSortColumn()->getName();
$sortdir = $sortableColumns->getSortDirection();
$sortableColumns->setAdditionalUrlParameters($additionalUrlParameters);
$templateParameters['sort'] = $sort;
$templateParameters['sortdir'] = $sortdir;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/RK/HelperModule/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ralf Koester <ralf@familie-koester.de>.
* @link http://k62.de
* @link http://zikula.org
* @version Generated by ModuleStudio 0.7.4 (http://modulestudio.de) at Sun Apr 23 11:15:08 CEST 2017.
* @version Generated by ModuleStudio 0.7.4 (http://modulestudio.de) at Sun Apr 23 13:08:45 CEST 2017.
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/modules/RK/HelperModule/zikula.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"version": {
"semver": "1.0.1",
"compatibility": ">=1.4.5 <2.0.0",
"compatibility": ">=1.4.6 <3.0.0",
"composerpath": "composer.json",
"description": "here you can find the helpers for this site e.g. carousel, linker, simple info pages or images",
"keywords": [
Expand Down

0 comments on commit 7e8f4b4

Please sign in to comment.