- All permission functionalities now are in the library PermissionLib

- All return messages functions are in the message helper and it is loaded by the core classes
- Added the missing constant FHC_NOPK
- Updated all the interested classes with the new permission method
- Updated all the interested classes with the new return message functions
This commit is contained in:
bison-paolo
2016-10-13 17:53:12 +02:00
parent 40f51d035f
commit 8e0ca12deb
24 changed files with 403 additions and 517 deletions
@@ -185,43 +185,43 @@ class Message extends APIv1_Controller
{
if (!isset($message))
{
return $this->_error('Parameter is null');
return error('Parameter is null');
}
if (!isset($message['subject']))
{
return $this->_error('subject is not set');
return error('subject is not set');
}
if( !isset($message['body']))
{
return $this->_error('body is not set');
return error('body is not set');
}
if (!isset($message['receiver_id']) && !isset($message['oe_kurzbz']))
{
return $this->_error('If a receiver_id is not given a oe_kurzbz must be specified');
return error('If a receiver_id is not given a oe_kurzbz must be specified');
}
return $this->_success('Input data are valid');
return success('Input data are valid');
}
private function _validatePostMessageVorlage($message = null)
{
if (!isset($message))
{
return $this->_error('Parameter is null');
return error('Parameter is null');
}
if (!isset($message['vorlage_kurzbz']))
{
return $this->_error('vorlage_kurzbz is not set');
return error('vorlage_kurzbz is not set');
}
if (!isset($message['data']))
{
return $this->_error('data is not set');
return error('data is not set');
}
if (!isset($message['receiver_id']) && !isset($message['oe_kurzbz']))
{
return $this->_error('If a receiver_id is not given a oe_kurzbz must be specified');
return error('If a receiver_id is not given a oe_kurzbz must be specified');
}
return $this->_success('Input data are valid');
return success('Input data are valid');
}
}