Figured since a JS Timestamp class was being implemented
it might be appropriate to create a complementary PHP
Timestamp class. Much of code is taken from wfTimestamp().
Note: Another change (I53dcf547) is attempting a related
issue. Not sure how much of scope overlap there is.
Change-Id: I68eb9f27eebe80df757187f634392e1bcba5551f
Signed-off-by: Tyler Romeo <tylerromeo@gmail.com>
Revert 94f623363b. Apparently all
ReverseChronologicalPager subclasses were broken by the unexplained
interface change in wfArrayToCgi(): changing the interpretation of
null array values from "omit this key" to "include this key with no
value". The function has always been called with the former
interpretation, that's why the special case was in there.
Also reverted dependent changes 4b517fa and part of 3d97704.
Change-Id: I41dadbde5d0e0e4c54cc76bfc13c263c15c73828
This special pages counts all langlinks and shows the pages with the
highest count.
Update rate on WMF is every 3 days, like all other Most* special pages.
Change-Id: Ia60aed7599e8b9d6dcbae2be9bc4f91f4f8d4e55
* Use the plurals.xml of CLDR for the plural rules of languages
* Use plurals-mediawiki.xml to override or extend the rules inside MW
* Remove the convertPlural method in each LanguageXX.php
* Parse and load the xml files in LocalisationCache
* Use the CLDRPluralRuleEvaluator.php for parsing the cldr plural rules
(This is taken from Translate extension and might require a replacement
parser without using eval)
* Add getPluralRules() to make the CLDR plural rules available to JS.
PS3: More method documentation, cleanup
Change-Id: I58a9cdfe60c7b9027bf031c91370472054f04ae2
With sharding, failover and consistent hashing. Only supports the
extension (phpredis), since the pure PHP library Predis had about a
billion files and it made my eyes hurt.
Change-Id: I90fb4a41d15265b9c22f8e32ecd1d956f89f3ce8
* Introduce $wgSessionCacheType to allow the session storage to be
configured independently of $wgMemc.
* Renamed $wgSessionsInMemcached to $wgSessionsInObjectCache to reflect
the new versatility.
* Modernized the relevant code, removing the explicit require_once(),
used the autoloader instead. Moved it to ObjectCacheSessionHandler.
* Tested with memcached, external sharded MySQL and APC, it all seems to
work just fine.
Change-Id: I473334bb56cafb4e21ac1c1304d69095676fc0c4
Add a Uri class matching our mw.Uri JS class for handling uris.
This class should be helpful in a bunch of places where we end up doing manual
concatenation of things like the path + '?' + query of a url parsed with wfParseUrl.
[tylerromeo@gmail.com: Removed cat() function, fixed wfWarn() usage for aliases
and added visibility to all functions. Also added test for aliases.]
Signed-off-by: Tyler Romeo <tylerromeo@gmail.com>
Change-Id: Iefdedb7c80cf1d4aab58050edab3ab44ba868a58
It should be possible to query the notificationtimestamp as a page info
property, rather than only by querying the recent changes for the
watchlist. It should also be possible to clear or adjust the
notificationtimestamp via the API.
This patch does just that.
Change-Id: I8e2c0769e93802a6a09936899a41c07f9c4c9f25
I have forgot to add an autoloader entry for the new exception class
named UserNotLoggedIn (introduced by Id8127299 / b1c1448d).
Change-Id: Ib7226c8532fd695edf78f0e4c33b91edbf8ed52e
Factor out duplicated code into the new ProcessCacheLRU. It is a fixed
size an per process cache which invalidate the least recently used cache
key.
Change-Id: Ib4475f21879ef6286ce2a28f248acd296fdbd45d
* The main Revision functions now allow various QoS and locking flags.
* Added tiny DBAO interface add made Revision implement it.
Since a lot of objects will need (or have) the same functionality.
* Use "self" keyword in Revision class consistently.
* Made Revisison::newFromConds() private.
Change-Id: I3139956999218a2bb44b5c845b8079e33b2328bb
Also remove require_once() calls from skin files.
This fixes a bug introduced in 0ec77e2b31 where MySkin would throw a
fatal error because it couldn't find the MonoBookTemplate class.
Change-Id: I63bbe1d25e8cb70ee4baf99ec6e685444b663c1f
...after a discussion with Debian packagers. They can now override installer
classes and change LocalSettings.php the installer generates. The file
intended for such overrides, mw-config/overrides.php, has intentionally been
placed outside of includes to underline the "don't change includes" paradigm.
Change-Id: Id82b90f6740307609bc6c6f4fb8765bc3484dbe7
This is a Workaround for PHP bug <https://bugs.php.net/bug.php?id=49143> (5.3.2. is broken, it's fixed in 5.3.6):
Strip leading backslashes from class names. When namespaces are used, leading backslashes are used to indicate
the top-level namespace, e.g. \foo\Bar. When used like this in the code, the leading backslash isn't passed to
the auto-loader ($className would be 'foo\Bar'). However, if a class is accessed using a string instead of a
class literal (e.g. $class = '\foo\Bar'; new $class()), then some versions of PHP do not strip the leading
backlash in this case, causing autoloading to fail.
amended: as per Jeroen's suggestion, used // for comments and ltrim instead of preg_replace.
Change-Id: I71e0429ed1da5c83262dbf6f989c782385af9bcb
Old interfaces are preserved for b/c for now. Stuff that needs to die
such as css_file_name has not been exposed for new interfaces.
Remove unused device properties.
Change-Id: I9b08eb81625a5570e700d9b690c03a001316de71
* Introduced a common base class for the two memcached clients, called
MemcachedBagOStuff.
* Moved the expiry time normalisation from MemcachedClient.php to
MemcachedBagOStuff since libmemcached needs the same workaround.
Change-Id: I507d4ec5a7fd863ae64a94f2c453981f9f03746c