mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Update
This commit is contained in:
parent
25bb9cc324
commit
e37a935dff
1 changed files with 14 additions and 2 deletions
|
@ -48,10 +48,23 @@ if (empty($_POST['list'])) {
|
|||
$_POST['list'][] = $value['id'];
|
||||
}
|
||||
}
|
||||
$o = new stdClass();
|
||||
$o->savedPLItem = array();
|
||||
$o->playlist_id = $_REQUEST['playlist_id'];
|
||||
|
||||
_error_log('playlistSort line='.__LINE__);
|
||||
mysqlBeginTransaction();
|
||||
foreach ($_POST['list'] as $key => $value) {
|
||||
$result = $obj->addVideo($value, true, ($count++), false);
|
||||
if(empty($value)){
|
||||
continue;
|
||||
}
|
||||
$order = ($count++);
|
||||
$result = $obj->addVideo($value, true, $order, false);
|
||||
$o->savedPLItem[] = array(
|
||||
'resp'=>$result,
|
||||
'videos_id'=>$value,
|
||||
'order'=>$order,
|
||||
);
|
||||
}
|
||||
PlayList::deleteCacheDir($obj->getId());
|
||||
mysqlCommit();
|
||||
|
@ -62,7 +75,6 @@ if (!empty($_GET['sort'])) {
|
|||
//header("Location: ". User::getChannelLink($obj->getUsers_id()));
|
||||
exit;
|
||||
}
|
||||
$o = new stdClass();
|
||||
$o->status = $result;
|
||||
//$o->channelName = $obj->get;
|
||||
echo json_encode($o);exit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue