From b2fa12eb3e1e3a9df30c3e92700bc325a18e9bf8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 8 Oct 2011 11:34:55 +0000 Subject: [PATCH] remove unusual and unnecessary "EGw-...-wGE" prefix/postfix from etag and ctag --- addressbook/inc/class.addressbook_groupdav.inc.php | 4 +--- calendar/inc/class.calendar_groupdav.inc.php | 4 ++-- infolog/inc/class.infolog_groupdav.inc.php | 2 +- phpgwapi/inc/class.groupdav.inc.php | 4 +--- phpgwapi/inc/class.groupdav_handler.inc.php | 2 +- phpgwapi/inc/class.groupdav_principals.inc.php | 6 +++--- 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/addressbook/inc/class.addressbook_groupdav.inc.php b/addressbook/inc/class.addressbook_groupdav.inc.php index 706ddd3820..ab82b3e01b 100644 --- a/addressbook/inc/class.addressbook_groupdav.inc.php +++ b/addressbook/inc/class.addressbook_groupdav.inc.php @@ -521,9 +521,7 @@ class addressbook_groupdav extends groupdav_handler // not showing addressbook of a single user? if (!$user || $path == '/addressbook/') $user = null; - $ctag = $this->bo->get_ctag($user); - - return 'EGw-'.$ctag.'-wGE'; + return $this->bo->get_ctag($user); } /** diff --git a/calendar/inc/class.calendar_groupdav.inc.php b/calendar/inc/class.calendar_groupdav.inc.php index a34ffb5fe0..ee1cf0aaf6 100644 --- a/calendar/inc/class.calendar_groupdav.inc.php +++ b/calendar/inc/class.calendar_groupdav.inc.php @@ -982,7 +982,7 @@ class calendar_groupdav extends groupdav_handler if ($this->debug > 1) error_log(__FILE__.'['.__LINE__.'] '.__METHOD__. "($path)[$user] = $ctag"); - return 'EGw-'.$ctag.'-wGE'; + return $ctag; } /** @@ -996,7 +996,7 @@ class calendar_groupdav extends groupdav_handler $etag = $this->bo->get_etag($entry,$this->client_shared_uid_exceptions); //error_log(__METHOD__ . "($entry[id] ($entry[etag]): $entry[title] --> etag=$etag"); - return 'EGw-'.$etag.'-wGE'; + return $etag; } /** diff --git a/infolog/inc/class.infolog_groupdav.inc.php b/infolog/inc/class.infolog_groupdav.inc.php index b00093c9e5..0b543b8a63 100644 --- a/infolog/inc/class.infolog_groupdav.inc.php +++ b/infolog/inc/class.infolog_groupdav.inc.php @@ -575,7 +575,7 @@ class infolog_groupdav extends groupdav_handler { return false; } - return 'EGw-'.$info['info_id'].':'.$info['info_datemodified'].'-wGE'; + return $info['info_id'].':'.$info['info_datemodified']; } /** diff --git a/phpgwapi/inc/class.groupdav.inc.php b/phpgwapi/inc/class.groupdav.inc.php index 0221ff37d3..06f4e1542e 100644 --- a/phpgwapi/inc/class.groupdav.inc.php +++ b/phpgwapi/inc/class.groupdav.inc.php @@ -419,7 +419,7 @@ class groupdav extends HTTP_WebDAV_Server // required props per WebDAV standard foreach(array( 'displayname' => basename($path), - 'getetag' => 'EGw-no-etag-wGE', + 'getetag' => 'none', 'getcontentlength' => '', 'getlastmodified' => '', 'getcontenttype' => '', @@ -716,8 +716,6 @@ class groupdav extends HTTP_WebDAV_Server groupdav::CALENDARSERVER,'getctag',$handler->getctag($path,$user)); } } - $props['getetag'] = 'EGw-'.$app.'-wGE'; - if ($handler) $privileges = $handler->current_user_privileges($path.$app.'/', $user) ; return $this->add_collection($path.$app.'/', $props, $privileges); diff --git a/phpgwapi/inc/class.groupdav_handler.inc.php b/phpgwapi/inc/class.groupdav_handler.inc.php index 2db624861b..115f6a9af6 100644 --- a/phpgwapi/inc/class.groupdav_handler.inc.php +++ b/phpgwapi/inc/class.groupdav_handler.inc.php @@ -217,7 +217,7 @@ abstract class groupdav_handler // error_log(__METHOD__."(".array2string($entry).") Cant create etag!"); return false; } - return 'EGw-'.$entry['id'].':'.(isset($entry['etag']) ? $entry['etag'] : $entry['modified']).'-wGE'; + return $entry['id'].':'.(isset($entry['etag']) ? $entry['etag'] : $entry['modified']); } /** diff --git a/phpgwapi/inc/class.groupdav_principals.inc.php b/phpgwapi/inc/class.groupdav_principals.inc.php index 4c2483c048..dfad8e9ef5 100644 --- a/phpgwapi/inc/class.groupdav_principals.inc.php +++ b/phpgwapi/inc/class.groupdav_principals.inc.php @@ -893,7 +893,7 @@ class groupdav_principals extends groupdav_handler return $this->add_principal($principal.'/'.$type, array( 'displayname' => $app.' '.$what.' proxy of '.basename($principal), 'group-member-set' => $this->principal_set('group-member-set', $proxys), - 'getetag' => 'EGw-'.md5(serialize($proxys)).'-wGE', + 'getetag' => md5(serialize($proxys)), 'resourcetype' => array(HTTP_WebDAV_Server::mkprop(groupdav::CALENDARSERVER, $type, '')), )); } @@ -1040,12 +1040,12 @@ class groupdav_principals extends groupdav_handler { $account = $this->read($account); } - return 'EGw-'.$account['account_id'].':'.md5(serialize($account)). + return $account['account_id'].':'.md5(serialize($account)). // add md5 from calendar grants, as they are listed as memberships ':'.md5(serialize($this->acl->get_grants('calendar', true, $account['account_id']))). // as the principal of current user is influenced by GroupDAV prefs, we have to include them in the etag ($account['account_id'] == $GLOBALS['egw_info']['user']['account_id'] ? - ':'.md5(serialize($GLOBALS['egw_info']['user']['preferences']['groupdav'])) : '').'-wGE'; + ':'.md5(serialize($GLOBALS['egw_info']['user']['preferences']['groupdav'])) : ''); } /**