Commit graph

237 commits

Author SHA1 Message Date
Raimond Spekking
15907ae25c Add formatnum to count of hidden categories, rephrase it a bit. 2008-02-25 20:36:29 +00:00
Raimond Spekking
d55f5bce0d Add count of hidden categories to message for better localization. 2008-02-25 19:09:25 +00:00
Andrew Garrett
5248b38e73 For pages with hidden categories, add a list of these categories down the bottom of the "edit" page - underneath the list of included templates. 2008-02-25 13:38:21 +00:00
Victor Vasiliev
31800ba04c Revert it back. It's already disabled on enwiki. If you need it, you can just set MediaWiki:Red-link-title to "$1". 2008-02-23 10:07:50 +00:00
Victor Vasiliev
4e80538c89 Remove "(not written yet)" text from title (introduced in r31140. It broke many bots which used title attribute of link for getting its target. 2008-02-22 18:49:09 +00:00
Tim Starling
c9397d91c1 Fixed namespace in red link title attribute, was briefly broken 2008-02-22 09:49:32 +00:00
Tim Starling
982fbb2dd9 * Don't show edit permissions errors on a red link click, just redirect to the article. This is so that readers who don't know what a red link is aren't confused when they are told they are range-blocked.
* Put "not yet written" in the title attribute of red links, so that readers unfamiliar with the site might guess what the colour means.
* Fixed minor bugs and refactored code in the vicinity of EditPage::edit().
2008-02-21 09:32:59 +00:00
Raimond Spekking
3518d9bb74 fix synxtax 2008-02-13 19:34:58 +00:00
Brion Vibber
59124a5002 Revert r30877 per discussion on wikitech-l: stubness coloring is enforced only on content namespaces, as other namespaces have no requirement to be non-short; further this is enforced higher up already. 2008-02-13 01:13:58 +00:00
Aryeh Gregor
61c57e7e22 Remove inexplicable $nt->isContentPage() check for rendering link colors in makeLinkObj(). I don't know why there should be any difference, and there isn't for the other methods of rendering links. 2008-02-12 20:11:58 +00:00
Aryeh Gregor
8bf5159e4d Improvements for 30871:
* Use !empty() to avoid notices if $s->page_is_redirect isn't set.
* Enable unconditionally.  This causes some extra queries, but only if 
makeLinkObj() is being used, which for typical article links it's not.  
(The previous version didn't add page_is_redirect to the parameter even 
when it would have caused no extra queries, in two places in 
Parser.php.)  If the extra makeLinkObj() queries are a problem, they can 
be combined with the existence check query.  Or failing that, it can 
just be reverted for that method only, which will still allow the 
feature to work with standard in-article links.
2008-02-12 19:58:12 +00:00
Raimond Spekking
d91d1616fb * (bug 12968) Render redirect wikilinks in a redirect class for customization via user/site CSS.
Based on a patch by Cobi
This works for logged in users who have set a threshold > 0 in its preferences. This way no extra database query is necessary.
Highly resource-intensive javascripts are now obsolete (see example in bugreport)
2008-02-12 18:01:42 +00:00
Aaron Schulz
2d22c85a4a Tweak r30820. Pass $time variable further in. This avoids extra wfFindFile() calls if we were fetching the current revision. 2008-02-11 03:27:07 +00:00
Aaron Schulz
9c08024f3e If a link is made to an old version of an image that doesn't exists, but a current version exists, blue link it. 2008-02-11 03:04:01 +00:00
Huji
49a02c6a6e * Image caption elements are now styled using a linked CSS (fixes bug 12869)
* A bug with Gecko browsers is fixed (lists were not floated correctly in RTL).
2008-02-08 17:20:04 +00:00
Raimond Spekking
63c76e8134 * (bug 12239) Use different separators for autocomments
This avoids confusion if there was some text deleted (which is often marked as "- foobar" by contributors) or a normal comment.
Based on a patch of Danny B
2008-02-06 11:45:38 +00:00
Victor Vasiliev
fb48f2917d Fix call to non-static method 2008-01-16 18:49:41 +00:00
Victor Vasiliev
f1850a9238 * Support redirects in image namespace
Now doesn't require schema change
2008-01-16 18:27:43 +00:00
Huji
db7d75fba7 (bug 12608) (in continuation of r29719) Unifying the spelling of getDBkey() in the code. 2008-01-14 09:26:36 +00:00
Thomas Bleher
2cee6e3392 Small documentation and whitespace fixes 2008-01-03 19:28:50 +00:00
Aryeh Gregor
269c5e83e1 Revert last commit, unintended things were committed. 2007-12-31 23:51:53 +00:00
Aryeh Gregor
659d643ae8 Add userrights-text message to display at all times on Special:Userrights, like makesysoptext, per request on bug 11645. 2007-12-31 23:50:47 +00:00
Aryeh Gregor
288c42cb6d Revert extraneous parts of last commit, I didn't mean to check in cruddy half-finished garbage on edit section links that I was about to throw out anyway. 2007-12-23 02:41:28 +00:00
Aryeh Gregor
fe43f5ea70 Fix last commit adding ID's, I didn't want to remove the <p>'s. 2007-12-23 02:21:49 +00:00
Aryeh Gregor
79fe751588 Revert 28517 for now. Puts non-standards-compliant code in shared.css to work around a Firefox/IE bug, and consequently breaks display for Opera, Safari, Konqueror, and any other browser that behaves correctly here (probably also future versions of FF and IE). It fixes that in Monobook only, and only for a small subset of affected browsers (Opera 7 and KHTML). The correct code should be in shared.css, with workarounds for IE and Firefox for all skins.
Furthermore, it's not clear to me why 1.2em was chosen, and it doesn't always seem to work.  See <http://encyclopedia.tw/wiki/%E8%AC%9B%E5%80%92%E7%B7%9A> for a page (non-Wikimedia, non-English) where the edit links are noticeably too high due, apparently, to this.

See also bug 12340, caused by this.
2007-12-18 16:39:57 +00:00
Leon Weber
1aad4161c7 * (bug 11555) Make editsection links come after section seadlines. This has no visible effect to graphical browsers,
but fixes the issue that headlines look like "[edit] Headline" in text browsers.
2007-12-15 16:28:38 +00:00
Raimond Spekking
06be63aa1c * (bug 12174) Update hooks.txt. Change Linker.php to use the hook name directely in wfRunHooks so that
maintenance/findhooks.php doesn't say that 'EditSectionLink' and 
'EditSectionLinkForOther' aren't found in MediaWiki code.
Patch by Alexandre Emsenhuber
2007-12-03 19:47:11 +00:00
Tim Starling
7863125a59 Recently-introduced typo in Linker::makeStubLinkObj() (bug 12165) 2007-11-30 16:56:05 +00:00
Aaron Schulz
7361fdf3fe *If you are going to check $s->page_namespace, at least select it first ;) (Nikerabbit caught this) 2007-11-24 08:20:28 +00:00
ThomasV
cf96cde1de minor fix 2007-11-22 16:06:16 +00:00
ThomasV
abf601e0fc * got rid of magic codes for colours.* added hook for link recolouring by extensions* merged redundant stub tests in one single function, getLinkColour (Linker.php)
* deprecated makeStubLink and makeStubLinkObj
2007-11-22 15:54:18 +00:00
Raimond Spekking
44c98ffac2 * Do not present an image bigger than the source when 'frameless' option is used
* This is consistent with the 'thumb' option now:
** Unchanged: [[Image:xyz.jpg|thumb]], [[Image:xyz.jpg|thumb|200px]] do not blow up an image larger than the source
** Unchanged: [[Image:xyz.jpg|frameless]] does not blow up an image
** New: [[Image:xyz.jpg|frameless|200px]] does not blow up an image
** Unchanged: [[Image:xyz.jpg|200px]] still blows up an image
2007-11-20 12:11:05 +00:00
Brion Vibber
e682f4eb68 Reverting r27599
* Uses hardcoded magic numbers extensively, which is poor practice
* Adds two hooks with no documentation
* Dropping $class unencoded into the HTML output feels like bad practice to me
* A link-by-link coloring plugin sounds like it could be very expensive to begin with; I'm a bit leery of adding in such overhead.
2007-11-19 15:38:56 +00:00
ThomasV
d03c63eb73 Inserted two hooks for extension-defined colour codes, and simplified the way link colours are passed. Deprecated makeStubLink and makeStubLinkObj 2007-11-18 11:10:26 +00:00
Domas Mituzas
e966749988 profiling tooltips. yes, they have to be profiled! 2007-11-13 09:03:49 +00:00
Brion Vibber
6a3260fe26 Revert r26670 [LiquidThreads-related patches] for now:
* Adds five undocumented hooks
* Unclear purpose for change to SpecialPage
* Big search-and-replace in EditPage for title usage which seems to still leave things inconsistent; a bit confused what all that's mean to be doing.
2007-10-18 14:55:48 +00:00
David McCabe
c474b77da3 Merged in changes from Liquid Threads branch including extra hooks and minor changes to EditPage. (Liquid Threads itself is still an extension; this is just some things it needs.) 2007-10-12 23:12:24 +00:00
Brion Vibber
050a29d575 * (bug 11560) Fix broken HTML output from weird link nesting in edit comments.
Nested links (as in image caption text) still don't work _right_ but they're
  less wrong.

Linker::formatComment() used a multi-pass run without proper protections,
making it possible for a later 'link' to erase a previous pass's start
or end tag. Switched to a single-pass run with preg_replace_callback which
avoids this.
2007-10-04 18:59:50 +00:00
Brion Vibber
9be2c3676a Revert r26281 for the moment. Big patch, changes several existing practices. Will want some public testing and more review before taking it to trunk. 2007-10-01 19:50:25 +00:00
Aaron Schulz
4febfc77c2 *Clean up deletion of revisions and remove some gaps
*Allow blocking of users to hide names
*Implement revision deletion for images/deleted files/deleted revs
*Log deletion set off for now
*Add 'hidden' file dir
*Dissallow merging via undelete (which was inefficient and hard to reverse)
*Use restore points and diffs to special:undelete
*Add a special page to merge pages
*Get changeslist to use tables to avoid ugly formatting
*Add logs into RC for rebuildrecentchanges.php
*Add private logs
*List private logs at specialpages
*Tweak/add some deletion and merge messages
2007-10-01 19:38:28 +00:00
Niklas Laxström
d8a096b97b * Some cleanups that have been hanging here too long 2007-09-21 14:32:26 +00:00
Brion Vibber
64e9083652 Revert r25916 -- breaks ability to blow up small images, without explanation. WTF? 2007-09-18 14:30:40 +00:00
Raimond Spekking
c842022728 Moving code from Linker::makeThumbLink2 to Linker::makeImageLink2
This will prevent bigger images than the source (for bitmap-style images)
[[Image:smallIconWith25px.png|200px]] does not blow the bitmap to 200px width
Now the same behavior as [[Image:smallIconWith25px.png|thumb|200px]] which prevents blow up already.
2007-09-18 13:24:53 +00:00
Tim Starling
88d6a101f3 Fixed border option to makeImageLink2() 2007-08-31 14:01:27 +00:00
Tim Starling
497649c904 In OggHandler:
* Changed display style: added a "more" link which expands a box for player selection. 
* Allow return to the still image only display.
* Fixed Java detection in IE (I hope)

Elsewhere:
* Changed MediaTransformOutput::toHtml() parameters, now accepts a single associative array with well-defined elements. Allows OggHandler to distinguish between file download links and image description links. 
* Made image links consistently have an anchor tag with class=image, instead of a mixture of image and internalParse.
* Made most images have a border=0 attribute, instead of just images on the image description page. Does not appear to adversely affect display at all, it was just convenient. 
* Use the image name as the title attribute for the <a> tag, when an a caption was not given by the user
* Block centering by the auto margins method in ImageGallery
* Fixed complete breakage of the thumbnail on upload conflict feature
* TODO: test DjVu
2007-08-31 02:51:23 +00:00
Brion Vibber
90cc625f03 * (bug 11067) Fix regression in upload conflict thumbnail display
Wildly incorrect data was getting passed through the Linker makeImageLinkObj -> makeImageLink2 -> makeThumbLink2 path, breaking certain thumb rendering as used by the special:upload ajax thingybob
2007-08-27 20:10:48 +00:00
Raimond Spekking
ee633efd84 Fix a regression from r24808 for some image options.
Thanks for hints from VP in de.wp.
2007-08-27 11:24:53 +00:00
Nick Jenkins
786e93fb37 Static code analysis housekeeping time... things that could be double-checked are marked with "[Note: some-comment]" :
if-if-else without curly braces [api/ApiQuerySiteinfo.php] --> adding
Unused global declaration:  $wgGroupPermissions --> removing 
Unused global declaration:  $wgEmailConfirmToEdit (line 301) --> removing 
Variable $id appears only once (line 1021)  --> removing 
Variable $m was used before it was defined (line 805) --> defining.
Variable $retval was used before it was defined (line 2346) --> renaming to $result
Variable $rcid appears only once (line 244 of RecentChange.php)  --> using this instead of $change [Note: was left over from r24607 refactoring, revert if wrong please]
Unused global declaration:  $wgCommandLineMode (line 11) --> removing
Variable $k appears only once (line 132 of ImagePage.php) --> removing.
Variable $info appears only once (line 311 of ImagePage.php)  --> removing.
Unused global declaration:  $wgTitle (line 569 of ImagePage.php) -> removing.
Variable $handlerParams was used before it was defined (line 616 of Linker.php) --> resolved by Raymond in r24966
Variable $match was used before it was defined (line 1031 of Linker.php) --> defining.
Unused global declaration:  $wgEnotifWatchlist (line 253 of UserMailer.php) --> removing 
Unused global declaration:  $wgShowUpdatedMarker (line 253 of UserMailer.php) --> removing 
Variable $img appears only once (line 446 of SpecialUpload.php) --> added definition, defined as null, flagged with @todo  [Note: should $img be defined in this context, or is it intended to be null? And should the return value after the hook be checked in some way?]
Unused global declaration:  $wgEnableAPI (line 739 of SpecialUpload.php) --> removing.
Unused global declaration:  $wgNamespaceProtection (line 1030 of OutputPage.php) --> removing.
Unused global declaration:  $wgContLang (line 18 of SpecialWatchlist.php) --> removing.
Unused global declaration:  $wgRawHtml (line 269 of SpecialMovepage.php) --> removing.
The value of variable $page was never used (line 331 of SpecialUndelete.php) --> removing line, as $page gets redefined a few lines down.
Variable $synIndex appears only once (line 521 of MagicWord.php) --> commenting out.
Variable $case appears only once (line 539 of MagicWord.php) --> removing from foreach index key usage.
Variable $wgUser appears only once (line 1039 of Title.php) --> adding line to declare as a global, would be null otherwise.
Variable $m was used before it was defined (line 285 of Title.php) --> defining.
Variable $id appears only once (line 1150 of Title.php) --> removing from foreach index key usage.
Variable $subpage appears only once (line 1297 of Title.php) --> commenting out.
Variable $restrictions appears only once (line 1399 of Title.php) --> commenting out.
Variable $mime appears only once (line 210 of filerepo/OldLocalFile.php) --> removing.
Variable $deprefixedName appears only once (line 213 of filerepo/LocalFile.php) --> removing.
Variable $m appears only once (line 541 of filerepo/LocalFile.php) --> removing.
Variable $where appears only once (line 1245 of filerepo/LocalFile.php) --> removing.
Variable $info appears only once (line 1427 of filerepo/LocalFile.php) --> removing.
Variable $rel appears only once (line 138 of filerepo/RepoGroup.php) --> commenting out.
Variable $zone appears only once (line 138 of filerepo/RepoGroup.php) --> commenting out.
Variable $nbytes appears only once (line 208 of media/Generic.php) --> added a return line that uses $nbytes. [Note: I'm assuming that this was the intent]
Variable $offset appears only once (line 201 of SpecialListusers.php) --> removing.
Variable $limit appears only once (line 201 of SpecialListusers.php) --> removing.
Variable $groupTarget appears only once (line 203 of SpecialListusers.php) --> removing.
Unused global declaration:  $wgLang (line 74 of SpecialWantedpages.php) --> removing.
Variable $block appears only once (line 244 of SpecialProtectedpages.php) --> removing.
Variable $offset appears only once (line 281 of SpecialProtectedpages.php) --> removing.
Variable $limit appears only once (line 281 of SpecialProtectedpages.php) --> removing.
Unused global declaration:  $wgLang (line 30 of FileDeleteForm.php) --> removing.
Unused global declaration:  $wgServer (line 30 of FileDeleteForm.php) --> removing.
2007-08-21 03:57:54 +00:00
Raimond Spekking
7b109cad8a Fix a regression from r24808:
PHP-Notice: 'Undefined variable:'
2007-08-20 21:37:48 +00:00
Tim Starling
164bb322f2 Basic integrated audio/video support, with Ogg implementation.
* JavaScript video player based loosely on Greg Maxwell's player
* Image page text snippet customisation
* Abstraction of transform parameters in the parser. Introduced Linker::makeImageLink2().
* Made canRender(), mustRender() depend on file, not just on handler. Moved width=0, height=0 checking to ImageHandler::canRender(), since audio streams have width=height=0 but should be rendered.

Also:
* Automatic upgrade for oldimage rows on image page view, allows media handler selection based on oi_*_mime
* oi_*_mime unconditionally referenced, REQUIRES SCHEMA UPGRADE
* Don't destroy file info for missing files on upgrade
* Simple, centralised extension message file handling
* Made MessageCache::loadAllMessages non-static, optimised for repeated-call case due to abuse in User.php
* Support for lightweight parser output hooks, with callback whitelist for security
* Moved Linker::formatSize() to Language, to join the new formatTimePeriod() and formatBitrate()
* Introduced MagicWordArray, regex capture trick requires that magic word IDs DO NOT CONTAIN HYPHENS.
2007-08-15 10:50:09 +00:00