call ajax scan only if a user is logged in - otherwise we'll get a 500

This commit is contained in:
Thomas Mueller 2013-01-28 09:48:03 +01:00
parent 47ce3c2160
commit 11e88f4939
1 changed files with 7 additions and 5 deletions

View File

@ -667,11 +667,13 @@ $(document).ready(function() {
});
//check if we need to scan the filesystem
$.get(OC.filePath('files','ajax','scan.php'),{checkonly:'true'}, function(response) {
if(response.data.done){
scanFiles();
}
}, "json");
if (OC.currentUser) {
$.get(OC.filePath('files','ajax','scan.php'),{checkonly:'true'}, function(response) {
if(response.data.done){
scanFiles();
}
}, "json");
}
var lastWidth = 0;
var breadcrumbs = [];