Skip to content

Commit

Permalink
Merge pull request #52 from eccubevn/change_session
Browse files Browse the repository at this point in the history
Change session rule
  • Loading branch information
t-nagahashi committed Jul 18, 2017
2 parents e602190 + e508a88 commit 45a2b14
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ env:
# ec-cube 3.0.9
- ECCUBE_VERSION=3.0.9 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
- ECCUBE_VERSION=3.0.9 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
# ec-cube 3.0.10
- ECCUBE_VERSION=3.0.10 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
- ECCUBE_VERSION=3.0.10 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
# ec-cube 3.0.11
- ECCUBE_VERSION=3.0.11 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
- ECCUBE_VERSION=3.0.11 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
- ECCUBE_VERSION=3.0.13 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
- ECCUBE_VERSION=3.0.13 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
matrix:
fast_finish: true
include:
Expand All @@ -50,10 +47,6 @@ matrix:
env: ECCUBE_VERSION=3.0.9 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
- php: 7.0
env: ECCUBE_VERSION=3.0.9 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
- php: 7.0
env: ECCUBE_VERSION=3.0.10 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
- php: 7.0
env: ECCUBE_VERSION=3.0.10 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres

install:
- gem install mime-types -v 2.99.1
Expand Down
7 changes: 5 additions & 2 deletions Controller/Admin/RelatedProductController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public function searchProduct(Application $app, Request $request, $page_no = nul
'id' => $request->get('id'),
);
if ($categoryId = $request->get('category_id')) {
$Category = $app['eccube.repository.category']->find($categoryId);
$searchData['category_id'] = $Category;
$searchData['category_id'] = $categoryId;
}
$session->set('eccube.plugin.related_product.product.search', $searchData);
$session->set('eccube.plugin.related_product.product.search.page_no', $page_no);
Expand All @@ -56,6 +55,10 @@ public function searchProduct(Application $app, Request $request, $page_no = nul
}
}

if (!empty($searchData['category_id'])) {
$searchData['category_id'] = $app['eccube.repository.category']->find($searchData['category_id']);
}

$qb = $app['eccube.repository.product']->getQueryBuilderBySearchDataForAdmin($searchData);

/** @var \Knp\Component\Pager\Pagination\SlidingPagination $pagination */
Expand Down
6 changes: 3 additions & 3 deletions Utils/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Version
/**
* Check version to support get instance function. (monolog, new style, ...)
*
* @return bool|int|mixed|void
* @return bool
*/
public static function isSupportGetInstanceFunction()
{
Expand All @@ -29,7 +29,7 @@ public static function isSupportGetInstanceFunction()
/**
* Check version to support get new hookpoint function. (monolog, new style, ...)
*
* @return bool|int|mixed|void
* @return bool
*/
public static function isSupportNewHookpoint()
{
Expand All @@ -38,7 +38,7 @@ public static function isSupportNewHookpoint()
/**
* Check version to support new log function.
*
* @return bool|int|mixed|void
* @return bool
*/
public static function isSupportLogFunction()
{
Expand Down
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 関連商品プラグイン
code: RelatedProduct
version: 1.0.0
version: 1.0.1
service:
- RelatedProductServiceProvider
orm.path:
Expand Down

0 comments on commit 45a2b14

Please sign in to comment.