ninetydegrees (90d)☕ (
ninetydegrees) wrote in
dw_dev_training2010-02-23 01:18 pm
QFaN: how thorough are redirects supposed to be?
The case: bug #2398 is about moving editpics to editicons. If I have a look at the patch submitted for a similar bug (bug #2396) it seems simple enough (and something a baby like me managed to actually patch \o/).
The question: should the 'renaming' be more thorough for this bug? In other words, should all references to editpics in other files such as allpics.bml and /site/index.bml be changed and should related files such as editpics.css and editpics.js be 'renamed' too? Or should we trust the redirect to make everything work smoothly and not bother?
The question: should the 'renaming' be more thorough for this bug? In other words, should all references to editpics in other files such as allpics.bml and /site/index.bml be changed and should related files such as editpics.css and editpics.js be 'renamed' too? Or should we trust the redirect to make everything work smoothly and not bother?

no subject
So:
cgi-bin/Apache/BML.pm
cvs/bml/lib/Apache/BML.pm
Are basically the same file, and you'd only need to edit one of them when making your patch -- in this case, cgi-bin/Apache/BML.pm.
Anyway, the mention of editpics in cgi-bin/Apache/BML.pm looks like an explanatory comment; yup edit it.
cvs/bml/lib/Apache/BML.pm - mirror of cgi-bin/Apache/BML.pm, so the patch you make will be affecting both. No need to edit this
cvs/bml/test/fake_root/bml-test.correct - these three files are used to test whether BML is working correctly, but they're more sample text than anything else. They're not used on the actual site, so it's not critical that they match wrt editpics versus editicons. No need to edit.
cvs/bml/test/fake_root/bml-test.bml
cvs/bml/test/fake_root/global.look
editpics.js and editpics.css -- hmmmm. no harm done if they're not renamed, since CSS classnames and function names are not user-facing, so you don't *need* to rename them, but I say sure, go ahead and rename.
en.dat -- nah, no need to rename.
if ($inline .= LJ::Hooks::run_hook("cprod_inline", $u, 'EditPics')) {
if ($inline .= LJ::Hooks::run_hook("cprod_inline", $u, 'EditPicsMax')) {
-- hmmmm. No, don't edit.
Quick explanation: hooks are basically a way to implement site-specific logic. Those lines above basically mean to try to do any site-specific logic which was implemented for an inline cprod identified by "EditPics" (and "EditPicsMax"). We haven't implemented any additional logic for cprods, so changing them won't affect us. However, we can't guarantee that other sites using DW code have done the same, so to be safe, don't change them.
no subject
no subject
no subject
Also, I'm unsure about forms like these:
no subject
Hmmmmmmmm. Yes you can fix those as well, just make sure that they're also fixed in whatever processes the form (likely something that looks for $POST{editpics$suffix} somewhere down the page)
no subject
no subject
($LJHOME/cvs contains dw-free, dw-nonfree, and a bunch of other folders, including bml)
no subject
no subject
Hmm. I don't see anything like this, no.
no subject
no subject
no subject
no subject
no subject
*salutes*