Merge "Api method documentation tweaks"
[lhc/web/wiklou.git] / includes / api / ApiRollback.php
index 4de49ea..76de5fb 100644 (file)
@@ -49,7 +49,7 @@ class ApiRollback extends ApiBase {
                // User and title already validated in call to getTokenSalt from Main
                $titleObj = $this->getRbTitle();
                $pageObj = WikiPage::factory( $titleObj );
-               $summary = ( isset( $params['summary'] ) ? $params['summary'] : '' );
+               $summary = $params['summary'];
                $details = array();
                $retval = $pageObj->doRollback( $this->getRbUser(), $summary, $params['token'], $params['markbot'], $details, $this->getUser() );
 
@@ -91,7 +91,7 @@ class ApiRollback extends ApiBase {
                                ApiBase::PARAM_REQUIRED => true
                        ),
                        'token' => null,
-                       'summary' => null,
+                       'summary' => '',
                        'markbot' => false,
                        'watchlist' => array(
                                ApiBase::PARAM_DFLT => 'preferences',
@@ -110,7 +110,7 @@ class ApiRollback extends ApiBase {
                        'title' => 'Title of the page you want to rollback.',
                        'user' => 'Name of the user whose edits are to be rolled back. If set incorrectly, you\'ll get a badtoken error.',
                        'token' => "A rollback token previously retrieved through {$this->getModulePrefix()}prop=revisions",
-                       'summary' => 'Custom edit summary. If not set, default summary will be used',
+                       'summary' => 'Custom edit summary. If empty, default summary will be used',
                        'markbot' => 'Mark the reverted edits and the revert as bot edits',
                        'watchlist' => 'Unconditionally add or remove the page from your watchlist, use preferences or do not change watch',
                );