spl_autoload_register exists in >=5.1.2, we require >=5.3.2
We no longer support hphpc and it looks like hhvm supports spl_autoload_register
We've got no reason to keep using __autoload.
We'll also need to exclusively use spl_autoload_register when we start using composer.json stuff.
Change-Id: I694b7b96825e5d136fa76461511efc9a002149fa
Jenkins does not run the autoloader test (will be fixed in a different
commit). This patch fix the main and test autoloader to add in all the
missing entries.
bug: 47750
Change-Id: I285fa7ed24a6fc45a4dc475b54d80cf3816436fb
Squiz.WhiteSpace.LanguageConstructSpacing:
Language constructs must be followed by a single space;
expected "require_once expression" but found
"require_once(expression)"
It is a keyword (e.g. like `new`, `return` and `print`). As
such the parentheses don't make sense.
Per our code conventions, we use a space after keywords like
these. We appeared to have an unwritten exception for `require`
that doesn't make sense. About 60% of require/include usage
was missing the space and/or had superfluous parentheses.
It is as silly as print("foo") or return("foo"), it works
because keywords have no significance for whitespace between
it and the expression that follows, and since experessions can
be wrapped in parentheses for clarity (e.g. when doing string
concatenation or mathematical operations) the parenthesis
before and after basiclaly just ignored.
Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
This reverts commit 27104686ab.
Revert "Remove link to Special:ActiveUsers from Special:Statistics"
This reverts commit 62949af09e.
I used a sledgehammer where a scalpel would've done--and I should
be whacked with the cluebat. This should be done per-wiki, plus
improvements.
Change-Id: Ib43b42057b8d9f714a8a71ba9cbe375385254b7c
The primary purpose of this page is to redirect to a user page given a
numeric id. The numeric User ID is stable across renames, and is
therefore an appropriate primary key for identifying the user
associated with a given revision. The Parsoid API would like to
export semantic RDFa in its DOM identifying the author of a revision
by their userid, but in order to do so requires a MW redirect from
userid to the appropriate User page. (A "permalink" for the user.)
This patch adds that redirect, as
http://somewiki/Special:Redirect/user/1234
(https://bugzilla.wikimedia.org/show_bug.cgi?id=45206 is the related
Parsoid feature.)
Rather than adding a set of ad-hoc redirection pages, this patch
sets up an infrastructure for redirections. Special:Redirect also
subsumes the functions of:
* Special:Filepath (Special:Redirect/file/xxxx)
* Special:PermanentLink (Special:Redirect/revision/xxxxx)
This structure is extensible for other redirect types.
Change-Id: I8b0785f4fbdb3dd438a7a45263c5f375ff9d2208
Similar to the login form (change 55847), this presents a compact
vertically-stacked form, if a global variable is set or if you add
?useNew=1 to the query string.
The redesigned create account form also:
* Removes the remember me checkbox (see bugzilla 47267)
* Displays some wiki statistics in a benefits column.
* Repositions the FancyCaptcha image if present using JavaScript (see
bugzilla 47372).
* Sets the template skin as in change 59577.
Bug: 44628
Bug: 47267
Change-Id: I9b03d519af43de147bff0ac509a1154f67cd3a0a
- Move files in includes/externalstore to their own location for consistency
- Order MWCryptRand alphabetically
- Add missing HTMLButtonField
Change-Id: Ib3798dce6080960df68badd6237968a33473e36b
* This lets queues be horizontally partitioned onto
different servers, with weights assigned to each.
The queue classes used by the different partitions
can be hetereogenous or homogeneous.
* How partitioning is done is setup similar to LBFactory,
where wikis belong to sections and sections have config.
Change-Id: I44d59b67cf417dca28a3e9b25371dac5a7ffcb47
If a global variable is set or if you add ?useNew=1 to the query string,
Special:Userlogin loads a different login template (UserloginVForm.php)
with the new Vertical Form appearance and different messaging.
Otherwise the current unchanged template renders so that wikis can cut
over to the new look when ready (with messages and links). Once they do
so, the variable and flag will be retired.
The new template applies mw-ui-vform and mw-ui-button styles defined in
a new 'mediawiki.ui' CSS module in core to create a compact vertical
form. The mw-ui styles specify a Helvetica font stack (that we tested
in the Account creation experiment) in the form area, but NOT if the
user is using some other skin than Vector.
The CSS code is developed using Sass. The patch includes the
Sass scss files, along with a Makefile that uses their Compass build
configuration (config.rb).
The redesigned Special:Userlogin also:
* Displays a "secure login" link if HTTPS is available.
* Loads additional CSS for its form features (e.g. more attractive
errorbox, "Join wiki" messaging).
* Defines new "userlogin-xx" messages; many are the same as
existing messages but without ':' on the end.
* Uses a distinct title for Login instead of generic "Log in /
Create account".
* Removes the [mailmypassword] code branch from its login template as it
is never executed.
Bug: 44628
Change-Id: I489042c50aa060c90ca18b05097dbe25c4ae6395
This was an experimental authentication system intoduced a couple
of years ago with a pretty narrow use-case. It's been pretty much
ignored since introduction, and makes login more complicated than
it needs to be.
I didn't drop the external_user table on the off-chance someone
out there actually has data in it, but they should use AuthPlugin
for their external authentication needs.
Change-Id: I794338dbb75961ee033d41fa44bb7aa22e54f447
Standard, Simple, Chick and MySkin have all been removed.
Nostalgia has been moved to an extension for posterity.
Change-Id: Ia6d73c2deb9428d214b7d69b29235094de75c52e
This will help with improving human readability of JS and JSON
objects encoded by both ResourceLoader and the API. This patch
also adds new "utf8" parameter to the JSON formatter of the API.
Changes to FormatJson class:
* Added escaping of '<', '>', and '&' by default to protect against XSS.
* Removed unnecessary escaping of '/' and added an additional option to
unescape non-ASCII characters (those above U+007F) as well.
* Added PHP 5.3 pretty printing code (to replace Services_JSON) that
uses a four-space indent as PHP 5.4 does.
Changes to Xml class:
* Defined Xml::encodeJsVar() in terms of FormatJson::encode()
and added a pretty printing option. Also added a pretty printing
option to Xml::encodeJsCall() as well.
* Deprecated Xml::escapeJsString() and QuickTemplate::jstext();
callers have to add quotes themselves, hence the escaping of
both double quotes and apostrophes.
Bug: 26818
Change-Id: I1987190f1ba5bf41738e7bd611209706c1f6bb5c
This feature was poorly thought out from the start. It's a huge
performance drain when used, for a mimimally useful set of data
Change-Id: I138622e1c184f74e2a7ce13a9a544ab4e610d7a0
Except LegacyLogFormatter.
includes/logging/LogFormatter.php is getting bigger and bigger with
the addition of new formatters when logs are changed to use them
instead of the old method, so better doing this now before we get
new formatters for remaining log types.
Change-Id: I6aab19c8d68bf47beddad42632b0360a7b12f251
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments
Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
It would be useful to be able to list pages using a particular page
property, particularly in light of the new Disambiguator extension.
This adds a special page Special:PagesWithProp and an API query module
list=pageswithprop to do just this. It also adds an API query module
list=pagepropnames to list the prop names currently in use on the wiki.
Change-Id: Ib0d4e17f22b8d0cb9894eac6095962315480e809
* The default class is JobQueueAggregatorMemc.
This essentially has the logic that nextJobDB.php used.
* Also created a JobQueueAggregatorRedis class.
This is much more efficient and more responsive.
* This can speed up calls to getQueuesWithJobs().
* Removed unused getDefaultQueuesWithJobs() function.
Change-Id: Ifb3c6c881decd643da1b662956ded69db4b39431
* (bug 44080) Also carry-over the IP and HTTP header info.
* This adds a RequestContext::importScopedSession() function.
Change-Id: Ie9c0a4d78fb719569c8149b9cc8a5430f0ac5673
* Made DBLockManager abstract instead of a hacky blocking implementation.
With a PG and MySQL option, that option is no longer useful.
Change-Id: I939551bd2283608f2d017d9d2fca1334a533c005
* This is useful for making IDs for object in partitioned stores.
* The "UID" functions are not called "UUIDs" since they don't follow RFC4122.
This is for performance reasons since the ID fields tend to be indexed.
* This includes newUUIDv4(), which is compliant with the aforementioned RFC.
This reverts commit 86f895bfe3.
Change-Id: I989626dfb7976d17f5931a34fe040f41cf14dfe3
To reduce the maintenance burden for changes such as Id7ec4e69. The
project to optimise the preprocessor for hiphop is incomplete and is not
especially useful given the present state of hiphop support.
Change-Id: Iebcfe4d40f74520e29e7feb522251892fab2f652
See I4542f57a. Meant as a temporary meassure until such a time
generic tailoring code is implemented for uca. This patch
is mostly Lejonel's code, with the class renamed.
Change-Id: Id39406c37a5277d9e7a9216544de2140411c2b01
This is a non-versioned part of the larger patch #41014https://gerrit.wikimedia.org/r/#/c/41014
It will allow help subsystem optimization (merging paraminfo and help),
path towards per-module or per-system versioning, removal of the
manually maintained generator lists.
Changes:
* ApiModuleManager now handles all submodules (actions,props,lists) and instantiation
* ApiModuleManager maintains a cache of all instantiated modules
* Query stores prop/list/meta as submodules
* action=help suports generalized submodules (modules=query+value), querymodules obsolete
Change-Id: Ie2dee41e44a29cd5d5935eeaa5240b708d95a8f0