Skip to content

Commit 45a2b14

Browse files
authored
Merge pull request #52 from eccubevn/change_session
Change session rule
2 parents e602190 + e508a88 commit 45a2b14

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

.travis.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@ env:
2525
# ec-cube 3.0.9
2626
- ECCUBE_VERSION=3.0.9 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
2727
- ECCUBE_VERSION=3.0.9 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
28-
# ec-cube 3.0.10
29-
- ECCUBE_VERSION=3.0.10 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
30-
- ECCUBE_VERSION=3.0.10 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
3128
# ec-cube 3.0.11
32-
- ECCUBE_VERSION=3.0.11 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
33-
- ECCUBE_VERSION=3.0.11 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
29+
- ECCUBE_VERSION=3.0.13 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
30+
- ECCUBE_VERSION=3.0.13 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
3431
matrix:
3532
fast_finish: true
3633
include:
@@ -50,10 +47,6 @@ matrix:
5047
env: ECCUBE_VERSION=3.0.9 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
5148
- php: 7.0
5249
env: ECCUBE_VERSION=3.0.9 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
53-
- php: 7.0
54-
env: ECCUBE_VERSION=3.0.10 DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
55-
- php: 7.0
56-
env: ECCUBE_VERSION=3.0.10 DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
5750

5851
install:
5952
- gem install mime-types -v 2.99.1

Controller/Admin/RelatedProductController.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ public function searchProduct(Application $app, Request $request, $page_no = nul
4242
'id' => $request->get('id'),
4343
);
4444
if ($categoryId = $request->get('category_id')) {
45-
$Category = $app['eccube.repository.category']->find($categoryId);
46-
$searchData['category_id'] = $Category;
45+
$searchData['category_id'] = $categoryId;
4746
}
4847
$session->set('eccube.plugin.related_product.product.search', $searchData);
4948
$session->set('eccube.plugin.related_product.product.search.page_no', $page_no);
@@ -56,6 +55,10 @@ public function searchProduct(Application $app, Request $request, $page_no = nul
5655
}
5756
}
5857

58+
if (!empty($searchData['category_id'])) {
59+
$searchData['category_id'] = $app['eccube.repository.category']->find($searchData['category_id']);
60+
}
61+
5962
$qb = $app['eccube.repository.product']->getQueryBuilderBySearchDataForAdmin($searchData);
6063

6164
/** @var \Knp\Component\Pager\Pagination\SlidingPagination $pagination */

Utils/Version.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Version
2020
/**
2121
* Check version to support get instance function. (monolog, new style, ...)
2222
*
23-
* @return bool|int|mixed|void
23+
* @return bool
2424
*/
2525
public static function isSupportGetInstanceFunction()
2626
{
@@ -29,7 +29,7 @@ public static function isSupportGetInstanceFunction()
2929
/**
3030
* Check version to support get new hookpoint function. (monolog, new style, ...)
3131
*
32-
* @return bool|int|mixed|void
32+
* @return bool
3333
*/
3434
public static function isSupportNewHookpoint()
3535
{
@@ -38,7 +38,7 @@ public static function isSupportNewHookpoint()
3838
/**
3939
* Check version to support new log function.
4040
*
41-
* @return bool|int|mixed|void
41+
* @return bool
4242
*/
4343
public static function isSupportLogFunction()
4444
{

config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 関連商品プラグイン
22
code: RelatedProduct
3-
version: 1.0.0
3+
version: 1.0.1
44
service:
55
- RelatedProductServiceProvider
66
orm.path:

0 commit comments

Comments
 (0)