Commit 30d04949 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-641 Revert "For Backend Storage type files, add a user element to the file...

ZP-641 Revert "For Backend Storage type files, add a user element to the file name so that multiple accounts on the same device do not overwrite each others data in a single file named only for the device."

This reverts commit 38ce1ca0.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 38ce1ca0
...@@ -443,8 +443,7 @@ class FileStateMachine implements IStateMachine { ...@@ -443,8 +443,7 @@ class FileStateMachine implements IStateMachine {
* @throws StateInvalidException * @throws StateInvalidException
*/ */
private function getFullFilePath($devid, $type, $key = false, $counter = false, $doNotCreateDirs = false) { private function getFullFilePath($devid, $type, $key = false, $counter = false, $doNotCreateDirs = false) {
$user = preg_replace('/[^a-z0-9]/', '-', Request::GetAuthUser()); $testkey = $devid . (($key !== false)? "-". $key : "") . (($type !== "")? "-". $type : "");
$testkey = $devid . (($key !== false)? "-". $key : "") . (($type !== "")? "-". $type : "") . (($type == IStateMachine::BACKENDSTORAGE)? "-". $user : "");
if (preg_match('/^[a-zA-Z0-9-]+$/', $testkey, $matches) || ($type == "" && $key === false)) if (preg_match('/^[a-zA-Z0-9-]+$/', $testkey, $matches) || ($type == "" && $key === false))
$internkey = $testkey . (($counter && is_int($counter))?"-".$counter:""); $internkey = $testkey . (($counter && is_int($counter))?"-".$counter:"");
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment