* The 'max threads' setting was removed from $wgDBservers.
* Support for AdminSettings.php has been completely removed. All configuration
belongs in LocalSettings.php.
+ * Special:ProtectedPages shows now a table. The timestamp, the reason and
+ the protecting user is also shown.
=== New features in 1.23 ===
* ResourceLoader can utilize the Web Storage API to cache modules client-side.
* New user accounts' personal and talk pages are now watched by them by default.
* Added SkinTemplateGetLanguageLink hook to allow changing the html of language
links.
+* Added MessageCache::get hook as a new way to customize messages across
+ multiple sites.
=== Bug fixes in 1.23 ===
* (bug 41759) The "updated since last visit" markers (on history pages, recent
* Added siprop=restrictions to API action=query&meta=siteinfo for querying
possible page restriction (protection) levels and types.
* Added prop 'limitreportdata' and 'limitreporthtml' to action=parse.
+* (bug 58627) Provide language names on action=parse&prop=langlinks.
+* Deprecated llurl= in favour of llprop=url for action=query&prop=langlinks.
+* Added llprop=langname and llprop=autonym for action=query&prop=langlinks.
=== Languages updated in 1.23 ===
3 headings)" was removed.
* (bug 52810) Preference "Justify paragraphs" was removed.
* OutputPage::showErrorPage raises a notice if arguments are incoherent.
+* Thumbnails that keep failing to render in thumb.php will be rate-limited
+ againt further render attempts for 1 hour. $wgAttemptFailureEpoch can be
+ altered to reset all rate-limited thumbnails at once.
==== Removed classes ====
* FakeMemCachedClient (deprecated in 1.18)
* @return WikiPage|null
*/
public static function newFromID( $id, $from = 'fromdb' ) {
+ // page id's are never 0 or negative, see bug 61166
+ if ( $id < 1 ) {
+ return null;
+ }
+
$from = self::convertSelectType( $from );
$db = wfGetDB( $from === self::READ_LATEST ? DB_MASTER : DB_SLAVE );
$row = $db->selectRow( 'page', self::selectFields(), array( 'page_id' => $id ), __METHOD__ );
// Truncate for whole multibyte characters
$reason = $wgContLang->truncate( $reason, 255 );
+ $logRelationsValues = array();
+ $logRelationsField = null;
+
if ( $id ) { // Protection of existing page
if ( !wfRunHooks( 'ArticleProtect', array( &$this, &$user, $limit, $reason ) ) ) {
return Status::newGood();
return Status::newFatal( 'no-null-revision', $this->mTitle->getPrefixedText() );
}
+ $logRelationsField = 'pr_id';
+
// Update restrictions table
foreach ( $limit as $action => $restrictions ) {
+ $dbw->delete(
+ 'page_restrictions',
+ array(
+ 'pr_page' => $id,
+ 'pr_type' => $action
+ ),
+ __METHOD__
+ );
if ( $restrictions != '' ) {
- $dbw->replace( 'page_restrictions', array( array( 'pr_page', 'pr_type' ) ),
- array( 'pr_page' => $id,
+ $dbw->insert(
+ 'page_restrictions',
+ array(
+ 'pr_id' => $dbw->nextSequenceValue( 'page_restrictions_pr_id_seq' ),
+ 'pr_page' => $id,
'pr_type' => $action,
'pr_level' => $restrictions,
'pr_cascade' => ( $cascade && $action == 'edit' ) ? 1 : 0,
),
__METHOD__
);
- } else {
- $dbw->delete( 'page_restrictions', array( 'pr_page' => $id,
- 'pr_type' => $action ), __METHOD__ );
+ $logRelationsValues[] = $dbw->insertId();
}
}
// Update the protection log
$log = new LogPage( 'protect' );
- $log->addEntry( $logAction, $this->mTitle, $reason, $params, $user );
+ $logId = $log->addEntry( $logAction, $this->mTitle, $reason, $params, $user );
+ if ( $logRelationsField !== null && count( $logRelationsValues ) ) {
+ $log->addRelations( $logRelationsField, $logRelationsValues, $logId );
+ }
return Status::newGood();
}
'protectedpages-cascade' => 'Cascading protections only',
'protectedpages-noredirect' => 'Hide redirects',
'protectedpagesempty' => 'No pages are currently protected with these parameters.',
+ 'protectedpages-timestamp' => 'Timestamp',
+ 'protectedpages-page' => 'Page',
+ 'protectedpages-expiry' => 'Expires',
+ 'protectedpages-performer' => 'Protecting user',
+ 'protectedpages-params' => 'Protection parameters',
+ 'protectedpages-reason' => 'Reason',
+ 'protectedpages-unknown-timestamp' => 'Unknown',
+ 'protectedpages-unknown-performer' => 'Unknown user',
+ 'protectedpages-unknown-reason' => '—', # do not translate or duplicate this message to other languages
'protectedtitles' => 'Protected titles',
'protectedtitles-summary' => '', # do not translate or duplicate this message to other languages
'protectedtitlesempty' => 'No titles are currently protected with these parameters.',
'thumbnail_image-type' => 'Image type not supported',
'thumbnail_gd-library' => 'Incomplete GD library configuration: Missing function $1',
'thumbnail_image-missing' => 'File seems to be missing: $1',
+'thumbnail_image-failure-limit' => 'There have been too many recent failed attempts ($1 or more) to render this thumbnail. Please try again later.',
# Special:Import
'import' => 'Import pages',
* @author Mihai
* @author Minh Nguyen
* @author Moha
+ * @author MongolWiki
* @author Mormegil
* @author Mpradeep
* @author Murma174
'category-subcat-count' => 'This message is displayed at the top of a category page showing the number of pages in the category.
Parameters:
-* $1 - number of subcategories shown
* $2 - total number of subcategories in category',
'category-subcat-count-limited' => 'This message is displayed at the top of a category page showing the number of pages in the category when not all pages in a category are counted.
'protectedpages-noredirect' => 'Option in [[Special:ProtectedPages]].
{{Identical|Hide redirect}}',
'protectedpagesempty' => 'Used in [[Special:ProtectedPages]], when there are no protected pages with the specified parameters.',
+ 'protectedpages-timestamp' => 'This is a column header for dates and times in the table on the page [[Special:ProtectedPages]].
+ {{Identical|Timestamp}}',
+ 'protectedpages-page' => 'This is a column header in the table on the page [[Special:ProtectedPages]].',
+ 'protectedpages-expiry' => 'This is a column header in the table on the page [[Special:ProtectedPages]].
+ {{Identical|Expire}}',
+ 'protectedpages-performer' => 'This is a column header in the table on the page [[Special:ProtectedPages]].',
+ 'protectedpages-params' => 'This is a column header in the table on the page [[Special:ProtectedPages]].',
+ 'protectedpages-reason' => 'This is a column header in the table on the page [[Special:ProtectedPages]].
+ {{Identical|Reason}}',
+ 'protectedpages-unknown-timestamp' => 'This is shown, when the date and time is unknown for a protection on the page [[Special:ProtectedPages]].',
+ 'protectedpages-unknown-performer' => 'This is shown, when the protecting user is unknown for a protection on the page [[Special:ProtectedPages]].',
'protectedtitles' => '{{doc-special|ProtectedTitles}}',
'protectedtitlesempty' => 'Used on [[Special:ProtectedTitles]]. This text appears if the list of protected titles is empty. See the [[mw:Project:Protected_titles|help page on MediaWiki]] for more information.',
'listusers' => '{{doc-special|ListUsers}}',
*$1 is a function name of the GD library',
'thumbnail_image-missing' => 'This is the parameter 1 of the message {{msg-mw|thumbnail error}}.
*$1 is the path incl. filename of the missing image',
+'thumbnail_image-failure-limit' => 'This is the parameter 1 of the message {{msg-mw|thumbnail error}}.
+*$1 is the maximum allowed number of failed attempts',
# Special:Import
'import' => 'The title of the special page [[Special:Import]];',
See: [[w:Non-English usage of quotation marks|Non-English usage of quotation marks on Wikipedia]].
-Parameters:
+Parameters:
* $1 - text to be wrapped in quotation marks',
# Multipage image navigation
'expand_templates_preview' => '{{Identical|Preview}}',
# Unknown messages
-'createaccount-hook-aborted' => 'Placeholder message to return with API errors on account create; passes through the message from a hook {{notranslate}}',
'uploadinvalidxml' => 'Error message displayed when the uploaded file contains XML that cannot be properly parsed and checked.',
);
'recentchanges-url',
'recentchangestext',
'revision-info-current',
+ 'createaccount-hook-aborted',
'revision-nav',
'rfcurl',
'shareddescriptionfollows',
'brokenredirects-summary',
'deadendpages-summary',
'protectedpages-summary',
+ 'protectedpages-unknown-reason',
'disambiguations-summary',
'pageswithprop-summary',
'doubleredirects-summary',
'protectedpages-cascade',
'protectedpages-noredirect',
'protectedpagesempty',
+ 'protectedpages-timestamp',
+ 'protectedpages-page',
+ 'protectedpages-expiry',
+ 'protectedpages-performer',
+ 'protectedpages-params',
+ 'protectedpages-reason',
+ 'protectedpages-unknown-timestamp',
+ 'protectedpages-unknown-performer',
+ 'protectedpages-unknown-reason',
'protectedtitles',
'protectedtitles-summary',
'protectedtitlesempty',
'thumbnail_image-type',
'thumbnail_gd-library',
'thumbnail_image-missing',
+ 'thumbnail_image-failure-limit'
),
'import' => array(
'import',