Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Date order being reversed after 'Apply' ?

phpMyEdit General     Date order being reversed after 'Apply' ?
Odoslať novú tému   Odpovedať na tému    
 
jonw     Založený: 19.04.2004   Príspevky: 5  
Príspevok Zaslal: 2004-04-19 06:01
Návrat hore  Odpovedať s citátom     

Hi, I've recently been looking at upgrading a site I run which uses phpMyEdit to maintain a lot of the system SQL tables and have noticed something odd since moving from 5.3 to 5.4. (The same problem appears to occur in the current (18th April) CVS too)

I'd like to move to 5.4 so I can start using the popup calendar functionality, but this happens even without that enabled:

I have a table which stores news items, I use:

$opts['sort_field'] = '-date';

To ensure that the most recent items are listed first in phpMyEdit. I don't display any sort controls or give users the ability to change the sort / filters.

When the screen first loads, the order is correct, when I add a new item and click 'Save' the order is correct, and if I click 'Cancel' the order is correct.

As soon as I use the 'More' (or 'Apply') button though, the order gets reversed when I return to the list view as if I'd used:

$opts['sort_field'] = 'date' (without the '-').

This gets weird when limiting the number of records per page as when the date order gets inverted the page numbers get very confused.

Should this be reported as a bug or am I missing something obvious ?

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-04-19 08:05
Návrat hore  Odpovedať s citátom     

is your problem similar to
http://opensource.platon.sk/forum/projects/viewtopic.php?t=343&highlight=date ?

 
jonw     Založený: 19.04.2004   Príspevky: 5  
Príspevok Zaslal: 2004-04-19 09:20
Návrat hore  Odpovedať s citátom     

michal Napísal:
is your problem similar to
http://opensource.platon.sk/forum/projects/viewtopic.php?t=343&highlight=date ?


Nope, the sort works fine when you first go to the page, but after you use 'apply' or 'more' when changing or adding a record and go back to the list the order is then inverted.

Reloading the page from scratch gets everything back into order (until you use apply or more again).

I've also made sure that the lang files are the ones from the 5.4 release and not older ones left hanging around.

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-04-19 09:44
Návrat hore  Odpovedať s citátom     

yet another suggestion, try current CVS version of the core class (on your left CVS/browser/phpMyEdit/..)
there have several changes since 5.4 release.

the problem is probably with the second part of recreate_displayed(). i've tried to understand this part, but i was unsuccesful....

 
jonw     Založený: 19.04.2004   Príspevky: 5  
Príspevok Zaslal: 2004-04-19 10:18
Návrat hore  Odpovedať s citátom     

Already tried the CVS version (see 1st post above), it has exactly the same problem.

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-04-19 10:45
Návrat hore  Odpovedať s citátom     

i'm sorry, note to use CVS version solves third of the problems. so it's the first answer i try :)


after some testing
Kód:

$opts['sort_field'] = array('-date');

works
while
Kód:

$opts['sort_field'] = '-date';

does not work.

there are just two questions left:
why one works and second one does not ?
does anybody care ? :)

 
jonw     Založený: 19.04.2004   Príspevky: 5  
Príspevok Zaslal: 2004-04-19 13:10
Návrat hore  Odpovedať s citátom     

Well, I care - pretty much means I can't use 5.4 (I have some *really* dumb users) :(

Have tried using array('-date') and get the same (wrong) result after clicking 'more' then 'cancel' the list still gets reversed :(

I've produced a simple case which shows the problem, will post as a bug.

 
jonw     Založený: 19.04.2004   Príspevky: 5  
Príspevok Zaslal: 2004-04-19 13:22
Návrat hore  Odpovedať s citátom     

Have posted as a bug #233 here .

Includes my test code to reproduce the problem using 5.4 (stable) here.

 
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