mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 18:29:39 +02:00
This commit is contained in:
parent
0ae428150a
commit
b55b488f46
1 changed files with 5 additions and 1 deletions
|
@ -142,7 +142,11 @@ class API extends PluginAbstract {
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/video.php';
|
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
if (!empty($parameters['videos_id'])) {
|
$dataObj = $this->getDataObject();
|
||||||
|
if($dataObj->APISecret===@$_GET['APISecret']){
|
||||||
|
$rows = Video::getAllVideos("viewable", true, true);
|
||||||
|
$totalRows = Video::getTotalVideos("viewable", true, true);
|
||||||
|
}else if (!empty($parameters['videos_id'])) {
|
||||||
$rows = Video::getVideo($parameters['videos_id']);
|
$rows = Video::getVideo($parameters['videos_id']);
|
||||||
$totalRows = empty($rows) ? 0 : 1;
|
$totalRows = empty($rows) ? 0 : 1;
|
||||||
} else if (!empty($parameters['clean_title'])) {
|
} else if (!empty($parameters['clean_title'])) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue