From: Aryeh Gregor Date: Fri, 14 Mar 2008 13:23:48 +0000 (+0000) Subject: Per suggestion on wikitech-l, use "Create( this page)" instead of "Edit( this page... X-Git-Tag: 1.31.0-rc.0~49107 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=2e44ec3e201e008b51dafb395f23e29f9e7aef6c;p=lhc%2Fweb%2Fwiklou.git Per suggestion on wikitech-l, use "Create( this page)" instead of "Edit( this page)" when the page doesn't actually exist yet. It makes quite a bit more sense. (Incidentally, am I the only one who finds it weird that different skins use different messages? They probably shouldn't use raw wfMsg() either, unless that's getting escaped later somewhere.) --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 19efca48c7..287c9c0f2e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -40,7 +40,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN redirects to the redirect table * Add links to page and file deletion forms to edit predefined delete reasons * (bug 13269) Added MediaWiki:Uploadfooter to the bottom of Special:Upload -* (bug 2815) Search results for media files now use thumb instead of text extract +* (bug 2815) Search results for media now use thumb instead of text extract +* When a page doesn't exist, the tab should say "create", not "edit" === Bug fixes in 1.13 === diff --git a/includes/Skin.php b/includes/Skin.php index 5610f3b19b..5ba8fdb1ab 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1283,11 +1283,13 @@ END; function editThisPage() { global $wgOut, $wgTitle; - if ( ! $wgOut->isArticleRelated() ) { + if ( !$wgOut->isArticleRelated() ) { $s = wfMsg( 'protectedpage' ); } else { - if ( $wgTitle->userCan( 'edit' ) ) { + if( $wgTitle->userCan( 'edit' ) && $wgTitle->exists() ) { $t = wfMsg( 'editthispage' ); + } elseif( $wgTitle->userCan( 'create' ) && !$wgTitle->exists() ) { + $t = wfMsg( 'create-this-page' ); } else { $t = wfMsg( 'viewsource' ); } diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 0178b86656..dd72dbd7d7 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -677,7 +677,9 @@ class SkinTemplate extends Skin { $istalkclass = $istalk?' istalk':''; $content_actions['edit'] = array( 'class' => ((($action == 'edit' or $action == 'submit') and $section != 'new') ? 'selected' : '').$istalkclass, - 'text' => wfMsg('edit'), + 'text' => $this->mTitle->exists() + ? wfMsg( 'edit' ) + : wfMsg( 'create' ), 'href' => $this->mTitle->getLocalUrl( $this->editUrlOptions() ) ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index da0829f4f3..0da6748ceb 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -619,7 +619,9 @@ XHTML id names. 'permalink' => 'Permanent link', 'print' => 'Print', 'edit' => 'Edit', +'create' => 'Create', 'editthispage' => 'Edit this page', +'create-this-page' => 'Create this page', 'delete' => 'Delete', 'deletethispage' => 'Delete this page', 'undelete_short' => 'Undelete {{PLURAL:$1|one edit|$1 edits}}',