Index: branches/apiedit/phase3/CHANGED |
— | — | @@ -27,15 +27,18 @@ |
28 | 28 | |
29 | 29 | api/ApiDelete.php (NEW) |
30 | 30 | * action=delete module that wraps around Article::doDeleteArticle() (r23590) |
| 31 | +* Added missingtitle error message (r25389) |
31 | 32 | |
32 | 33 | api/ApiQueryDeletedRevs.php (NEW) |
33 | 34 | * action=query&list=deletedrevs module that lists deleted revisions from the archive table (r23668) |
34 | 35 | |
35 | 36 | api/ApiUndelete.php (NEW) |
36 | 37 | * action=undelete module that wraps around PageArchive::undelete() (r23687, r23697) |
| 38 | +* Added missingtitle error message (r25389) |
37 | 39 | |
38 | 40 | api/ApiProtect.php (NEW) |
39 | 41 | * action=protect module that wraps around Article::updateRestrictions() (r25388) |
| 42 | +* Added missingtitle error message (r25389) |
40 | 43 | |
41 | 44 | AutoLoader.php |
42 | 45 | * Added entries for ApiRollback (r23562), ApiDelete (r23590), ApiQueryDeletedRevs (r23668), ApiUndelete (r23687), ApiProtect (r23588) |
Index: branches/apiedit/phase3/includes/api/ApiProtect.php |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | if(!$titleObj) |
63 | 63 | $this->dieUsage("bad title {$params['title']}", 'invalidtitle'); |
64 | 64 | if(!$titleObj->exists()) |
65 | | - $this->dieUsage("{$params['title']} doesn't exist", "nonexistenttitle"); |
| 65 | + $this->dieUsage("{$params['title']} doesn't exist", 'missingtitle'); |
66 | 66 | $articleObj = new Article($titleObj); |
67 | 67 | |
68 | 68 | if(in_array($params['expiry'], array('infinite', 'indefinite', 'never'))) |
Index: branches/apiedit/phase3/includes/api/ApiDelete.php |
— | — | @@ -103,6 +103,8 @@ |
104 | 104 | $titleObj = Title::newFromText($params['title']); |
105 | 105 | if(!$titleObj) |
106 | 106 | $this->dieUsage("bad title {$params['title']}", 'invalidtitle'); |
| 107 | + if(!$titleObj->exists()) |
| 108 | + $this->dieUsage("{$params['title']} doesn't exist", 'missingtitle'); |
107 | 109 | |
108 | 110 | $articleObj = new Article($titleObj); |
109 | 111 | $reason = (isset($params['reason']) ? $params['reason'] : NULL); |
Index: branches/apiedit/phase3/includes/api/ApiUndelete.php |
— | — | @@ -58,6 +58,8 @@ |
59 | 59 | $titleObj = Title::newFromText($params['title']); |
60 | 60 | if(!$titleObj) |
61 | 61 | $this->dieUsage("bad title {$params['title']}", 'invalidtitle'); |
| 62 | + if(!$titleObj->exists()) |
| 63 | + $this->dieUsage("{$params['title']} doesn't exist", 'missingtitle'); |
62 | 64 | $pa = new PageArchive($titleObj); |
63 | 65 | $retval = $pa->undelete((isset($params['timestamps']) ? $params['timestamps'] : array()), $params['reason']); |
64 | 66 | if(!is_array($retval)) |