diff --git a/content/shareyourpaper/setup.html b/content/shareyourpaper/setup.html
index 7b0de091..d2c7950c 100644
--- a/content/shareyourpaper/setup.html
+++ b/content/shareyourpaper/setup.html
@@ -697,8 +697,10 @@
OAB Only TODO is this still needed
});
var deposits = function(e) {
- var addr = api + '/' + ($(this).attr('id') === 'all_file_deposits' ? 'deposited' : 'deposits') + '.csv?uid=' + noddy.user.account._id;
- if ($('#depositdate').val()) addr += '&q=deposit.createdAt:>' + new Date($('#depositdate').datepicker('getDate')).valueOf();
+ var addr = api + '/deposited.csv?'
+ if (noddy.user !== undefined && noddy.user.account !== undefined && noddy.user.account._id !== undefined) addr += 'uid=' + noddy.user.account._id + '&';
+ if ($(this).attr('id') === 'all_file_deposits') addr += 'submitted=true&';
+ if ($('#depositdate').val()) addr += 'fromdate=' + new Date($('#depositdate').datepicker('getDate')).valueOf() + '&';
$(this).attr('href',addr);
}
$('body').on('click','#all_deposits',deposits);