User:Catrope/UploadWizard review

Review as of r84913

UploadWizard.config.php

 * apiUrl should use $wgScriptExtension
 * Commented-out stuff about exporting blacklist regexes; is that supposed to stay or go?

UploadWizardHooks.php

 * The CanonicalNamespaces thing is ugly, but I understand why you need it (File is the canonical name and we don't do a great job of exporting those to JS ATM AFAIK); it should be fixed properly at some point though
 * Tipsy, autoellipis and jquery.suggestions are in core, don't duplicate them

test/jasmine/makeLanguageSpec.php

 * This should honor the  environment variable if present, instead of assuming the extensions directory will always be a sibling of the maintenance directory

test/jasmine/SpecRunner.html

 * Also makes assumptions about the location of the resources directory relative to . There's no easy way to fix it, though, and it's just the test suite.

UploadWizardDependencyLoader.php

 * This still seems to be used here and there. Is UW not fully RL-ified yet?

resources/mw.UploadWizardDeed.js

 * In  there's some scary HTML building using things like  . Please use jQuery functions instead so things are escaped properly.

resources/mw.UploadWizardLicenseInput.js

 * --> does that mean you have to build all the attributes in a scary way? Can't you e.g. create it as  and add other attribs later?

resources/mw.UploadWizardUploadInterface.js

 * seems to be leaked to the global scope
 * is redundant, you can just use
 * Bindings for mouseenter and mouseleave are commented out, what's up with that?
 * Quick testing seems to indicate that the src attribute of an  is already URL-encoded when you fetch it, so you don't need to URL-encode it in setPreview
 * showTransportProgress doesn't use its argument

resources/jquery/jquery.removeCtrl.js

 * Things that are intended to be called as  instead of   should not be registered as   but as

resources/uploadWizard.css

 * Use  for icon images.

resources/mw.Uri.js

 * leaks  to the global scope.
 * To what degree is this library not obsoleted by  ?

resources/mw.UploadWizard.js

 * After wrestling with bootloaders and reviewing lots of your code, seeing these comments cracked me up. Thank you for making my day :)
 * that's a valid statement, and does absolutely nothing, but I do wonder what it's doing there :)
 * Note that this replace call will only replace the first occurrence. To replace all underscores with spaces, you need
 * Did you know we have the jQuery cookie plugin in core?
 * More global scope leakage
 * Note that this replace call will only replace the first occurrence. To replace all underscores with spaces, you need
 * Did you know we have the jQuery cookie plugin in core?
 * More global scope leakage
 * Did you know we have the jQuery cookie plugin in core?
 * More global scope leakage
 * More global scope leakage

SpecialUploadWizard.php

 * Why are you exporting wgSiteName by hand? If that's not being exported by MediaWiki, something is very wrong.