diff --git a/apps/calendar/ajax/categories/rescan.php b/apps/calendar/ajax/categories/rescan.php
new file mode 100644
index 00000000000..0fd878ed8f9
--- /dev/null
+++ b/apps/calendar/ajax/categories/rescan.php
@@ -0,0 +1,42 @@
+
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+require_once('../../../../lib/base.php');
+OC_JSON::checkLoggedIn();
+OC_JSON::checkAppEnabled('calendar');
+
+foreach ($_POST as $key=>$element) {
+ debug('_POST: '.$key.'=>'.print_r($element, true));
+}
+
+function bailOut($msg) {
+ OC_JSON::error(array('data' => array('message' => $msg)));
+ OC_Log::write('calendar','ajax/categories/rescan.php: '.$msg, OC_Log::DEBUG);
+ exit();
+}
+function debug($msg) {
+ OC_Log::write('calendar','ajax/categories/rescan.php: '.$msg, OC_Log::DEBUG);
+}
+
+$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
+if(count($calendars) == 0) {
+ bailOut(OC_Calendar_App::$l10n->t('No calendars found.'));
+}
+$events = array();
+foreach($calendars as $calendar) {
+ $calendar_events = OC_Calendar_Object::all($calendar['id']);
+ $events = $events + $calendar_events;
+}
+if(count($events) == 0) {
+ bailOut(OC_Calendar_App::$l10n->t('No events found.'));
+}
+
+OC_Calendar_App::scanCategories($events);
+$categories = OC_Calendar_App::getCategoryOptions();
+
+OC_JSON::success(array('data' => array('categories'=>$categories)));
diff --git a/apps/calendar/ajax/event/edit.form.php b/apps/calendar/ajax/event/edit.form.php
index 837edbbbf05..98c22eb0206 100644
--- a/apps/calendar/ajax/event/edit.form.php
+++ b/apps/calendar/ajax/event/edit.form.php
@@ -41,13 +41,8 @@ switch($dtstart->getDateType()) {
$summary = $vevent->getAsString('SUMMARY');
$location = $vevent->getAsString('LOCATION');
-$categories = $vevent->getAsArray('CATEGORIES');
+$categories = $vevent->getAsString('CATEGORIES');
$description = $vevent->getAsString('DESCRIPTION');
-foreach($categories as $category){
- if (!in_array($category, $category_options)){
- array_unshift($category_options, $category);
- }
-}
$last_modified = $vevent->__get('LAST-MODIFIED');
if ($last_modified){
$lastmodified = $last_modified->getDateTime()->format('U');
@@ -189,7 +184,6 @@ if($data['repeating'] == 1){
}
$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
-$category_options = OC_Calendar_App::getCategoryOptions();
$repeat_options = OC_Calendar_App::getRepeatOptions();
$repeat_end_options = OC_Calendar_App::getEndOptions();
$repeat_month_options = OC_Calendar_App::getMonthOptions();
@@ -205,7 +199,6 @@ $tmpl = new OC_Template('calendar', 'part.editevent');
$tmpl->assign('id', $id);
$tmpl->assign('lastmodified', $lastmodified);
$tmpl->assign('calendar_options', $calendar_options);
-$tmpl->assign('category_options', $category_options);
$tmpl->assign('repeat_options', $repeat_options);
$tmpl->assign('repeat_month_options', $repeat_month_options);
$tmpl->assign('repeat_weekly_options', $repeat_weekly_options);
@@ -242,7 +235,14 @@ if($repeat['repeat'] != 'doesnotrepeat'){
$tmpl->assign('repeat_bymonthday', $repeat['bymonthday']);
$tmpl->assign('repeat_bymonth', $repeat['bymonth']);
$tmpl->assign('repeat_byweekno', $repeat['byweekno']);
+} else {
+ $tmpl->assign('repeat_month', 'monthday');
+ $tmpl->assign('repeat_weekdays', array());
+ $tmpl->assign('repeat_interval', 1);
+ $tmpl->assign('repeat_end', 'never');
+ $tmpl->assign('repeat_count', '10');
+ $tmpl->assign('repeat_weekofmonth', 'auto');
+ $tmpl->assign('repeat_date', '');
+ $tmpl->assign('repeat_year', 'bydate');
}
$tmpl->printpage();
-
-?>
\ No newline at end of file
diff --git a/apps/calendar/ajax/event/new.form.php b/apps/calendar/ajax/event/new.form.php
index c19928a727e..838002a3a09 100644
--- a/apps/calendar/ajax/event/new.form.php
+++ b/apps/calendar/ajax/event/new.form.php
@@ -32,7 +32,6 @@ $start->setTimezone(new DateTimeZone($timezone));
$end->setTimezone(new DateTimeZone($timezone));
$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
-$category_options = OC_Calendar_App::getCategoryOptions();
$repeat_options = OC_Calendar_App::getRepeatOptions();
$repeat_end_options = OC_Calendar_App::getEndOptions();
$repeat_month_options = OC_Calendar_App::getMonthOptions();
@@ -46,7 +45,6 @@ $repeat_bymonthday_options = OC_Calendar_App::getByMonthDayOptions();
$tmpl = new OC_Template('calendar', 'part.newevent');
$tmpl->assign('calendar_options', $calendar_options);
-$tmpl->assign('category_options', $category_options);
$tmpl->assign('repeat_options', $repeat_options);
$tmpl->assign('repeat_month_options', $repeat_month_options);
$tmpl->assign('repeat_weekly_options', $repeat_weekly_options);
@@ -73,4 +71,3 @@ $tmpl->assign('repeat_weekofmonth', 'auto');
$tmpl->assign('repeat_date', '');
$tmpl->assign('repeat_year', 'bydate');
$tmpl->printpage();
-?>
diff --git a/apps/calendar/index.php b/apps/calendar/index.php
index 67e61dee40a..f964a13ef79 100644
--- a/apps/calendar/index.php
+++ b/apps/calendar/index.php
@@ -48,7 +48,6 @@ OC_Util::addScript('', 'jquery.multiselect');
OC_Util::addStyle('', 'jquery.multiselect');
OC_Util::addScript('contacts','jquery.multi-autocomplete');
OC_Util::addScript('','oc-vcategories');
-OC_Util::addStyle('','oc-vcategories');
OC_App::setActiveNavigationEntry('calendar_index');
$tmpl = new OC_Template('calendar', 'calendar', 'user');
$tmpl->assign('eventSources', $eventSources);
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php
index b58b70d2df8..22c1133e006 100644
--- a/apps/calendar/lib/app.php
+++ b/apps/calendar/lib/app.php
@@ -89,6 +89,41 @@ class OC_Calendar_App{
return $categories;
}
+ /**
+ * scan events for categories.
+ * @param $events VEVENTs to scan. null to check all events for the current user.
+ */
+ public static function scanCategories($events = null) {
+ if (is_null($events)) {
+ $calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
+ if(count($calendars) > 0) {
+ $events = array();
+ foreach($calendars as $calendar) {
+ $calendar_events = OC_Calendar_Object::all($calendar['id']);
+ $events = $events + $calendar_events;
+ }
+ }
+ }
+ if(is_array($events) && count($events) > 0) {
+ $vcategories = self::getVCategories();
+ $vcategories->delete($vcategories->categories());
+ foreach($events as $event) {
+ $vobject = OC_VObject::parse($event['calendardata']);
+ if(!is_null($vobject)) {
+ $vcategories->loadFromVObject($vobject->VEVENT, true);
+ }
+ }
+ }
+ }
+
+ /**
+ * check VEvent for new categories.
+ * @see OC_VCategories::loadFromVObject
+ */
+ public static function loadCategoriesFromVCalendar(OC_VObject $calendar) {
+ self::getVCategories()->loadFromVObject($calendar->VEVENT, true);
+ }
+
public static function getRepeatOptions(){
return OC_Calendar_Object::getRepeatOptions(self::$l10n);
}
diff --git a/apps/calendar/lib/calendar.php b/apps/calendar/lib/calendar.php
index 7eeb004d181..321f4c73ba0 100644
--- a/apps/calendar/lib/calendar.php
+++ b/apps/calendar/lib/calendar.php
@@ -44,10 +44,8 @@ class OC_Calendar_Calendar{
/**
* @brief Returns the list of calendars for a specific user.
* @param string $uid User ID
- * @param boolean $active
+ * @param boolean $active Only return calendars with this $active state, default(=null) is don't care
* @return array
- *
- * TODO: what is active for?
*/
public static function allCalendars($uid, $active=null){
$values = array($uid);
diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php
index 4d4421b5c4a..d5622f6251f 100644
--- a/apps/calendar/lib/object.php
+++ b/apps/calendar/lib/object.php
@@ -93,6 +93,7 @@ class OC_Calendar_Object{
*/
public static function add($id,$data){
$object = OC_VObject::parse($data);
+ OC_Calendar_App::loadCategoriesFromVCalendar($object);
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
if(is_null($uid)){
@@ -139,6 +140,7 @@ class OC_Calendar_Object{
$oldobject = self::find($id);
$object = OC_VObject::parse($data);
+ OC_Calendar_App::loadCategoriesFromVCalendar($object);
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
$stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_objects SET objecttype=?,startdate=?,enddate=?,repeating=?,summary=?,calendardata=?, lastmodified = ? WHERE id = ?' );
@@ -436,10 +438,6 @@ class OC_Calendar_Object{
$errnum++;
}
- if(isset($request['categories']) && !is_array($request['categories'])){
- $errors['categories'] = $l10n->t('Not an array');
- }
-
$fromday = substr($request['from'], 0, 2);
$frommonth = substr($request['from'], 3, 2);
$fromyear = substr($request['from'], 6, 4);
@@ -607,7 +605,7 @@ class OC_Calendar_Object{
{
$title = $request["title"];
$location = $request["location"];
- $categories = isset($request["categories"]) ? $request["categories"] : array();
+ $categories = $request["categories"];
$allday = isset($request["allday"]);
$from = $request["from"];
$to = $request["to"];
@@ -781,7 +779,7 @@ class OC_Calendar_Object{
$vevent->setString('LOCATION', $location);
$vevent->setString('DESCRIPTION', $description);
- $vevent->setString('CATEGORIES', join(',', $categories));
+ $vevent->setString('CATEGORIES', $categories);
/*if($repeat == "true"){
$vevent->RRULE = $repeat;
diff --git a/apps/calendar/templates/part.eventform.php b/apps/calendar/templates/part.eventform.php
index 130ce111b03..3830c273a73 100644
--- a/apps/calendar/templates/part.eventform.php
+++ b/apps/calendar/templates/part.eventform.php
@@ -10,7 +10,7 @@
t("Category");?>: |
-
+
|
1) { ?>
diff --git a/apps/contacts/index.php b/apps/contacts/index.php
index c3650a36086..4039b8afd3d 100644
--- a/apps/contacts/index.php
+++ b/apps/contacts/index.php
@@ -52,7 +52,6 @@ OC_Util::addScript('contacts','jquery.inview');
OC_Util::addScript('contacts','jquery.Jcrop');
OC_Util::addScript('contacts','jquery.multi-autocomplete');
OC_Util::addStyle('','jquery.multiselect');
-OC_Util::addStyle('','oc-vcategories');
OC_Util::addStyle('contacts','jquery.combobox');
OC_Util::addStyle('contacts','jquery.Jcrop');
OC_Util::addStyle('contacts','contacts');
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index f6f6e619075..78fdfe6a10a 100644
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -53,11 +53,12 @@ class OC_Contacts_App {
if( $addressbook === false || $addressbook['userid'] != OC_User::getUser()) {
if ($addressbook === false) {
OC_Log::write('contacts', 'Addressbook not found: '. $id, OC_Log::ERROR);
+ OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('Addressbook not found.'))));
}
else {
OC_Log::write('contacts', 'Addressbook('.$id.') is not from '.OC_User::getUser(), OC_Log::ERROR);
+ OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('This is not your addressbook.'))));
}
- OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('This is not your addressbook.')))); // Same here (as with the contact error). Could this error be improved?
exit();
}
return $addressbook;
@@ -194,7 +195,7 @@ class OC_Contacts_App {
* @see OC_VCategories::loadFromVObject
*/
public static function loadCategoriesFromVCard(OC_VObject $contact) {
- self::$categories->loadFromVObject($contact);
+ self::$categories->loadFromVObject($contact, true);
}
public static function setLastModifiedHeader($contact) {
diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php
index 9b40d2b98cf..fa4c74a6e26 100644
--- a/apps/files_external/tests/config.php
+++ b/apps/files_external/tests/config.php
@@ -1,18 +1,21 @@
array(
+ 'run'=>false,
'host'=>'localhost',
'user'=>'test',
'password'=>'test',
'root'=>'/test',
),
'webdav'=>array(
+ 'run'=>false,
'host'=>'localhost',
'user'=>'test',
'password'=>'test',
'root'=>'/owncloud/files/webdav.php',
),
'google'=>array(
+ 'run'=>false,
'consumer_key'=>'anonymous',
'consumer_secret'=>'anonymous',
'token'=>'test',
diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php
index aa565751ba3..e30fb9a1c38 100644
--- a/apps/files_external/tests/ftp.php
+++ b/apps/files_external/tests/ftp.php
@@ -5,19 +5,26 @@
* later.
* See the COPYING-README file.
*/
+
+$config=include('apps/files_external/tests/config.php');
+if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']){
+ abstract class Test_Filestorage_FTP extends Test_FileStorage{}
+ return;
+}else{
+ class Test_Filestorage_FTP extends Test_FileStorage {
+ private $config;
+ private $id;
-class Test_Filestorage_FTP extends Test_FileStorage {
- private $config;
- private $id;
+ public function setUp(){
+ $id=uniqid();
+ $this->config=include('apps/files_external/tests/config.php');
+ $this->config['ftp']['root'].='/'.$id;//make sure we have an new empty folder to work in
+ $this->instance=new OC_Filestorage_FTP($this->config['ftp']);
+ }
- public function setUp(){
- $id=uniqid();
- $this->config=include('apps/files_external/tests/config.php');
- $this->config['ftp']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_FTP($this->config['ftp']);
- }
-
- public function tearDown(){
- OC_Helper::rmdirr($this->instance->constructUrl(''));
+ public function tearDown(){
+ OC_Helper::rmdirr($this->instance->constructUrl(''));
+ }
}
}
+
diff --git a/apps/files_external/tests/google.php b/apps/files_external/tests/google.php
index 1c028945228..08116f0e748 100644
--- a/apps/files_external/tests/google.php
+++ b/apps/files_external/tests/google.php
@@ -20,19 +20,26 @@
* License along with this library. If not, see .
*/
-class Test_Filestorage_Google extends Test_FileStorage {
-
- private $config;
- private $id;
+$config=include('apps/files_external/tests/config.php');
+if(!is_array($config) or !isset($config['google']) or !$config['google']['run']){
+ abstract class Test_Filestorage_Google extends Test_FileStorage{}
+ return;
+}else{
+ class Test_Filestorage_Google extends Test_FileStorage {
+
+ private $config;
+ private $id;
- public function setUp(){
- $id=uniqid();
- $this->config=include('apps/files_external/tests/config.php');
- $this->config['google']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_Google($this->config['google']);
- }
+ public function setUp(){
+ $id=uniqid();
+ $this->config=include('apps/files_external/tests/config.php');
+ $this->config['google']['root'].='/'.$id;//make sure we have an new empty folder to work in
+ $this->instance=new OC_Filestorage_Google($this->config['google']);
+ }
- public function tearDown(){
- $this->instance->rmdir('/');
+ public function tearDown(){
+ $this->instance->rmdir('/');
+ }
}
}
+
diff --git a/apps/files_external/tests/webdav.php b/apps/files_external/tests/webdav.php
index 51799290540..144659819b6 100644
--- a/apps/files_external/tests/webdav.php
+++ b/apps/files_external/tests/webdav.php
@@ -6,18 +6,25 @@
* See the COPYING-README file.
*/
-class Test_Filestorage_DAV extends Test_FileStorage {
- private $config;
- private $id;
+$config=include('apps/files_external/tests/config.php');
+if(!is_array($config) or !isset($config['webdav']) or !$config['webdav']['run']){
+ abstract class Test_Filestorage_DAV extends Test_FileStorage{}
+ return;
+}else{
+ class Test_Filestorage_DAV extends Test_FileStorage {
+ private $config;
+ private $id;
- public function setUp(){
- $id=uniqid();
- $this->config=include('apps/files_external/tests/config.php');
- $this->config['webdav']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_DAV($this->config['webdav']);
- }
+ public function setUp(){
+ $id=uniqid();
+ $this->config=include('apps/files_external/tests/config.php');
+ $this->config['webdav']['root'].='/'.$id;//make sure we have an new empty folder to work in
+ $this->instance=new OC_Filestorage_DAV($this->config['webdav']);
+ }
- public function tearDown(){
- $this->instance->rmdir('/');
+ public function tearDown(){
+ $this->instance->rmdir('/');
+ }
}
}
+
diff --git a/apps/media/appinfo/database.xml b/apps/media/appinfo/database.xml
index 223682fcfcd..702ae9c28b4 100644
--- a/apps/media/appinfo/database.xml
+++ b/apps/media/appinfo/database.xml
@@ -45,6 +45,30 @@
true
200
+
+
+ album_index
+
+ album_id
+ ascending
+
+
+
+
+ album_name_index
+
+ album_name
+ ascending
+
+
+
+
+ album_artist_index
+
+ album_artist
+ ascending
+
+
@@ -81,6 +105,21 @@
ascending
+
+
+ artist_index
+
+ artist_id
+ ascending
+
+
+
+ artist_name_index
+
+ artist_name
+ ascending
+
+
@@ -223,6 +262,36 @@
true
4
+
+
+ song_index
+
+ song_id
+ ascending
+
+
+
+ song_album_index
+
+ song_album
+ ascending
+
+
+
+ song_artist_index
+
+ song_artist
+ ascending
+
+
+
+ song_name_index
+
+ song_name
+ ascending
+
+
+
diff --git a/apps/media/appinfo/info.xml b/apps/media/appinfo/info.xml
index 795c9a4dd71..4a642bf889d 100644
--- a/apps/media/appinfo/info.xml
+++ b/apps/media/appinfo/info.xml
@@ -3,7 +3,7 @@
media
Media
Media player and server for ownCloud
- 0.2
+ 0.3
AGPL
Robin Appelman
2
diff --git a/core/css/oc-vcategories.css b/core/css/oc-vcategories.css
deleted file mode 100644
index 68ff832bb06..00000000000
--- a/core/css/oc-vcategories.css
+++ /dev/null
@@ -1,7 +0,0 @@
-#categoryform .scrollarea { position: absolute; left: 10px; top: 10px; right: 10px; bottom: 50px; overflow: auto; border:1px solid #ddd; background: #f8f8f8; }
-#categoryform .bottombuttons { position: absolute; bottom: 10px;}
-#categoryform .bottombuttons * { float: left;}
-/*#categorylist { border:1px solid #ddd;}*/
-#categorylist li { background:#f8f8f8; padding:.3em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; }
-#categorylist li:hover, li:active { background:#eee; }
-#category_addinput { width: 10em; }
diff --git a/core/css/styles.css b/core/css/styles.css
index 9d9f6d98303..a8efcfc5a23 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -106,7 +106,7 @@ label.infield { cursor: text !important; }
#notification { z-index:101; cursor:pointer; background-color:#fc4; border:0; padding:0 .7em .3em; display:none; position:fixed; left:50%; top:0; -moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; -moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
-.action, .selectedActions a, #logout { opacity:.3; -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; }
+.action, .selectedActions a, #logout { opacity:.5; -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; }
.action { width: 16px; height: 16px; }
.action:hover, .selectedActions a:hover, #logout:hover { opacity:1; }
@@ -132,9 +132,19 @@ li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; background:#ff
a.bookmarklet { background-color: #ddd; border:1px solid #ccc; padding: 5px;padding-top: 0px;padding-bottom: 2px; text-decoration: none; margin-top: 5px }
-/* ---- DIALOGS ---- */
+/* ---- DIALOGS ---- */
#dirtree {width: 100%;}
#filelist {height: 270px; overflow:scroll; background-color: white;}
.filepicker_element_selected { background-color: lightblue;}
.filepicker_loader {height: 120px; width: 100%; background-color: #333; opacity: 0.3; visibility: visible; position:absolute; top:0; left:0; text-align:center; padding-top: 150px;}
+
+
+/* ---- CATEGORIES ---- */
+#categoryform .scrollarea { position: absolute; left: 10px; top: 10px; right: 10px; bottom: 50px; overflow: auto; border:1px solid #ddd; background: #f8f8f8; }
+#categoryform .bottombuttons { position: absolute; bottom: 10px;}
+#categoryform .bottombuttons * { float: left;}
+/*#categorylist { border:1px solid #ddd;}*/
+#categorylist li { background:#f8f8f8; padding:.3em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; }
+#categorylist li:hover, li:active { background:#eee; }
+#category_addinput { width: 10em; }
diff --git a/core/js/js.js b/core/js/js.js
index 44b4f503b8c..7e8ca6164c6 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -413,9 +413,10 @@ $(document).ready(function(){
$('.jp-controls .jp-previous').tipsy({gravity:'nw', fade:true, live:true});
$('.jp-controls .jp-next').tipsy({gravity:'n', fade:true, live:true});
$('.password .action').tipsy({gravity:'se', fade:true, live:true});
- $('.file_upload_button_wrapper').tipsy({gravity:'w', fade:true});
- $('.selectedActions a.delete').tipsy({gravity: 'se', fade:true, live:true});
+ $('.file_upload_button_wrapper').tipsy({gravity:'w', fade:true});
$('.selectedActions a').tipsy({gravity:'s', fade:true, live:true});
+ $('a.delete').tipsy({gravity: 'se', fade:true, live:true});
+ $('a.action').tipsy({gravity:'s', fade:true, live:true});
$('#headerSize').tipsy({gravity:'s', fade:true, live:true});
$('td.filesize').tipsy({gravity:'s', fade:true, live:true});
$('td .modified').tipsy({gravity:'s', fade:true, live:true});
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){
diff --git a/files/js/fileactions.js b/files/js/fileactions.js
index b33be280ad5..60c4fadedd0 100644
--- a/files/js/fileactions.js
+++ b/files/js/fileactions.js
@@ -66,7 +66,7 @@ FileActions={
if(img.call){
img=img(file);
}
- var html='';
+ var html='';
var element=$(html);
if(img){
element.append($('
'));
@@ -89,7 +89,7 @@ FileActions={
if(img.call){
img=img(file);
}
- var html='';
+ var html='';
var element=$(html);
if(img){
element.append($('
'));