mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +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'];
|
$_POST['list'][] = $value['id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$o = new stdClass();
|
||||||
|
$o->savedPLItem = array();
|
||||||
|
$o->playlist_id = $_REQUEST['playlist_id'];
|
||||||
|
|
||||||
_error_log('playlistSort line='.__LINE__);
|
_error_log('playlistSort line='.__LINE__);
|
||||||
mysqlBeginTransaction();
|
mysqlBeginTransaction();
|
||||||
foreach ($_POST['list'] as $key => $value) {
|
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());
|
PlayList::deleteCacheDir($obj->getId());
|
||||||
mysqlCommit();
|
mysqlCommit();
|
||||||
|
@ -62,7 +75,6 @@ if (!empty($_GET['sort'])) {
|
||||||
//header("Location: ". User::getChannelLink($obj->getUsers_id()));
|
//header("Location: ". User::getChannelLink($obj->getUsers_id()));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$o = new stdClass();
|
|
||||||
$o->status = $result;
|
$o->status = $result;
|
||||||
//$o->channelName = $obj->get;
|
//$o->channelName = $obj->get;
|
||||||
echo json_encode($o);exit;
|
echo json_encode($o);exit;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue