Index: branches/apiedit/phase3/includes/api/ApiProtect.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | |
44 | 44 | $titleObj = NULL; |
45 | 45 | if(!isset($params['title'])) |
46 | | - $this->dieUsage('The title parameter must be set', 'notarget'); |
| 46 | + $this->dieUsage('The title parameter must be set', 'notitle'); |
47 | 47 | if(!isset($params['token'])) |
48 | 48 | $this->dieUsage('The token parameter must be set', 'notoken'); |
49 | 49 | if(!isset($params['protections']) || empty($params['protections'])) |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | |
61 | 61 | $titleObj = Title::newFromText($params['title']); |
62 | 62 | if(!$titleObj) |
63 | | - $this->dieUsage("bad title {$params['title']}", 'invalidtitle'); |
| 63 | + $this->dieUsage("Bad title {$params['title']}", 'invalidtitle'); |
64 | 64 | if(!$titleObj->exists()) |
65 | 65 | $this->dieUsage("{$params['title']} doesn't exist", 'missingtitle'); |
66 | 66 | $articleObj = new Article($titleObj); |
Index: branches/apiedit/phase3/includes/api/ApiRollback.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | |
44 | 44 | $titleObj = NULL; |
45 | 45 | if(!isset($params['title'])) |
46 | | - $this->dieUsage('The title parameter must be set', 'notarget'); |
| 46 | + $this->dieUsage('The title parameter must be set', 'notitle'); |
47 | 47 | if(!isset($params['user'])) |
48 | 48 | $this->dieUsage('The user parameter must be set', 'nouser'); |
49 | 49 | if(!isset($params['token'])) |
— | — | @@ -58,12 +58,12 @@ |
59 | 59 | |
60 | 60 | $titleObj = Title::newFromText($params['title']); |
61 | 61 | if(!$titleObj) |
62 | | - $this->dieUsage("bad title {$params['title']}", 'invalidtitle'); |
| 62 | + $this->dieUsage("Bad title {$params['title']}", 'invalidtitle'); |
63 | 63 | |
64 | 64 | $articleObj = new Article($titleObj); |
65 | 65 | $summary = (isset($params['summary']) ? $params['summary'] : ""); |
66 | 66 | $details = NULL; |
67 | | - $retval = $articleObj->doRollback($params['user'], $summary, $params['token'], isset($params['markbot']), &$details); |
| 67 | + $retval = $articleObj->doRollback($params['user'], $summary, $params['token'], $params['markbot'], &$details); |
68 | 68 | |
69 | 69 | switch($retval) |
70 | 70 | { |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | case Article::BAD_TOKEN: |
80 | 80 | $this->dieUsage('Invalid token', 'badtoken'); |
81 | 81 | case Article::BAD_TITLE: |
82 | | - $this->dieUsage("The article ``{$params['title']}'' doesn't exist", 'missingtitle'); |
| 82 | + $this->dieUsage("{$params['title']} doesn't exist", 'missingtitle'); |
83 | 83 | case Article::ALREADYROLLED: |
84 | 84 | $current = $details['current']; |
85 | 85 | $currentID = $current->getId(); |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | 'user' => null, |
116 | 116 | 'token' => null, |
117 | 117 | 'summary' => null, |
118 | | - 'markbot' => null |
| 118 | + 'markbot' => false |
119 | 119 | ); |
120 | 120 | } |
121 | 121 | |
Index: branches/apiedit/phase3/includes/api/ApiDelete.php |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | |
104 | 104 | $titleObj = Title::newFromText($params['title']); |
105 | 105 | if(!$titleObj) |
106 | | - $this->dieUsage("bad title {$params['title']}", 'invalidtitle'); |
| 106 | + $this->dieUsage("Bad title {$params['title']}", 'invalidtitle'); |
107 | 107 | if(!$titleObj->exists()) |
108 | 108 | $this->dieUsage("{$params['title']} doesn't exist", 'missingtitle'); |
109 | 109 | |
Index: branches/apiedit/phase3/includes/api/ApiUndelete.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | |
59 | 59 | $titleObj = Title::newFromText($params['title']); |
60 | 60 | if(!$titleObj) |
61 | | - $this->dieUsage("bad title {$params['title']}", 'invalidtitle'); |
| 61 | + $this->dieUsage("Bad title {$params['title']}", 'invalidtitle'); |
62 | 62 | $pa = new PageArchive($titleObj); |
63 | 63 | $retval = $pa->undelete((isset($params['timestamps']) ? $params['timestamps'] : array()), $params['reason']); |
64 | 64 | if(!is_array($retval)) |