From: Julian F. <ju...@be...> - 2003-02-24 08:41:45
|
Chr...@he... wrote: > From: vb...@us... > >>M bug_report_advanced_page.php >>M bug_report_page.php >> >>M bug_update_advanced_page.php >>M bug_update_page.php >> >>M bug_view_advanced_page.php >>M bug_view_page.php > > > I allways wondered why we have the bug_*_page and bug_*_advanced_page. > Both are nearly the same - only that the advanced page has some more > fields. > > So when I'm changing one page I allways have to make sure that the > other one gets changed as well - and I have to debug both pages. > > Wouldn't it make more sense to have only one page and show the advanced > fields when f_advanced=1 (or something like that...)? Yes, the duplication is annoying. It's a fine balance. I think having two pages rather than one page that takes a parameter is likely easier because you don't have to worry about passing that parameter on all the time and remembering which one the user wants, and remembering whether a page name you get needs ? appeneded to add cgi params or &. Also, having hundreds of conditional blocks in a file makes it really hard to read. But I do have on my list of things to do, trying to figure out some way of reducing duplication between these files - maybe by having several include files or... I dunno. I'm open to suggestions that achieve a better balance. Julian -- ju...@be... Beta4 Productions (http://www.beta4.com) |