1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
This commit is contained in:
Daniel Neto 2023-03-14 16:41:25 -03:00
parent 22d5803de2
commit 948d61ada5

View file

@ -1824,6 +1824,7 @@ class SectionFirstPage {
// Add constructor, getter, and setter here // Add constructor, getter, and setter here
public function __construct($type, $title, $endpoint, $rowCount, $childs = array()) { public function __construct($type, $title, $endpoint, $rowCount, $childs = array()) {
global $global;
$endpoint = addQueryStringParameter($endpoint, 'current', 1); $endpoint = addQueryStringParameter($endpoint, 'current', 1);
$endpoint = addQueryStringParameter($endpoint, 'noRelated', 1); $endpoint = addQueryStringParameter($endpoint, 'noRelated', 1);
$this->type = $type; $this->type = $type;
@ -1832,6 +1833,11 @@ class SectionFirstPage {
$this->nextEndpoint = addQueryStringParameter($endpoint, 'current', 2); $this->nextEndpoint = addQueryStringParameter($endpoint, 'current', 2);
$this->rowCount = $rowCount; $this->rowCount = $rowCount;
$endpointURL = addQueryStringParameter($endpoint, 'rowCount', $rowCount); $endpointURL = addQueryStringParameter($endpoint, 'rowCount', $rowCount);
if(User::isLogged()){
$endpointURL = addQueryStringParameter($endpointURL, 'user', User::getUserName());
$endpointURL = addQueryStringParameter($endpointURL, 'pass', User::getUserPass());
$endpointURL = addQueryStringParameter($endpointURL, 'webSiteRootURL', $global['webSiteRootURL']);
}
$response = json_decode(url_get_contents($endpointURL)); $response = json_decode(url_get_contents($endpointURL));
$this->endpointResponse = $response->response; $this->endpointResponse = $response->response;
$this->totalRows = $this->endpointResponse->totalRows; $this->totalRows = $this->endpointResponse->totalRows;