Commit graph

36 commits

Author SHA1 Message Date
Reedy
39f0f919c5 Update suppressWarning()/restoreWarning() calls
Bug: T182273
Change-Id: I9e1b628fe5949ca54258424c2e45b2fb6d491d0f
2018-02-10 08:50:12 +00:00
jenkins-bot
3198421632 Merge "SpecialLockdb and SpecialUnlockdb don't do database writes" 2016-05-07 23:57:20 +00:00
Sethakill
c6d8b513a6 Special:Lockdb return error when database is locked.
Bug: T134650
Change-Id: Ia8950d0f2ae8a151df1fa1c05e9d33cb7e8e7f10
2016-05-07 17:18:08 +02:00
Bartosz Dziewoński
52bad71412 SpecialLockdb and SpecialUnlockdb don't do database writes
Change-Id: I95d0df4227632ce2e5fe57e73f3cd1f78e1cc14f
2016-05-07 16:20:15 +02:00
Sethakill
c5be310e1b Convert Special:Lockdb and Special:Unlockdb to OOUI
Bug: T134308
Change-Id: Ie5bdba62fa8e39f44522c39cc6b6d3649aec8141
2016-05-03 21:51:04 +02:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Aaron Schulz
7798b70e7e Define which SpecialPage classes expect write vs read mode
Bug: T123591
Change-Id: I521ebdd5e8eb8f7f4df927dc38732170aef2ac19
2016-01-14 14:40:37 -08:00
Kunal Mehta
f6e5079a69 Use mediawiki/at-ease library for suppressing warnings
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.

Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.

Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.

Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
2015-06-11 18:49:29 +00:00
Kunal Mehta
badc5cbb07 SpecialLockdb: Use Config instead of globals
Change-Id: I70b1fc0a4c89628c504f75e5e19beff5169cd5cb
2014-08-03 16:35:52 -07:00
Siebrand Mazeland
2c10a13c64 Pass phpcs-strict on includes/specials/ (2/3)
Change-Id: Ide979e5b948115afcec59d929516411c2e8346ae
2014-05-10 14:17:32 +00:00
umherirrender
96a5486ed0 Add SpecialPage::getGroupName and use it
Having all group mapping for Special:SpecialPages in the global
$wgSpecialPageGroups is not a good OO style.
Created a method SpecialPage::getGroupName, which than can be overridden
by each subclasses to the featured group name.

Added also SpecialPage::getFinalGroupName to get the groupname on
Special:SpecialPages to handle the customization and
to keep $wgSpecialPageGroups for b/c

Change-Id: I1de3a186f0a59ec5ecb8996c5f805cf164e9637f
2013-03-07 21:15:54 +01:00
Alexandre Emsenhuber
a06b79ab53 Use local context to get messages.
Also added "false, false" to Language::time() and Language::date() calls in Special:Lockdb, this is to have the date using the default format and not in the format of the user locking the database.

