Skip to content

Commit b3e7a90

Browse files
committed
Fixed loading subsequent issue pages
Signed-off-by: Roland Dalmulder <[email protected]>
1 parent 4ea1532 commit b3e7a90

File tree

1 file changed

+2
-9
lines changed
  • administrator/components/com_patchtester/PatchTester/Model

1 file changed

+2
-9
lines changed

administrator/components/com_patchtester/PatchTester/Model/PullsModel.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ protected function getListQueryCache()
187187
*/
188188
protected function getListQuery()
189189
{
190-
// Create a new query object.
191190
$db = $this->getDbo();
192191
$query = $db->getQuery(true);
193192
$labelQuery = $db->getQuery(true);
@@ -201,7 +200,6 @@ protected function getListQuery()
201200
. $db->quoteName('pulls.pull_id')
202201
);
203202

204-
// Filter by search
205203
$search = $this->getState()->get('filter.search');
206204

207205
if (!empty($search))
@@ -230,7 +228,6 @@ protected function getListQuery()
230228
}
231229
}
232230

233-
// Filter for applied patches
234231
$applied = $this->getState()->get('filter.applied');
235232

236233
if (!empty($applied))
@@ -241,7 +238,6 @@ protected function getListQuery()
241238
$query->where($db->quoteName('applied') . $value);
242239
}
243240

244-
// Filter for branch
245241
$branch = $this->getState()->get('filter.branch');
246242

247243
if (!empty($branch))
@@ -251,7 +247,6 @@ protected function getListQuery()
251247
);
252248
}
253249

254-
// Filter for RTC patches
255250
$applied = $this->getState()->get('filter.rtc');
256251

257252
if (!empty($applied))
@@ -262,7 +257,6 @@ protected function getListQuery()
262257
$query->where($db->quoteName('pulls.is_rtc') . ' = ' . $value);
263258
}
264259

265-
// Filter for NPM patches
266260
$npm = $this->getState()->get('filter.npm');
267261

268262
if (!empty($npm))
@@ -346,7 +340,6 @@ public function getSortFields()
346340
*/
347341
public function requestFromGithub($page)
348342
{
349-
// If on page 1, dump the old data
350343
if ($page === 1)
351344
{
352345
$this->getDbo()->truncateTable('#__patchtester_pulls');
@@ -385,9 +378,9 @@ public function requestFromGithub($page)
385378
// Default this to being a single page of results
386379
$lastPage = 1;
387380

388-
if (isset($pullsResponse->headers['Link']))
381+
if (isset($pullsResponse->headers['link']))
389382
{
390-
$linkHeader = $pullsResponse->headers['Link'];
383+
$linkHeader = $pullsResponse->headers['link'];
391384

392385
// The `joomla/http` 2.0 package uses PSR-7 Responses which has a different format for headers, check for this
393386
if (is_array($linkHeader))

0 commit comments

Comments
 (0)