Commit 01cdef5dbbb19fb29c3db70ed5c29e1ce4faa168

Authored by Alex Savenko
1 parent 829c1953

remarketing

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
console/controllers/FeedController.php
... ... @@ -21,12 +21,12 @@ class FeedController extends Controller
21 21 private $count = 1;
22 22  
23 23 public function getProducts() {
24   - return Product::find()->all();
  24 + return Product::find()->all()->limit(10);
25 25 }
26 26  
27 27 public function checkUrl($url){
28 28 if(!in_array($url, $this->urlList)){
29   - $this->urlList[] = array($url);
  29 + $this->urlList[] = $url;
30 30 return true;
31 31 } else {
32 32 return false;
... ... @@ -37,7 +37,7 @@ class FeedController extends Controller
37 37 $url = Url::to(['catalog/product', 'product' => $product]);
38 38 if($this->checkUrl($url)){
39 39 print $this->count++ . "\n";
40   - $content[] = $url;
  40 + $content[] = [$url];
41 41 }
42 42 }
43 43  
... ...