diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php
index 832194f0fe..b0cb20f2f1 100644
--- a/apps/calendar/templates/calendar.php
+++ b/apps/calendar/templates/calendar.php
@@ -34,29 +34,21 @@
});
diff --git a/apps/contacts/import.php b/apps/contacts/import.php
index 9d5504563f..c95fd970fe 100644
--- a/apps/contacts/import.php
+++ b/apps/contacts/import.php
@@ -15,7 +15,7 @@ session_write_close();
$nl = "\n";
global $progresskey;
-$progresskey = 'contacts.import-' . $_GET['progresskey'];
+$progresskey = 'contacts.import-' . (isset($_GET['progresskey'])?$_GET['progresskey']:'');
if (isset($_GET['progress']) && $_GET['progress']) {
echo OC_Cache::get($progresskey);
@@ -63,13 +63,13 @@ foreach($lines as $line){
if(strtoupper(trim($line)) == 'BEGIN:VCARD'){
$inelement = true;
} elseif (strtoupper(trim($line)) == 'END:VCARD') {
- $card[] = str_replace('=0D=0A', '\n', iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line));
+ $card[] = $line;
$parts[] = implode($nl, $card);
$card = array();
$inelement = false;
}
if ($inelement === true && trim($line) != '') {
- $card[] = str_replace('=0D=0A', '\n', iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line));
+ $card[] = $line;
}
}
//import the contacts
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index a241856300..6b83504c9c 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -839,22 +839,22 @@ Contacts={
$('#addressdisplay dl').last().data('checksum', this.data.ADR[adr]['checksum']);
var adrarray = this.data.ADR[adr]['value'];
var adrtxt = '';
- if(adrarray[0].length > 0) {
+ if(adrarray[0] && adrarray[0].length > 0) {
adrtxt = adrtxt + '
' + adrarray[0].strip_tags() + '';
}
- if(adrarray[1].length > 0) {
+ if(adrarray[1] && adrarray[1].length > 0) {
adrtxt = adrtxt + '' + adrarray[1].strip_tags() + '';
}
- if(adrarray[2].length > 0) {
+ if(adrarray[2] && adrarray[2].length > 0) {
adrtxt = adrtxt + '' + adrarray[2].strip_tags() + '';
}
- if(adrarray[3].length > 0 || adrarray[5].length > 0) {
+ if((adrarray[3] && adrarray[5]) && adrarray[3].length > 0 || adrarray[5].length > 0) {
adrtxt = adrtxt + '' + adrarray[5].strip_tags() + ' ' + adrarray[3].strip_tags() + '';
}
- if(adrarray[4].length > 0) {
+ if(adrarray[4] && adrarray[4].length > 0) {
adrtxt = adrtxt + '' + adrarray[4].strip_tags() + '';
}
- if(adrarray[6].length > 0) {
+ if(adrarray[6] && adrarray[6].length > 0) {
adrtxt = adrtxt + '' + adrarray[6].strip_tags() + '';
}
$('#addressdisplay dl').last().find('.addresslist').html(adrtxt);
diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php
index 20a9e4afc9..168e8af3e5 100644
--- a/apps/contacts/lib/vcard.php
+++ b/apps/contacts/lib/vcard.php
@@ -131,7 +131,7 @@ class OC_Contacts_VCard{
foreach($property->parameters as $key=>&$parameter){
if(strtoupper($parameter->name) == 'ENCODING') {
if(strtoupper($parameter->value) == 'QUOTED-PRINTABLE') { // what kind of other encodings could be used?
- $property->value = quoted_printable_decode($property->value);
+ $property->value = str_replace("\r\n", "\n", mb_convert_encoding(quoted_printable_decode($property->value), 'utf-8', 'auto'));
unset($property->parameters[$key]);
}
} elseif(strtoupper($parameter->name) == 'CHARSET') {
diff --git a/apps/gallery/lib/managers.php b/apps/gallery/lib/managers.php
index 9a2dbd3bae..d4d978dbdd 100644
--- a/apps/gallery/lib/managers.php
+++ b/apps/gallery/lib/managers.php
@@ -2,8 +2,6 @@
namespace OC\Pictures;
-require_once('lib/base.php');
-
class DatabaseManager {
private static $instance = null;
const TAG = 'DatabaseManager';
diff --git a/apps/tasks/js/tasks.js b/apps/tasks/js/tasks.js
index d1e3a9969b..6547b80981 100644
--- a/apps/tasks/js/tasks.js
+++ b/apps/tasks/js/tasks.js
@@ -310,8 +310,11 @@ OC.Tasks = {
};
$(document).ready(function(){
- fillHeight($('#tasks_lists'));
- fillWindow($('#tasks_list'));
+ $(window).resize(function () {
+ fillHeight($('#tasks_lists'));
+ fillWindow($('#tasks_list'));
+ });
+ $(window).trigger('resize');
/*-------------------------------------------------------------------------
* Actions for startup