Commit graph

293 commits

Author SHA1 Message Date
Andrew Garrett
b342a81da0 Well there was no problem in the first place. Nice work Werdna 2007-01-07 07:57:54 +00:00
Andrew Garrett
1e975a47b0 Okay brion, this patch actually /works/. Thanks to the miracles of testing, I can now be certain that it does something other than give a PHP warning. 2007-01-07 06:58:21 +00:00
Andrew Garrett
8c49f7ffd9 Fix for r18904 where autoblocker would not correctly block ipblock-exempt users. 2007-01-07 06:21:54 +00:00
Andrew Garrett
9b91d163a2 * (bug 3706) Allow users to be exempted from IP blocks. The ipblock-exempt permission key has been added to enable this behaviour, by default assigned to sysops. 2007-01-07 03:23:31 +00:00
Tim Starling
792eab2c3b Use $wgLang->getCode() rather than $wgUser->getOption('language') in the parser cache rendering hash, since the latter may be overridden by a uselang= parameter in the URL. 2007-01-05 18:10:22 +00:00
Rob Church
ceb9b86359 (bug 8461) Support watching pages on move 2007-01-02 23:37:56 +00:00
Rob Church
727a9fb2ce * (bug 8018) Allow hiding minor edits from the watchlist 2006-12-29 13:48:36 +00:00
Rob Church
c1d5cea711 (bug 6856) User::clearNotification() does not respect read-only mode 2006-12-24 02:52:02 +00:00
Brion Vibber
eb9fc47454 * Initialize user_editcount to 0 instead of NULL for newly created accounts 2006-12-22 23:46:08 +00:00
Rob Church
6be73092db Introduce 'PingLimiter' hook for overriding the result of User::pingLimiter() 2006-12-22 20:21:14 +00:00
Brion Vibber
a83f5fbeae * (bug 8333) Fix quick user data update on login password change on
replication database setups. User data is now pulled from master
  instead of slave in User::loadFromDatabase, ensuring that it is
  fresh and accurate when read and then saved back into cache.
  This was breaking with the Special:Rename operation which
  automatically logs the user in with the new password after changing
  it; pulling from slave meant the record was often not the updated
  one.
2006-12-20 09:09:50 +00:00
Rob Church
1be955f1ba * (bug 5411) Remove autopatrol preference; users who can mark edits patrolled will now have their edits marked as such regardless - per Brion's enthusiasm on the mailing list ;) 2006-12-18 21:39:36 +00:00
Rob Church
941a032df2 * (bug 4488) Support watching pages on deletion; introduces new user preference 2006-12-16 21:36:01 +00:00
Antoine Musso
171945efed User::getOption now accept a default value to override default user values
this makes it consistent with WebRequest::get* methods. Corrected code in
various places accordingly.
2006-12-14 20:28:38 +00:00
Brion Vibber
288a7eb7f1 Going ahead and adding this field while other DB updates are pending.
Interfaces to use it can be added shortly.

* Add user_editcount field to provide data for heuristics on account use.
  Incremented on edit, with lazy initialization from past revision data.
  Can batch-initialize with maintenance/initEditCount.php (not yet friendly
  to replication environments, this will do all accounts in one query).
* Allow raw SQL subsections in Database::update() SET portion as well as
  for WHERE portion. Handy for increments and such.
2006-12-14 13:22:52 +00:00
Brion Vibber
9bac5f13a4 * Add a notification about the confirmation mail sent during account
creation, so people don't immediately go off to request a second one.
* Add a warning on Special:Confirmemail if a code was already sent and has
  not yet expired.
2006-12-14 00:31:16 +00:00
Brion Vibber
295d0bf295 * Accept null parameter to User::setPassword() as indicating the password
field should be cleared to an unusable state. Login will only be possible
  after the password is reset, for instance by e-mail.
* (bug 6394) Invalidate the password set for "by e-mail" account creations
  to avoid accidental empty password creations.
2006-12-13 08:59:20 +00:00
Brion Vibber
4bdff3636f Consolidate checks against $wgMinimalPasswordLength to use User::isValidPassword 2006-12-13 08:33:31 +00:00
Brion Vibber
1c4daa9724 * Change behavior of logins using the temporary e-mailed password (as stored
in user_newpassword hash field). Instead of just logging in silently and
  leaving the previous user_password field in place indefinitely, the user
  is now prompted to set a new password.
  
  The password-changing form is at Special:Resetpass; currently it's only
  usable for changing from the temporary password during login, but it
  could perhaps be generalized, replacing the subform in preferences.
  
  Once the new password is set successfully, the temporary password is wiped
  so it cannot be used to login a second time, and the login process
  is completed.
