Commit graph

65 commits

Author SHA1 Message Date
Raimond Spekking
cea6746acf partly revert of r30110. looks like an accident. 2008-01-24 13:58:40 +00:00
Huji
615041d7b4 (bug 12738) Database query syntax error in maintenance/storage/compressOld.inc 2008-01-24 11:21:36 +00:00
Brion Vibber
a15ed4bc6b * (bug 12567) Fix for misformatted read-only messages on edit, protect.
Also added proper read-only checks to several special pages.
  Have removed read-only checks from the general user permission framework
  since it doesn't belong there; user authorization is independent from
  the database's read-only state, and the way we check and present error
  conditions is necessarily different. Further, as a detail it was formatting
  the actual message incorrectly as an inline message when historically it's a
  big block message with tables and images and stuff.
2008-01-15 01:55:48 +00:00
Aaron Schulz
8d4aaa2121 More title protection clean up. JS errors were being thrown calling the non-existent cascade checkbox. Also the chain box was showing for non-existent titles even though 'create' was the only available protection type. 2007-12-11 22:10:44 +00:00
Andrew Garrett
34d22f6edc * (bug 2919) Allow the protection of non-existent pages using the regular protection interface.
* WARNING: This revision requires a schema change, which is included in maintenance/archives/patch-protected_titles.sql, and can be applied in the normal manner (update.php).
2007-12-11 09:51:56 +00:00
Andrew Garrett
a94424d59c * (bug 11346) Prevent users who cannot edit a page from changing its restrictions. 2007-12-01 09:08:43 +00:00
Rotem Liss
ea46bf1ff1 Limit text field of deletion, protection and user rights changes reasons to 255 characters (already restricted in the database) 2007-11-04 15:20:45 +00:00
Andrew Garrett
b62ec76ae2 * Ensure, on the server side, that cascading protection cannot be applied to anything but full protection, so as to prevent people from using semi-cascade-protected pages to protect arbitrary pages.
* Fix a bug in the previous javascript implementation of this behaviour (protection is per-right, not per-group!)
2007-09-10 06:27:36 +00:00
Rob Church
a54fc5b974 (bug 10872) Fall back to sane defaults when generating protection selector labels for custom restriction levels 2007-08-11 16:24:01 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Rob Church
9245969b82 Drop the redirect=no thing for non-redirects, per Brion. Seems like a waste of time and a needless load of the page record and text to me, but he's the boss... 2007-06-26 21:24:23 +00:00
Rob Church
e8e9be1176 (bug 10344) Don't follow a redirect after changing its protection level 2007-06-23 19:37:31 +00:00
Brion Vibber
cd3924342e Revert r23166, 23178, 23179, and probably some other related bits.
There are issues with putting robots stuff into the current protection system, so we're backing this out to prevent another backwards-compatibility disaster when it's done in a more reliable way. :)
2007-06-22 14:52:49 +00:00
Raimond Spekking
3b72b28943 * Some cosmetic tweaks
** ProtectionForm: move 'watch this page' checkbox between reason field and submit button like in all other forms too
** SpecialMovepage.php: right shift checkboxes a bit like in all other forms too, move hardcoded colons to message file for better localization
2007-06-22 07:41:45 +00:00
Rob Church
7fcf8aff1a i18n and better label text, don't assume all users speak robots.txt 2007-06-21 20:58:48 +00:00
Rob Church
795ed1c389 * Allow wiki links in "protect-robotspolicy", I imagine people are likely to want to link to help
* Typos
2007-06-21 20:50:29 +00:00
Rotem Liss
73c51ed3cc Adding a direction mark, for RTL wikis (it may be better to localise the text, though). 2007-06-21 16:08:11 +00:00
Raimond Spekking
8027310503 * (bug 9415) Added options to Special:Protect to allow setting of per-page robot
policies. This can be done only by users with the 'editrobots' permission
  Based on a patch of AmiDaniel
