From 6090218f2a86f47ad2fd53bec389a224e587ffae Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 25 Mar 2008 21:12:01 +0000 Subject: [PATCH] API: Rename dontcreate to createonly, which actually makes sense --- RELEASE-NOTES | 2 +- includes/api/ApiBase.php | 2 +- includes/api/ApiEditPage.php | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index cfdcb48fe3..7c577a31bd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -162,7 +162,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 13482) Disabled search types handled properly * Added inprop=talkid,subjectid to prop=info * Added help text message that specifies whether a module is POST-only -* Added dontcreate parameter to action=edit +* Added createonly parameter to action=edit === Languages updated in 1.13 === diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 97b18f405c..197d47990d 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -625,7 +625,7 @@ abstract class ApiBase { 'cantunblock' => array('code' => 'permissiondenied', 'info' => "You don't have permission to unblock users"), 'cannotundelete' => array('code' => 'cantundelete', 'info' => "Couldn't undelete: the requested revisions may not exist, or may have been undeleted already"), 'permdenied-undelete' => array('code' => 'permissiondenied', 'info' => "You don't have permission to restore deleted revisions"), - 'dontcreate-exists' => array('code' => 'articleexists', 'info' => "The article you tried to create has been created already"), + 'createonly-exists' => array('code' => 'articleexists', 'info' => "The article you tried to create has been created already"), ); /** diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index a553b258d0..e4a64fd333 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -57,8 +57,8 @@ class ApiEditPage extends ApiBase { if(!$titleObj) $this->dieUsageMsg(array('invalidtitle', $params['title'])); - if($params['dontcreate'] && $titleObj->exists()) - $this->dieUsageMsg(array('dontcreate-exists')); + if($params['createonly'] && $titleObj->exists()) + $this->dieUsageMsg(array('createonly-exists')); // Now let's check whether we're even allowed to do this $errors = $titleObj->getUserPermissionsErrors('edit', $wgUser); @@ -223,7 +223,7 @@ class ApiEditPage extends ApiBase { 'bot' => false, 'basetimestamp' => null, 'recreate' => false, - 'dontcreate' => false, + 'createonly' => false, 'captchaword' => null, 'captchaid' => null, 'watch' => false, @@ -245,7 +245,7 @@ class ApiEditPage extends ApiBase { 'Used to detect edit conflicts; leave unset to ignore conflicts.' ), 'recreate' => 'Override any errors about the article having been deleted in the meantime', - 'dontcreate' => 'Don\'t create the page if it exists already', + 'createonly' => 'Don\'t create the page if it exists already', 'watch' => 'Add the page to your watchlist', 'unwatch' => 'Remove the page from your watchlist', 'captchaid' => 'CAPTCHA ID from previous request', -- 2.20.1