conservation des infos dans l'edition des sources sourceml.0.16.2
authordj3c1t <dj3c1t@free.fr>
Sat, 19 Oct 2013 21:08:32 +0000 (23:08 +0200)
committerdj3c1t <dj3c1t@free.fr>
Sat, 19 Oct 2013 21:08:32 +0000 (23:08 +0200)
app/controllers/users/morceaux.php
app/controllers/users/pistes.php

index 9c3adda..93cf57f 100644 (file)
           );
           $source_infos["date_creation"] = $_POST["annee_date_creation"]."-".$_POST["mois_date_creation"]."-".$_POST["jour_date_creation"];
           $source_infos["description"] = $_POST["description"];
+          $morceau["description"] = $source_infos["description"];
+          $morceau["date_creation"] = $source_infos["date_creation"];
           foreach($_POST as $post_key => $post_value){
             if(substr($post_key, 0, 13) == "document_nom_"){
               if($id_document = substr($post_key, 13)){
           "date_inscription" => $_POST["date_inscription"],
           "ordre" => isset($morceau["ordre"]) ? $morceau["ordre"] : 0
         );
+        $permissions = $morceau["permissions"];
+        $image = isset($morceau["image"]) ? $morceau["image"] : null;
+        $image_uri = isset($morceau["image_uri"]) ? $morceau["image_uri"] : null;
+        $image_uri = $morceau["image_uri"];
         $morceau = $data->empty_source(
           array(
             "id" => $morceau["id"],
             "image" => isset($morceau["image"]) ? $morceau["image"] : ""
           )
         );
+        $morceau["permissions"] = $permissions;
+        $morceau["date_creation"] = $_POST["annee_date_creation"]."-".$_POST["mois_date_creation"]."-".$_POST["jour_date_creation"];
+        $morceau["image"] = $image;
+        $morceau["image_uri"] = $image_uri;
         $users_sources_mod = $env->get_controller("users/sources");
         if($_POST["album"]){
           if($album = $data->source($_POST["album"], true)){
           );
           $source_infos["date_creation"] = $_POST["annee_date_creation"]."-".$_POST["mois_date_creation"]."-".$_POST["jour_date_creation"];
           $source_infos["description"] = $_POST["description"];
+          $morceau["description"] = $source_infos["description"];
           foreach($_POST as $post_key => $post_value){
             if(substr($post_key, 0, 13) == "document_nom_"){
               if($id_document = substr($post_key, 13)){
index 30b0d04..eeab45b 100644 (file)
           );
           $source_infos["date_creation"] = $_POST["annee_date_creation"]."-".$_POST["mois_date_creation"]."-".$_POST["jour_date_creation"];
           $source_infos["description"] = $_POST["description"];
+          $piste["description"] = $source_infos["description"];
+          $piste["date_creation"] = $source_infos["date_creation"];
           foreach($_POST as $post_key => $post_value){
             if(substr($post_key, 0, 13) == "document_nom_"){
               if($id_document = substr($post_key, 13)){
       }
       if($compositions) foreach($compositions[$piste["id"]] as $id_morceau) { $piste["morceau"] = $id_morceau; break; }
       if($_POST){
+        $permissions = $piste["permissions"];
+        $image = isset($piste["image"]) ? $piste["image"] : null;
+        $image_uri = isset($piste["image_uri"]) ? $piste["image_uri"] : null;
         $source_infos = array(
           "date_inscription" => $_POST["date_inscription"],
           "ordre" => isset($piste["ordre"]) ? $piste["ordre"] : 0
             "image" => isset($piste["image"]) ? $piste["image"] : ""
           )
         );
+        $piste["permissions"] = $permissions;
+        $piste["date_creation"] = $_POST["annee_date_creation"]."-".$_POST["mois_date_creation"]."-".$_POST["jour_date_creation"];
+        $piste["image"] = $image;
+        $piste["image_uri"] = $image_uri;
         $users_sources_mod = $env->get_controller("users/sources");
         if($_POST["morceau"]){
           if($morceau = $data->source($_POST["morceau"], true)){
           );
           $source_infos["date_creation"] = $_POST["annee_date_creation"]."-".$_POST["mois_date_creation"]."-".$_POST["jour_date_creation"];
           $source_infos["description"] = $_POST["description"];
+          $piste["description"] = $source_infos["description"];
           foreach($_POST as $post_key => $post_value){
             if(substr($post_key, 0, 13) == "document_nom_"){
               if($id_document = substr($post_key, 13)){