Commit graph

42 commits

Author SHA1 Message Date
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
Tim Starling
b1cd1b035c Fixed inefficient use of array_keys() introduced by Nick in r17880. If this is setting off alarms, then fix the alarms. 2006-11-25 17:11:58 +00:00
Nick Jenkins
14c53b728f Code housekeeping stuff (and barring any stuff-ups on my behalf, there should be no changes in behaviour whatsoever after this) -
* removing some unused global declarations.
* removing or commenting out or adding comments for unused local vars.
* Adding one or two local var declarations.
* Declaring $matches array passed to preg_match() / preg_match_all() as array() before using [not required, just have a slight preference for the explicitness].
* remove one or two pass-by-reference function declarations where the value is not modified.
* Adding some braces to if-else blocks.
* In Parser.php, stripstrate is now an object rather than an array as per r17820, so we no longer need ask for a reference to it (as in "$x =& $this->mStripState;"), and in fact it's probably just simpler to get rid of $x altogether.
* Moving some preg regexes from "" quoting to '' quoting to stop static analyzer whinging about bad escape sequences.

... up to "LinksUpdate.php" in the includes/ directory.
2006-11-23 08:25:56 +00:00
Brion Vibber
3af8ce82b9 * Added global $wgStyleVersion to centralize bumping CSS and JS file versions
for cache-friendly style and script updating
2006-10-13 21:48:19 +00:00
Tim Starling
3005679b0e * Removed lots of explicit require_once statements. The autoloader should theoretically be faster, because it always uses an absolute path, eliminating the need for a search, and it is never called unnecessarily. Absolute paths are also more robust in the face of odd configurations or usage patterns. Moved a few constants around to support this, they always have to be available before the method call.
* Deleted DatabaseMysql.php, no longer necessary, database classes are autoloaded. 
* Moved wfGetMimeMagic() to MimeMagic::singleton()
* Fixed a couple of __CLASS__.'::'.__FUNCTION__ things.
2006-10-03 13:00:52 +00:00
Niklas Laxström
3b454333ef * More escaping 2006-07-08 13:53:50 +00:00
Rotem Liss
7dd78c22e3 Reverting 15375 - causes JavaScript error. 2006-07-06 16:42:48 +00:00
Rotem Liss
a0a851d472 (bug 6571) Protect page: "Unlock move permissions" appears when "move" is not an option 2006-07-06 16:09:41 +00:00
Tim Starling
02547dac72 Removed most exit() calls from the MediaWiki core, by replacing them with either a throw or by classic error checking. OutputPage::fatalError() and similar functions are deprecated, use either OutputPage::showFatalError() to return control or throw new FatalError() to relinquish it. Backwards compatibility of all interfaces has been maintained, thus extensions should continue to work and can be ported at a later date. 2006-06-07 06:40:24 +00:00
Brion Vibber
f2c29baf9f Update the FSF's address in all these GPL stub headers 2006-04-05 07:43:17 +00:00
Niklas Laxström
85ca43d2ee * Restriction types now use restriction-* messages instead of ui messages
* Don't try to link to current page on protection tab
2006-02-18 15:07:02 +00:00
Ævar Arnfjörð Bjarmason
04eb005d4f * If you're using a global, remember the global thingy... 2006-01-10 16:19:32 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
7bbe971aec * s~ +$~~ 2006-01-07 13:09:30 +00:00
Rob Church
868e8a971a Prevent blocked users from changing page protection levels 2006-01-06 23:25:26 +00:00
Brion Vibber
a35fcb0bed * (bug 1735) Revamped protection interface
* (bug 675) Add page protection level for unregistered/new accounts
* User::isNewbie now uses the registration date and $wgAutoconfirmAge
* Log views show message when no matches
2005-12-22 05:41:06 +00:00