1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
Daniel Neto 2023-03-28 13:08:27 -03:00
parent 8483867cb1
commit 49f5694d2c
2 changed files with 22 additions and 3 deletions

View file

@ -2210,14 +2210,22 @@ class SectionFirstPage
//$endpointURL = addQueryStringParameter($endpointURL, 'PHPSESSID', session_id());
}
$response = json_decode(url_get_contents($endpointURL, '', 2, false, true));
$endPointResponse = url_get_contents_with_cache($endpointURL, 300, '', 5, false, true);
$response = json_decode($endPointResponse);
/*
if(User::isLogged()){
session_id($response->session_id);
}
*/
$this->endpointResponse = $response->response;
$this->totalRows = $this->endpointResponse->totalRows;
if(!empty($response)){
$this->endpointResponse = $response->response;
$this->totalRows = $this->endpointResponse->totalRows;
}else{
$this->endpointResponse = new stdClass();
$this->totalRows = 0;
}
$this->childs = $childs;
}
}