1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/z-push_ynh.git synced 2024-09-03 18:05:58 +02:00

Update to latest sources

This commit is contained in:
polytan02 2015-09-03 19:31:14 +01:00
parent 2e31abbdba
commit 86a9c1bb49
12 changed files with 36 additions and 24 deletions

View file

@ -304,7 +304,7 @@ function parse_meeting_calendar($part, &$output, $is_sent_folder) {
else {
$tz = TimezoneUtil::GetFullTZ();
}
$output->meetingrequest->timezone = base64_encode(TimezoneUtil::getSyncBlobFromTZ($tz));
$output->meetingrequest->timezone = base64_encode(TimezoneUtil::GetSyncBlobFromTZ($tz));
// Fixed values
$output->meetingrequest->instancetype = 0;
@ -354,4 +354,4 @@ function reply_meeting_calendar($part, $response, $username) {
$ical->SetCPParameterValue("VEVENT", "ATTENDEE", "RSVP", null, sprintf("MAILTO:%s", $username));
return $ical->Render();
}
}

View file

@ -234,7 +234,7 @@ class ExportChangesICS implements IExportChanges{
$changes = mapi_exportchanges_getchangecount($this->exporter);
if($changes || !($this->flags & BACKEND_DISCARD_DATA))
ZLog::Write(LOGLEVEL_DEBUG, sprintf("ExportChangesICS->InitializeExporter() successfully. %d changes ready to sync.", $changes));
ZLog::Write(LOGLEVEL_DEBUG, sprintf("ExportChangesICS->InitializeExporter() successfully. %d changes ready to sync for '%s'.", $changes, ($this->folderid)?bin2hex($this->folderid) : 'hierarchy'));
return $ret;
}

View file

@ -453,7 +453,6 @@ class ImportChangesICS implements IImportChanges {
return true;
}
/**
* Imports a move of a message. This occurs when a user moves an item to another folder
*
@ -694,4 +693,4 @@ class ImportChangesICS implements IImportChanges {
return $ret;
}
}
}

View file

@ -2679,4 +2679,4 @@ class MAPIProvider {
}
return $this->inboxProps;
}
}
}

View file

@ -63,7 +63,6 @@ include_once('backend/zarafa/mapi/class.meetingrequest.php');
include_once('backend/zarafa/mapi/class.freebusypublish.php');
// processing of RFC822 messages
include_once('include/mimeDecode.php');
require_once('include/z_RFC822.php');
// components of Zarafa backend
@ -167,7 +166,7 @@ class BackendZarafa implements IBackend, ISearchProvider {
// send Z-Push version and user agent to ZCP - ZP-589
if (Utils::CheckMapiExtVersion('7.2.0')) {
$zpush_version = 'Z-Push_' . @constant('ZPUSH_VERSION');
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$user_agent = ZPush::GetDeviceManager()->GetUserAgent();
$this->session = @mapi_logon_zarafa($user, $pass, MAPI_SERVER, null, null, 0, $zpush_version, $user_agent);
}
else {

View file

@ -26,6 +26,8 @@
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of Leon van Kammen / Coder of Salvation
*
* https://github.com/coderofsalvation/syslog-flexible
*/
class ZSyslog {
@ -103,4 +105,4 @@ class ZSyslog {
case LOGLEVEL_WBXMLSTACK: return LOG_DEBUG; break;
}
}
}
}

View file

@ -247,15 +247,7 @@ if (defined('LOG_MEMORY_PROFILER') && LOG_MEMORY_PROFILER) {
ZPush::GetDeviceManager()->Save();
// end gracefully
if (version_compare(phpversion(), '5.4.0') < 0) {
$time_used = number_format(time() - $_SERVER["REQUEST_TIME"], 4);
}
else {
$time_used = number_format(microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"], 4);
}
ZLog::Write(LOGLEVEL_DEBUG, sprintf("-------- End - max mem: %s/%s - time: %s - code: %s", memory_get_peak_usage(false), memory_get_peak_usage(true), $time_used, http_response_code()));
ZLog::WriteEnd();
if (defined('LOG_MEMORY_PROFILER') && LOG_MEMORY_PROFILER) {
if (function_exists('memprof_enable')) {

View file

@ -316,8 +316,8 @@ class StateManager {
*/
public function SetBackendStorage($data, $type = self::BACKENDSTORAGE_PERMANENT) {
if ($type == self::BACKENDSTORAGE_STATE) {
if (!$this->uuid)
throw new StateNotYetAvailableException();
if (!$this->uuid)
throw new StateNotYetAvailableException();
// TODO serialization should be done in the StateMachine
return $this->statemachine->SetState($data, $this->device->GetDeviceId(), IStateMachine::BACKENDSTORAGE, $this->uuid, $this->newStateCounter);

View file

@ -44,7 +44,6 @@
class ImportChangesStream implements IImportChanges {
private $encoder;
private $objclass;
private $classAsString;
private $seenObjects;
private $importedMsgs;
private $checkForIgnoredMessages;

View file

@ -172,6 +172,27 @@ class ZLog {
return (isset(self::$lastLogs[$loglevel]))?self::$lastLogs[$loglevel]:false;
}
/**
* Writes info at the end of the request but only if the LOGLEVEL is DEBUG or more verbose
*
* @access public
* @return
*/
static public function WriteEnd() {
if (LOGLEVEL_DEBUG <= LOGLEVEL) {
if (version_compare(phpversion(), '5.4.0') < 0) {
$time_used = number_format(time() - $_SERVER["REQUEST_TIME"], 4);
}
else {
$time_used = number_format(microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"], 4);
}
ZLog::Write(LOGLEVEL_DEBUG, sprintf("Memory usage information: %s/%s - Execution time: %s - HTTP responde code: %s", memory_get_peak_usage(false), memory_get_peak_usage(true), $time_used, http_response_code()));
ZLog::Write(LOGLEVEL_DEBUG, "-------- End");
}
}
/**----------------------------------------------------------------------------------------------------------
* private log stuff
*/

View file

@ -529,7 +529,7 @@ class ZPush {
$loaded = false;
foreach (self::$autoloadBackendPreference as $autoloadBackend) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZPush::GetBackend(): trying autoload backend '%s'", $autoloadBackend));
$loaded = self::IncludeBackend($autoloadBackend);
$loaded = class_exists($autoloadBackend) || self::IncludeBackend($autoloadBackend);
if ($loaded) {
$ourBackend = $autoloadBackend;
break;
@ -538,7 +538,7 @@ class ZPush {
if (!$ourBackend || !$loaded)
throw new FatalMisconfigurationException("No Backend provider can not be loaded. Check your installation and configuration!");
}
else
elseif (!class_exists($ourBackend))
self::IncludeBackend($ourBackend);
if (class_exists($ourBackend))

View file

@ -110,7 +110,7 @@ class ExportChangesDiff extends DiffState implements IExportChanges{
$this->changes = $this->getDiffTo($folderlist);
}
ZLog::Write(LOGLEVEL_INFO, sprintf("ExportChangesDiff->InitializeExporter(): Found %d changes", count($this->changes)));
ZLog::Write(LOGLEVEL_INFO, sprintf("ExportChangesDiff->InitializeExporter(): Found '%d' changes for '%s'", count($this->changes), ($this->folderid)?$this->folderid : 'hierarchy' ));
}
/**