From f3046d2bbd96dc9a501975392e76d6ae539cdf05 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Tue, 29 Nov 2011 20:42:35 +0100 Subject: [PATCH] Second part of the error codes. Forgot some :( Added the new error codes and categories: --- 212 Not allowed to delete media == 230 Media edit error --- 231 Filename not given --- 232 File is still referenced --- 233 Could not delete file --- lib/exe/xmlrpc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index 5d19725a38..910271461d 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -575,7 +575,7 @@ function putAttachment($id, $file, $params) { $auth = auth_quickaclcheck(getNS($id).':*'); if(!isset($id)) { - return new IXR_ERROR(1, 'Filename not given.'); + return new IXR_ERROR(231, 'Filename not given.'); } global $conf; @@ -611,11 +611,11 @@ function deleteAttachment($id){ if ($res & DOKU_MEDIA_DELETED) { return 0; } elseif ($res & DOKU_MEDIA_NOT_AUTH) { - return new IXR_ERROR(1, "You don't have permissions to delete files."); + return new IXR_ERROR(212, "You don't have permissions to delete files."); } elseif ($res & DOKU_MEDIA_INUSE) { - return new IXR_ERROR(1, 'File is still referenced'); + return new IXR_ERROR(232, 'File is still referenced'); } else { - return new IXR_ERROR(1, 'Could not delete file'); + return new IXR_ERROR(233, 'Could not delete file'); } }