Commit graph

125 commits

Author SHA1 Message Date
Tim Starling
0219f3490f Set an explicit class on framed thumbnail inner divs and images, changed some CSS to use these instead of using descendent selectors. The immediate application is the ImageMap extension. 2006-12-13 05:53: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
Rob Church
cd0570b894 Quote namespace names before plonking them into a regular expression, to give me the warm fuzzies 2006-12-03 04:09:48 +00:00
Rob Church
8bcdc5658e (bug 7671) Observe canonical media namespace prefix in Linker::formatComment 2006-12-03 04:05:12 +00:00
Andrew Garrett
a0274a70d8 Update linker to make contributions links (in userToolLinks and userLink) and block links (blockLink) use subpage notation, rather than pass the target as a parameter 2006-12-02 08:52:54 +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
Aryeh Gregor
846cecd91e Since formatComment and commentBlock can take null as well as Title objects (per r17833), corrected documentation (Title -> mixed). Since revComment would immediately fail if passed anything but a Revision object or descendant, restore type hinting to that. 2006-11-21 22:49:25 +00:00
Rotem Liss
165a70109f Reverting the addition of class names near the parameters: it doesn't seem to have a purpose, and breaks PHP 5.0.4 on my computer (PHP raises error when the parameters are set to null). 2006-11-21 18:38:06 +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
Aryeh Gregor
db76f08819 Code style tweaks per brion's suggestions on Wikitech-l 2006-11-21 03:22:18 +00:00
Aryeh Gregor
733cda1c26 * (bug 7918) Fix regression in display of "templates used on this page" for users with edit form before preview
* Make section edits show templates used in the section, not the page

Patch by Mark Haidar (Fyren).  I didn't change the Boolean params to class constants because they're currently called as ($this->preview, $this->section != ''), which is much more readable than the alternative.
2006-11-20 05:15:51 +00:00
Aryeh Gregor
7f33a86ead (bug 7688) When viewing diff, section anchors in autosummary jump to section on current page. Patch by Mark Haidar (Fyren) with slight modifications. 2006-11-17 03:59:32 +00:00
Aryeh Gregor
a14bf886d0 Clean up last commit: OutputPage::formatTemplates + EditPage::formatTemplates -> Linker::formatTemplates. 2006-11-17 03:42:23 +00:00
Aryeh Gregor
3a0c45e93c * urlencode username so rollback-on-history works for users with funny names
* Move rollback-link-generating code to Linker::generateRollback
2006-11-16 22:53:01 +00:00
Nick Jenkins
8ca554e9b1 Prevent PHP Notice: "Uninitialized string offset: 0 in includes/Linker.php on line 954" in error_reporting(E_ALL) mode, when doing a "Show Preview" with the edit summary as just "[[]]". 2006-11-14 07:21:40 +00:00
Brion Vibber
79e25cef14 * Approximate height for client-side scaling fallback instead of passing -1 into the HTML output.
height="-1" was getting into the <img> tags for (for example) very large PNGs not thumbnailed server-side due to the max image size limit
2006-11-10 13:23:47 +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
Nick Jenkins
332eed5df0 Fix parserTests regression introduced in r17479.
Example of failing test:
----------------------
Running test Magic links: RFC (bug 479)... FAILED!
--- /tmp/mwParser-1109840392-expected   2006-11-08 05:39:04.000000000 +0000
+++ /tmp/mwParser-1109840392-actual     2006-11-08 05:39:04.000000000 +0000
@@ -1,2 +1,2 @@
-<p><a href="http://www.ietf.org/rfc/rfc822.txt" class="external" title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
+<p><a href="http://www.ietf.org/rfc/rfc822.txt" class="external " title="http://www.ietf.org/rfc/rfc822.txt" rel="nofollow">RFC 822</a>
 </p>
----------------------

