Proper public link is sharing dropdown

pull/1/head
Victor Dubiniuk 11 years ago
parent 93c774d81e
commit e33d481e78

@ -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);

@ -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, ''),

Loading…
Cancel
Save