summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/js/oc-vcategories.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/js/oc-vcategories.js b/core/js/oc-vcategories.js
index d5a9b0016de..4d8d010a36f 100644
--- a/core/js/oc-vcategories.js
+++ b/core/js/oc-vcategories.js
@@ -84,16 +84,16 @@ OCCategories={
},
rescan:function(){
console.log('Categories.rescan');
- $.getJSON(OC.filePath(OCCategories.app, 'ajax', 'categories/rescan.php'),{},function(jsondata, status, xhr){
- if (status == 'error' && xhr.status == 404) {
- OC.dialogs.alert('The required file ' + OC.filePath(Categories.app, 'ajax', 'categories/rescan.php') + ' is not installed!', 'Error');
- return;
- }
+ $.getJSON(OC.filePath(OCCategories.app, 'ajax', 'categories/rescan.php'),function(jsondata, status, xhr){
if(jsondata.status == 'success'){
OCCategories._update(jsondata.data.categories);
} else {
OC.dialogs.alert(jsondata.data.message, 'Error');
}
+ }).error(function(xhr){
+ if (xhr.status == 404) {
+ OC.dialogs.alert('The required file ' + OC.filePath(Categories.app, 'ajax', 'categories/rescan.php') + ' is not installed!', 'Error');
+ }
});
},
_update:function(categories){