mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
22 lines
739 B
PHP
22 lines
739 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;
|
|
}
|