Projects
Kolab:16:Testing
kolab-syncroton
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 11
View file
kolab-syncroton-2.4.0.tar.gz/lib/ext/Syncroton/Command/Settings.php
Changed
@@ -113,6 +113,7 @@ $OofGet = null; try { $OofGet = $this->_deviceBackend->getOOF($this->_OofGet); + $OofStatus = self::STATUS_SUCCESS; } catch (Exception $e) { if ($e instanceof Syncroton_Exception_Status) { $OofStatus = $e->getCode();
View file
kolab-syncroton-2.4.0.tar.gz/lib/ext/Syncroton/Command/Sync.php
Changed
@@ -1022,7 +1022,10 @@ // Store a client id mapping in case we encounter a reused sync_key in a future request. $newClientIdMap = ; foreach($clientModifications'added' as $entryData) { - $newClientIdMap$entryData'clientId' = $entryData'serverId'; + // No serverId if we failed to add + if ($entryData'status' == self::STATUS_SUCCESS) { + $newClientIdMap$entryData'clientId' = $entryData'serverId'; + } } $collectionData->syncState->clientIdMap = Zend_Json::encode($newClientIdMap); }
View file
kolab-syncroton-2.4.0.tar.gz/lib/kolab_sync.php
Changed
@@ -46,6 +46,7 @@ public $password; public $task = null; + protected $per_user_log_dir; const CHARSET = 'UTF-8'; const VERSION = "2.4.0"; @@ -224,6 +225,8 @@ $auth'pass' = $password; } + $err = null; + // Authenticate - get Roundcube user ID if (!($auth'abort' ?? false) && ($userid = $this->login($auth'user', $auth'pass', $auth'host', $err))) { // set real username @@ -235,7 +238,7 @@ } if (class_exists('kolab_auth', false)) { - kolab_auth::log_login_error($auth'user', $err_str ?: $err); + kolab_auth::log_login_error($auth'user', !empty($err_str) ? $err_str : $err); } $this->plugins->exec_hook('login_failed', array(
View file
kolab-syncroton-2.4.0.tar.gz/lib/kolab_sync_backend.php
Changed
@@ -216,7 +216,7 @@ array_pop($items); $parent_name = implode($delim, $items); - $parent_type = $typedata$parent_name ?: 'mail'; + $parent_type = !empty($typedata$parent_name) ? $typedata$parent_name : 'mail'; $parent_id = self::folder_id($parent_name, $parent_type); if (isset($folders$parent_id)) {
View file
kolab-syncroton-2.4.0.tar.gz/lib/kolab_sync_backend_device.php
Changed
@@ -207,7 +207,11 @@ $status = Syncroton_Model_Oof::STATUS_GLOBAL; } + $message = null; + if ($vacation'message') { + $message = array(); + // convert message format, Roundcube supports plain text only if ($request'bodyType' == 'HTML') { $text2html = new rcube_text2html($vacation'message');
View file
kolab-syncroton-2.4.0.tar.gz/lib/kolab_sync_data.php
Changed
@@ -311,6 +311,7 @@ $parentid = $folder->parentId; $type = $folder->type; $display_name = $folder->displayName; + $parent = null; if ($parentid) { $parent = $this->backend->folder_id2name($parentid, $this->device->deviceid); @@ -1331,7 +1332,8 @@ // custom properties if ($count == 2 && $name_items0 == 'x-custom') { - foreach ((array) $data'x-custom' as $idx => $val) { + $data'x-custom' = isset($data'x-custom') ? ((array) $data'x-custom') : array(); + foreach ($data'x-custom' as $idx => $val) { if (is_array($val) && $val0 == $name_items1) { $data'x-custom'$idx1 = $value; return; @@ -1523,7 +1525,7 @@ $real_length = $body_length = strlen($body); // truncate the body if needed - if (isset($prefs$type) && ($truncateAt = $prefs$type'truncationSize') && $body_length > $truncateAt) { + if (isset($prefs$type'truncationSize') && ($truncateAt = $prefs$type'truncationSize') && $body_length > $truncateAt) { $body = mb_strcut($body, 0, $truncateAt); $body_length = strlen($body);
View file
kolab-syncroton-2.4.0.tar.gz/lib/kolab_sync_data_calendar.php
Changed
@@ -290,10 +290,12 @@ } } + $resp_type = self::ATTENDEE_STATUS_UNKNOWN; + $user_rsvp = false; + // Attendees if (!empty($event'attendees')) { $user_emails = $this->user_emails(); - $user_rsvp = false; foreach ($event'attendees' as $idx => $attendee) { $att = array(); @@ -371,7 +373,7 @@ // Timezone if (!$timezone && isset($data->timezone) && $data->timezone != $dummy_tz) { $tzc = kolab_sync_timezone_converter::getInstance(); - $expected = $old_timezone ?: kolab_format::$timezone; + $expected = !empty($old_timezone) ? $old_timezone : kolab_format::$timezone; try { $timezone = $tzc->getTimezone($data->timezone, $expected->getName()); @@ -428,12 +430,12 @@ case 'sensitivity': $map = array_flip($this->sensitivityMap); - $value = $map$value; + $value = isset($map$value) ? $map$value : null; break; case 'free_busy': $map = array_flip($this->busyStatusMap); - $value = $map$value; + $value = isset($map$value) ? $map$value : null; break; case 'description': @@ -450,7 +452,7 @@ // Try to fix allday events from Android // It doesn't set all-day flag but the period is a whole day - if (!$event'allday' && $event'end' && $event'start') { + if (empty($event'allday') && !empty($event'end') && !empty($event'start')) { $interval = @date_diff($event'start', $event'end'); if ($interval && $interval->format('%y%m%d%h%i%s') === '001000') { $event'allday' = 1; @@ -820,7 +822,7 @@ } } - if (!$event_attendee) { + if (empty($event_attendee)) { // Add the user to the attendees list $event'attendees' = array( 'role' => 'OPT-PARTICIPANT', @@ -953,7 +955,7 @@ if (!empty($event'valarms')) { foreach ($event'valarms' as $alarm) { - if (!$current && in_array($alarm'action', array('DISPLAY', 'AUDIO'))) { + if (empty($current) && in_array($alarm'action', array('DISPLAY', 'AUDIO'))) { $current = $alarm; } else { @@ -1024,7 +1026,7 @@ { // Calendar namespace fields foreach (array('allday', 'start', 'end', 'location', 'recurrence') as $key) { - if ($event$key != $old$key) { + if ((isset($event$key) ? $event$key : null) != (isset($old$key) ? $old$key : null)) { // Comparing recurrence is tricky as there can be differences in default // value handling. Let's try to handle most common cases if ($key == 'recurrence' && $this->fixed_recurrence($event) == $this->fixed_recurrence($old)) {
View file
kolab-syncroton-2.4.0.tar.gz/lib/kolab_sync_data_contacts.php
Changed
@@ -192,7 +192,8 @@ // email address(es): email1Address, email2Address, email3Address for ($x=0; $x<3; $x++) { - if ($email = $data'email'$x) { + if (!empty($data'email'$x)) { + $email = $data'email'$x; if (is_array($email)) { $email = $email'address'; }
View file
kolab-syncroton-2.4.0.tar.gz/lib/kolab_sync_data_email.php
Changed
@@ -269,7 +269,7 @@ $truncateAt = $prefs$type'truncationSize'; } - $preview = (int) $prefs$type'preview'; + $preview = (int) (isset($prefs$type'preview') ? $prefs$type'preview' : 0); $airSyncBaseType = $type; break; @@ -571,7 +571,7 @@ } // Use COPYUID feature (RFC2359) to get the new UID of the copied message - $copyuid = $this->storage->conn->data'COPYUID'; + $copyuid = isset($this->storage->conn->data'COPYUID') ? $this->storage->conn->data'COPYUID' : null; if (is_array($copyuid) && ($uid = $copyuid1)) { return $this->createMessageId($dest_id, $uid); @@ -880,13 +880,14 @@ // If previous HIGHESTMODSEQ doesn't exist we can't get changes // We can only get folder's HIGHESTMODSEQ value and store it for the next try // Skip search if HIGHESTMODSEQ didn't change - if ($folder_data'HIGHESTMODSEQ') { + if (!empty($folder_data'HIGHESTMODSEQ')) { $modseq_data$foldername = $folder_data'HIGHESTMODSEQ'; - if ($modseq_data$foldername != $modseq$foldername) { + $modseq_old = isset($modseq$foldername) ? $modseq$foldername : null; + if ($modseq_data$foldername != $modseq_old) { $modseq_update = true; - if ($modseq && $modseq$foldername) { + if ($modseq && $modseq_old) { $modified = true; - $filter_str .= " MODSEQ " . ($modseq$foldername + 1); + $filter_str .= " MODSEQ " . ($modseq_old + 1); } } } @@ -1038,7 +1039,7 @@ } } - $search_str .= ' ' . str_repeat(' OR', $search_count-1) . $search; + $search_str = str_repeat(' OR', $search_count-1) . $search; // search messages in current folder $search = $storage->search_once($foldername, $search_str); @@ -1316,6 +1317,11 @@ */ protected function getMessagePartBody($message, $part, $html = false) { + if (empty($part->size) || !isset($part->mime_id)) { + // TODO: Throw an exception? + return ''; + } + // Check if we have enough memory to handle the message in it $body = $this->message_mem_check($message, $part->size, false); @@ -1328,8 +1334,10 @@ return ''; } + $ctype_secondary = !empty($part->ctype_secondary) ? $part->ctype_secondary : null; + if ($html) { - if ($part->ctype_secondary == 'html') { + if ($ctype_secondary == 'html') { // charset was converted to UTF-8 in rcube_storage::get_message_part(), // change/add charset specification in HTML accordingly $meta = '<meta http-equiv="Content-Type" content="text/html; charset='.RCUBE_CHARSET.'" />'; @@ -1342,14 +1350,14 @@ $body = '<head>' . $meta . '</head>' . $body; } } - else if ($part->ctype_secondary == 'enriched') { + else if ($ctype_secondary == 'enriched') { $body = rcube_enriched::to_html($body); } else { // Roundcube >= 1.2 if (class_exists('rcube_text2html')) { - $flowed = $part->ctype_parameters'format' == 'flowed'; - $delsp = $part->ctype_parameters'delsp' == 'yes'; + $flowed = isset($part->ctype_parameters'format') && $part->ctype_parameters'format' == 'flowed'; + $delsp = isset($part->ctype_parameters'delsp') && $part->ctype_parameters'delsp' == 'yes'; $options = array('flowed' => $flowed, 'wrap' => false, 'delsp' => $delsp); $text2html = new rcube_text2html($body, false, $options); $body = '<html><body>' . $text2html->get_html() . '</body></html>'; @@ -1360,17 +1368,20 @@ } } else { - if ($part->ctype_secondary == 'enriched') { + if ($ctype_secondary == 'enriched') { $body = rcube_enriched::to_html($body); $part->ctype_secondary = 'html'; } - if ($part->ctype_secondary == 'html') { + if ($ctype_secondary == 'html') { $txt = new rcube_html2text($body, false, true); $body = $txt->get_text(); } else { - if ($part->ctype_secondary == 'plain' && $part->ctype_parameters'format' == 'flowed') { + if ($ctype_secondary == 'plain' + && !empty($part->ctype_parameters'format') + && $part->ctype_parameters'format' == 'flowed' + ) { $body = rcube_mime::unfold_flowed($body); } } @@ -1457,7 +1468,7 @@ if ($force) { $config->resolve_members($relation, $force); - $this->tag_rts$tag'uid' = time(); + $this->tag_rts$relation'uid' = time(); } $selected = !empty($tags) && in_array($relation'name', $tags);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.