http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96088
Revision: 96088
Author: hashar
Date: 2011-09-02 10:53:50 +0000 (Fri, 02 Sep 2011)
Log Message:
-----------
MFT to REL1_18
r94058 fix hebrew alias for Special:ChangePassword
r94062 ApiQueryWatchlist cleaner queries
r94107 r95812 MW installer require -> require_once
r94630 Watch action: add , 0 to article construction
r95042 typo in docs/hooks.txt
r95155 Exif byte order, windows-1252 as fallback encoding for gif r95332 r95451
(bug 30441) getParamValue must understand "+" encoding of space
r95410 r95442 related to (bug 13979)
r95468 Put mediawiki.special.search in a document ready wrapper
Modified Paths:
--------------
branches/REL1_18/phase3/RELEASE-NOTES-1.18
branches/REL1_18/phase3/docs/hooks.txt
branches/REL1_18/phase3/includes/actions/WatchAction.php
branches/REL1_18/phase3/includes/api/ApiQueryWatchlist.php
branches/REL1_18/phase3/includes/installer/LocalSettingsGenerator.php
branches/REL1_18/phase3/includes/media/BitmapMetadataHandler.php
branches/REL1_18/phase3/includes/media/Exif.php
branches/REL1_18/phase3/includes/media/GIFMetadataExtractor.php
branches/REL1_18/phase3/includes/media/JpegMetadataExtractor.php
branches/REL1_18/phase3/includes/media/Tiff.php
branches/REL1_18/phase3/includes/specials/SpecialEmailuser.php
branches/REL1_18/phase3/languages/messages/MessagesHe.php
branches/REL1_18/phase3/resources/mediawiki/mediawiki.util.js
branches/REL1_18/phase3/resources/mediawiki.special/mediawiki.special.search.js
branches/REL1_18/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js
Property Changed:
----------------
branches/REL1_18/phase3/
branches/REL1_18/phase3/RELEASE-NOTES-1.18
branches/REL1_18/phase3/docs/hooks.txt
branches/REL1_18/phase3/includes/
branches/REL1_18/phase3/includes/api/
branches/REL1_18/phase3/includes/media/Exif.php
branches/REL1_18/phase3/includes/specials/
branches/REL1_18/phase3/languages/
branches/REL1_18/phase3/languages/messages/
branches/REL1_18/phase3/maintenance/archives/
branches/REL1_18/phase3/maintenance/cleanupTable.inc
branches/REL1_18/phase3/maintenance/tables.sql
branches/REL1_18/phase3/resources/mediawiki/mediawiki.util.js
branches/REL1_18/phase3/tests/phpunit/Makefile
branches/REL1_18/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js
branches/REL1_18/phase3/tests/selenium/installer/README.txt
branches/REL1_18/phase3/tests/testHelpers.inc
Property changes on: branches/REL1_18/phase3
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3:51646
/branches/REL1_17/phase3:81445,81448
/branches/new-installer/phase3:43664-66004
/branches/sqlite:58211-58321
/trunk/phase3:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94728,94738,94825,94862,94995-94997,95023,95072-95073,95327,95422,95426,95601
+ /branches/REL1_15/phase3:51646
/branches/REL1_17/phase3:81445,81448
/branches/new-installer/phase3:43664-66004
/branches/sqlite:58211-58321
/trunk/phase3:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812
Modified: branches/REL1_18/phase3/RELEASE-NOTES-1.18
===================================================================
--- branches/REL1_18/phase3/RELEASE-NOTES-1.18 2011-09-02 10:42:08 UTC (rev
96087)
+++ branches/REL1_18/phase3/RELEASE-NOTES-1.18 2011-09-02 10:53:50 UTC (rev
96088)
@@ -431,6 +431,8 @@
#REDIRECT [[Foo]] is invalid JS
* (bug 30335) Fix for HTMLForms using GET breaking when non-friendly URLs
are used
+* (bug 30264) Changed installer-generated LocalSettings.php to use
require_once()
+ instead require() for included extensions.
=== API changes in 1.18 ===
* BREAKING CHANGE: action=watch now requires POST and token.
Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/RELEASE-NOTES-1.18:51646
/branches/REL1_17/phase3/RELEASE-NOTES-1.18:81445,81448
/branches/new-installer/phase3/RELEASE-NOTES-1.18:43664-66004
/branches/sqlite/RELEASE-NOTES-1.18:58211-58321
/trunk/phase3/RELEASE-NOTES-1.18:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93916,93935-93936,94068,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94728,94738,94825,94862,94995-94997,95023,95072-95073,95327,95422,95426,95601
+ /branches/REL1_15/phase3/RELEASE-NOTES-1.18:51646
/branches/REL1_17/phase3/RELEASE-NOTES-1.18:81445,81448
/branches/new-installer/phase3/RELEASE-NOTES-1.18:43664-66004
/branches/sqlite/RELEASE-NOTES-1.18:58211-58321
/trunk/phase3/RELEASE-NOTES-1.18:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93916,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812
Modified: branches/REL1_18/phase3/docs/hooks.txt
===================================================================
--- branches/REL1_18/phase3/docs/hooks.txt 2011-09-02 10:42:08 UTC (rev
96087)
+++ branches/REL1_18/phase3/docs/hooks.txt 2011-09-02 10:53:50 UTC (rev
96088)
@@ -635,7 +635,7 @@
'ContribsPager::getQueryInfo': Before the contributions query is about to run
&$pager: Pager object for contributions
-&queryInfo: The query for the contribs Pager
+&$queryInfo: The query for the contribs Pager
'ContributionsLineEnding': Called before a contributions HTML line is finished
$page: SpecialPage object for contributions
Property changes on: branches/REL1_18/phase3/docs/hooks.txt
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/docs/hooks.txt:51646
/branches/REL1_17/phase3/docs/hooks.txt:81445,81448
/branches/new-installer/phase3/docs/hooks.txt:43664-66004
/branches/sqlite/docs/hooks.txt:58211-58321
/trunk/phase3/docs/hooks.txt:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93916,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+ /branches/REL1_15/phase3/docs/hooks.txt:51646
/branches/REL1_17/phase3/docs/hooks.txt:81445,81448
/branches/new-installer/phase3/docs/hooks.txt:43664-66004
/branches/sqlite/docs/hooks.txt:58211-58321
/trunk/phase3/docs/hooks.txt:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93916,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Property changes on: branches/REL1_18/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/includes:51646
/branches/new-installer/phase3/includes:43664-66004
/branches/sqlite/includes:58211-58321
/branches/wmf-deployment/includes:53381
/trunk/phase3/includes:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94728,94738,94825,94862,94995-94997,95023,95072-95073,95327,95422,95426,95601
+ /branches/REL1_15/phase3/includes:51646
/branches/new-installer/phase3/includes:43664-66004
/branches/sqlite/includes:58211-58321
/branches/wmf-deployment/includes:53381
/trunk/phase3/includes:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812
Modified: branches/REL1_18/phase3/includes/actions/WatchAction.php
===================================================================
--- branches/REL1_18/phase3/includes/actions/WatchAction.php 2011-09-02
10:42:08 UTC (rev 96087)
+++ branches/REL1_18/phase3/includes/actions/WatchAction.php 2011-09-02
10:53:50 UTC (rev 96088)
@@ -87,7 +87,7 @@
}
public static function doWatch( Title $title, User $user ) {
- $page = new Article( $title );
+ $page = new Article( $title, 0 );
if ( wfRunHooks( 'WatchArticle', array( &$user, &$page ) ) ) {
$user->addWatch( $title );
@@ -97,7 +97,7 @@
}
public static function doUnwatch( Title $title, User $user ) {
- $page = new Article( $title );
+ $page = new Article( $title, 0 );
if ( wfRunHooks( 'UnwatchArticle', array( &$user, &$page ) ) ) {
$user->removeWatch( $title );
Property changes on: branches/REL1_18/phase3/includes/api
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/includes/api:51646
/branches/REL1_16/phase3/includes/api:63621-63636,69357
/branches/sqlite/includes/api:58211-58321
/branches/wmf/1.16wmf4/includes/api:69521
/branches/wmf-deployment/includes/api:53381,59952
/trunk/phase3/includes/api:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+ /branches/REL1_15/phase3/includes/api:51646
/branches/REL1_16/phase3/includes/api:63621-63636,69357
/branches/sqlite/includes/api:58211-58321
/branches/wmf/1.16wmf4/includes/api:69521
/branches/wmf-deployment/includes/api:53381,59952
/trunk/phase3/includes/api:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Modified: branches/REL1_18/phase3/includes/api/ApiQueryWatchlist.php
===================================================================
--- branches/REL1_18/phase3/includes/api/ApiQueryWatchlist.php 2011-09-02
10:42:08 UTC (rev 96087)
+++ branches/REL1_18/phase3/includes/api/ApiQueryWatchlist.php 2011-09-02
10:53:50 UTC (rev 96088)
@@ -118,7 +118,6 @@
$this->addTables( array(
'recentchanges',
'watchlist',
- 'page',
) );
$userId = $user->getId();
@@ -128,7 +127,6 @@
'wl_namespace=rc_namespace',
'wl_title=rc_title'
) ) ) );
- $this->addJoinConds( array( 'page' => array( 'LEFT
JOIN','rc_cur_id=page_id' ) ) );
$this->addWhere( array(
'rc_deleted' => 0,
@@ -140,8 +138,13 @@
$db->timestamp( $params['start'] ),
$db->timestamp( $params['end'] ) );
$this->addWhereFld( 'wl_namespace', $params['namespace'] );
- $this->addWhereIf( 'rc_this_oldid=page_latest OR rc_type=' .
RC_LOG, !$params['allrev'] );
+ if ( !$params['allrev'] ) {
+ $this->addTables( 'page' );
+ $this->addJoinConds( array( 'page' => array( 'LEFT
JOIN','rc_cur_id=page_id' ) ) );
+ $this->addWhere( 'rc_this_oldid=page_latest OR
rc_type=' . RC_LOG );
+ }
+
if ( !is_null( $params['show'] ) ) {
$show = array_flip( $params['show'] );
Modified: branches/REL1_18/phase3/includes/installer/LocalSettingsGenerator.php
===================================================================
--- branches/REL1_18/phase3/includes/installer/LocalSettingsGenerator.php
2011-09-02 10:42:08 UTC (rev 96087)
+++ branches/REL1_18/phase3/includes/installer/LocalSettingsGenerator.php
2011-09-02 10:53:50 UTC (rev 96088)
@@ -129,7 +129,7 @@
foreach( $this->extensions as $extName ) {
$encExtName = self::escapePhpString( $extName );
- $localSettings .= "require(
\"extensions/$encExtName/$encExtName.php\" );\n";
+ $localSettings .= "require_once(
\"\$IP/extensions/$encExtName/$encExtName.php\" );\n";
}
}
Modified: branches/REL1_18/phase3/includes/media/BitmapMetadataHandler.php
===================================================================
--- branches/REL1_18/phase3/includes/media/BitmapMetadataHandler.php
2011-09-02 10:42:08 UTC (rev 96087)
+++ branches/REL1_18/phase3/includes/media/BitmapMetadataHandler.php
2011-09-02 10:53:50 UTC (rev 96088)
@@ -40,16 +40,16 @@
/**
- *
- * get exif info using exif class.
+ * Get exif info using exif class.
* Basically what used to be in BitmapHandler::getMetadata().
* Just calls stuff in the Exif class.
*
* @param $filename string
*/
- function getExif ( $filename ) {
- if ( file_exists( $filename ) ) {
- $exif = new Exif( $filename );
+ function getExif ( $filename, $byteOrder ) {
+ global $wgShowEXIF;
+ if ( file_exists( $filename ) && $wgShowEXIF ) {
+ $exif = new Exif( $filename, $byteOrder );
$data = $exif->getFilteredData();
if ( $data ) {
$this->addMetadata( $data, 'exif' );
@@ -117,7 +117,6 @@
static function Jpeg ( $filename ) {
$showXMP = function_exists( 'xml_parser_create_ns' );
$meta = new self();
- $meta->getExif( $filename );
$seg = JpegMetadataExtractor::segmentSplitter( $filename );
if ( isset( $seg['COM'] ) && isset( $seg['COM'][0] ) ) {
@@ -141,6 +140,9 @@
$meta->addMetadata( $array, $type );
}
}
+ if ( isset( $seg['byteOrder'] ) ) {
+ $meta->getExif( $filename, $seg['byteOrder'] );
+ }
return $meta->getMetadataArray();
}
@@ -208,4 +210,60 @@
return $baseArray;
}
+ /**
+ * This doesn't do much yet, but eventually I plan to add
+ * XMP support for Tiff. (PHP's exif support already extracts
+ * but needs some further processing because PHP's exif support
+ * is stupid...)
+ *
+ * @todo Add XMP support, so this function actually makes
+ * sense to put here.
+ *
+ * The various exceptions this throws are caught later.
+ * @param $filename String
+ * @return Array The metadata.
+ */
+ static public function Tiff ( $filename ) {
+ if ( file_exists( $filename ) ) {
+ $byteOrder = self::getTiffByteOrder( $filename );
+ if ( !$byteOrder ) {
+ throw new MWException( "Error determining byte
order of $filename" );
+ }
+ $exif = new Exif( $filename, $byteOrder );
+ $data = $exif->getFilteredData();
+ if ( $data ) {
+ $data['MEDIAWIKI_EXIF_VERSION'] =
Exif::version();
+ return $data;
+ } else {
+ throw new MWException( "Could not extract data
from tiff file $filename" );
+ }
+ } else {
+ throw new MWException( "File doesn't exist - $filename"
);
+ }
+ }
+ /**
+ * Read the first 2 bytes of a tiff file to figure out
+ * Little Endian or Big Endian. Needed for exif stuff.
+ *
+ * @param $filename String The filename
+ * @return String 'BE' or 'LE' or false
+ */
+ static function getTiffByteOrder( $filename ) {
+ $fh = fopen( $filename, 'rb' );
+ if ( !$fh ) return false;
+ $head = fread( $fh, 2 );
+ fclose( $fh );
+
+ switch( $head ) {
+ case 'II':
+ return 'LE'; // II for intel.
+ case 'MM':
+ return 'BE'; // MM for motorla.
+ default:
+ return false; // Something went wrong.
+
+ }
+ }
+
+
}
Modified: branches/REL1_18/phase3/includes/media/Exif.php
===================================================================
--- branches/REL1_18/phase3/includes/media/Exif.php 2011-09-02 10:42:08 UTC
(rev 96087)
+++ branches/REL1_18/phase3/includes/media/Exif.php 2011-09-02 10:53:50 UTC
(rev 96088)
@@ -90,6 +90,11 @@
*/
var $log = false;
+ /**
+ * The byte order of the file. Needed because php's
+ * extension doesn't fully process some obscure props.
+ */
+ private $byteOrder;
//@}
/**
@@ -102,7 +107,7 @@
* DigitalZoomRatio = 0/0 is rejected. need to determine if that's
valid.
* possibly should treat 0/0 = 0. need to read exif spec on that.
*/
- function __construct( $file ) {
+ function __construct( $file, $byteOrder = '' ) {
/**
* Page numbers here refer to pages in the EXIF 2.2 standard
*
@@ -275,6 +280,16 @@
$this->file = $file;
$this->basename = wfBaseName( $this->file );
+ if ( $byteOrder === 'BE' || $byteOrder === 'LE' ) {
+ $this->byteOrder = $byteOrder;
+ } else {
+ // Only give a warning for b/c, since originally we
didn't
+ // require this. The number of things affected by this
is
+ // rather small.
+ wfWarn( 'Exif class did not have byte order specified. '
+ . 'Some properties may be decoded incorrectly.' );
+ $this->byteOrder = 'BE'; // BE seems about twice as
popular as LE in jpg's.
+ }
$this->debugFile( $this->basename, __FUNCTION__, true );
if( function_exists( 'exif_read_data' ) ) {
@@ -394,7 +409,16 @@
}
$newVal .= ord( substr($val, $i, 1) );
}
- $this->mFilteredExifData['GPSVersionID'] = $newVal;
+ if ( $this->byteOrder === 'LE' ) {
+ // Need to reverse the string
+ $newVal2 = '';
+ for ( $i = strlen( $newVal ) - 1; $i >= 0; $i--
) {
+ $newVal2 .= substr( $newVal, $i, 1 );
+ }
+ $this->mFilteredExifData['GPSVersionID'] =
$newVal2;
+ } else {
+ $this->mFilteredExifData['GPSVersionID'] =
$newVal;
+ }
unset( $this->mFilteredExifData['GPSVersion'] );
}
@@ -415,7 +439,6 @@
unset($this->mFilteredExifData[$prop]);
return;
}
-
$charCode = substr( $this->mFilteredExifData[$prop], 0,
8);
$val = substr( $this->mFilteredExifData[$prop], 8);
@@ -426,7 +449,7 @@
$charset = "Shift-JIS";
break;
case "UNICODE\x00":
- $charset = "UTF-16";
+ $charset = "UTF-16" . $this->byteOrder;
break;
default: //ascii or undefined.
$charset = "";
Property changes on: branches/REL1_18/phase3/includes/media/Exif.php
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/includes/Exif.php:51646
/branches/new-installer/phase3/includes/Exif.php:43664-66004
/branches/sqlite/includes/Exif.php:58211-58321
/branches/wmf-deployment/includes/Exif.php:53381
/trunk/phase3/includes/media/Exif.php:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+ /branches/REL1_15/phase3/includes/Exif.php:51646
/branches/new-installer/phase3/includes/Exif.php:43664-66004
/branches/sqlite/includes/Exif.php:58211-58321
/branches/wmf-deployment/includes/Exif.php:53381
/trunk/phase3/includes/media/Exif.php:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Modified: branches/REL1_18/phase3/includes/media/GIFMetadataExtractor.php
===================================================================
--- branches/REL1_18/phase3/includes/media/GIFMetadataExtractor.php
2011-09-02 10:42:08 UTC (rev 96087)
+++ branches/REL1_18/phase3/includes/media/GIFMetadataExtractor.php
2011-09-02 10:53:50 UTC (rev 96088)
@@ -126,14 +126,14 @@
// The standard says this should be
ASCII, however its unclear if
// thats true in practise. Check to see
if its valid utf-8, if so
- // assume its that, otherwise assume
its iso-8859-1
+ // assume its that, otherwise assume
its windows-1252 (iso-8859-1)
$dataCopy = $data;
// quickIsNFCVerify has the side effect
of replacing any invalid characters
UtfNormal::quickIsNFCVerify( $dataCopy
);
if ( $dataCopy !== $data ) {
wfSuppressWarnings();
- $data = iconv( 'ISO-8859-1',
'UTF-8', $data );
+ $data = iconv( 'windows-1252',
'UTF-8', $data );
wfRestoreWarnings();
}
Modified: branches/REL1_18/phase3/includes/media/JpegMetadataExtractor.php
===================================================================
--- branches/REL1_18/phase3/includes/media/JpegMetadataExtractor.php
2011-09-02 10:42:08 UTC (rev 96087)
+++ branches/REL1_18/phase3/includes/media/JpegMetadataExtractor.php
2011-09-02 10:53:50 UTC (rev 96088)
@@ -28,7 +28,10 @@
$segmentCount = 0;
- $segments = array( 'XMP_ext' => array(), 'COM' => array() );
+ $segments = array(
+ 'XMP_ext' => array(),
+ 'COM' => array(),
+ );
if ( !$filename ) {
throw new MWException( "No filename specified for " .
__METHOD__ );
@@ -82,23 +85,34 @@
wfDebug( __METHOD__ . ' Ignoring JPEG
comment as is garbage.' );
}
- } elseif ( $buffer === "\xE1" && $showXMP ) {
+ } elseif ( $buffer === "\xE1" ) {
// APP1 section (Exif, XMP, and XMP extended)
// only extract if XMP is enabled.
$temp = self::jpegExtractMarker( $fh );
-
// check what type of app segment this is.
- if ( substr( $temp, 0, 29 ) ===
"http://ns.adobe.com/xap/1.0/\x00" ) {
+ if ( substr( $temp, 0, 29 ) ===
"http://ns.adobe.com/xap/1.0/\x00" && $showXMP ) {
$segments["XMP"] = substr( $temp, 29 );
- } elseif ( substr( $temp, 0, 35 ) ===
"http://ns.adobe.com/xmp/extension/\x00" ) {
+ } elseif ( substr( $temp, 0, 35 ) ===
"http://ns.adobe.com/xmp/extension/\x00" && $showXMP ) {
$segments["XMP_ext"][] = substr( $temp,
35 );
- } elseif ( substr( $temp, 0, 29 ) ===
"XMP\x00://ns.adobe.com/xap/1.0/\x00" ) {
+ } elseif ( substr( $temp, 0, 29 ) ===
"XMP\x00://ns.adobe.com/xap/1.0/\x00" && $showXMP ) {
// Some images (especially flickr
images) seem to have this.
// I really have no idea what the deal
is with them, but
// whatever...
$segments["XMP"] = substr( $temp, 29 );
wfDebug( __METHOD__ . ' Found XMP
section with wrong app identifier '
. "Using anyways.\n" );
+ } elseif ( substr( $temp, 0, 6 ) === "Exif\0\0"
) {
+ // Just need to find out what the byte
order is.
+ // because php's exif plugin sucks...
+ // This is a II for little Endian, MM
for big. Not a unicode BOM.
+ $byteOrderMarker = substr( $temp, 6, 2
);
+ if ( $byteOrderMarker === 'MM' ) {
+ $segments['byteOrder'] = 'BE';
+ } elseif ( $byteOrderMarker === 'II' ) {
+ $segments['byteOrder'] = 'LE';
+ } else {
+ wfDebug( __METHOD__ . ' Invalid
byte ordering?!' );
+ }
}
} elseif ( $buffer === "\xED" ) {
// APP13 - PSIR. IPTC and some photoshop stuff
Modified: branches/REL1_18/phase3/includes/media/Tiff.php
===================================================================
--- branches/REL1_18/phase3/includes/media/Tiff.php 2011-09-02 10:42:08 UTC
(rev 96087)
+++ branches/REL1_18/phase3/includes/media/Tiff.php 2011-09-02 10:53:50 UTC
(rev 96088)
@@ -56,13 +56,20 @@
*/
function getMetadata( $image, $filename ) {
global $wgShowEXIF;
- if ( $wgShowEXIF && file_exists( $filename ) ) {
- $exif = new Exif( $filename );
- $data = $exif->getFilteredData();
- if ( $data ) {
- $data['MEDIAWIKI_EXIF_VERSION'] =
Exif::version();
- return serialize( $data );
- } else {
+ if ( $wgShowEXIF ) {
+ try {
+ $meta = BitmapMetadataHandler::Tiff( $filename
);
+ if ( !is_array( $meta ) ) {
+ // This should never happen, but
doesn't hurt to be paranoid.
+ throw new MWException('Metadata array
is not an array');
+ }
+ $meta['MEDIAWIKI_EXIF_VERSION'] =
Exif::version();
+ return serialize( $meta );
+ }
+ catch ( MWException $e ) {
+ // BitmapMetadataHandler throws an exception in
certain exceptional
+ // cases like if file does not exist.
+ wfDebug( __METHOD__ . ': ' . $e->getMessage() .
"\n" );
return ExifBitmapHandler::BROKEN_FILE;
}
} else {
Property changes on: branches/REL1_18/phase3/includes/specials
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/includes/specials:51646
/branches/sqlite/includes/specials:58211-58321
/branches/wmf-deployment/includes/specials:53381,56967
/trunk/phase3/includes/specials:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+ /branches/REL1_15/phase3/includes/specials:51646
/branches/sqlite/includes/specials:58211-58321
/branches/wmf-deployment/includes/specials:53381,56967
/trunk/phase3/includes/specials:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Modified: branches/REL1_18/phase3/includes/specials/SpecialEmailuser.php
===================================================================
--- branches/REL1_18/phase3/includes/specials/SpecialEmailuser.php
2011-09-02 10:42:08 UTC (rev 96087)
+++ branches/REL1_18/phase3/includes/specials/SpecialEmailuser.php
2011-09-02 10:53:50 UTC (rev 96088)
@@ -122,7 +122,7 @@
if( !$ret instanceof User ) {
if( $this->mTarget != '' ) {
$ret = ( $ret == 'notarget' ) ? 'emailnotarget'
: ( $ret . 'text' );
- $wgOut->addHTML( '<p class="error">' .
wfMessage( $ret )->parse() . '</p>' );
+ $out->wrapWikiMsg( "<p class='error'>$1</p>",
$ret );
}
$wgOut->addHTML( self::userForm( $this->mTarget ) );
return false;
Property changes on: branches/REL1_18/phase3/languages
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/languages:51646
/branches/REL1_17/phase3/languages:81445,81448
/branches/new-installer/phase3/languages:43664-66004
/branches/nikola/phase3/languages:85224,85239,85308
/branches/sqlite/languages:58211-58321
/trunk/phase3/languages:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+ /branches/REL1_15/phase3/languages:51646
/branches/REL1_17/phase3/languages:81445,81448
/branches/new-installer/phase3/languages:43664-66004
/branches/nikola/phase3/languages:85224,85239,85308
/branches/sqlite/languages:58211-58321
/trunk/phase3/languages:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Property changes on: branches/REL1_18/phase3/languages/messages
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk/phase3/languages/messages:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94011,94017-94018,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+
/trunk/phase3/languages/messages:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94011,94017-94018,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Modified: branches/REL1_18/phase3/languages/messages/MessagesHe.php
===================================================================
--- branches/REL1_18/phase3/languages/messages/MessagesHe.php 2011-09-02
10:42:08 UTC (rev 96087)
+++ branches/REL1_18/phase3/languages/messages/MessagesHe.php 2011-09-02
10:53:50 UTC (rev 96088)
@@ -226,7 +226,7 @@
'BrokenRedirects' => array( 'הפניות_לא_תקינות',
'הפניות_שבורות' ),
'Categories' => array( 'קטגוריות', 'רשימת_קטגוריות' ),
'ChangeEmail' => array( 'שינוי_דואר_אלקטרוני',
'שינוי_דואל' ),
- 'ChangePassword' => array( 'שינוי_סיסמה', 'איפוס_סיסמה' ),
+ 'ChangePassword' => array( 'שינוי_סיסמה' ),
'ComparePages' => array( 'השוואת_דפים' ),
'Confirmemail' => array( 'אימות_כתובת_דואר' ),
'Contributions' => array( 'תרומות', 'תרומות_המשתמש' ),
Property changes on: branches/REL1_18/phase3/maintenance/archives
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/maintenance/archives:51646
/branches/iwtransclusion/phase3/maintenance/archives:69540
/branches/new-installer/phase3/maintenance/archives:43664-66004
/branches/sqlite/maintenance/archives:58211-58321
/trunk/phase3/maintenance/archives:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+ /branches/REL1_15/phase3/maintenance/archives:51646
/branches/iwtransclusion/phase3/maintenance/archives:69540
/branches/new-installer/phase3/maintenance/archives:43664-66004
/branches/sqlite/maintenance/archives:58211-58321
/trunk/phase3/maintenance/archives:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Property changes on: branches/REL1_18/phase3/maintenance/cleanupTable.inc
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/maintenance/cleanupTable.inc:51646
/branches/wmf-deployment/maintenance/cleanupTable.inc:56715
/trunk/phase3/maintenance/cleanupTable.inc:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+ /branches/REL1_15/phase3/maintenance/cleanupTable.inc:51646
/branches/wmf-deployment/maintenance/cleanupTable.inc:56715
/trunk/phase3/maintenance/cleanupTable.inc:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Property changes on: branches/REL1_18/phase3/maintenance/tables.sql
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/maintenance/tables.sql:51646
/branches/iwtransclusion/phase3/maintenance/tables.sql:68448,69480
/branches/new-installer/phase3/maintenance/tables.sql:43664-66004
/branches/resourceloader/phase3/maintenance/tables.sql:68366-69676,69678-70682,70684-71999,72001-72255,72257-72305,72307-72342
/branches/sqlite/maintenance/tables.sql:58211-58321
/trunk/phase3/maintenance/tables.sql:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+ /branches/REL1_15/phase3/maintenance/tables.sql:51646
/branches/iwtransclusion/phase3/maintenance/tables.sql:68448,69480
/branches/new-installer/phase3/maintenance/tables.sql:43664-66004
/branches/resourceloader/phase3/maintenance/tables.sql:68366-69676,69678-70682,70684-71999,72001-72255,72257-72305,72307-72342
/branches/sqlite/maintenance/tables.sql:58211-58321
/trunk/phase3/maintenance/tables.sql:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Modified: branches/REL1_18/phase3/resources/mediawiki/mediawiki.util.js
===================================================================
--- branches/REL1_18/phase3/resources/mediawiki/mediawiki.util.js
2011-09-02 10:42:08 UTC (rev 96087)
+++ branches/REL1_18/phase3/resources/mediawiki/mediawiki.util.js
2011-09-02 10:53:50 UTC (rev 96088)
@@ -237,7 +237,9 @@
var re = new RegExp( '^[^#]*[&?]' + $.escapeRE( param )
+ '=([^&#]*)' );
var m = re.exec( url );
if ( m && m.length > 1 ) {
- return decodeURIComponent( m[1] );
+ // Beware that decodeURIComponent is not
required to understand '+'
+ // by spec, as encodeURIComponent does not
produce it.
+ return decodeURIComponent( m[1].replace( /\+/g,
'%20' ) );
}
return null;
},
Property changes on:
branches/REL1_18/phase3/resources/mediawiki/mediawiki.util.js
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/resources/mediawiki/mediawiki.util.js:51646
/branches/REL1_17/phase3/resources/mediawiki/mediawiki.util.js:81445,81448
/branches/new-installer/phase3/resources/mediawiki/mediawiki.util.js:43664-66004
/branches/sqlite/resources/mediawiki/mediawiki.util.js:58211-58321
/trunk/phase3/resources/mediawiki/mediawiki.util.js:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95451,95468,95601,95812
Modified:
branches/REL1_18/phase3/resources/mediawiki.special/mediawiki.special.search.js
===================================================================
---
branches/REL1_18/phase3/resources/mediawiki.special/mediawiki.special.search.js
2011-09-02 10:42:08 UTC (rev 96087)
+++
branches/REL1_18/phase3/resources/mediawiki.special/mediawiki.special.search.js
2011-09-02 10:53:50 UTC (rev 96088)
@@ -1,7 +1,7 @@
/*
- * JavaScript for Specical:Search
+ * JavaScript for Special:Search
*/
-( function( $ ) {
+jQuery( function( $ ) {
// Emulate HTML5 autofocus behavior in non HTML5 compliant browsers
if ( !( 'autofocus' in document.createElement( 'input' ) ) ) {
@@ -34,4 +34,4 @@
});
}).trigger('change');
-} )( jQuery );
\ No newline at end of file
+} );
\ No newline at end of file
Property changes on: branches/REL1_18/phase3/tests/phpunit/Makefile
___________________________________________________________________
Modified: svn:mergeinfo
-
/branches/phpunit-restructure/maintenance/tests/phpunit/Makefile:72257-72560
/branches/uploadwizard/phase3/maintenance/tests/phpunit/Makefile:73550-75905
/trunk/phase3/tests/phpunit/Makefile:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+
/branches/phpunit-restructure/maintenance/tests/phpunit/Makefile:72257-72560
/branches/uploadwizard/phase3/maintenance/tests/phpunit/Makefile:73550-75905
/trunk/phase3/tests/phpunit/Makefile:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Modified:
branches/REL1_18/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js
===================================================================
---
branches/REL1_18/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js
2011-09-02 10:42:08 UTC (rev 96087)
+++
branches/REL1_18/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js
2011-09-02 10:53:50 UTC (rev 96088)
@@ -107,7 +107,7 @@
});
test( 'getParamValue', function() {
- expect(3);
+ expect(5);
var url1 = 'http://mediawiki.org/?foo=wrong&foo=right#&foo=bad';
@@ -116,6 +116,12 @@
var url2 = 'http://mediawiki.org/#&foo=bad';
strictEqual( mw.util.getParamValue( 'foo', url2 ), null, 'Ignore hash
if param is not in querystring but in hash (bug 27427)' );
+
+ var url3 = 'example.com?' + $.param({ 'TEST': 'a b+c' });
+ strictEqual( mw.util.getParamValue( 'TEST', url3 ), 'a b+c', 'Bug
30441: getParamValue must understand "+" encoding of space' );
+
+ var url4 = 'example.com?' + $.param({ 'TEST': 'a b+c d' }); // check
for sloppy code from r95332 :)
+ strictEqual( mw.util.getParamValue( 'TEST', url4 ), 'a b+c d', 'Bug
30441: getParamValue must understand "+" encoding of space (multiple spaces)' );
});
test( 'tooltipAccessKey', function() {
Property changes on:
branches/REL1_18/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js
___________________________________________________________________
Added: svn:mergeinfo
+
/branches/REL1_15/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js:51646
/branches/REL1_17/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js:81445,81448
/branches/new-installer/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js:43664-66004
/branches/sqlite/tests/qunit/suites/resources/mediawiki/mediawiki.util.js:58211-58321
/trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812
/trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js:95332,95451
Property changes on: branches/REL1_18/phase3/tests/selenium/installer/README.txt
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/phase3/tests/installer/README.txt:78775-78950
/trunk/phase3/tests/selenium/installer/README.txt:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+ /trunk/phase3/tests/installer/README.txt:78775-78950
/trunk/phase3/tests/selenium/installer/README.txt:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
Property changes on: branches/REL1_18/phase3/tests/testHelpers.inc
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/phpunit-restructure/maintenance/tests/testHelpers.inc:72257-72560
/trunk/phase3/tests/testHelpers.inc:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94728,94825,94862,94995-94997
+ /branches/phpunit-restructure/maintenance/tests/testHelpers.inc:72257-72560
/trunk/phase3/tests/testHelpers.inc:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs