moveAudioClipInPlaylist method added to GreenBox.

This commit is contained in:
tomas 2005-03-09 03:02:37 +00:00
parent 4a83ede603
commit bc9be167cb
1 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,7 @@
Author : $Author: tomas $
Version : $Revision: 1.6 $
Version : $Revision: 1.7 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/Playlist.php,v $
------------------------------------------------------------------------------*/
@ -431,8 +431,10 @@ class Playlist extends StoredFile{
$r = $this->delAudioClip($el['attrs']['id']);
if(PEAR::isError($r)){ return $r; }
}
if($newPos<1) $newPos = 1;
if($newPos>count($els)) $newPos = count($els);
$movedel = array_splice($els, $movedi, 1);
array_splice($els, $newPos, 0, $movedel);
array_splice($els, $newPos-1, 0, $movedel);
// var_dump($els);
foreach($els as $i=>$el){
foreach($el['children'] as $j=>$af){