Completed
Pull Request — master (#288)
by Jason
05:58
created
code/pages/ProductHolder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
      * Products function.
124 124
      * 
125 125
      * @access public
126
-     * @return array
126
+     * @return PaginatedList
127 127
      */
128 128
     public function ProductList($limit = 10)
129 129
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -129,14 +129,14 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $config = SiteConfig::current_site_config();
131 131
 
132
-        if ($config->ProductLimit>0) {
132
+        if ($config->ProductLimit > 0) {
133 133
             $limit = $config->ProductLimit;
134 134
         }
135 135
 
136 136
         if ($config->MultiGroup) {
137 137
             $entries = $this->Products()->sort('SortOrder');
138
-        } else {
139
-            $filter = '"ParentID" = ' . $this->ID;
138
+        }else {
139
+            $filter = '"ParentID" = '.$this->ID;
140 140
 
141 141
             // Build a list of all IDs for ProductGroups that are children
142 142
             $holderIDs = $this->ProductGroupIDs();
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                 if ($filter) {
148 148
                     $filter .= ' OR ';
149 149
                 }
150
-                $filter .= '"ParentID" IN (' . implode(',', $holderIDs) . ")";
150
+                $filter .= '"ParentID" IN ('.implode(',', $holderIDs).")";
151 151
             }
152 152
 
153 153
             $order = '"SiteTree"."Title" ASC';
Please login to merge, or discard this patch.