"Lorenzo Hernandez Garcia-Hierro" <[EMAIL PROTECTED]> tapota :

> Hi,
> I've created the new branch for the Savane version without globals.
> Today i can't work , i will away so tomorrow i will work some time.
> This my idea of the possible recoding:
> - First: setting register_globals to Off and run the code , look for
> variable errors and
> replace variables that must be sent by users with normal GET VARS or POST
> VARS.

I think the easiest way to go would be each time a new variable appears
in the code to defines it according to variables accepted for it.

For instance, if you have $blabla that occurs in a page like that,
where $blabla can righfully be set by a POST and a GET

if ($blabla) 
   {
  
   }  

It would make sense to me to write :

if ($_POST['blabla'])
   { $blabla = $_POST['blabla']; }
elseif ($_GET['blabla'])
   { $blabla = $_GET['blabla']; }
   
if ($blabla)
   {

   }

instead of doing :

if ($_POST['blabla'] || $_GET['blabla'])
   {

   }

because the latest will be a true pain when the statements will be
more complicated.


> - Adding a new file to /include for set variables , etc. 

How so ?



Regards,
-- 
Mathieu Roy

  +---------------------------------------------------------------------+
  | General Homepage:           http://yeupou.coleumes.org/             |
  | Computing Homepage:         http://alberich.coleumes.org/           |
  | Not a native english speaker:                                       |
  |     http://stock.coleumes.org/doc.php?i=/misc-files/flawed-english  |
  +---------------------------------------------------------------------+

Reply via email to