Example #1
0
 /**
  * set private data referenced by $key to $value and generate the xml for ocs
  * @param string $format
  * @param string $app
  * @param string $key
  * @param string $value
  * @return string xml/json
  */
 private static function privateDataSet($format, $app, $key, $value)
 {
     $user = OC_OCS::checkpassword();
     if (OC_OCS::setData($user, $app, $key, $value)) {
         echo OC_OCS::generatexml($format, 'ok', 100, '');
     }
 }