X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FEditPage.php;h=764f413f20f341ff40dfd0a8edd9cbb13a1ed6cf;hb=ad225f501c095a154bf015978e0c3263f0f1fa3f;hp=a423f260c79dfb0960b6dbedbca3ad15bf118561;hpb=71e6840b70889181e7e979a0f9f2e959c5c69ea6;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/EditPage.php b/includes/EditPage.php
index a423f260c7..764f413f20 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -779,7 +779,8 @@ class EditPage {
// TODO: softened the check for cutover. Once we determine
// that it is safe, we should complete the transition by
// removing the "edittime" clause.
- $this->incompleteForm = ( !$request->getVal( 'wpUltimateParam' ) && is_null( $this->edittime ) );
+ $this->incompleteForm = ( !$request->getVal( 'wpUltimateParam' )
+ && is_null( $this->edittime ) );
}
if ( $this->incompleteForm ) {
# If the form is incomplete, force to preview.
@@ -2106,6 +2107,17 @@ class EditPage {
if ( $namespace == NS_MEDIAWIKI ) {
# Show a warning if editing an interface message
$wgOut->wrapWikiMsg( "
\n$1\n
", 'editinginterface' );
+ # If this is a default message (but not css or js),
+ # show a hint that it is translatable on translatewiki.net
+ if ( !$this->mTitle->hasContentModel( CONTENT_MODEL_CSS )
+ && !$this->mTitle->hasContentModel( CONTENT_MODEL_JAVASCRIPT )
+ ) {
+ $defaultMessageText = $this->mTitle->getDefaultMessageText();
+ if ( $defaultMessageText !== false ) {
+ $wgOut->wrapWikiMsg( "\n$1\n
",
+ 'translateinterface' );
+ }
+ }
} elseif ( $namespace == NS_FILE ) {
# Show a hint to shared repo
$file = wfFindFile( $this->mTitle );
@@ -2137,7 +2149,8 @@ class EditPage {
if ( !( $user && $user->isLoggedIn() ) && !$ip ) { # User does not exist
$wgOut->wrapWikiMsg( "\n$1\n
",
array( 'userpage-userdoesnotexist', wfEscapeWikiText( $username ) ) );
- } elseif ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) { # Show log extract if the user is currently blocked
+ } elseif ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) {
+ # Show log extract if the user is currently blocked
LogEventsList::showLogExtract(
$wgOut,
'block',
@@ -2204,7 +2217,10 @@ class EditPage {
if ( $title instanceof Title && $title->exists() && $title->userCan( 'read' ) ) {
global $wgOut;
// Added using template syntax, to take 's into account.
- $wgOut->addWikiTextTitleTidy( '{{:' . $title->getFullText() . '}}
', $this->mTitle );
+ $wgOut->addWikiTextTitleTidy(
+ '{{:' . $title->getFullText() . '}}
',
+ $this->mTitle
+ );
return true;
}
}