mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 10:49:36 +02:00
Fix embed link save
This commit is contained in:
parent
57400b579e
commit
444f08dda8
6 changed files with 35 additions and 18 deletions
|
@ -113,7 +113,7 @@ class Subscribe {
|
|||
$sql .= " AND status = '{$status}' ";
|
||||
}
|
||||
$sql .= " LIMIT 1";
|
||||
$res = sqlDAL::readSql($sql);
|
||||
$res = sqlDAL::readSql($sql, "", array(), true);
|
||||
$data = sqlDAL::fetchAssoc($res);
|
||||
sqlDAL::close($res);
|
||||
if ($res != false) {
|
||||
|
|
|
@ -66,7 +66,8 @@ if (!class_exists('Video')) {
|
|||
'd' => 'Downloading',
|
||||
't' => 'Transfering',
|
||||
'u' => 'Unlisted',
|
||||
'r' => 'Recording');
|
||||
'r' => 'Recording',
|
||||
'f' => 'FansOnly');
|
||||
public static $statusActive = 'a';
|
||||
public static $statusActiveAndEncoding = 'k';
|
||||
public static $statusInactive = 'i';
|
||||
|
@ -76,6 +77,7 @@ if (!class_exists('Video')) {
|
|||
public static $statusTranfering = 't';
|
||||
public static $statusUnlisted = 'u';
|
||||
public static $statusRecording = 'r';
|
||||
public static $statusFansOnly = 'f';
|
||||
public static $rratingOptions = array('', 'g', 'pg', 'pg-13', 'r', 'nc-17', 'ma');
|
||||
//ver 3.4
|
||||
private $youtubeId;
|
||||
|
@ -1111,7 +1113,11 @@ if (!class_exists('Video')) {
|
|||
require_once 'userGroups.php';
|
||||
TimeLogStart("video::getAllVideos foreach");
|
||||
foreach ($fullData as $row) {
|
||||
$videos[] = self::getInfo($row, $getStatistcs);
|
||||
$row = self::getInfo($row, $getStatistcs);
|
||||
if(!is_object($row['externalOptions'])){
|
||||
$row['externalOptions'] = _json_decode($row['externalOptions']);
|
||||
}
|
||||
$videos[] = $row;
|
||||
}
|
||||
$rowCount = getRowCount();
|
||||
$tolerance = $rowCount / 100;
|
||||
|
@ -1577,21 +1583,14 @@ if (!class_exists('Video')) {
|
|||
}
|
||||
|
||||
public static function getViewableStatus($showUnlisted = false) {
|
||||
/**
|
||||
a = active
|
||||
k = active and encoding
|
||||
i = inactive
|
||||
e = encoding
|
||||
x = encoding error
|
||||
d = downloading
|
||||
u = unlisted
|
||||
*/
|
||||
$viewable = array('a', 'k');
|
||||
$viewable = array('a', 'k', 'f');
|
||||
if ($showUnlisted) {
|
||||
$viewable[] = "u";
|
||||
} elseif (!empty($_GET['videoName'])) {
|
||||
}
|
||||
$videos_id = getVideos_id();
|
||||
if (!empty($videos_id)) {
|
||||
$post = $_POST;
|
||||
if (self::isOwnerFromCleanTitle($_GET['videoName']) || Permissions::canModerateVideos()) {
|
||||
if (self::isOwner($videos_id) || Permissions::canModerateVideos()) {
|
||||
$viewable[] = "u";
|
||||
}
|
||||
$_POST = $post;
|
||||
|
@ -2189,7 +2188,11 @@ if (!class_exists('Video')) {
|
|||
}
|
||||
} else {
|
||||
$ppv = AVideoPlugin::getObjectDataIfEnabled("PayPerView");
|
||||
if ($advancedCustomUser->userCanProtectVideosWithPassword && !empty($video->getVideo_password())) {
|
||||
if ($video->getStatus()===self::$statusFansOnly) {
|
||||
$objTag->type = "warning";
|
||||
$objTag->text = '<i class="fas fa-star" ></i>';
|
||||
$objTag->tooltip = __("Fans Only");
|
||||
} elseif ($advancedCustomUser->userCanProtectVideosWithPassword && !empty($video->getVideo_password())) {
|
||||
$objTag->type = "danger";
|
||||
$objTag->text = '<i class="fas fa-lock" ></i>';
|
||||
$objTag->tooltip = __("Password Protected");
|
||||
|
|
|
@ -6,7 +6,9 @@ $extraPluginFile = $global['systemRootPath'] . 'plugin/Customize/Objects/ExtraCo
|
|||
if(empty($advancedCustom)){
|
||||
$advancedCustom = AVideoPlugin::getObjectData("CustomizeAdvanced");
|
||||
}
|
||||
|
||||
if(is_object($video)){
|
||||
$video = Video::getVideoLight($video->getId());
|
||||
}
|
||||
$custom = array();
|
||||
|
||||
if (file_exists($extraPluginFile) && AVideoPlugin::isEnabled("c4fe1b83-8f5a-4d1b-b912-172c608bf9e3")) {
|
||||
|
|
|
@ -1653,6 +1653,9 @@ function avideoAjax(url, data) {
|
|||
avideoAlertError(response.msg);
|
||||
} else {
|
||||
avideoToastSuccess(response.msg);
|
||||
if(typeof response.eval !== 'undefined'){
|
||||
eval(response.eval);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1258,6 +1258,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
|
|||
|
||||
function resetVideoForm() {
|
||||
isArticle = 0;
|
||||
$('#fileUploadVideos_id').val(0);
|
||||
$('.nav-tabs a[href="#pmedia"], #pmedia').show();
|
||||
$("#pmedia").css("display", "");
|
||||
$("#pmedia").attr("style", "");
|
||||
|
@ -1758,6 +1759,7 @@ if (empty($advancedCustom->disableCopyEmbed)) {
|
|||
var activeBtn = '<button style="color: #090" type="button" class="btn btn-default btn-xs command-active" data-row-id="' + row.id + '" data-toggle="tooltip" title="<?php echo str_replace("'", "\\'", __("This video is Active and Listed, click here to unlist it")); ?>"><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span></button>';
|
||||
var inactiveBtn = '<button style="color: #A00" type="button" class="btn btn-default btn-xs command-inactive" data-row-id="' + row.id + '" data-toggle="tooltip" title="<?php echo str_replace("'", "\\'", __("This video is inactive, click here to activate it")); ?>"><span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span></button>';
|
||||
var unlistedBtn = '<button style="color: #BBB" type="button" class="btn btn-default btn-xs command-unlisted" data-row-id="' + row.id + '" data-toggle="tooltip" title="<?php echo str_replace("'", "\\'", __("This video is unlisted, click here to inactivate it")); ?>"><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span></button>';
|
||||
var fansOnlyBtn = '<button style="color: #FFD700" type="button" class="btn btn-default btn-xs command-fansOnly" data-row-id="' + row.id + '" data-toggle="tooltip" title="<?php echo str_replace("'", "\\'", __("This video is for fans Only, click here to toogle it")); ?>" onclick="avideoAjax(webSiteRootURL+\'plugin/FansSubscriptions/toogleFansOnly.json.php?videos_id=' + row.id + '\', {});"><i class="fas fa-star" aria-hidden="true"></i></button>';
|
||||
var status;
|
||||
var pluginsButtons = '<?php echo AVideoPlugin::getVideosManagerListButton(); ?>';
|
||||
var download = "";
|
||||
|
@ -1802,6 +1804,8 @@ if (User::isAdmin()) {
|
|||
status = activeBtn;
|
||||
} else if (row.status == "u") {
|
||||
status = unlistedBtn;
|
||||
} else if (row.status == "f") {
|
||||
status = fansOnlyBtn;
|
||||
} else if (row.status == "x") {
|
||||
return editBtn + deleteBtn;
|
||||
} else if (row.status == "d") {
|
||||
|
|
|
@ -175,7 +175,12 @@ if (User::hasBlockedUser($video['users_id'])) {
|
|||
echo '<!-- CustomizeUser::canDownloadVideosFromVideo said NO -->';
|
||||
}
|
||||
?>
|
||||
<?php } echo AVideoPlugin::getWatchActionButton($video['id']); ?>
|
||||
<?php
|
||||
}
|
||||
$_v = $video;
|
||||
echo AVideoPlugin::getWatchActionButton($video['id']);
|
||||
$video = $_v;
|
||||
?>
|
||||
<?php
|
||||
if (!empty($video['id']) && empty($advancedCustom->removeThumbsUpAndDown)) {
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue