From 8c594bbb11bb6103aac427b8e73dd514ceff23ad Mon Sep 17 00:00:00 2001 From: jerome mouneyrac Date: Wed, 13 Jan 2010 04:03:52 +0000 Subject: [PATCH] webservice MDL-20805 add missing exception string message --- admin/webservice/tokens.php | 2 +- lang/en_utf8/error.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/webservice/tokens.php b/admin/webservice/tokens.php index a520e01559..953e25e3db 100644 --- a/admin/webservice/tokens.php +++ b/admin/webservice/tokens.php @@ -70,7 +70,7 @@ switch ($action) { if (empty($service->requiredcapability) || has_capability($service->requiredcapability, $systemcontext, $data->user)) { $newtoken->externalserviceid = $data->service; } else { - throw new moodle_exception('userhasnocapabilitytousethisservice'); + throw new moodle_exception('nocapabilitytousethisservice'); } $newtoken->tokentype = 2; $newtoken->userid = $data->user; diff --git a/lang/en_utf8/error.php b/lang/en_utf8/error.php index 78a65d6bcd..4612e82cad 100644 --- a/lang/en_utf8/error.php +++ b/lang/en_utf8/error.php @@ -335,6 +335,7 @@ $string['noblocks'] = 'No blocks found!'; $string['nodata'] = 'No data'; $string['noformdesc'] = 'No formslib form description file found for this activity.'; $string['nofile'] = 'File not specified'; +$string['nocapabilitytousethisservice'] = 'The user hasn\'t the required capability to use this service'; $string['nocategorydelete'] = 'Category \'$a\' cannot be deleted!'; $string['nocontext'] = 'Sorry, but that course is not a valid context'; $string['noinstances'] = 'There are no instances of $a in this course!'; @@ -399,6 +400,7 @@ $string['searchableselectorcannotbemultiple'] = 'A searchableselector form eleme $string['sectionnotexist'] = 'This section does not exist'; $string['secretalreadyused'] = 'Change password confirmation link was already used, password was not changed'; $string['sendmessage'] = 'Send message'; +$string['servicedonotexist'] = 'The service does not exist'; $string['sessioncookiesdisable'] = 'Incorrect use of require_key_login() - session cookies must be disabled!'; $string['sessiondiskfull'] = 'The session partition is full. It is not possible to login at this time.

Please notify server administrator.'; $string['sessionerroruser'] = 'Your session has timed out. Please login again.'; -- 2.39.5