This is an automated notification sent by Gna!.
It relates to:
                bugs #1799, project GLPI

==============================================================================
 LATEST MODIFICATIONS of bugs #1799:
==============================================================================

               Posted by: DOMBRE Julien <moyo>
               Posted on: 2005-01-15 21:25 (Europe/Paris)
    _______________________________________________________

                  Status:                    None -> Fixed                  


==============================================================================
 OVERVIEW of bugs #1799:
==============================================================================

URL:
  <http://gna.org/bugs/?func=detailitem&item_id=1799>

                 Summary: setup-dropdowns.php, $which renovie une valeur non
conforme (exemple : "locationswhich=locations" au lieu de "locations"
                 Project: GLPI
            Submitted by: silvermat
            Submitted on: Thu 10/28/2004 at 13:12
                Category: None
                Severity: 3 - Ordinary
                Priority: 5 - Normal
                  Status: Fixed
                 Privacy: Public
             Assigned to: moyo
        Originator Email: 
             Open/Closed: Open

    _______________________________________________________


J'avais le problème suivant :

Dans configuration --> intitulés, la liste des éléments de chaque rubrique
(lieux, types d emachines, etc...) ne s'affichait jamais.



Via un echo $which dans setup-dropdowns.php, je me suis aperçu que $which
renvoyait par exemple : "locationswhich=locations" au lieu de "locations" tout
court



Est ce un probleme spécifique à mon installation et ma version de php ou
d'autres ont ils eu ce problème ?



J'ai résolu mon problème de la façon suivante, j'ai ajouté le code suivant :



// Modifications Patrick Kocelniak 26-10-2004

$longueur=(strlen($which)-5)/2;

$which=substr($which,0,$longueur);

// Fin modifications



Modifications à mettre juste avant le code :



foreach ($dp as $key => $val){

$sel="";

if ($which==$key) $sel="selected";

echo "<option value='$key' $sel>".$val."</option>";

}

    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 01/13/2005 at 00:13       By: Jean-Mathieu Doléans <silvermat>
J'ai regardé...



Je dois avoir les yeux à coté des trous, je ne pige pas pourquoi $which  sort
ça.



Je vois rien qui puisse l'expliquer dans le code proprement dit...



et j'arrive pas à reproduire le bug.












==============================================================================

This item URL is:
  <http://gna.org/bugs/?func=detailitem&item_id=1799>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


Répondre à