mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
update
This commit is contained in:
parent
f9a74eb117
commit
a4923173a0
2 changed files with 20 additions and 14 deletions
|
@ -2212,19 +2212,25 @@ class SectionFirstPage
|
|||
}
|
||||
|
||||
$endPointResponse = url_get_contents_with_cache($endpointURL, 300, '', 5, false, true);
|
||||
|
||||
$response = json_decode($endPointResponse);
|
||||
/*
|
||||
if(User::isLogged()){
|
||||
session_id($response->session_id);
|
||||
}
|
||||
*/
|
||||
if(!empty($response)){
|
||||
$this->endpointResponse = $response->response;
|
||||
$this->totalRows = $this->endpointResponse->totalRows;
|
||||
}else{
|
||||
$this->endpointResponse = new stdClass();
|
||||
$this->totalRows = 0;
|
||||
//_error_log(gettype($endPointResponse).' '.json_encode($endPointResponse));
|
||||
if(!empty($endPointResponse)){
|
||||
if(is_string($endPointResponse)){
|
||||
$response = json_decode($endPointResponse);
|
||||
}else{
|
||||
$response = $endPointResponse;
|
||||
}
|
||||
/*
|
||||
if(User::isLogged()){
|
||||
session_id($response->session_id);
|
||||
}
|
||||
*/
|
||||
if(!empty($response)){
|
||||
$this->endpointResponse = $response->response;
|
||||
$this->totalRows = $this->endpointResponse->totalRows;
|
||||
}else{
|
||||
$this->endpointResponse = new stdClass();
|
||||
$this->totalRows = 0;
|
||||
}
|
||||
}
|
||||
$this->childs = $childs;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue