Commit graph

35 commits

Author SHA1 Message Date
Alexandre Emsenhuber
63176b99b7 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I1deb70318d01a257b51948ba806d80cd1a239f4f
2012-05-04 08:47:07 +02:00
Roan Kattouw
23ab0f7162 (bug 34114) CSSMin::remap() doesn't respect its $embed parameter. Patch by Gilles van den Hoven 2012-02-02 10:30:57 +00:00
Sam Reed
4622da783c More documentation! 2011-10-26 04:15:09 +00:00
Sam Reed
27665d27ae Update some deprecated code
Documentation

Fix "/*" comments to "/**"

Flesh out some missing returns, change some return types
2011-10-14 21:18:38 +00:00
Roan Kattouw
b3599d8f8c Followup to r92580 and r93820: r92580 duplicated the call to wfExpandUrl(), and r93820 caused them to get out of sync. 2011-08-14 13:35:06 +00:00
Roan Kattouw
3e0a770524 Fix syntax error in r93820 2011-08-03 13:12:55 +00:00
Roan Kattouw
ae7d7676fb Fix r93820: PROT_ -> PROTO_ 2011-08-03 13:11:42 +00:00
Roan Kattouw
6adb2e86a5 Some random URL protocol forcing for protocol-relative URLs 2011-08-03 12:58:21 +00:00
Roan Kattouw
cb8418647f Fixes for URL expanding in CSSMin: adjust the offset correctly (this could've theoretically resulted in very strange bugs) and only call wfExpandUrl() if available (the file is in includes/libs so it should work outside of MediaWiki) 2011-07-19 21:19:50 +00:00
Sam Reed
bdf84cb20e Swap else if for elseif
Trimming trailing whitespace also

Doing in 3 commits, so hopefully reviewable in CR...
2011-06-17 16:03:52 +00:00
Brion Vibber
5feb09f086 * (bug 25262) Fix for minification of hardcoded data: URIs in CSS
CSSMin::minify()'s processing of url references for path adjustment or embedding had excluded explicit fully-qualified http: and https: URLs, but was damaging others such as data: URIs that were actually hardcoded into the original CSS.
This was affecting styles used on no.wikipedia.org which embedded a few icons directly into the style sheet.
Now checking for any URL scheme rather than hardcoding a check for http & https.
2011-05-10 20:14:30 +00:00
Ryan Kaldari
55fc4f6a86 oops, don't delete char before the slash, followup to r83902 2011-03-15 02:03:01 +00:00
Ryan Kaldari
754e09b59b keep double slash filter from breaking absolute URLs, fix to r83902 2011-03-15 01:57:37 +00:00
Roan Kattouw
797544d3a3 (bug 27052) CSSMin generated URLs like foo//../bar in some cases, which apparently resolves to foo/bar rather than foo/../bar or bar . Fixed by eliminating duplicate slashes from the file URL when remapping 2011-03-14 15:01:50 +00:00
Roan Kattouw
97a945864a (bug 27328) Redo r82218 properly, expanding URLs with absolute paths 2011-02-19 14:58:16 +00:00
Roan Kattouw
a99d1f47e5 Revert r82218 , doesn't fix absolute path URLs but breaks them. Will fix properly in next commit 2011-02-19 14:46:49 +00:00
Roan Kattouw
94ab016fb2 Followup r82156: skip relative URLs with absolute paths too 2011-02-16 06:27:22 +00:00
Trevor Parscal
64e5faa430 Resolves remaining issues in r82000 with remapping relative CSS URLs that contained queries. 2011-02-15 00:49:34 +00:00
Trevor Parscal
7a1903ec6b Resolves bug #27328 by supporting URL rewriting for CSS that comes from the Wiki, such as user and site scripts. 2011-02-11 22:57:32 +00:00
Trevor Parscal
083125258c Resolves bug #26655 - adds support for space before and after the URL inside the parenthesis of a url() statement in CSS. 2011-01-10 21:31:12 +00:00
Roan Kattouw
b548c98abb (bug 26228) On certain PHP 5.2 installs, finfo functions can be available while FILEINFO_MIME_TYPE is not. Check for the latter explicitly 2010-12-05 13:38:25 +00:00
Roan Kattouw
f21e31ccaa Fix typo in comment 2010-12-03 23:34:12 +00:00
Aaron Schulz
fe9076c3c8 Broke and split up many long lines 2010-12-02 19:49:54 +00:00
Roan Kattouw
1bf567fa6b (bug 25735) Fix regex error in PHP < 5.2.2 by using old (?P<name>) syntax for named subpatterns. Patch by Paul Oranje. 2010-11-01 14:31:32 +00:00
Roan Kattouw
bd02732734 Per r74946 CR, check whether realpath( $file ) returns false before using it 2010-10-18 15:11:48 +00:00
Roan Kattouw
a3d80d71e5 (bug 25546) Feed argument to finfo_file() through readpath() so it'll work on Windows 2010-10-18 14:59:42 +00:00
Trevor Parscal
108fb9b207 Fixed typo in a comment 2010-09-27 18:43:21 +00:00
Alexandre Emsenhuber
95df9b3ed0 Fixed some doxygen warnings 2010-09-23 19:41:29 +00:00
Roan Kattouw
3f535071ff (bug 25182) ResourceLoader breaks because of warnings thrown when an open_basedir is set. Fix is untested, asking reporter to confirm 2010-09-16 13:45:01 +00:00
Trevor Parscal
87c6f7ad2b Made CSSMin::remap take both local and remote directory parameters, allowing more felxible configuration. Also made ResourceLoaderFileModule use $wgScriptPath as the base of the remote directory parameter. 2010-09-11 10:20:26 +00:00
Trevor Parscal
a71f8e3f5f Changed the license to Apache 2.0 - I also hereby grant the copyright to the Wikimedia Foundation. 2010-09-09 22:12:54 +00:00
Trevor Parscal
90c012eaca Using constant to reduce duplication of CSS URL matching regular expression. Adjusted some naming for readability. 2010-09-09 21:57:59 +00:00
Trevor Parscal
546378e5ab Fixes issues with complex background rules containing extra information after the URL, while using quotes within the url. 2010-09-09 21:41:05 +00:00
Trevor Parscal
8e6e2dd1d3 Added 2 more options for mime-type detection. We now detect if the Fileinfo PECL extension is available and use it (PHP 5.3+ will have this more commonly than older versions), then try and use the now deprecated mime_content_type, and finally resort to inferring the mime-type from the file extension. Also, now if all else fails, we will gracefully degrade functionality by not embedding resources with undeterminable mime-types. 2010-09-09 21:34:44 +00:00
Trevor Parscal
c5aa835502 Moved stand-alone libraries to includes/libs. 2010-09-09 19:57:11 +00:00
Renamed from includes/CSSMin.php (Browse further)