diff options
-rw-r--r-- | apps/files_trashbin/lib/backgroundjob/expiretrash.php | 6 | ||||
-rw-r--r-- | core/js/sharedialogshareelistview.js | 8 | ||||
-rw-r--r-- | core/js/sharedialogview.js | 7 | ||||
-rw-r--r-- | lib/private/share/hooks.php | 17 |
4 files changed, 35 insertions, 3 deletions
diff --git a/apps/files_trashbin/lib/backgroundjob/expiretrash.php b/apps/files_trashbin/lib/backgroundjob/expiretrash.php index 7f4f4823918..4ee0658840b 100644 --- a/apps/files_trashbin/lib/backgroundjob/expiretrash.php +++ b/apps/files_trashbin/lib/backgroundjob/expiretrash.php @@ -120,6 +120,12 @@ class ExpireTrash extends \OC\BackgroundJob\TimedJob { return false; } + //Check if this user has a trashbin directory + $view = new \OC\Files\View('/' . $user); + if (!$view->is_dir('/files_trashbin/files')){ + return false; + } + \OC_Util::tearDownFS(); \OC_Util::setupFS($user); diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index e26421dcaed..e8976bb26e6 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -16,12 +16,12 @@ var TEMPLATE = '<ul id="shareWithList" class="shareWithList">' + '{{#each sharees}}' + - ' <li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}" title="{{shareWith}}">' + + ' <li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">' + ' <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><img class="svg" alt="{{unshareLabel}}" title="{{unshareLabel}}" src="{{unshareImage}}" /></a>' + ' {{#if avatarEnabled}}' + ' <div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' + ' {{/if}}' + - ' <span class="username">{{shareWithDisplayName}}</span>' + + ' <span class="has-tooltip username" title="{{shareWith}}">{{shareWithDisplayName}}</span>' + ' {{#if mailNotificationEnabled}} {{#unless isRemoteShare}}' + ' <input id="mail-{{cid}}-{{shareWith}}" type="checkbox" name="mailNotification" class="mailNotification checkbox" {{#if wasMailSent}}checked="checked"{{/if}} />' + ' <label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' + @@ -193,6 +193,10 @@ }); } + this.$el.find('.has-tooltip').tooltip({ + placement: 'bottom' + }); + this.delegateEvents(); return this; diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index fbb3a915810..5e1e14541c5 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -221,7 +221,7 @@ .tooltip('hide') .tooltip({ placement: 'bottom', - trigger: 'manual', + trigger: 'manual' }) .tooltip('fixTitle') .tooltip('show'); @@ -259,9 +259,14 @@ } } insert.text(text); + insert.attr('title', item.value.shareWith); if(item.value.shareType === OC.Share.SHARE_TYPE_GROUP) { insert = insert.wrapInner('<strong></strong>'); } + insert.tooltip({ + placement: 'bottom', + container: 'body' + }); return $("<li>") .addClass((item.value.shareType === OC.Share.SHARE_TYPE_GROUP) ? 'group' : 'user') .append(insert) diff --git a/lib/private/share/hooks.php b/lib/private/share/hooks.php index c939164e39e..b730146ddfe 100644 --- a/lib/private/share/hooks.php +++ b/lib/private/share/hooks.php @@ -55,6 +55,15 @@ class Hooks extends \OC\Share\Constants { * @param array $arguments */ public static function pre_addToGroup($arguments) { + $currentUser = \OC::$server->getUserSession()->getUser(); + $currentUserID = is_null($currentUser) ? '' : $currentUser->getUID(); + + // setup filesystem for added user if it isn't the current user + if($currentUserID !== $arguments['uid']) { + \OC_Util::tearDownFS(); + \OC_Util::setupFS($arguments['uid']); + } + /** @var \OC\DB\Connection $db */ $db = \OC::$server->getDatabaseConnection(); @@ -120,6 +129,14 @@ class Hooks extends \OC\Share\Constants { ]; } } + + // re-setup old filesystem state + if($currentUserID !== $arguments['uid']) { + \OC_Util::tearDownFS(); + if($currentUserID !== '') { + \OC_Util::setupFS($currentUserID); + } + } } /** |