Remove hardcoded Shared/ folder

This commit is contained in:
Joas Schilling 2014-05-05 22:08:55 +02:00
Родитель c1a0b7c1cc
Коммит 9abfcc2cc9
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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'];
} }
} }