Changeset 71850 in spip-zone
- Timestamp:
- Apr 9, 2013, 5:58:50 PM (8 years ago)
- Location:
- _plugins_/getID3/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/getID3/trunk/formulaires/editer_id3.php
r71838 r71850 6 6 * Auteurs : 7 7 * kent1 (http://www.kent1.info - kent1@arscenic.info), BoOz 8 * 2008-201 2- Distribué sous licence GNU/GPL8 * 2008-2013 - Distribué sous licence GNU/GPL 9 9 * 10 10 * Formulaire d'édition des tags ID3 d'un fichier sonore … … 22 22 function formulaires_editer_id3_charger($id,$retour=''){ 23 23 $valeurs = array(); 24 $config_id3 = lire_config('getid3',array());25 $infos_doc = sql_fetsel('*','spip_documents','id_document='.intval($id));24 if(!function_exists('lire_config')) 25 $config_id3 = lire_config('getid3',array()); 26 26 27 if(!in_array($infos_doc['extension'],lire_config('getid3_write',array('mp3')))){ 27 $infos_doc = sql_fetsel('extension,distant,fichier','spip_documents','id_document='.intval($id)); 28 if(!in_array($infos_doc['extension'],lire_config('getid3_write',array('mp3')))) 28 29 $valeurs['message_erreur'] = _T('getid3:message_extension_invalide_ecriture'); 29 }else if($infos_doc['distant'] == 'oui'){30 else if($infos_doc['distant'] == 'oui') 30 31 $valeurs['message_erreur'] = _T('getid3:message_erreur_document_distant_ecriture'); 31 }32 if(isset($valeurs['message_erreur'])) {32 33 if(isset($valeurs['message_erreur'])) 33 34 $valeurs['editable'] = false; 34 }else{35 else{ 35 36 /** 36 37 * Récupération des tags habituels: … … 43 44 include_spip('inc/documents'); 44 45 $fichier = get_spip_doc($infos_doc['fichier']); 45 $recuperer_id3 = charger_fonction('recuperer_id3','inc'); 46 $valeurs = $recuperer_id3($fichier); 46 $recuperer_id3 = charger_fonction('getid3_recuperer_infos','inc'); 47 $valeurs = $recuperer_id3(false,$fichier,false,true); 48 47 49 foreach($valeurs as $valeur => $info){ 48 50 if(preg_match('/cover/',$valeur)){ 49 51 $valeurs['covers'][] = $info; 50 52 $valeurs['_hidden'] .= "<input type='hidden' name='old_cover' id='old_cover' value='$info' />"; 51 }else{ 52 $valeurs[$valeur] = filtrer_entites($info); 53 } 53 }else 54 $valeurs[$valeur] = $info; 54 55 } 55 56 if(!count($valeurs['covers']) && (strlen($config_id3['cover_defaut']) > 0)){ -
_plugins_/getID3/trunk/genie/getid3_taches_generales.php
r71838 r71850 6 6 * Auteurs : 7 7 * kent1 (http://www.kent1.info - kent1@arscenic.info), BoOz 8 * 2008-201 2- Distribué sous licence GNU/GPL8 * 2008-2013 - Distribué sous licence GNU/GPL 9 9 * 10 * @package SPIP\GetID3\Crons 10 11 */ 11 12 -
_plugins_/getID3/trunk/inc/getid3_ecrire_infos.php
r71838 r71850 6 6 * Auteurs : 7 7 * kent1 (http://www.kent1.info - kent1@arscenic.info), BoOz 8 * 2008-201 2- Distribué sous licence GNU/GPL8 * 2008-2013 - Distribué sous licence GNU/GPL 9 9 * 10 * Ecriture des tags ID3 ou vorbis 10 11 */ 11 12 … … 26 27 27 28 function inc_getid3_ecrire_infos($id_document,$infos=array(),$images=null,$formats = array('id3v1', 'id3v2.3')){ 28 if(!intval($id_document)){ 29 return; 30 } 29 if(!intval($id_document)) 30 return false; 31 31 32 32 $document = sql_fetsel("fichier,distant,extension", "spip_documents","id_document=".intval($id_document)); … … 42 42 } 43 43 44 $err = array(); 45 $TagData = array(); 44 $err = $TagData = array(); 46 45 47 46 include_spip('inc/documents'); … … 50 49 include_spip('getid3/getid3'); 51 50 $getid3 = new getID3; 52 if(!$getid3) {51 if(!$getid3) 53 52 return false; 54 }55 53 56 54 include_spip('getid3/write'); … … 133 131 * Les warnings 134 132 */ 135 if (!empty($ecrire->warnings)) {133 if (!empty($ecrire->warnings)) 136 134 $err = array_merge($err,$ecrire->warnings); 137 }138 135 139 136 /** 140 137 * Les erreurs 141 138 */ 142 if (!empty($ecrire->errors)) {139 if (!empty($ecrire->errors)) 143 140 $err = array_merge($err,$ecrire->errors); 144 }145 141 146 142 /** -
_plugins_/getID3/trunk/inc/getid3_recuperer_infos.php
r71837 r71850 106 106 * pour que le point soit lié dans le pipeline post_edition 107 107 */ 108 if(defined('_DIR_PLUGIN_GIS') && is_numeric($infos['latitude']) && is_numeric($infos['longitude'])){108 if(defined('_DIR_PLUGIN_GIS') && !$only_return && is_numeric($infos['latitude']) && is_numeric($infos['longitude'])){ 109 109 $zoom = lire_config('gis/zoom',4); 110 110 $config = @unserialize($GLOBALS['meta']['gis']); … … 233 233 } 234 234 235 if((count($covers) > 0) ){235 if((count($covers) > 0) && !$only_return){ 236 236 if(intval($id_document)) 237 237 $id_vignette = sql_getfetsel('id_vignette','spip_documents','id_document='.intval($id_document)); … … 251 251 $infos['id_vignette'] = $id_vignette; 252 252 } 253 }else if( strlen($cover_defaut = lire_config('getid3/cover_defaut','')) > 1){253 }else if(!$only_return && strlen($cover_defaut = lire_config('getid3/cover_defaut','')) > 1){ 254 254 /** 255 255 * Si on n'a pas de cover, -
_plugins_/getID3/trunk/paquet.xml
r71841 r71850 2 2 prefix="getid3" 3 3 categorie="multimedia" 4 version="1.3. 1"4 version="1.3.2" 5 5 etat="stable" 6 6 compatibilite="[3.0.2;3.0.99]" 7 7 logo="images/id3v2.png" 8 8 schema="0.5.0" 9 documentation="http://www.mediaspip.net/?article32" 10 developpement="http://www.mediaspip.net/spip.php?page=tickets&composant=plugins%20-%20getID3" 9 11 > 10 12
Note: See TracChangeset
for help on using the changeset viewer.