mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2024-06-03 14:10:47 +00:00
Fixed loading subsequent issue pages
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
parent
4ea1532319
commit
b3e7a90d37
|
@ -187,7 +187,6 @@ class PullsModel extends ListModel
|
||||||
*/
|
*/
|
||||||
protected function getListQuery()
|
protected function getListQuery()
|
||||||
{
|
{
|
||||||
// Create a new query object.
|
|
||||||
$db = $this->getDbo();
|
$db = $this->getDbo();
|
||||||
$query = $db->getQuery(true);
|
$query = $db->getQuery(true);
|
||||||
$labelQuery = $db->getQuery(true);
|
$labelQuery = $db->getQuery(true);
|
||||||
|
@ -201,7 +200,6 @@ class PullsModel extends ListModel
|
||||||
. $db->quoteName('pulls.pull_id')
|
. $db->quoteName('pulls.pull_id')
|
||||||
);
|
);
|
||||||
|
|
||||||
// Filter by search
|
|
||||||
$search = $this->getState()->get('filter.search');
|
$search = $this->getState()->get('filter.search');
|
||||||
|
|
||||||
if (!empty($search))
|
if (!empty($search))
|
||||||
|
@ -230,7 +228,6 @@ class PullsModel extends ListModel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter for applied patches
|
|
||||||
$applied = $this->getState()->get('filter.applied');
|
$applied = $this->getState()->get('filter.applied');
|
||||||
|
|
||||||
if (!empty($applied))
|
if (!empty($applied))
|
||||||
|
@ -241,7 +238,6 @@ class PullsModel extends ListModel
|
||||||
$query->where($db->quoteName('applied') . $value);
|
$query->where($db->quoteName('applied') . $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter for branch
|
|
||||||
$branch = $this->getState()->get('filter.branch');
|
$branch = $this->getState()->get('filter.branch');
|
||||||
|
|
||||||
if (!empty($branch))
|
if (!empty($branch))
|
||||||
|
@ -251,7 +247,6 @@ class PullsModel extends ListModel
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter for RTC patches
|
|
||||||
$applied = $this->getState()->get('filter.rtc');
|
$applied = $this->getState()->get('filter.rtc');
|
||||||
|
|
||||||
if (!empty($applied))
|
if (!empty($applied))
|
||||||
|
@ -262,7 +257,6 @@ class PullsModel extends ListModel
|
||||||
$query->where($db->quoteName('pulls.is_rtc') . ' = ' . $value);
|
$query->where($db->quoteName('pulls.is_rtc') . ' = ' . $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter for NPM patches
|
|
||||||
$npm = $this->getState()->get('filter.npm');
|
$npm = $this->getState()->get('filter.npm');
|
||||||
|
|
||||||
if (!empty($npm))
|
if (!empty($npm))
|
||||||
|
@ -346,7 +340,6 @@ class PullsModel extends ListModel
|
||||||
*/
|
*/
|
||||||
public function requestFromGithub($page)
|
public function requestFromGithub($page)
|
||||||
{
|
{
|
||||||
// If on page 1, dump the old data
|
|
||||||
if ($page === 1)
|
if ($page === 1)
|
||||||
{
|
{
|
||||||
$this->getDbo()->truncateTable('#__patchtester_pulls');
|
$this->getDbo()->truncateTable('#__patchtester_pulls');
|
||||||
|
@ -385,9 +378,9 @@ class PullsModel extends ListModel
|
||||||
// Default this to being a single page of results
|
// Default this to being a single page of results
|
||||||
$lastPage = 1;
|
$lastPage = 1;
|
||||||
|
|
||||||
if (isset($pullsResponse->headers['Link']))
|
if (isset($pullsResponse->headers['link']))
|
||||||
{
|
{
|
||||||
$linkHeader = $pullsResponse->headers['Link'];
|
$linkHeader = $pullsResponse->headers['link'];
|
||||||
|
|
||||||
// The `joomla/http` 2.0 package uses PSR-7 Responses which has a different format for headers, check for this
|
// The `joomla/http` 2.0 package uses PSR-7 Responses which has a different format for headers, check for this
|
||||||
if (is_array($linkHeader))
|
if (is_array($linkHeader))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user