ZLog::Write(LOGLEVEL_ERROR,sprintf("ASDevice->AddAdditionalFolder(): folder can not be added because the specified type '%s' is not a permitted user type.",$type));
...
...
@@ -922,6 +928,12 @@ class ASDevice extends StateObject {
ZLog::Write(LOGLEVEL_ERROR,sprintf("ASDevice->EditAdditionalFolder(): No valid folderid ('%s') or name ('%s') sent. Aborting. ",$folderid,$name));
returnfalse;
}
// check if a folder with this ID is known
if(!isset($this->additionalfolders[$folderid])){
ZLog::Write(LOGLEVEL_ERROR,sprintf("ASDevice->EditAdditionalFolder(): folder can not be edited because there is no folder known with this folder id: '%s'. Add the folder first.",$folderid));
...
...
@@ -961,6 +973,11 @@ class ASDevice extends StateObject {
* @return boolean
*/
publicfunctionRemoveAdditionalFolder($folderid){
// check if a folderid were sent
if(!$folderid){
ZLog::Write(LOGLEVEL_ERROR,sprintf("ASDevice->RemoveAdditionalFolder(): No valid folderid ('%s') sent. Aborting. ",$folderid));
returnfalse;
}
// check if a folder with this ID is known
if(!isset($this->additionalfolders[$folderid])){
ZLog::Write(LOGLEVEL_ERROR,sprintf("ASDevice->RemoveAdditionalFolder(): folder can not be removed because there is no folder known with this folder id: '%s'",$folderid));