2007-06-21 15:51:28 +00:00
Rob Church
4d09760870 Our release manager believes I need to be shot. I am a mindless drone without opinion in this matter. 2007-06-19 14:42:46 +00:00
Rob Church
7734700c78 * (bug 8760) Allow wiki links in "protectexpiry" message
* Introduce wfMsgWithLinks() and a content-language counterpart, wfMsgForContentWithLinks(); these escape HTML and render wiki links in text, so should be suitable for labels and so on
* Make Linker::formatLinksInComment() public
2007-06-07 22:16:19 +00:00
Rob Church
768b1eadaa * (bug 9769) Provide "watch this page" toggle on protection form
* Clean up protection form a little
* Change default text for "protectcomment", "protectexpiry", "unprotectcomment" and "protect-cascade" messages
2007-06-05 02:18:49 +00:00
Daniel Cannon
b0d24a3a10 (bug 7691) Show deletion log following noarticletext and newarticletext when creating a new page. 2007-06-02 00:41:16 +00:00
Nick Jenkins
b4d37577b9 Removing or commenting out unused variables or globals, and adding declarations for two arrays. 2007-05-08 09:09:46 +00:00
Nick Jenkins
bd23ec29c6 Doc tweaks:
* Seems like an opportune time to introduce "@addtogroup Media" documentation tags.
* Merge "@addtogroup Metadata" (used by Exif.php) into "@addtogroup Media".
* Few more moving comment blocks to above classes.
2007-04-24 06:53:31 +00:00
Aaron Schulz
1937ee0924 *Add {{plural}} to Protect-cascadeon too. (bug 8664) 2007-04-24 02:04:04 +00:00
Raimond Spekking
e26d9b56ad * adding an ID to the submit button
* changing ID introduced with r20998: for new IDs use 'mw-'
2007-04-16 10:34:58 +00:00
Raimond Spekking
727b74e543 Adding an ID to the form itself 2007-04-04 07:35:13 +00:00
Nick Jenkins
113bb1c772 Documentation tweaks to help documentation systems (Doxygen + PHPDocumentor)
pick up the appropriate tags, and documentation blobs for classes. This is 
the same as per r20769, but with the grouping changes (e.g. removing "@{{") omitted.
Please be advised that more related documentation tweaks may follow later - e.g. 
Doxygen generates a log file of warnings that is 574 Kb in size, when run over 
the just the trunk/phase3 code ... eek! Thankfully, much of that is just 
whining about functions without documentation   ;-)
2007-04-04 05:22:37 +00:00
Rob Church
c0e0aa1de7 (bug 9033) Use a more specific error message when users are not able/allowed to edit page protection levels due to a block, database lock or permissions 2007-04-02 07:39:32 +00:00
Brion Vibber
3a6ac5a3c3 Revert r20769: we don't use PHPDocumentor anymore, we use doxygen.
If making mass changes to tweak to its preferences, probably better to do it for the tool we actually generate docs with. :)
2007-03-28 14:16:43 +00:00
Nick Jenkins
5fef2333d4 PHPDocumentor [http://en.wikipedia.org/wiki/PhpDocumentor] documentation tweaking stuff.
Minor doc tweaks to prevent some PHPDocumentor warnings or errors when run on the includes/ directory. PHPDocumentor uses a syntax very similar to javadoc - mostly we already use this, but there were a few scattered places that were adjusted to make them consistent with the rest of the code. In practical terms, these changes were made:
* @url becomes @link
* @fixme becomes @todo
* HTML tags in descriptions must be closed / balanced.
* @bug was removed (where the bug was long fixed), or changed into a @todo (in the few situations where the bug was still pending)
* @obsolete becomes @deprecated
* Things like "/**@{{" and "/**@}}*/" which cause "unknown tag" warnings were removed
* @access must be a valid access level.
* @desc tag not needed, removed.
* Doesn't seem to like @licence, will accept @license however.
* Use full comment block notation in a few places (i.e. open block with "/**", start each line with " *", and end block with " */")

Then additional to this, to get some class docs associated with their respective classes:
* Moved some docs to right above those classes (deleting blank lines, or moving descriptions from the file headers)
* Marked some classes without docs as "@todo document"
* (done up to "class MIMEsearchPage" on the "classtrees_MediaWiki.html" page for the includes/ directory)
2007-03-28 08:53:02 +00:00
Nick Jenkins
f1fb0bc169 * Prevent E_STRICT error when '$wgDebugDumpSql = true', and a path has been defined for $wgDebugLogFile,
but $wgDebugLogFile does not exist yet: "filesize(): stat failed for sql-log.txt in includes/GlobalFunctions.php on line 219"
* Removing unused global $IP.
* Indentation of an if/else block.
* Trivial comment typo.
* Prevent PHP Fatal error: "Call to a member function getText() on a non-object in includes/SpecialListusers.php on line 46", 
  when opening a URL such as http://192.168.0.64/wiki/index.php/Special:Listusers?username=%22%27%3E 
  (i.e. when "Display users starting at:" username supplied in Special:Listusers is not a valid MediaWiki title).
* Fix HTML validation of protection form (i.e. when "action=protect").
2007-03-19 07:08:58 +00:00
Aaron Schulz
11ef493f49 *Add nifty JS function to grey out cascade option when it will not apply 2007-03-15 02:52:28 +00:00
Aaron Schulz
f55dcf8e2f *Add framework for proper protection cascading 2007-03-14 22:57:32 +00:00
Andrew Garrett
4f98bda5ba Fix for ProtectionForm - consider expiry times invalid if theyre in the past. Also a *very* minor typo fix from my previous work on alignment in the expiry box. 2007-02-16 07:39:33 +00:00
Andrew Garrett
da8ae236ae Fix for ProtectionForm - make mwProtect-reason retain its value when errors are spat as errors are :-) 2007-02-16 07:21:03 +00:00
Andrew Garrett
be72d62432 Disable the expiry field in Protection for users without the requisite permission. 2007-01-23 07:57:41 +00:00
Nick Jenkins
61678d8a5d * Removing a handful of unused globals.
* $stack is not modified in Profiler::calltreeCount(), no need to pass-by-ref.
* Add FIXME marker to non-cross-platform line.
* A freshly created string does not need to be returned by reference. [Xml::namespaceSelector() and HTMLnamespaceselector() ].
2007-01-23 07:29:58 +00:00
Brion Vibber
50d9a5ec18 Further fixes to protection expiry:
* Use RFC 2822-style date/time format instead of localized formatting for
  the expiry time in the protection form; while ugly, it actually works;
  a localized time is usually lossy (changing the time on submit) and
  more significantly will fail for any UI language that's not english!