* Suppress 'mail new password' button on login form if $wgAuth forbids
  changing user passwords; it wouldn't work very well...
* Consolidate password length checks and $wgAuth manipulation into
  User::setPassword() to avoid duplicate code in different places
  that set passwords.
* User::setPassword() now throws PasswordError exceptions if the password
  is illegal or cannot be set via $wgAuth. These can be caught and a human-
  readable error message displayed by UI code.
2006-12-12 04:15:00 +00:00
Ilmari Karonen
31b171ec2a Include a backslash character in wpEditToken to prevent editing from broken
proxies that mangle such characters.  Not only is editing from open proxies
generally frowned upon on Wikimedia projects, but more importantly, these
particular proxies tend to break wiki markup in submitted content.  These 
really are not edits we want to let through.

Yes, this is a hack.  We may eventually want to explicitly check for this
condition and provide a more informative response, but even so this would
still remain a useful fallback check just in case.
2006-12-02 06:19:48 +00:00
Rob Church
5350554d22 (bug 8024) Introduce "send me copies of emails I send to others" preference 2006-12-01 18:39:43 +00:00
Nick Jenkins
ae8554c45b Completing code housekeeping stuff for rest of includes/ directory: removing unused local vars, removing unused globals, replacing extract() where simple to do, declaring output arrays before calling preg_match(), and so forth. 2006-11-29 11:43: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
Andrew Garrett
8c6f5f6431 Make the DNSBL used for proxy blocking configurable. This is better than hard-coding, but a lot of the internal variables still call it SORBS, and unfortunately this will need to continue - as I don't want to break existing configurations. Updated the messages for SORBS blocking to refer generically to a DNSBL, rather than to any particular one. 2006-11-10 22:57:51 +00:00
Andrew Garrett
8671e7cda8 * (bug 5149) When autoblocks are enabled, retroactively apply an autoblock to the most recently used IP of a user when they are blocked.
* Add an index on (rc_user_text,rc_timestamp) on the recentchanges table. This will make CheckUser.php and the new retroactive autoblock functionality faster.
2006-11-08 09:54:06 +00:00
Tim Starling
36ed0cd96c Reverting 17479/17480, breaks subclassing of Linker methods by skins. See my comment on bug 7405. 2006-11-08 07:12:03 +00:00
Andrew Garrett
020e6ac57f Spelling error in comments in User.php -- excede -> exceed 2006-11-08 07:04:25 +00:00
Nick Jenkins
fa239349f2 * (bug 7405) Make Linker methods static. Patch by Dan Li. 2006-11-08 05:21:15 +00:00
Andrew Garrett
05f4492f06 Restore patch that was temporarily reverted in order to rectify an issue where the patch was applied without enacting required database changes 2006-11-01 21:57:18 +00:00
Andrew Garrett
5941189de0 Revert patch that was scapped into production without database changes 2006-11-01 21:36:03 +00:00
Tim Starling
329b012d2b Added block option "enable autoblocks". Patch by Werdna from bug 1294. 2006-11-01 07:13:31 +00:00
Tim Starling
a3b490d2c4 * Made special page names case-insensitive and localisable. Care has been taken to maintain backwards compatibility.
* Used special page subpages in a few more places, instead of query parameters
2006-10-30 06:25:31 +00:00
Tim Starling
e9de4983bf Added a per-user limit on password reminder emails. Presumably if you just had a password reminder sent to you, you don't need another one a short time later. Along with a proper per-IP throttle setting, this should fix the majority of the abuse problem on Wikipedia. 2006-10-23 09:35:30 +00:00
Brion Vibber
b19cf7f3aa * Fix regression in autoconfirm permission check
Anons can't be autoconfirmed. Was broken by restructuring in r17004.
2006-10-15 22:41:28 +00:00
Tim Starling
dd785270d7 Converted User to use lazy initialisation. This is to avoid unstub loops, and also for performance. Interfaces and semantics have been largely preserved, except for a minor change involving setLoaded(). 2006-10-14 06:58:19 +00:00
Brion Vibber
5f0d32b5e7 * (bug 7526) Make $wgDefaultUserOptions work again
The globals for preference default overrides was removed in r15823,
when the defaults were moved from Language to User. Moved the settings
out to the global where they arguably belong, restoring compatibility
for site-specific overrides.
2006-10-09 08:13:48 +00:00
Nick Jenkins
794e8744d4 (Bug 7004) PHP iconv() notice on bad password input to Special:Userlogin, with E_ALL enabled. 2006-10-04 12:13:22 +00:00
Tim Starling
e174a4ddfb Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction.
Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop.
2006-10-04 09:06:18 +00:00
Brion Vibber
c1094ba987 * Do fewer unnecessary full writes of user rows; only update user_touched
for watch/unwatch, group membership change, and login operations
2006-10-03 22:30:40 +00:00
Jimmy Collins
f509270254 * (bug 6023) Fixed mismatch of 0/NULL for wl_notificationtimestamp; now notification
mails are working after 'Mark all pages visited' button on Special:Watchlist is clicked
2006-09-29 20:13:38 +00:00
Brion Vibber
3a515b48b1 * (bug 6849) Block @ from usernames; interferes with multi-database tools and
was meant to be banned years ago... For now existing accounts will not be
  prevented fromm login.
