1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
DanieL 2022-07-26 11:39:06 -03:00
parent 52e98a15d6
commit 96c144080b

View file

@ -19,7 +19,11 @@ if (empty($_POST['name'])) {
die('{"error":"'.__("Name can't be blank").'"}'); die('{"error":"'.__("Name can't be blank").'"}');
} }
$obj = new PlayList(@$_POST['id']); $obj = new PlayList(@$_POST['id']);
forbidIfItIsNotMyUsersId($obj->getUsers_id());
if(!empty($obj->getUsers_id())){
forbidIfItIsNotMyUsersId($obj->getUsers_id());
}
$obj->setName($_POST['name']); $obj->setName($_POST['name']);
$obj->setStatus($_POST['status']); $obj->setStatus($_POST['status']);
echo '{"status":"'.$obj->save().'"}'; echo '{"status":"'.$obj->save().'"}';