Also applied to the "BUG 1887: A RFC with a thumbnail" and "RFC code coverage" tests.
2006-11-08 06:03:01 +00:00
Nick Jenkins
fa239349f2 * (bug 7405) Make Linker methods static. Patch by Dan Li. 2006-11-08 05:21:15 +00:00
Aryeh Gregor
5d7a6166d6 Fix documentation that confused me. Bad Tim, copy-pasting in r12924! 2006-11-03 06:02:34 +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
Aryeh Gregor
ace123a337 * (bug 4525) Move section links down visually to same level as headings editsection links are now inside the heading elements).
* Document structure changed, so some JavaScript/CSS may need tweaking (wikibits.js updated to reflect changes).
* Parsertests updated, but don't seem to run, so someone please confirm that there are no (illusory) regressions.
* $wgStyleVersion bumped.
2006-10-18 06:53:19 +00:00
Aryeh Gregor
8825de5e6f Revert last two commits. Broke wikibits and don't know how to fix it at the moment. 2006-10-12 09:02:25 +00:00
Aryeh Gregor
2d6344080e * (bug 4525) Move section links down to same level as headings (editsection links are now inside the h# elements) 2006-10-12 08:01:19 +00:00
Aryeh Gregor
6e51912903 * (bug 6868) Un-hardcode section edit link style 2006-10-12 04:47:01 +00:00
Brion Vibber
834df59395 Revert r16863: broke section arrow link at least for he: 2006-10-09 00:22:41 +00:00
Niklas Laxström
d4ee2a4dd2 * Escaping 2006-10-08 14:00:37 +00:00
Jens Frank
7f7e79022b (bug 6420) Render thumbnails for djvu images, show multipage preview on image page 2006-08-13 17:34:48 +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
Tim Starling
179733a3f0 Created $wgGenerateThumbnailOnParse, set to false to allow NFS stat calls to be suppressed. 2006-07-05 05:04:06 +00:00
Tim Starling
eac0376cdc s/Revision::MW_REV_DELETED/Revision::DELETED/, and introduced aliases for compatibility with 1.6. 2006-06-23 06:31:46 +00:00
Brion Vibber
6c6b3b8083 Temporarily revert 14847; makes incompatible changes to message strings. 2006-06-20 18:20:58 +00:00
Rotem Liss
1fb3d373a9 * Using the "returnto" in the login link in additional messages, and creating a function (Linker::loginLink) to create it.
* Removing "whitelistreadtitle" and "whitelistreadtext", which seem to be unused.
* Removing the self login link in the create account not allowed screen, as it is not useful.
* Fixing "loginreqlink" in Hebrew.
* Fixing various small bugs about these error pages.
2006-06-20 16:08:38 +00:00
Brion Vibber
e2b6e096d6 HTML output normalization: remove extra space after class="thumbcaption" 2006-06-12 05:46:33 +00:00
Brion Vibber
d68c89cfd1 * Use double quoted consistently on attributes in linker output; preparing for new normalization code when tidy not in use 2006-06-12 05:33:48 +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
Domas Mituzas
d8c04540b7 Move revision deletion constants into Revision:: 2006-06-06 10:54:23 +00:00
Brion Vibber
00015b8bf2 * Fix fatal error when specifying illegal name for manual thumbnail 2006-06-03 00:24:04 +00:00
Erik Moeller
1eeb7019c8 fix magic => section links (from edit summaries) to sections that have links of the type [[:Image:Foo.jpg]] in their title 2006-05-31 07:29:02 +00:00
Rob Church
70ef86af58 * Remove redundant extra span tag
* Fix parser test for self-links
2006-05-27 00:31:06 +00:00
Rob Church
5990996523 (bug 6103) Wrap self-links in a CSS class ("selflink") 2006-05-26 23:15:37 +00:00
Brion Vibber
1d281db39f * (bug 5523) $wgNoFollowNsExceptions to allow disabling rel="nofollow" in specially-selected namespaces.
Patch by Ilmari Karonen, http://bugzilla.wikimedia.org/attachment.cgi?id=1789&action=view
2006-05-22 21:17:38 +00:00
Niklas Laxström
edbbb4970b * Don't use content language for talk link 2006-05-08 16:20:59 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00
Gabriel Wicke
6dd3edac2d special case: don't return an empty table, fixes test case 2006-03-24 16:07:50 +00:00
Gabriel Wicke
6e39f46aaa Make size of thumb box for non-existent images consistent with common 180px default size; fixes a test case 2006-03-24 16:06:57 +00:00
Lupin
867bd26aa9 unused globals removed 2006-03-18 01:06:57 +00:00
Brion Vibber
16047ca2b7 * Don't URL-decode in the title attribute for URL links; it can produce false
results that don't code back to their original values.
2006-03-17 01:02:14 +00:00
Brion Vibber
7241c48e61 * Add a clickable contribs link in user tool links (rc, watchlist, diff view)
to see how people like it. (There was one in the old hacked-up diff view.)
2006-03-16 21:17:32 +00:00
Brion Vibber
103be1dda1 * Further work on rev_deleted; changed to a bitfield with several data-hiding
options. Not yet ready for production use; Special:Revisiondelete is
  incomplete, and the flags are not preserved across page deletion/undeletion.
  To try it; add the 'deleterevision' permission to a privileged group.
Also split some functions from GlobalFunctions to XmlFunctions.php, added
some convenience functions for building form controls, some more Linker
conveniences for formatting various types of standard link clusters.
2006-03-16 19:04:25 +00:00