API: Rename dontcreate to createonly, which actually makes sense
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 25 Mar 2008 21:12:01 +0000 (21:12 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 25 Mar 2008 21:12:01 +0000 (21:12 +0000)
RELEASE-NOTES
includes/api/ApiBase.php
includes/api/ApiEditPage.php

index cfdcb48..7c577a3 100644 (file)
@@ -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 ===
 
index 97b18f4..197d479 100644 (file)
@@ -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"),
        );
        
        /**
index a553b25..e4a64fd 100644 (file)
@@ -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',