diff --git a/ajax/sessionController.php b/ajax/sessionController.php index 1648d433..074dc805 100644 --- a/ajax/sessionController.php +++ b/ajax/sessionController.php @@ -16,7 +16,7 @@ class SessionController extends Controller{ public static function joinAsGuest($args){ $uid = self::preDispatchGuest(); - $uid = substr(@$_POST['name'], 0, 16) . $uid; + $uid = substr(@$_POST['name'], 0, 16) .' '. $uid; $token = @$args['token']; $file = File::getByShareToken($token); self::join($uid, $file); diff --git a/js/documents.js b/js/documents.js index 5e31e90f..ba30ca63 100644 --- a/js/documents.js +++ b/js/documents.js @@ -200,6 +200,15 @@ var documentsMain = { if (OC.Share.droppedDown) { OC.Share.hideDropDown(); } else { + (function() { + var target = OC.Share.showLink; + OC.Share.showLink = function() { + var r = target.apply( this, arguments ); + $('#linkText').val( $('#linkText').val().replace('service=files', 'service=documents') ); + return r; + }; + })(); + OC.Share.showDropDown( 'file', parent.location.hash.replace(/\W*/g, ''),