Change-Id: I9309022b005fcc7d31350242b8989ca7eabf69a8
2012-05-11 22:22:06 +02:00
Alexandre Emsenhuber
f8e2b347a5 * Changed OutputPage's handling of subtitles to use an array and implode it with "<br />" so that callers don't have to bother whether there's already a subtitle when adding new ones
* Make OutputPage::setSubtitle(), OutputPage::addSubtitle() and OutputPage::appendSubtitle() accept a Message object in addition to a string
* Added new method OutputPage::addSubtitle() to replace appendSubtitle() and marked it as deprecated
* Clear the subtitles when showing an error page
* Always show the subtitle from Article::viewRedirect() when showing a page; left the parameter for use in EditPage
* Make Article::setOldSubtitle() add two subtitles and has to set "display:inline;" for the three possible divs to avoid too many spacing
* Removed the six different backlink subtitles and added one new message 'backlinksubtitle' to replace them and added OutputPage::addBacklinkSubtitle() to factorise common code
* Changed EditPage's view source to show "View source for <Page>" with the same backlink in subtitle for consistency with other back links and page titles
2011-11-08 18:01:22 +00:00
Aaron Schulz
44ff769519 Split out checkExecutePermissions() function from userCanExecute() in FormSpecialPage. The former handles actual execute() calls and throws exceptions, the later inherits its purpose from SpecialPage. It just checks the page restriction to see if a user generally *could* execute. This avoids the breakage that came up in r100723 where Special:SpecialPages was throwing permission errors due to the getUsablePages() call. 2011-10-26 06:22:25 +00:00
Alexandre Emsenhuber
574e8bf3f9 Port Special:Lockdb and Special:Unlockdb to HTMLForm using FormSpecialPage 2011-10-25 18:20:44 +00:00
Alexandre Emsenhuber
f4d0f5dfba Use local context instead of global variables 2011-08-14 19:54:04 +00:00
Thomas Gries
d7b0108f1f code cosmetics: moved the closing td to a new line 2011-08-11 20:57:57 +00:00
Thomas Gries
9a93faf4d4 correction of Mixed tabs and spaces (2 tabs and 4 spaces), should use just tabs for indentation 2011-08-11 20:47:25 +00:00
Thomas Gries
c6ec5a6d8d adding label atttributes for confirm checkboxes in SpecialLockdb and SpecialUnlockdb. Fix for bug30299 . 2011-08-10 05:45:41 +00:00
Sam Reed
5c134b562c Kill unused globals
Remove unreachable return;
2011-07-18 13:14:05 +00:00
Alexandre Emsenhuber
1e253f81c6 * Use standard method to check user permissions
* Directly throw an ReadOnlyError instead of calling OutputPage::readOnlyPage()
* In Special:Block: don't let user think the error is temporary if he doesn't have right and the database is locked, instead check permissions first and then the database lock
2011-07-16 19:31:18 +00:00
Siebrand Mazeland
4cc45d50ad Follow-up r88278. Do not call $wfTimestampNow() twice, but use a temporary variable. 2011-06-24 09:48:38 +00:00
Sam Reed
16842c0b73 Swap else if for elseif
Trimming trailing whitespace also

Doing in 3 commits (2/3), so hopefully reviewable in CR...
2011-06-17 16:05:05 +00:00
Siebrand Mazeland
b9a8dad275 Fix broken r89643. 2011-06-07 12:42:28 +00:00
Siebrand Mazeland
05b4bc3611 Add GENDER support for 'lockedbyandtime'. Suggested by Purodha Blissenbach. 2011-06-07 12:12:13 +00:00
Siebrand Mazeland
7ec00fa118 (bug 29011) Remove hard coded text from Special:LockDb.
Who locked the database and when will be displayed in the content language, as reason, locker and timestamp are saved in $wgReadOnlyFile.
2011-05-16 23:21:32 +00:00
Alexandre Emsenhuber
229b39b139 Removed usage of error suppression operator in Special:LockDB and Special:UnlockDB 2011-05-15 14:48:15 +00:00
Alexandre Emsenhuber
144c825809 Standardised file description headers; first path 2010-08-14 19:19:41 +00:00
Derk-Jan Hartman
f68b7bddb4 Correct the address of the FSF in some of the GPL headers
59 Temple Place -> 51 Franklin Street
Follow up to r68351
2010-06-21 13:16:32 +00:00
Sam Reed
7b229a2047 GPL Headers for all! 2010-06-21 12:59:04 +00:00
Alexandre Emsenhuber
2f0c3efd09 Changes to Special:Lockdb and Special:Unlockdb:
* Subclass SpecialPage instead of using wfSpecial*() functions
* Now validate correctly when output is HTML5
2010-06-13 13:52:20 +00:00
Aryeh Gregor
74a21f3bd1 Remove most named character references from output
Recommit of r66254 to trunk.  This was just

