From: <ara...@us...> - 2006-12-21 15:41:35
|
Revision: 62 http://svn.sourceforge.net/easybox-mod/?rev=62&view=rev Author: aragornis Date: 2006-12-21 07:41:32 -0800 (Thu, 21 Dec 2006) Log Message: ----------- Petits ajustements sur la gestion de la playlist audio Modified Paths: -------------- trunk/_framework/demarrage.php trunk/_framework/framework.php trunk/module/mp3/lecteuraudio.php trunk/module/mp3/playdb.php Added Paths: ----------- trunk/_utilisateur/audiotemp/ Modified: trunk/_framework/demarrage.php =================================================================== --- trunk/_framework/demarrage.php 2006-12-17 18:14:46 UTC (rev 61) +++ trunk/_framework/demarrage.php 2006-12-21 15:41:32 UTC (rev 62) @@ -6,16 +6,17 @@ $FRAMEWORK_REP = $RACINE_REP."_framework/"; $LIBRARIES_REP = $FRAMEWORK_REP."lib/"; - $BOUTON = $FRAMEWORK_REP."bouton/"; - $GESTION = $RACINE_REP."configuration/"; - $USER = $RACINE_REP."_utilisateur/"; - $CACHE_IMAGE = $RACINE_REP."_utilisateur/cache/"; - $MODULE = $RACINE_REP."module/"; - $LECTEUR = $RACINE_REP."lecteur/"; - $IMG2FBX = $FRAMEWORK_REP."img2fbx.php?sURL="; - $EXPLORATEUR= $MODULE."_explorateur/index1.php"; - $PLAYLIST = $USER."playlist/"; - $AIDE_REP = $RACINE_REP."_framework/aide/"; + $BOUTON = $FRAMEWORK_REP."bouton/"; + $GESTION = $RACINE_REP."configuration/"; + $USER = $RACINE_REP."_utilisateur/"; + $AUDIOTEMP = $USER."audiotemp/"; + $CACHE_IMAGE = $RACINE_REP."_utilisateur/cache/"; + $MODULE = $RACINE_REP."module/"; + $LECTEUR = $RACINE_REP."lecteur/"; + $IMG2FBX = $FRAMEWORK_REP."img2fbx.php?sURL="; + $EXPLORATEUR = $MODULE."_explorateur/index1.php"; + $PLAYLIST = $USER."playlist/"; + $AIDE_REP = $RACINE_REP."_framework/aide/"; require($GESTION."verif_config.php"); @@ -54,6 +55,16 @@ case 1: list_templates(); + function RemoveDir($dir) { + if(!$dh = @opendir($dir)) return; + while (($obj = readdir($dh))) { + if($obj=='.' || $obj=='..') continue; + @unlink($dir.'/'.$obj); + } + @closedir($dh); + } + RemoveDir($AUDIOTEMP); + break; // Phase d'initialisation case 2: Modified: trunk/_framework/framework.php =================================================================== --- trunk/_framework/framework.php 2006-12-17 18:14:46 UTC (rev 61) +++ trunk/_framework/framework.php 2006-12-21 15:41:32 UTC (rev 62) @@ -29,6 +29,9 @@ $USER = $RACINE_REP."_utilisateur/"; $smarty->assign('USER',$USER); + $AUDIOTEMP = $USER."audiotemp/"; + $smarty->assign('AUDIOTEMP',$AUDIOTEMP); + $CACHE_IMAGE = $RACINE_REP."_utilisateur/cache/"; $smarty->assign('CACHE_IMAGE',$CACHE_IMAGE); Modified: trunk/module/mp3/lecteuraudio.php =================================================================== --- trunk/module/mp3/lecteuraudio.php 2006-12-17 18:14:46 UTC (rev 61) +++ trunk/module/mp3/lecteuraudio.php 2006-12-21 15:41:32 UTC (rev 62) @@ -45,7 +45,7 @@ foreach($pl as $morceau){ if($morceau[3] == $toplay){ if(array_pop(explode(".", $morceau[2]))=='m3u'){ - $supplement = '?toplaybis='.$_GET['url']; + $supplement = '?toplaybis='.urlencode(realpath($_GET['url'])); } } } Modified: trunk/module/mp3/playdb.php =================================================================== --- trunk/module/mp3/playdb.php 2006-12-17 18:14:46 UTC (rev 61) +++ trunk/module/mp3/playdb.php 2006-12-21 15:41:32 UTC (rev 62) @@ -151,11 +151,11 @@ ".utf8_encode(realpath(stripslashes($basename))); } //Cr\xE9ation de la playlist temporaire - $fp = fopen($USER.'audiotemp'.get_variable('num_playlist').'.m3u',"w+"); + $fp = fopen($AUDIOTEMP.'audiotemp'.get_variable('num_playlist').'.m3u',"w+"); fputs($fp,"#EXTM3U"); fputs($fp,$variable); fclose($fp); - play_fichier($page,$USER.'audiotemp'.get_variable('num_playlist').'.m3u',1,'mp3'); + play_fichier($page,$AUDIOTEMP.'audiotemp'.get_variable('num_playlist').'.m3u',1,'mp3'); save_variable('num_playlist', get_variable('num_playlist')+1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |