File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,21 @@ public function addStoreFilter($store, $withAdmin = true)
147147 }
148148
149149 if (!$ this ->getFlag ('store_filter_added ' )) {
150+ $ this ->setFlag ('store_filter_added ' , 1 );
151+
152+ if (is_array ($ store )) {
153+ foreach ($ store as $ k => $ v ) {
154+ if ($ k == 'like ' ) {
155+ if (is_object ($ v ) && $ v instanceof \Zend_Db_Expr && (string )$ v == "'%0%' " ) {
156+ return $ this ;
157+ } else {
158+ $ this ->addFilter ('store ' , $ store , 'public ' );
159+ return $ this ;
160+ }
161+ }
162+ }
163+ }
164+
150165 if ($ store instanceof \Magento \Store \Model \Store) {
151166 $ this ->_storeId = $ store ->getId ();
152167 $ store = [$ store ->getId ()];
@@ -165,8 +180,9 @@ public function addStoreFilter($store, $withAdmin = true)
165180 $ store [] = \Magento \Store \Model \Store::DEFAULT_STORE_ID ;
166181 }
167182
183+
168184 $ this ->addFilter ('store ' , ['in ' => $ store ], 'public ' );
169- $ this -> setFlag ( ' store_filter_added ' , 1 );
185+
170186 }
171187 return $ this ;
172188 }
You can’t perform that action at this time.
0 commit comments