Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 29. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  trim()

phpMyEdit Features     trim()
Odoslať novú tému   Odpovedať na tému    
 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2004-01-21 22:23
Návrat hore  Odpovedať s citátom     

Doug Hockinson Napísal:
It appears that function get_cgi_vars() doesn't return a trimmed value. If the user adds a new record and a space is the first character typed, then the space is not removed from the entry when committed to the database. I am using a recent CVS version of phpMyEdit.class.php.


Well, isn't this a correct behavior ?

I mean, if you want to allways trim, you can use

'sqlw' => 'trim($val_qas),

can't you ?

 
nepto     Založený: 06.01.2003   Príspevky: 320   Bydlisko: Phoenix, Arizona (USA)
Príspevok Zaslal: 2004-01-23 16:46
Návrat hore  Odpovedať s citátom     

I would recommend not to edit 100+ records, but run quite simple UPDATE on your table.

_________________
Ondrej Jombik (Nepto)
Visit my homepage , review my recent CV or projects and give me some feedback .
 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2004-01-23 21:58
Návrat hore  Odpovedať s citátom     

Doug Hockinson Napísal:
When I change in get_cgi_vars()
Kód:
return $var;

to
Kód:
return trim($var);

then sorting by clicking a column title does not work. Try it. This is unexpected, so I thought I'd mention it.


I think this is because $var may be an array (?)

 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2004-01-24 11:58
Návrat hore  Odpovedať s citátom     

Well, this works for me:

replace :
Kód:
return $var;

by :
Kód:
if (!is_array($var)) {
   return trim($var);
} else {
   return $var;
}

in the get_cgi_var() func

I would recommend you to make a tiny class extension that will have only get_cgi_var() changed this way.
So you will not loose further enhancement.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov