Commit graph

23 commits

Author SHA1 Message Date
Rob Church
8ec0a2350e * (bug 9898) Allow viewing all namespaces in Special:Newpages
* Removed some bizarre behaviour in Xml::namespaceSelector() that stopped non-numeric indexes working for the "all namespace" option
2007-06-05 00:50:46 +00:00
Antoine Musso
84a27cc33e Some fixes to avoid Xml::element call with null content when we actually want
to open a XML element. It should help fix bug #5312 later on.

* XML attributes rendering now made by private Xml::expandAttributes() method
* Xml::openElement() and Xml::tags() no more rely on Xml::element() with
  a null content.
* Fix wfElement() call with null content when we actually open an element.
2007-05-10 20:51:15 +00:00
River Tarnell
49ebe3c5b7 (bug 9835) password input should be type="password" 2007-05-08 00:37:16 +00:00
Niklas Laxström
4ca6bed03a * Polishing and documentation 2007-05-06 20:52:03 +00:00
Niklas Laxström
abe117f8b2 * XMLify preferences a little with more clear look as side effect 2007-05-06 17:54:38 +00:00
Niklas Laxström
755d972b5c * New shortcut function 2007-04-02 14:04:29 +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
d88bf87284 Apply most of the code tweaks from the live site:
* use configured cache servers for mctest.php
* bucket details in mcc.php
* fix input validation and remove debugging code in compressOld
* full ID range for moveToExternal
* fix resolveStubs.php for compatibility with older serialized data
* maximum line length for bar graphs in getLagTimes.php
* recognize specieswiki in rebuildInterwiki.inc
* --purge option to do additional parser-cache purging for purgeList.php
* default changed in MiniDonation extension
* profile unicode cleanup in Xml
* log slow parses in Article.php
* profile wfMsgReal
* log mkdir failures
* profile AutoLoader
* rebuild empty DjVu metadata containing ''
* security fix for DjVu metadata retrieval
2007-01-17 00:54:54 +00:00
Ævar Arnfjörð Bjarmason
42e34088f3 * Clarified function documentation 2006-12-31 09:53:21 +00:00
Antoine Musso
53a89fc564 * someone forgot to declare a method static
* compatibility issue in zhconvert
2006-12-14 20:47:19 +00:00
Brion Vibber
da2aa30f1d * Allow Xml::check() $attribs parameter to override 'value' attribute
PHP's array + operator doesn't overwrite items from the left side when
keys conflict. Switch to array_merge() here, which acts as expected.
2006-12-08 23:07:06 +00:00
Tim Starling
439f59fb7b * Added redirect to section feature. Use it wisely.
* Added a configuration variable allowing the "break out of framesets" feature to be switched on and off. Off by default -- there's all sorts of flashy frameset gadgets around, outright abuse is more rare, especially for small default installs.
* Refactored URL fragment handling.
* Made Title::secureAndSplit() slightly more legible.
* Refactored makeGlobalVariablesScript() -- it's not particularly convenient or maintainable to pass all global variables through the template array. The array is there for BC, not flexibility.
2006-12-08 06:09:15 +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
Tim Starling
2f12a58d93 * Introduced StringUtils.php, populated it with some generic string functions, both new and collected from various other files.
* Removed some backtracking regexes with an O(N^2) worst case, replaced with StringUtils::delimiterReplace(). There is a beneficial functional difference: /*/ is no longer considered to be a complete CSS comment.
* Changed the parser strip state from an array to an object. This should hopefully avoid the PHP bugs with array references. StripState uses the new ReplacementArray to do the replacements, thereby supporting FSS. 
* Removed DatabaseFunctions.php from the default startup sequence. Moved wfGetDB() to GlobalFunctions.php.
* Introduced the SiteStats class, with a collection of cached site stats accessor functions.
* Removed all global functions from Parser.php, they don't belong there.
* Made LanguageConverter use the new ReplacementArray class instead of managing its own FSS objects.
2006-11-21 09:53:45 +00:00
Brion Vibber
ce7a9631d7 * Set default disabled values for DjVu render options
* Added Xml::option() for generating <option>s easily
* Localized page numbers in drop-down for DjVu page selection
* Fixed linktrail for vi
2006-09-06 08:53:02 +00:00
Rotem Liss
679f587f24 EOL fixes. 2006-08-31 11:20:43 +00:00
Daniel Kinzler
584c456a94 Adding various global JS variables, fixing bug 6030 completely and 6806 mostly. 2006-07-28 19:05:27 +00:00
Antoine Musso
3ba69de714 Indent the namespace selector 2006-07-11 12:21:39 +00:00
Antoine Musso
89d2c02702 Adding some more static statements 2006-07-10 18:53:15 +00:00
Antoine Musso
fd912a148b A lot more of static issues when using E_STRICT from the commandline. 2006-07-10 15:41:30 +00:00
Brion Vibber
0a41a6a1c3 Use Sanitizer::encodeAttribute instead of raw htmlspecialchars for encoding attributes in Xml::element. This does two things:
* Preserves tabs and newlines as given (they would otherwise be normalized to spaces by the XML input processor)
* When generating output back to wiki text, this avoids line-based block parsing breakage. (bug 6577)
2006-07-07 04:45:19 +00:00
Tim Starling
c9fbdbe110 bug 2006-07-02 16:29:18 +00:00
Tim Starling
2ff288720c Various performance and initialisation issues:
* Made autoloader work for unserialize()
* Made XmlFunctions.php and HttpFunctions.php autoloadable modules, via Http:: and Xml::
* Made Image class autoloadable, global functions moved to ImageFunctions.php where they can be loaded on every invocation.
* Removed some unnecessary require_once() calls
* Deferred $wgValidSkinNames initialisation
* Fixed a couple of silly construct/initialise splits. My idea from C++ experience, bad practice in PHP.
* Deferred skin initialisation in ParserOptions
* Removed $wgMwRedir during an attempt to make MagicWord autoloadable. Didn't complete that, but removing the global is still the right direction.
2006-07-02 15:57:59 +00:00