summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-04-13 16:12:55 +0200
committerBart Visscher <bartv@thisnet.nl>2012-04-13 21:13:58 +0200
commitb8466d362e54bb96a30411143361198a01816f4d (patch)
tree946f6e9871559ada31db2052d8a1c82762a7bbd8 /core
parent6aee6dae6b708d0dc26a0c707cdbb9a6ef618293 (diff)
downloadnextcloud-server-b8466d362e54bb96a30411143361198a01816f4d.tar.gz
nextcloud-server-b8466d362e54bb96a30411143361198a01816f4d.zip
Fix rescan "File not Found" error handling in oc-vcategories.js
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){