summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-01-24 09:26:41 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-01-24 09:26:41 +0000
commitb6c19d49965caece085e7ee0da9c619b14f19655 (patch)
tree60c57c2a5035d5078fcc417e969f05cc8589f8ab
parent3cbab0f9c75400197f64677945b7d8c45de85d06 (diff)
Aktualisierung auf MediaWiki 1.9.1
-rw-r--r--RELEASE-NOTES25
-rw-r--r--includes/DefaultSettings.php6
-rw-r--r--includes/DjVuImage.php3
-rw-r--r--includes/Exception.php3
-rw-r--r--includes/GlobalFunctions.php2
-rw-r--r--includes/Image.php2
-rw-r--r--includes/Skin.php7
-rw-r--r--includes/WebRequest.php15
-rw-r--r--includes/Wiki.php5
-rw-r--r--includes/api/ApiFormatBase.php6
-rw-r--r--includes/api/ApiQueryRevisions.php4
-rw-r--r--index.php9
-rw-r--r--languages/messages/MessagesAr.php2
-rw-r--r--languages/messages/MessagesHe.php4
-rw-r--r--maintenance/Doxyfile2
-rw-r--r--maintenance/updaters.inc7
-rw-r--r--skins/common/wikibits.js10
17 files changed, 72 insertions, 40 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 24d90c1f..6c1a8626 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -3,6 +3,31 @@
Security reminder: MediaWiki does not require PHP's register_globals
setting since version 1.2.0. If you have it on, turn it *off* if you can.
+== MediaWiki 1.9.1 ==
+
+January 24, 2007
+
+This is a bug-fix update that fixes some installation and upgrade issues
+with the original 1.9.0 release.
+
+* (bug 3000) Fall back to SCRIPT_NAME plus QUERY_STRING when REQUEST_URI is
+ not available, as on IIS with PHP-CGI
+* Security fix for DjVu images. (Only affects servers where .djvu file
+ uploads are enabled and $wgDjvuToXML is set.)
+* (bug 8638) Fix update from 1.4 and earlier
+* (bug 8641) Fix order of updates to ipblocks table for updates from <=1.7
+* (bug 8673) Minor fix for web service API content-type header
+* Fix API revision list on PHP 5.2.1; bad reference assignment
+* Fixed up the AjaxSearch
+* Exclude settings files when generating documentation. That could
+ expose the database user and password to remote users.
+* ar: fix the 'create a new page' on search page when no exact match found
+* Correct tooltip accesskey hint for Opera on the Macintosh
+ (uses Shift-Esc-, not Ctrl-).
+* (bug 8719) Firefox release notes lie! Fix tooltips for Firefox 2 on x11;
+ accesskeys default settings appear to be same as Windows.
+
+
== MediaWiki 1.9 ==
January 10, 2007
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 03697b69..3790be87 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -32,7 +32,7 @@ require_once( 'includes/SiteConfiguration.php' );
$wgConf = new SiteConfiguration;
/** MediaWiki version number */
-$wgVersion = '1.9.0';
+$wgVersion = '1.9.1';
/** Name of the site. It must be changed in LocalSettings.php */
$wgSitename = 'MediaWiki';
@@ -1096,7 +1096,7 @@ $wgCacheEpoch = '20030516000000';
* to ensure that client-side caches don't keep obsolete copies of global
* styles.
*/
-$wgStyleVersion = '42';
+$wgStyleVersion = '42a';
# Server-side caching:
@@ -2237,7 +2237,7 @@ $wgTrustedMediaFormats= array(
MEDIATYPE_VIDEO, //all plain video formats
"image/svg", //svg (only needed if inline rendering of svg is not supported)
"application/pdf", //PDF files
- #"application/x-shockwafe-flash", //flash/shockwave movie
+ #"application/x-shockwave-flash", //flash/shockwave movie
);
/**
diff --git a/includes/DjVuImage.php b/includes/DjVuImage.php
index f7297dc2..3b8a68ba 100644
--- a/includes/DjVuImage.php
+++ b/includes/DjVuImage.php
@@ -216,7 +216,8 @@ class DjVuImage {
function retrieveMetaData() {
global $wgDjvuToXML;
if ( isset( $wgDjvuToXML ) ) {
- $cmd = $wgDjvuToXML . ' --without-anno --without-text ' . $this->mFilename;
+ $cmd = $wgDjvuToXML . ' --without-anno --without-text ' .
+ wfEscapeShellArg( $this->mFilename );
$xml = wfShellExec( $cmd );
} else {
$xml = null;
diff --git a/includes/Exception.php b/includes/Exception.php
index ac9c8a21..ad7ec14a 100644
--- a/includes/Exception.php
+++ b/includes/Exception.php
@@ -54,10 +54,11 @@ class MWException extends Exception
}
function getLogMessage() {
+ global $wgRequest;
$file = $this->getFile();
$line = $this->getLine();
$message = $this->getMessage();
- return "{$_SERVER['REQUEST_URI']} Exception from line $line of $file: $message";
+ return $wgRequest->getRequestURL() . " Exception from line $line of $file: $message";
}
function reportHTML() {
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 08094ca1..da24e4a7 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -230,7 +230,7 @@ function wfLogProfilingData() {
$forward .= ' anon';
$log = sprintf( "%s\t%04.3f\t%s\n",
gmdate( 'YmdHis' ), $elapsed,
- urldecode( $_SERVER['REQUEST_URI'] . $forward ) );
+ urldecode( $wgRequest->getRequestURL() . $forward ) );
if ( '' != $wgDebugLogFile && ( $wgRequest->getVal('action') != 'raw' || $wgDebugRawPage ) ) {
error_log( $log . $prof, 3, $wgDebugLogFile );
}
diff --git a/includes/Image.php b/includes/Image.php
index 1f3895c6..7a6442c3 100644
--- a/includes/Image.php
+++ b/includes/Image.php
@@ -2271,7 +2271,7 @@ class Image
# Check for files uploaded prior to DJVU support activation
# They have a '0' in their metadata field.
#
- if ( $this->metadata == '0' ) {
+ if ( $this->metadata == '0' || $this->metadata == '' ) {
$deja = new DjVuImage( $this->imagePath );
$this->metadata = $deja->retrieveMetaData();
$this->purgeMetadataCache();
diff --git a/includes/Skin.php b/includes/Skin.php
index 3e4f5d3c..f8e733ef 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -783,13 +783,6 @@ END;
function printableLink() {
global $wgOut, $wgFeedClasses, $wgRequest;
- $baseurl = $_SERVER['REQUEST_URI'];
- if( strpos( '?', $baseurl ) == false ) {
- $baseurl .= '?';
- } else {
- $baseurl .= '&';
- }
- $baseurl = htmlspecialchars( $baseurl );
$printurl = $wgRequest->escapeAppendQuery( 'printable=yes' );
$s = "<a href=\"$printurl\">" . wfMsg( 'printableversion' ) . '</a>';
diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index 35336954..7648b75f 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -314,7 +314,20 @@ class WebRequest {
* @return string
*/
function getRequestURL() {
- $base = $_SERVER['REQUEST_URI'];
+ if( isset( $_SERVER['REQUEST_URI'] ) ) {
+ $base = $_SERVER['REQUEST_URI'];
+ } elseif( isset( $_SERVER['SCRIPT_NAME'] ) ) {
+ // Probably IIS; doesn't set REQUEST_URI
+ $base = $_SERVER['SCRIPT_NAME'];
+ if( isset( $_SERVER['QUERY_STRING'] ) && $_SERVER['QUERY_STRING'] != '' ) {
+ $base .= '?' . $_SERVER['QUERY_STRING'];
+ }
+ } else {
+ // This shouldn't happen!
+ throw new MWException( "Web server doesn't provide either " .
+ "REQUEST_URI or SCRIPT_NAME. Report details of your " .
+ "web server configuration to http://bugzilla.wikimedia.org/" );
+ }
if( $base{0} == '/' ) {
return $base;
} else {
diff --git a/includes/Wiki.php b/includes/Wiki.php
index 4fa421a6..06ae8cfe 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -118,7 +118,7 @@ class MediaWiki {
* Initialize the object to be known as $wgArticle for special cases
*/
function initializeSpecialCases ( &$title, &$output, $request ) {
-
+ global $wgRequest;
wfProfileIn( 'MediaWiki::initializeSpecialCases' );
$search = $this->getVal('Search');
@@ -151,8 +151,7 @@ class MediaWiki {
$targetUrl = $title->getFullURL();
// Redirect to canonical url, make it a 301 to allow caching
global $wgServer, $wgUsePathInfo;
- if( isset( $_SERVER['REQUEST_URI'] ) &&
- $targetUrl == $wgServer . $_SERVER['REQUEST_URI'] ) {
+ if( $targetUrl == $wgRequest->getFullRequestURL() ) {
$message = "Redirect loop detected!\n\n" .
"This means the wiki got confused about what page was " .
"requested; this sometimes happens when moving a wiki " .
diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php
index 611960d3..338a6c07 100644
--- a/includes/api/ApiFormatBase.php
+++ b/includes/api/ApiFormatBase.php
@@ -81,7 +81,7 @@ abstract class ApiFormatBase extends ApiBase {
if (is_null($mime))
return; // skip any initialization
- header("Content-Type: $mime; charset=utf-8;");
+ header("Content-Type: $mime; charset=utf-8");
if ($isHtml) {
?>
@@ -170,7 +170,7 @@ for more information.
}
public static function getBaseVersion() {
- return __CLASS__ . ': $Id: ApiFormatBase.php 17374 2006-11-03 06:53:47Z yurik $';
+ return __CLASS__ . ': $Id: ApiFormatBase.php 19434 2007-01-18 02:04:11Z brion $';
}
}
@@ -226,7 +226,7 @@ class ApiFormatFeedWrapper extends ApiFormatBase {
}
public function getVersion() {
- return __CLASS__ . ': $Id: ApiFormatBase.php 17374 2006-11-03 06:53:47Z yurik $';
+ return __CLASS__ . ': $Id: ApiFormatBase.php 19434 2007-01-18 02:04:11Z brion $';
}
}
?>
diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php
index 3f678ff7..e92b92c9 100644
--- a/includes/api/ApiQueryRevisions.php
+++ b/includes/api/ApiQueryRevisions.php
@@ -177,7 +177,7 @@ class ApiQueryRevisions extends ApiQueryBase {
// Ensure that all revisions are shown as '<rev>' elements
$result = $this->getResult();
if ($result->getIsRawMode()) {
- $data = $result->getData();
+ $data =& $result->getData();
foreach ($data['query']['pages'] as & $page) {
if (is_array($page) && array_key_exists('revisions', $page)) {
$result->setIndexedTagName($page['revisions'], 'rev');
@@ -262,7 +262,7 @@ class ApiQueryRevisions extends ApiQueryBase {
}
public function getVersion() {
- return __CLASS__ . ': $Id: ApiQueryRevisions.php 17374 2006-11-03 06:53:47Z yurik $';
+ return __CLASS__ . ': $Id: ApiQueryRevisions.php 19434 2007-01-18 02:04:11Z brion $';
}
}
?>
diff --git a/index.php b/index.php
index 964770ee..e3b753fa 100644
--- a/index.php
+++ b/index.php
@@ -14,6 +14,11 @@ OutputPage::setEncodings(); # Not really used yet
$action = $wgRequest->getVal( 'action', 'view' );
$title = $wgRequest->getVal( 'title' );
+$wgTitle = $mediaWiki->checkInitialQueries( $title,$action,$wgOut, $wgRequest, $wgContLang );
+if ($wgTitle == NULL) {
+ unset( $wgTitle );
+}
+
#
# Send Ajax requests to the Ajax dispatcher.
#
@@ -26,10 +31,6 @@ if ( $wgUseAjax && $action == 'ajax' ) {
exit;
}
-$wgTitle = $mediaWiki->checkInitialQueries( $title,$action,$wgOut, $wgRequest, $wgContLang );
-if ($wgTitle == NULL) {
- unset( $wgTitle );
-}
wfProfileOut( 'main-misc-setup' );
diff --git a/languages/messages/MessagesAr.php b/languages/messages/MessagesAr.php
index b8e7864e..4704b32f 100644
--- a/languages/messages/MessagesAr.php
+++ b/languages/messages/MessagesAr.php
@@ -406,7 +406,7 @@ $messages = array(
'noemailtext' => 'لم يحدد هذا المستخدم عنوان بريد إلكتروني صحيح،
أو طلب عدم إستلام الرسائل من المستخدمين الآخرين.',
'noemailtitle' => 'لا يوجد عنوان بريد إلكتروني',
-'noexactmatch' => 'لا يوجد صفحة بنفس العنوان، حاول البحث بشكل مفصل أكثر من خلال إستعمال صندوق البحث أدناه. بإمكانك أيضاً إنشاء [[:1|صفحة جديدة]] بالعنوان الذي طلبته.',
+'noexactmatch' => 'لا يوجد صفحة بنفس العنوان، حاول البحث بشكل مفصل أكثر من خلال إستعمال صندوق البحث أدناه. بإمكانك أيضاً إنشاء [[:$1|صفحة جديدة]] بالعنوان الذي طلبته.',
'nohistory' => 'لا يوجد تاريخ للتغييرات لهذه الصفحة.',
'nolinkshere' => 'لا يوجد صفحات تصل لهذه الصفحة.',
'nolinkstoimage' => 'لا يوجد صفحات تصل لهذه الصورة.',
diff --git a/languages/messages/MessagesHe.php b/languages/messages/MessagesHe.php
index 3019f944..25ac4357 100644
--- a/languages/messages/MessagesHe.php
+++ b/languages/messages/MessagesHe.php
@@ -344,7 +344,7 @@ $messages = array(
'privacy' => 'מדיניות הפרטיות',
'privacypage' => '{{ns:project}}:מדיניות הפרטיות',
'errorpagetitle' => 'שגיאה',
-'returnto' => 'חזרו לדף $1.',
+'returnto' => 'חזרה לדף $1.',
'tagline' => 'מתוך {{SITENAME}}',
'search' => 'חיפוש',
'searchbutton' => 'חיפוש',
@@ -616,7 +616,7 @@ $messages = array(
'link_sample' => 'קישור',
'link_tip' => 'קישור פנימי',
'extlink_sample' => 'http://www.example.com כותרת הקישור לתצוגה',
-'extlink_tip' => 'קישור חיצוני (כולל קידומת http מלאה',
+'extlink_tip' => 'קישור חיצוני (כולל קידומת http מלאה)',
'headline_sample' => 'כותרת',
'headline_tip' => 'כותרת – דרגה 2',
'math_sample' => 'formula',
diff --git a/maintenance/Doxyfile b/maintenance/Doxyfile
index 06f2c096..44e8e495 100644
--- a/maintenance/Doxyfile
+++ b/maintenance/Doxyfile
@@ -133,7 +133,7 @@ FILE_PATTERNS = *.c \
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
+EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc
index 7909b13d..9641d60d 100644
--- a/maintenance/updaters.inc
+++ b/maintenance/updaters.inc
@@ -35,7 +35,6 @@ $wgNewTables = array(
array( 'langlinks', 'patch-langlinks.sql' ),
array( 'querycache_info', 'patch-querycacheinfo.sql' ),
array( 'filearchive', 'patch-filearchive.sql' ),
- array( 'redirect', 'patch-redirect.sql' ),
array( 'querycachetwo', 'patch-querycachetwo.sql' ),
);
@@ -43,7 +42,6 @@ $wgNewFields = array(
# table field patch file (in maintenance/archives)
array( 'ipblocks', 'ipb_id', 'patch-ipblocks.sql' ),
array( 'ipblocks', 'ipb_expiry', 'patch-ipb_expiry.sql' ),
- array( 'ipblocks', 'ipb_enable_autoblock', 'patch-ipb_optional_autoblock.sql' ),
array( 'recentchanges', 'rc_type', 'patch-rc_type.sql' ),
array( 'recentchanges', 'rc_ip', 'patch-rc_ip.sql' ),
array( 'recentchanges', 'rc_id', 'patch-rc_id.sql' ),
@@ -66,6 +64,7 @@ $wgNewFields = array(
array( 'ipblocks', 'ipb_range_start', 'patch-ipb_range_start.sql' ),
array( 'site_stats', 'ss_images', 'patch-ss_images.sql' ),
array( 'ipblocks', 'ipb_anon_only', 'patch-ipb_anon_only.sql' ),
+ array( 'ipblocks', 'ipb_enable_autoblock', 'patch-ipb_optional_autoblock.sql' ),
array( 'user', 'user_newpass_time','patch-user_newpass_time.sql' ),
array( 'user', 'user_editcount', 'patch-user_editcount.sql' ),
);
@@ -902,7 +901,9 @@ function do_all_updates( $shared = false, $purge = true ) {
do_page_random_update(); flush();
do_rc_indices_update(); flush();
-
+
+ add_table( 'redirect', 'patch-redirect.sql' );
+
do_backlinking_indices_update(); flush();
echo "Deleting old default messages..."; flush();
diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js
index eabdcbb4..afb1fa27 100644
--- a/skins/common/wikibits.js
+++ b/skins/common/wikibits.js
@@ -484,14 +484,12 @@ function akeytt( doId ) {
}
var pref;
- if (is_safari || navigator.userAgent.toLowerCase().indexOf('mac') + 1
+ if (is_opera) {
+ pref = 'shift-esc-';
+ } else if (is_safari || navigator.userAgent.toLowerCase().indexOf('mac') + 1
|| navigator.userAgent.toLowerCase().indexOf('konqueror') + 1 ) {
pref = 'control-';
- } else if (is_opera) {
- pref = 'shift-esc-';
- } else if (is_ff2_x11) {
- pref = 'ctrl-shift-';
- } else if (is_ff2_win) {
+ } else if (is_ff2_win || is_ff2_x11) {
pref = 'alt-shift-';
} else {
pref = 'alt-';