@@ -886,44 +886,6 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
|
||||
return ($new && !$existing_col) ? "201 Created" : "204 No Content";
|
||||
}
|
||||
|
||||
/**
|
||||
* PROPPATCH method handler
|
||||
*
|
||||
* @param array general parameter passing array
|
||||
* @return bool true on success
|
||||
*/
|
||||
public function PROPPATCH(&$options)
|
||||
{
|
||||
global $prefs, $tab;
|
||||
|
||||
$msg = "";
|
||||
|
||||
$path = $options["path"];
|
||||
|
||||
$dir = dirname($path) . "/";
|
||||
$base = basename($path);
|
||||
|
||||
G::LoadSystem('inputfilter');
|
||||
$filter = new InputFilter();
|
||||
|
||||
foreach ($options["props"] as $key => $prop) {
|
||||
if ($prop["ns"] == "DAV:") {
|
||||
$options["props"][$key]['status'] = "403 Forbidden";
|
||||
} else {
|
||||
if (isset($prop["val"])) {
|
||||
$query = "REPLACE INTO properties SET path = '%s', name = '%s', ns= '%s', value = '%s'";
|
||||
$query = $filter->preventSqlInjection($query, Array($options['path'],$prop['name'],$prop['ns'],$prop['val']));
|
||||
error_log($query);
|
||||
} else {
|
||||
$query = "DELETE FROM properties WHERE path = '%s' AND name = '%s' AND ns = '%s'";
|
||||
$query = $filter->preventSqlInjection($query, Array($options['path'],$prop['name'],$prop['ns']));
|
||||
}
|
||||
mysql_query($query);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* LOCK method handler
|
||||
*
|
||||
|
||||
@@ -1136,10 +1136,8 @@ class workspaceTools
|
||||
$oDbMaintainer = new DataBaseMaintenance($dbInfo["host"], $dbInfo["user"], $dbInfo["pass"]);
|
||||
CLI::logging("Saving database {$dbInfo["name"]}\n");
|
||||
$oDbMaintainer->connect($dbInfo["name"]);
|
||||
$oDbMaintainer->lockTables();
|
||||
$oDbMaintainer->setTempDir($path . "/");
|
||||
$oDbMaintainer->backupDataBase($oDbMaintainer->getTempDir() . $dbInfo["name"] . ".sql");
|
||||
$oDbMaintainer->unlockTables();
|
||||
$dbNames[] = $dbInfo;
|
||||
}
|
||||
return $dbNames;
|
||||
|
||||
Reference in New Issue
Block a user