User:Jack Phoenix/wikiHow/Low-hanging fruits, 2014-07-03

Low-hanging fruits for wikiHow codebase, 2014-07-03 release


 * General
 * Remove wfLoadExtensionMessages, the function in question ceased to exist a few release ago and without the b/c wrapper in /extensions/wikihow/Misc.php there'd be fatals all over the place
 * /extensions/wikihow/altmethodadder/MethodEditor.body.php
 * /extensions/wikihow/altmethodadder/MethodGuardian.body.php
 * /extensions/wikihow/authors/AuthorEmailNotification.body.php
 * /extensions/wikihow/cattool/Categorizer.body.php
 * /extensions/wikihow/createpage/CreatePage.body.php
 * /extensions/wikihow/dashboard/AdminCommunityDashboard.body.php
 * /extensions/wikihow/dashboard/CommunityDashboard.body.php
 * /extensions/wikihow/docviewer/DocViewer.body.php
 * /extensions/wikihow/editfinder/EditFinder.body.php
 * /extensions/wikihow/eiu/Easyimageupload.body.php
 * /extensions/wikihow/fblogin/FBLogin.body.php
 * /extensions/wikihow/FollowWidget.body.php
 * /extensions/wikihow/GPlusLogin/GPlusLogin.body.php
 * /extensions/wikihow/HAWelcome/HAWelcome.php
 * /extensions/wikihow/HAWelcome/HAWelcomeEdit.body.php
 * /extensions/wikihow/ImageHelper/ImageHelper.body.php
 * /extensions/wikihow/loginreminder/LoginReminder.body.php
 * /extensions/wikihow/LSearch.body.php
 * /extensions/wikihow/Milestones.class.php
 * /extensions/wikihow/Misc.body.php
 * /extensions/wikihow/Misc.php
 * /extensions/wikihow/mobile/ucipatrol/UCIPatrol.body.php
 * /extensions/wikihow/mqg/MQG.body.php
 * /extensions/wikihow/mqg/MQGTest.body.php
 * /extensions/wikihow/nab/Newarticleboost.body.php
 * /extensions/wikihow/nfd/NFDGuardian.body.php
 * /extensions/wikihow/old/Copyimages.body.php
 * /extensions/wikihow/old/gallery/GallerySlide.body.php
 * /extensions/wikihow/old/h5e/Html5editor.body.php
 * /extensions/wikihow/old/h5e/Html5editor.php
 * /extensions/wikihow/old/RateArticle.body.php
 * /extensions/wikihow/old/SSearch.body.php
 * /extensions/wikihow/old/UserTalkTool.body.php
 * /extensions/wikihow/pagestats/Pagestats.body.php
 * /extensions/wikihow/ProfileBadges.body.php
 * /extensions/wikihow/profilebox/ProfileBox.body.php
 * /extensions/wikihow/qc/QC.body.php
 * /extensions/wikihow/QuickNoteEdit.body.php
 * /extensions/wikihow/quizzes/Quizzes.body.php
 * /extensions/wikihow/Rating/Rating.body.php
 * /extensions/wikihow/Rating/RatingArticle.php
 * /extensions/wikihow/Rating/RatingSample.php
 * /extensions/wikihow/rcpatrol/RCPatrol.body.php
 * /extensions/wikihow/rctest/RCTestAdmin.body.php
 * /extensions/wikihow/rctest/RCTestGrader.body.php
 * /extensions/wikihow/rcwidget/RCWidget.body.php
 * /extensions/wikihow/Sitemap.body.php
 * /extensions/wikihow/slider/Slider.body.php
 * /extensions/wikihow/spellchecker/Spellchecker.body.php
 * /extensions/wikihow/spelltool/Spellchecker.body.php
 * /extensions/wikihow/Standings.class.php
 * /extensions/wikihow/starter/StarterTool.body.php
 * /extensions/wikihow/Suggest.body.php
 * /extensions/wikihow/Suggest.php
 * /extensions/wikihow/ThankAuthors.body.php
 * /extensions/wikihow/thumbsup/ThumbsEmailNotifications.body.php
 * /extensions/wikihow/thumbsup/ThumbsUp.body.php
 * /extensions/wikihow/tipsandwarnings/TipsPatrol.body.php
 * /extensions/wikihow/TwitterFeed.body.php
 * /extensions/wikihow/TwitterReplier/TwitterReplier.body.php
 * /extensions/wikihow/video/EmbedVideo.php
 * /extensions/wikihow/video/Importvideo.body.php
 * /extensions/wikihow/video/Importvideo.Youtube.class.php
 * /extensions/wikihow/video/Videoadder.body.php
 * /extensions/wikihow/Welcome.body.php
 * /extensions/wikihow/WelcomeWagon/WelcomeWagon.body.php
 * /extensions/wikihow/whvid/WHVid.body.php


 * Replace split with explode as the former is deprecated and has been for a while
 * /extensions/wikihow/AdminTitles.body.php
 * /extensions/wikihow/articledata/ArticleData.body.php
 * /extensions/wikihow/AutotimestampTemplates.php
 * /extensions/wikihow/Categoryhelper.body.php
 * /extensions/wikihow/catsearch/CatSearch.body.php
 * /extensions/wikihow/cattool/Categorizer.body.php
 * /extensions/wikihow/common/nusoap/class.soap_transport_http.php
 * /extensions/wikihow/common/nusoap/nusoap.php
 * /extensions/wikihow/createpage/CreatePage.body.php
 * /extensions/wikihow/eiu/Easyimageupload.body.php
 * /extensions/wikihow/EmailLink.body.php
 * /extensions/wikihow/FeaturedArticles.php
 * /extensions/wikihow/GoogGadget.body.php
 * /extensions/wikihow/hooks/WikihowHooks.php
 * /extensions/wikihow/ImportXML.body.php
 * /extensions/wikihow/Interests.body.php
 * /extensions/wikihow/ManageRelated/ManageRelated.body.php
 * /extensions/wikihow/monitorpages/Monitorpages.body.php
 * /extensions/wikihow/nab/Newarticleboost.php
 * /extensions/wikihow/NewHowtoArticles.php
 * /extensions/wikihow/NVGadget.body.php
 * /extensions/wikihow/old/Ads.body.php
 * /extensions/wikihow/old/Docentsettings.body.php
 * /extensions/wikihow/old/gallery/GallerySlide.body.php
 * /extensions/wikihow/old/NewLayout/NewLayout.body.php
 * /extensions/wikihow/old/RateArticle.body.php
 * /extensions/wikihow/qc/QC.body.php
 * /extensions/wikihow/SpamDiffTool.body.php
 * /extensions/wikihow/starter/StarterTool.body.php
 * /extensions/wikihow/Suggest.body.php
 * /extensions/wikihow/Suggest.php
 * /extensions/wikihow/TitleSearch.body.php
 * /extensions/wikihow/video/Importvideo.Youtube.class.php
 * /extensions/wikihow/WikihowArticle.class.php


 * extensions/wikihow/accountcreationfilter
 * Extension credits
 * i18n
 * Stylizing
 * dirname( __FILE__ ) --> __DIR__


 * extensions/wikihow/authors
 * Given that Special:Authorleaderboard redirects to Special:Leaderboard (via a rather nasty hack),
 * Leaderboard extension should be given its own folder
 * extensions/wikihow/Leaderboard.body.php
 * extensions/wikihow/Leaderboard.i18n.php
 * extensions/wikihow/Leaderboard.css
 * extensions/wikihow/Leaderboard.php
 * extensions/wikihow/Leaderboard.js
 * If Authorleaderboard's three i18n messages are needed, they should be moved to Leaderboard's i18n file
 * And Leaderboard should be given its own alias file, because it enables this:
 * And then Authorleaderboard can be safely decommissioned and there are no broken links anywhere and a tad bit less code to maintain. Yay!


 * extensions/wikihow/FBNuke
 * Extension credits are needed in the setup file
 * dirname( __FILE__ ) &rarr; __DIR__
 * (PHP-based) i18n file is there but is empty...meanwhile the main body file has hard-coded English on lines 15, 31, 33, 34, 47, 53 & 65
 * Line 30: this URL generation mechanism is not kosher and works only for wikiHow and similar setups with null script paths. Use  instead
 * Line 45: Database's  method is defined canonically like that, with a lowercase "E", not with an uppercase one
 * SQL queries (lines 51, 58, 62) could use __METHOD__ (although the latter two should be rewritten to use Database's delete method instead)
 * Additional notes/a bit more complicated tasks:
 * It probably shouldn't be an UnlistedSpecialPage...
 * nor hard-coded to check for Jordan's username
 * and it definitely should have a user right restriction in __construct (but restricting a special page &mdash; when adding a new user right &mdash; requires the $wgAvailableRights entry in the setup file + 2 new i18n messages)
 * and the form should be using POST instead of GET...
 * and it'd need an anti-CSRF token, i.e.


 * extensions/wikihow/fblogin
 * fblogin.css, lines 128-129: invalid comment syntax
 * FBLink.body.php
 * Line 1: short open tag
 * lines 76-80 & 91-97: you'll likely want  instead for lines 76-80
 * Line 114: missing __METHOD__
 * fblink.js, fblogin.js: IIRC .live is deprecated in favor of .on
 * FBLink_confirm.tmpl.php: guess what, short opening tag and hard-coded English still isn't a scalable nor internationally compatible approach
 * FBLink_enable.tmpl.php: see above
 * FBLink_linked.tmpl.php: see above
 * FBLogin.i18n.php: getting better, but I'd offload the actual HTML into a template file (or two, rather) and use i18n messages there (also, your usual URL construct issues for the form action, etc. apply)


 * extensions/wikihow/ImageHelper
 * HTML attributes should use "double quotes" (although it doesn't really matter in this case, but it's just good practise)
 * &rarr;  etc.
 * and  (portability)
 * should be self-closing
 * &rarr;
 * i18n!
 * hard-coded English in connectedImages.tmpl.php, fileInfo.tmpl.php
 * and also on the following lines in ImageHelper.body.php: 526, 637 (technically also 641-642 & 646, but that's a bit more complicated to fix)


 * extensions/wikihow/LoginReminder
 * Line 212: change  to
 * Line 255: hard-coded English
 * BONUS! This should enable the safe removal of /extensions/wikihow/WikiError.php