2006-09-26 16:06:16 +00:00
Brion Vibber
2997fd7637 * (bug 7064) Replace hard-coded empty message checks with wfEmptyMsg calls 2006-09-11 12:22:35 +00:00
Rotem Liss
c7491fe86b Adding static functions to User to create links to groups in either HTML or Wikitext; using the HTML function in Special:Listusers; using the Wikitext function in Special:Statistics instead of a raw link to the sysops page (kept for backwards compatibility); several code fixes. 2006-08-12 09:24:18 +00:00
Rotem Liss
fe4fd85975 Finally removing the deprecated and unused functions User::isSysop, User::isBureaucrat and User::isDeveloper, and updating the release notes. 2006-08-08 14:20:33 +00:00
Rotem Liss
241676caf2 Removing the last references to OutputPage::sysopRequired() and OutputPage::developerRequired() (mostly using OutputPage::permissionRequired(), but in one case - reverting of a protected image - OutputPage::readOnlyPage is better), and throwing an exception when calling them; removing two useless comments. 2006-08-08 13:58:25 +00:00
Tim Starling
2774ccdd43 Defer loading default options, this avoids a theoretical unstub loop. 2006-08-02 17:43:55 +00:00
Tim Starling
43b2fb56b6 Merged localisation-work branch:
* Made lines from initialiseMessages() appear as list items during installation
* Moved the bulk of the localisation data from the Language*.php files to the Messages*.php files. Deleted most of the Languages*.php files.
* Introduced "stub global" framework to provide deferred initialisation of core modules. 
* Removed placeholder values for $wgTitle and $wgArticle, these variables will now be null during the initialisation process, until they are set by index.php or another entry point.
* Added DBA cache type, for BDB-style caches. 
* Removed custom date format functions, replacing them with a format string in the style of PHP's date(). Used string identifiers instead of integer identifiers, in both the language files and user preferences. Migration should be transparent in most cases.
* Simplified the initialisation API for LoadBalancer objects.
* Removed the broken altencoding feature.
* Moved default user options and toggles from Language to User. Language objects are still able to define default preference overrides and extra user toggles, via a slightly different interface.
* Don't include the date option in the parser cache rendering hash unless $wgUseDynamicDates is enabled.
* Merged LanguageUtf8 with Language. Removed LanguageUtf8.php. 
* Removed inclusion of language files from the bottom of Language.php. This is now consistently done from Language::factory(). 
* Add the name of the executing maintenance script to the debug log. Start the profiler during maintenance scripts.
* Added "serialized" directory, for storing precompiled data in serialized form.
2006-07-26 07:15:39 +00:00
Rotem Liss
31c3012d45 Deprecating ; reordering the special pages array (whose the special page list is created from) by restricted and not restricted (like Special:Specialpages), not by rights which are not used to divide the list anymore to levels, and required us to use . 2006-07-23 12:36:37 +00:00
Rotem Liss
ee7ab4900e Making User::isBot deprecated, using User::isAllowed('bot') instead, making it a wrapper of User::isAllowed, and deleting several obsolete comments. 2006-07-16 16:42:15 +00:00
Tim Starling
22b718c035 Fixed autoblock bug 2006-07-11 05:29:31 +00:00