зеркало из https://github.com/nextcloud/activity.git
Remove hardcoded Shared/ folder
This commit is contained in:
Родитель
c1a0b7c1cc
Коммит
9abfcc2cc9
|
@ -172,7 +172,7 @@ class Hooks {
|
||||||
}
|
}
|
||||||
|
|
||||||
// New shared user
|
// New shared user
|
||||||
$path = '/Shared' . $params['fileTarget'];
|
$path = $params['fileTarget'];
|
||||||
$link = \OCP\Util::linkToAbsolute('files', 'index.php', array(
|
$link = \OCP\Util::linkToAbsolute('files', 'index.php', array(
|
||||||
'dir' => ($params['itemType'] === 'file') ? dirname($path) : $path,
|
'dir' => ($params['itemType'] === 'file') ? dirname($path) : $path,
|
||||||
));
|
));
|
||||||
|
@ -205,7 +205,7 @@ class Hooks {
|
||||||
$affectedUsers = array();
|
$affectedUsers = array();
|
||||||
$usersInGroup = \OC_Group::usersInGroup($params['shareWith']);
|
$usersInGroup = \OC_Group::usersInGroup($params['shareWith']);
|
||||||
foreach ($usersInGroup as $user) {
|
foreach ($usersInGroup as $user) {
|
||||||
$affectedUsers[$user] = '/Shared' . $params['fileTarget'];
|
$affectedUsers[$user] = $params['fileTarget'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($affectedUsers)) {
|
if (!empty($affectedUsers)) {
|
||||||
|
@ -219,7 +219,7 @@ class Hooks {
|
||||||
\OCP\Util::writeLog('OCA\Activity\Hooks::shareFileOrFolderWithGroup', \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
|
\OCP\Util::writeLog('OCA\Activity\Hooks::shareFileOrFolderWithGroup', \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
|
||||||
} else {
|
} else {
|
||||||
while ($row = $result->fetchRow()) {
|
while ($row = $result->fetchRow()) {
|
||||||
$affectedUsers[$row['share_with']] = '/Shared' . $row['file_target'];
|
$affectedUsers[$row['share_with']] = $row['file_target'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче