/** * delete private data referenced by $key and generate the xml for ocs * @param string $format * @param string $app * @param string $key * @return string xml/json */ private static function privateDataDelete($format, $app, $key) { if ($key == "" or $app == "") { return; //key and app are NOT optional here } $user = OC_OCS::checkpassword(); if (OC_OCS::deleteData($user, $app, $key)) { echo OC_OCS::generatexml($format, 'ok', 100, ''); } }