1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/objects/videos.txt.php
2022-03-17 11:43:59 -03:00

22 lines
761 B
PHP

<?php
error_reporting(0);
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
header('Content-type: text/plain');
$showOnlyLoggedUserVideos = true;
if (Permissions::canModerateVideos()) {
$showOnlyLoggedUserVideos = false;
}
$videos = Video::getAllVideosLight('', $showOnlyLoggedUserVideos, false);
foreach ($videos as $key => $value) {
if (empty($_GET['type'])) {
echo Video::getPermaLink($videos[$key]['id']);
} else {
echo Video::getURLFriendlyFromCleanTitle($videos[$key]['clean_title']);
}
echo PHP_EOL;
}