Reindentinf + fixing error messages

This commit is contained in:
Usuario Moodle 2013-05-07 17:37:50 -03:00
parent d3ec5f3d7c
commit 04669d927b
2 changed files with 222 additions and 229 deletions

View File

@ -30,11 +30,6 @@
* For generic usage, you can try the ANDS_Response_XML defined in xml_creater.php.
*/
// Report all errors except E_NOTICE
// This is the default value set in php.ini
// If anything else, try them.
// error_reporting (E_ALL ^ E_NOTICE);
/**
* An array for collecting erros which can be reported later. It will be checked before a new action is taken.
*/

View File

@ -25,7 +25,6 @@
*
* \see http://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions
*/
/*
http://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions
@ -56,15 +55,15 @@ noSetHierarchy:
*/
/** utility funciton to mapping error codes to readable messages */
function oai_error($code, $argument = '', $value = '')
{
function oai_error($code, $argument = '', $value = '') {
switch ($code) {
case 'badArgument' :
$text = "Attribute '{$argument}' is not allowed to appear in element 'request'";
$text = "Attribute '{$argument}' is not allowed to appear in element 'request'.";
break;
case 'badGranularity' :
$text = "The value '{$value}' of the argument '{$argument}' is not valid.";
$text = "The value '{$value}' of attribute '{$argument}' on element 'request' is not valid with respect to its type, 'UTCdatetimeType'.";
$code = 'badArgument';
break;
@ -78,7 +77,7 @@ function oai_error($code, $argument = '', $value = '')
break;
case 'badVerb' :
$text = "The verb '{$argument}' provided in the request is illegal.";
$text = "The value '{$argument}' of attribute 'verb' on element 'request' is not valid with respect to its type, 'verbType'";
break;
case 'cannotDisseminateFormat' :
@ -191,7 +190,6 @@ class ANDS_XML {
return $added_node;
}
/**
* Create an OAI request node.
*