bugganesha - Bugs: bug #8328, [Evaluations annexes] erreurs lors...

 
 

bug #8328: [Evaluations annexes] erreurs lors de la création/mofdification/suppression...

Submitted by:  Eric Villard <EVi>
Submitted on:  Sat 27 Mar 2004 04:01:44 PM UTC  
 
Category: Autres fonctionnalitésSeverity: 2 - Minor
Item Group: NoneRelease: 
Status: NonePrivacy: Public
Assigned to: Eric Villard <EVi>Percent Complete: 100%
Originator Name: EViOpen/Closed: Closed
URL: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 27 Mar 2004 04:01:44 PM UTC, original submission:

Lors de la création d'une évaluation annexe le titre est systématiquement 'A' et le contenu 'r'.
Lors de la modification, de la suppression... on obtient un message du type "Mysql Error : 1054 (Champ 'A' inconnu dans where clause)."

Le problème est dû au paramétrage php : magic_quotes_gpc -> off

Solution :
dans le fichier ./ganesha/inc/library.inc.php

remplacer le passage suivant de la ligne 60 à 68 inclues :

/**

  • Supprime les \ sur POST/GET/COOKIES/FILES

*/
if (!get_magic_quotes_gpc()) {
foreach($HTTP_GET_VARS as $k=>$v) $HTTP_GET_VARS["$k"] = addslashes($v) ;
foreach($HTTP_POST_VARS as $k=>$v) $HTTP_POST_VARS["$k"] = addslashes($v) ;
//foreach($_FILES as $k=>$v) $_FILES["$k"] = addslashes($v) ;
foreach($HTTP_COOKIE_VARS as $k=>$v) $HTTP_COOKIE_VARS["$k"]= addslashes($v) ;
}

par le code suivant :

/**

  • procédure récursive ajoutant les \ dans les éléments d'un tableau
  • @param array &$tab tableau à traiter
  • @access public

*/
// modifications corrigeant le bug concernant la gestion des évaluations annexes
// http://www.anemalab.org/phorum/read.php?f=2&i=6932&t=6932
// EVI 16/03/2004
function ajouteSlashes(&$tab) {
if (gettype($tab)=="array") {
foreach($tab as $k=>$v) {
if (gettype($v)=="string") {
$tab["$k"] = addslashes($v);
} elseif (gettype($v)=="array") {
ajouteSlashes($tab["$k"]);
}
}
}
}

if (!get_magic_quotes_gpc()) {
ajouteSlashes($HTTP_GET_VARS);
ajouteSlashes($HTTP_POST_VARS);
//ajouteSlashes($_FILES);
ajouteSlashes($HTTP_COOKIE_VARS);
}

Eric Villard <EVi>In charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Sat 27 Mar 2004 04:02:07 PM UTCEViOpen/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1