* Rearrange some of the form display logic to handle error conditions
  a little more gracefully; invalid expiry format caused the form to
  be displayed twice.
* Should be nicer on session token expiration as well, showing the
  form instead of just an exception message.
2007-01-22 20:59:00 +00:00
Andrew Garrett
957839573b * (bug 4133) Allow page protections to be made with an expiry date, in the same format as block expiry dates. Existing protections are assumed to be infinite, as are protections made with the new field left blank. 2007-01-22 08:26:41 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Antoine Musso
b144fcb85d Rename constructors to __constructor 2007-01-20 13:34:31 +00:00
Andrew Garrett
a355a684c1 Various, 2007-01-12 09:10:30 +00:00
Andrew Garrett
ff67bbdda8 Various tweaks for last commit, including a merge of the functions to determine if an image/page is cascade-protected; message changes, et cetera 2007-01-12 08:37:07 +00:00
Andrew Garrett
1d95a6efa9 Display MULTIPLE culprit pages for cascading protection in the messages. Also improve performance by separating boolean 'is this page affected by a cascading protection' from array 'who are the culprits for this cascading protection' -- both are cached in member variables of the Title object. 2007-01-12 07:31:34 +00:00
Andrew Garrett
283621653b UI stuff for the cascading protection feature - warnings for sysops editing cascading protected pages (including which page the protection has come from), more useful errors for users (including which page the protection has come from), and a note at the top of the protect page when trying to unprotect a page affected by cascading protection to the effect of 'you can't affect the cascading protection here'. 2007-01-12 04:43:33 +00:00
Andrew Garrett
19cca14f69 Restore backwards-compatibility for old types of restrictions; wipe page_restrictions column in update for page_restrictions and on updateRestrictions 2007-01-12 01:44:33 +00:00
Andrew Garrett
4e14efacc7 Fix a couple of mistyped variable names, mysql strict incompatibilities, make cascading protect checkbox disabled for users without protect permission. 2007-01-11 01:17:19 +00:00
Andrew Garrett
b6d674623e Fixes for a couple of embarrassing bugs I should have caught in testing. Brion and Tim save the day... 2007-01-11 00:31:04 +00:00
Andrew Garrett
b3a8d488a8 Merge from branches/werdna/restrictions-separation (forked at r18959): * Branch page_restrictions column out into its own table, also creating a 'cascading protection' feature, which automagically disallows edits to pages transcluded into a page protected with this new option. Various other code tidiness fixes and refactoring in the log messages of branches/werdna/restrictions-separation. REQUIRES DATABASE SCHEMA UPGRADE 2007-01-10 23:32:38 +00:00