From: daniel Date: Thu, 2 Aug 2012 09:01:22 +0000 (+0200) Subject: merged master X-Git-Tag: 1.31.0-rc.0~22097^2^2~63 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/supprimer.php?a=commitdiff_plain;h=c0b50eb47d2f73cb47a8f1c2e09fb089f7319587;p=lhc%2Fweb%2Fwiklou.git merged master Change-Id: I6afafe971afb3f38fc8f1e66ba409283b8a698f8 --- c0b50eb47d2f73cb47a8f1c2e09fb089f7319587 diff --cc includes/DefaultSettings.php index 3dcecaed2e,69b632c10b..09e13fe7fd --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@@ -6150,31 -6145,11 +6155,36 @@@ $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; + + /** + * Whether the user must enter their password to change their e-mail address + */ + $wgRequirePasswordforEmailChange = true; + /** * For really cool vim folding this needs to be at the end: * vim: foldmarker=@{,@} foldmethod=marker diff --cc includes/WikiPage.php index 4df80705a0,1378ce1e23..2fb9048a65 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@@ -1561,67 -1426,9 +1561,67 @@@ class WikiPage extends Page * revision: The revision object for the inserted revision, or null * * Compatibility note: this function previously returned a boolean value indicating success/failure + * + * @deprecated since 1.WD: use doEditContent() instead. + */ + public function doEdit( $text, $summary, $flags = 0, $baseRevId = false, $user = null ) { #@todo: use doEditContent() instead + wfDeprecated( __METHOD__, '1.WD' ); + + $content = ContentHandler::makeContent( $text, $this->getTitle() ); + + return $this->doEditContent( $content, $summary, $flags, $baseRevId, $user ); + } + + /** + * Change an existing article or create a new article. Updates RC and all necessary caches, + * optionally via the deferred update array. + * + * @param $content Content: new content + * @param $summary String: edit summary + * @param $flags Integer bitfield: + * EDIT_NEW + * Article is known or assumed to be non-existent, create a new one + * EDIT_UPDATE + * Article is known or assumed to be pre-existing, update it + * EDIT_MINOR + * Mark this edit minor, if the user is allowed to do so + * EDIT_SUPPRESS_RC + * Do not log the change in recentchanges + * EDIT_FORCE_BOT + * Mark the edit a "bot" edit regardless of user rights + * EDIT_DEFER_UPDATES + * Defer some of the updates until the end of index.php + * EDIT_AUTOSUMMARY + * Fill in blank summaries with generated text where possible + * + * If neither EDIT_NEW nor EDIT_UPDATE is specified, the status of the article will be detected. + * If EDIT_UPDATE is specified and the article doesn't exist, the function will return an + * edit-gone-missing error. If EDIT_NEW is specified and the article does exist, an + * edit-already-exists error will be returned. These two conditions are also possible with + * auto-detection due to MediaWiki's performance-optimised locking strategy. + * + * @param $baseRevId the revision ID this edit was based off, if any + * @param $user User the user doing the edit + * @param $serialisation_format String: format for storing the content in the database + * + * @return Status object. Possible errors: + * edit-hook-aborted: The ArticleSave hook aborted the edit but didn't set the fatal flag of $status + * edit-gone-missing: In update mode, but the article didn't exist + * edit-conflict: In update mode, the article changed unexpectedly + * edit-no-change: Warning that the text was the same as before + * edit-already-exists: In creation mode, but the article already exists + * + * Extensions may define additional errors. + * + * $return->value will contain an associative array with members as follows: + * new: Boolean indicating if the function attempted to create a new article + * revision: The revision object for the inserted revision, or null + * + * @since 1.WD */ - public function doEdit( $text, $summary, $flags = 0, $baseRevId = false, $user = null ) { + public function doEditContent( Content $content, $summary, $flags = 0, $baseRevId = false, + User $user = null, $serialisation_format = null ) { - global $wgUser, $wgDBtransactions, $wgUseAutomaticEditSummaries; + global $wgUser, $wgUseAutomaticEditSummaries, $wgUseRCPatrol, $wgUseNPPatrol; # Low-level sanity check if ( $this->mTitle->getText() === '' ) { @@@ -1795,21 -1564,9 +1796,15 @@@ $revision->setId( $this->getLatest() ); } - // Now that ignore_user_abort is restored, we can respond to fatal errors - if ( !$status->isOK() ) { - wfProfileOut( __METHOD__ ); - return $status; - } - # Update links tables, site stats, etc. - $this->doEditUpdates( $revision, $user, array( 'changed' => $changed, - 'oldcountable' => $oldcountable ) ); + $this->doEditUpdates( + $revision, + $user, + array( + 'changed' => $changed, + 'oldcountable' => $oldcountable + ) + ); if ( !$changed ) { $status->warning( 'edit-no-change' ); diff --cc includes/installer/OracleUpdater.php index dc02afb12c,8a93b45c82..645c91108c --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@@ -69,14 -68,9 +68,16 @@@ class OracleUpdater extends DatabaseUpd //1.20 array( 'addTable', 'config', 'patch-config.sql' ), + array( 'addIndex', 'ipblocks', 'i05', 'patch-ipblocks_i05_index.sql' ), + array( 'addIndex', 'revision', 'i05', 'patch-revision_i05_index.sql' ), + //1.WD + array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ), + array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ), + array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ), + array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ), + array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ), + // KEEP THIS AT THE BOTTOM!! array( 'doRebuildDuplicateFunction' ),