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,12 +21,12 @@ class FeedController extends Controller
21 private $count = 1; 21 private $count = 1;
22 22
23 public function getProducts() { 23 public function getProducts() {
24 - return Product::find()->all(); 24 + return Product::find()->all()->limit(10);
25 } 25 }
26 26
27 public function checkUrl($url){ 27 public function checkUrl($url){
28 if(!in_array($url, $this->urlList)){ 28 if(!in_array($url, $this->urlList)){
29 - $this->urlList[] = array($url); 29 + $this->urlList[] = $url;
30 return true; 30 return true;
31 } else { 31 } else {
32 return false; 32 return false;
@@ -37,7 +37,7 @@ class FeedController extends Controller @@ -37,7 +37,7 @@ class FeedController extends Controller
37 $url = Url::to(['catalog/product', 'product' => $product]); 37 $url = Url::to(['catalog/product', 'product' => $product]);
38 if($this->checkUrl($url)){ 38 if($this->checkUrl($url)){
39 print $this->count++ . "\n"; 39 print $this->count++ . "\n";
40 - $content[] = $url; 40 + $content[] = [$url];
41 } 41 }
42 } 42 }
43 43