find extensions phase3 -iname '*.php' \! -iname '*.i18n.php' \! -iname 'Messages*.php' \! -iname '*_Messages.php' -exec sed -i 's/&nbsp;/\&#160;/g;s/&mdash;/―/g;s/&bull;/•/g;s/&aacute;/á/g;s/&acute;/´/g;s/&agrave;/à/g;s/&alpha;/α/g;s/&auml;/ä/g;s/&ccedil;/ç/g;s/&copy;/©/g;s/&darr;/↓/g;s/&deg;/°/g;s/&eacute;/é/g;s/&ecirc;/ê/g;s/&euml;/ë/g;s/&egrave;/è/g;s/&euro;/€/g;s/&harr;//g;s/&hellip;/…/g;s/&iacute;/í/g;s/&igrave;/ì/g;s/&larr;/←/g;s/&ldquo;/“/g;s/&middot;/·/g;s/&minus;/−/g;s/&ndash;/–/g;s/&oacute;/ó/g;s/&ocirc;/ô/g;s/&oelig;/œ/g;s/&ograve;/ò/g;s/&otilde;/õ/g;s/&ouml;/ö/g;s/&pound;/£/g;s/&prime;/′/g;s/&Prime;/″/g;s/&raquo;/»/g;s/&rarr;/→/g;s/&rdquo;/”/g;s/&Sigma;/Σ/g;s/&times;/×/g;s/&uacute;/ú/g;s/&uarr;/↑/g;s/&uuml;/ü/g;s/&yen;/¥/g' {} +

followed by reading over every single line of the resulting diff and
fixing a whole bunch of false positives.  The reason for this change is
given in <http://lists.wikimedia.org/pipermail/wikitech-l/2010-April/047617.html>.
I cleared it with Tim and Brion on IRC before committing.  It might
cause a few problems, but I tried to be careful; please report any
issues.

I skipped all messages files.  I plan to make a follow-up commit that
alters wfMsgExt() with 'escapenoentities' to sanitize all the entities.
That way, the only messages that will be problems will be ones that
output raw HTML, and we want to get rid of those anyway.

This should get rid of all named entities everywhere except messages.  I
skipped a few things like &nbsp that I noticed in manual inspection,
because they weren't well-formed XML anyway.

Also, to everyone who uses non-breaking spaces when they could use a
normal space, or nothing at all, or CSS padding: I still hate you.  Die.
2010-05-30 17:33:59 +00:00
Sam Reed
b6e0df246f Attempt at normalistion of comparison styles - empty string on left and right hand side normalised to it being on the rhs
Before this change, there were (? being regex 0 or 1)

"" ===? 1
'' ===? 24
"" !==? 8
'' !==? 32

== "" 14
== '' 344
!= "" 9
!== "" 4
!= '' 151
!== '' 85


Rhs was the much more common, and the preferred style by many developers.. (Was a similar discussion in #mediawiki recently.. After that lolbugreport i think)

Where there is a string (non empty) on the lhs, and variable/method call on the rhs still need normalising
2010-01-06 19:59:42 +00:00
Tim Starling
c5fc589257 Replaced all instances of <<<END (which breaks vim syntax highlighting), with a type-specific end token. For HTML and SQL, this causes vim to highlight the embedded text with the HTML or SQL file type plugins respectively, which is very neat. 2009-12-07 08:51:52 +00:00
Ryan Schmidt
0afb910034 * (bug 16623) Add missing </p> tag in Special:LockDB -- patch by Nakon 2008-12-13 05:02:26 +00:00
Brion Vibber
660a5eb7aa Rename all the special page class files back to their proper names.
1) This keeps the filename the same as the classname, which is always nice
2) This avoids duplicate filenames (such as includes/Export.php and includes/specials/Export.php)
So I've at least got a chance of figuring out what file is what still...
2008-06-19 21:12:45 +00:00
Renamed from includes/specials/Lockdb.php (Browse further)