phpMyEdit - Rozšírené detaily chyby [ Späť ]
150 core / field option slabá vždy 2003-12-18 19:00 2004-02-20 13:15
ajh i386  
nepto Linux  
normálna SuSE 8.1  
uzavretý current from CVS  
vyriešený  
žiadny  
žiadny  
Trimlen breaks URL linkages
See description in this forum entry:

http://platon.sk/forum/projects/viewtopic.php?t=233
Create a text field as a URL, set a trimlen option on it. The actual link is trimmed as well as the display - thus breaking the link
Proposed solution in the forum entry

Poznámky k chybe
nepto   
2003-12-18 22:20   
Thank you for this nice bug-report.

It was fixed in the CVS and will appear in comming release.
ajh   
2003-12-19 13:56   
I think that there may be an inconsistency in the way that this has been implemented which might break URLdisp. Looking at the way that the new variable substitution array has been setup, the $value variable will always be the new link_val (ie. the full URL) in both URL and URLdisp. Whilst this behaviour makes sense for URL, it might not for URLdisp - you might still want the trimmed URL for display purposes. Could you explictly make both link_val and disp_val available to use in URLdisp. I think that this could be done just by adding another entry into the substitution array in the URLdisplay function:

'display' => $disp_val

That way the user could use $display in their URLdisp string to get the trimmed version.

I have to say that I haven't actually tried this yet, but I think I'm right about the behaviour.

edited on: 2003-12-19 14:00

edited on: 2003-12-19 14:00
nepto   
2003-12-19 18:02   
OK, that I would like to leave $value as original "display" value and create new $link as "link" value.

'link' => $link_val
'value' => $disp_val
ajh   
2003-12-19 18:06   
That would be great - thanks
nepto   
2003-12-19 18:08   
OK, fixed in CVS. Documentation updated as well.