Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/mediawiki/core into Wikidata
authordaniel <daniel.kinzler@wikimedia.de>
Thu, 7 Jun 2012 14:36:58 +0000 (16:36 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Thu, 7 Jun 2012 14:36:58 +0000 (16:36 +0200)
1  2 
includes/DefaultSettings.php
languages/Language.php
languages/classes/LanguageFi.php
languages/messages/MessagesQqq.php

@@@ -660,40 -660,6 +660,40 @@@ $wgMediaHandlers = array
        'image/x-djvu' => 'DjVuHandler', // compat
  );
  
 +/**
 + * Plugins for page content model handling.
 + * Each entry in the array maps a model id to a class name
 + */
 +$wgContentHandlers = array(
 +    CONTENT_MODEL_WIKITEXT => 'WikitextContentHandler', // the usual case
 +    CONTENT_MODEL_JAVASCRIPT => 'JavaScriptContentHandler', // dumb version, no syntax highlighting
 +    CONTENT_MODEL_CSS => 'CssContentHandler', // dumb version, no syntax highlighting
 +    CONTENT_MODEL_TEXT => 'TextContentHandler', // dumb plain text in <pre>
 +);
 +
 +/**
 + * Mime types for content formats.
 + * Each entry in the array maps a content format to a mime type.
 + *
 + * Extensions that define their own content formats can register
 + * the appropriate mime types in this array.
 + *
 + * Such extensions shall use content format IDs
 + * larger than 100 and register the ids they use at
 + * <http://mediawiki.org/ContentHandler/registry>
 + * to avoid conflicts with other extensions.
 + */
 +$wgContentFormatMimeTypes = array(
 +      CONTENT_FORMAT_WIKITEXT => 'text/x-wiki',
 +      CONTENT_FORMAT_JAVASCRIPT => 'text/javascript',
 +      CONTENT_FORMAT_CSS => 'text/css',
 +      CONTENT_FORMAT_TEXT => 'text/plain',
 +      CONTENT_FORMAT_HTML => 'text/html',
 +      CONTENT_FORMAT_XML => 'application/xml',
 +      CONTENT_FORMAT_JSON => 'application/json',
 +      CONTENT_FORMAT_SERIALIZED => 'application/vnd.php.serialized',
 +);
 +
  /**
   * Resizing can be done using PHP's internal image libraries or using
   * ImageMagick or another third-party converter, e.g. GraphicMagick.
@@@ -3494,11 -3460,11 +3494,11 @@@ $wgSysopEmailBans = true
   *
   * CIDR notation is hard to understand, it's easy to mistakenly assume that a
   * /1 is a small range and a /31 is a large range. Setting this to half the
-  * number of bits avoids such errors.
+  * number of bits avoids such errors for IPv4.
   */
  $wgBlockCIDRLimit = array(
        'IPv4' => 16, # Blocks larger than a /16 (64k addresses) will not be allowed
-       'IPv6' => 64, # 2^64 = ~1.8x10^19 addresses
+       'IPv6' => 32, # Blocks larger than a /32 (~7.9x10^28 addresses) will not be allowed
  );
  
  /**
@@@ -5887,31 -5853,6 +5887,31 @@@ $wgSeleniumConfigFile = null
  $wgDBtestuser = ''; //db user that has permission to create and drop the test databases only
  $wgDBtestpassword = '';
  
 +/**
 + * Associative array mapping namespace IDs to the name of the content model pages in that namespace should have by
 + * default (use the CONTENT_MODEL_XXX constants). If no special content type is defined for a given namespace,
 + * pages in that namespace will  use the CONTENT_MODEL_WIKITEXT (except for the special case of JS and CS pages).
 + */
 +$wgNamespaceContentModels = array();
 +
 +/**
 + * How to react if a plain text version of a non-text Content object is requested using ContentHandler::getContentText():
 + *
 + * * 'ignore': return null
 + * * 'fail': throw an MWException
 + * * 'serializeContent': serializeContent to default format
 + */
 +$wgContentHandlerTextFallback = 'ignore';
 +
 +/**
 + * Compatibility switch for running ContentHandler code withoput a schema update.
 + * Set to false to disable use of the database fields introduced by the ContentHandler facility.
 + *
 + * @deprecated this is only here to allow code deployment without a database schema update on large sites.
 + *             get rid of it in the next version.
 + */
 +$wgContentHandlerUseDB = true;
 +
  /**
   * For really cool vim folding this needs to be at the end:
   * vim: foldmarker=@{,@} foldmethod=marker
diff --combined languages/Language.php
@@@ -1,6 -1,21 +1,21 @@@
  <?php
  /**
-  * Internationalisation code
+  * Internationalisation code.
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published by
+  * the Free Software Foundation; either version 2 of the License, or
+  * (at your option) any later version.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  * GNU General Public License for more details.
+  *
+  * You should have received a copy of the GNU General Public License along
+  * with this program; if not, write to the Free Software Foundation, Inc.,
+  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+  * http://www.gnu.org/copyleft/gpl.html
   *
   * @file
   * @ingroup Language
@@@ -399,16 -414,6 +414,16 @@@ class Language 
         */
        public function setNamespaces( array $namespaces ) {
                $this->namespaceNames = $namespaces;
 +              $this->mNamespaceIds = null;
 +      }
 +
 +      /**
 +       * Resets all of the namespace caches. Mainly used for testing
 +       */
 +      public function resetNamespaces( ) {
 +              $this->namespaceNames = null;
 +              $this->mNamespaceIds = null;
 +              $this->namespaceAliases = null;
        }
  
        /**
@@@ -1,10 -1,31 +1,31 @@@
  <?php
- /** Finnish (Suomi)
+ /**
+  * Finnish (Suomi) specific code.
   *
-  * @ingroup Language
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published by
+  * the Free Software Foundation; either version 2 of the License, or
+  * (at your option) any later version.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  * GNU General Public License for more details.
   *
+  * You should have received a copy of the GNU General Public License along
+  * with this program; if not, write to the Free Software Foundation, Inc.,
+  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+  * http://www.gnu.org/copyleft/gpl.html
+  *
+  * @file
   * @author Niklas Laxström
+  * @ingroup Language
+  */
+ /**
+  * Finnish (Suomi)
+  *
+  * @ingroup Language
   */
  class LanguageFi extends Language {
  
                        'monday' => 'maanantai',
                        'tuesday' => 'tiistai',
                        'wednesday' => 'keskiviikko',
 -                      'thursay' => 'torstai',
 +                      'thursday' => 'torstai',
                        'friday' => 'perjantai',
                        'saturday' => 'lauantai',
                        'sunday' => 'sunnuntai',
@@@ -2610,6 -2610,7 +2610,7 @@@ Similar to {{msg-mw|rcnote}} which is u
  'unwatching' => 'Text displayed when clicked on the unwatch tab: [[MediaWiki:Unwatch/{{SUBPAGENAME}}|{{int:unwatch}}]]. It means the wiki is removing that page from your watchlist.',
  'watcherrortext' => 'When a user clicked the watch/unwatch tab and the action did not succeed, this message is displayed. See also {{msg|addedwatchtext}}. and {{msg|addedwatchtext}}. This message is used raw and should not contain wikitext.',
  
+ 'enotif_reset' => "This should be translated as \"Mark all pages '''as''' visited\".",
  'enotif_newpagetext' => 'Part of text of a notification e-mail sent when a watched page has been created. See [[File:Screenshot_MediaWiki_e-mail_notifier.PNG|150px|right]]',
  'changed' => 'Possible value for $CHANGEDORCREATED in {{msg|enotif_subject}} and {{msg|enotif_body}}.',
  'created' => 'Possible value for $CHANGEDORCREATED in {{msg|enotif_subject}} and {{msg|enotif_body}}.',
@@@ -4735,10 -4736,4 +4736,10 @@@ $4 is the gender of the target user.'
  'api-error-uploaddisabled' => 'API error message that can be used for client side localisation of API errors.',
  'api-error-verification-error' => 'The word "extension" refers to the part behind the last dot in a file name, that by convention gives a hint about the kind of data format which a files contents are in.',
  
 +# Content model IDs for the ContentHandler facility; used by ContentHander::getContentModel()
 +'content-model-1' => 'Name for the wikitext content model, used when decribing what type of content a page contains.',
 +'content-model-2' => 'Name for the JavaScript content model, used when decribing what type of content a page contains.',
 +'content-model-3' => 'Name for the CSS content model, used when decribing what type of content a page contains.',
 +'content-model-4' => 'Name for the plain text content model, used when decribing what type of content a page contains.',
 +
  );