From 6b8193ad9aad9fa3bad9229c276490cbb658abf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ja=CC=81n=20Ma=CC=81te=CC=81?= Date: Thu, 12 Jun 2014 12:34:05 +0200 Subject: [PATCH 01/21] added network timeout option for LDAP (thanks Sebastian Kotthoff) --- inc/drivers_ldap.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index 8e5cb452..529bad65 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -48,6 +48,8 @@ class ldapDrivers ldap_set_option($this->connect, LDAP_OPT_PROTOCOL_VERSION, $config['protocolVersion']); if (isset($config['optReferrals'])) ldap_set_option($this->connect, LDAP_OPT_REFERRALS, $config['optReferrals']); + if (isset($config['networkTimeout'])) + ldap_set_option($this->connect, LDAP_OPT_NETWORK_TIMEOUT, $config['networkTimeout']); if ($port) $this->connect=ldap_connect($host, $port); From 6325bd3019cdf016556ae504f24e314257149aba Mon Sep 17 00:00:00 2001 From: Jim Fenton Date: Fri, 13 Jun 2014 13:54:24 -0700 Subject: [PATCH 02/21] Adjust copyright; remove broken footer beacon --- docs/website/inc/page-footer.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/website/inc/page-footer.php b/docs/website/inc/page-footer.php index 7c764d02..3a1db181 100644 --- a/docs/website/inc/page-footer.php +++ b/docs/website/inc/page-footer.php @@ -11,11 +11,7 @@ echo $tags_to_be_closed; XHTML | CSS

-Copyright 2007-2011 | Andrew McMillan -

-

- - +Copyright 2007-2014 | Andrew McMillan

From a391d4e2a5511b4a876557d70a97df958c0b6022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CPaul?= <“p.kallnbach@gorilla-computing.de”> Date: Mon, 23 Jun 2014 20:02:35 +0200 Subject: [PATCH 03/21] Added check to ensure email field does not get a double extension. --- inc/drivers_imap_pam.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/inc/drivers_imap_pam.php b/inc/drivers_imap_pam.php index f3260657..cac06f1e 100644 --- a/inc/drivers_imap_pam.php +++ b/inc/drivers_imap_pam.php @@ -84,10 +84,19 @@ function IMAP_PAM_check($username, $password ){ $fullname = $username; } + // ensure email domain is not doubled in email field + @list($tmp_user, $tmp_domain) = explode('@', $username); + if( empty($tmp_domain) ) { + $email_address = $username . "@" . $c->authenticate_hook['config']['email_base']; + } + else { + $email_address = $username; + } + $principal->Create( array( 'username' => $username, 'user_active' => true, - 'email' => $username . "@" . $c->authenticate_hook['config']['email_base'], + 'email' => $email_address, 'modified' => date('c'), 'fullname' => $fullname )); From 096594fac33f55259b8951bb2d594d231c0f1c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CPaul?= <“p.kallnbach@gorilla-computing.de”> Date: Mon, 23 Jun 2014 20:28:08 +0200 Subject: [PATCH 04/21] Support uniqueMember with DN for user names. --- inc/drivers_ldap.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index 529bad65..cf727914 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -412,6 +412,16 @@ function LDAP_check($username, $password ){ } +function fix_unique_member($list) { + $fixed_list = array(); + foreach ( $list as $member ){ + list( $mem, $rest ) = explode(",", $member ); + $member = str_replace( 'uid=', '', $mem ); + array_unshift( $fixed_list, $member ); + } + return $fixed_list; +} + /** * sync LDAP Groups against the DB */ @@ -502,6 +512,10 @@ function sync_LDAP_groups(){ Principal::cacheDelete('username', $group); $c->messages[] = sprintf(i18n('- adding users %s to group : %s'),join(',',$ldap_groups_info[$group][$mapping['members']]),$group); foreach ( $ldap_groups_info[$group][$mapping['members']] as $member ){ + if ( $member_field == 'uniqueMember' ) { + list( $mem, $rest ) = explode(",", $member ); + $member = str_replace( 'uid=', '', $mem ); + } $qry = new AwlQuery( "INSERT INTO group_member SELECT g.principal_id AS group_id,u.principal_id AS member_id FROM dav_principal g, dav_principal u WHERE g.username=:group AND u.username=:member;",array (':group'=>$group,':member'=>$member) ); $qry->Exec('sync_LDAP_groups',__LINE__,__FILE__); Principal::cacheDelete('username', $member); @@ -514,6 +528,9 @@ function sync_LDAP_groups(){ foreach ( $groups_to_update as $group ){ $db_members = array_values ( $db_group_members[$group] ); $ldap_members = array_values ( $ldap_groups_info[$group][$member_field] ); + if ( $member_field == 'uniqueMember' ) { + $ldap_members = fix_unique_member( $ldap_members ); + } $add_users = array_diff ( $ldap_members, $db_members ); if ( sizeof ( $add_users ) ){ $c->messages[] = sprintf(i18n('- adding %s to group : %s'),join(', ', $add_users ), $group); From c03b8827289a8f9d7706a9d06365027ca4cd186d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CPaul?= <“p.kallnbach@gorilla-computing.de”> Date: Mon, 23 Jun 2014 20:37:32 +0200 Subject: [PATCH 05/21] Call log_caldav_action for VCARD PUT requests. --- inc/caldav-PUT-vcard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/caldav-PUT-vcard.php b/inc/caldav-PUT-vcard.php index 8bb7dafe..0da06bc3 100644 --- a/inc/caldav-PUT-vcard.php +++ b/inc/caldav-PUT-vcard.php @@ -134,7 +134,7 @@ $vcard->Write( $row->dav_id, $dest->Exists() ); $qry->QDo("SELECT write_sync_change( $collection_id, $response_code, :dav_name)", array(':dav_name' => $dest->bound_from() ) ); -if ( isset($log_action) && $log_action && function_exists('log_caldav_action') ) { +if ( function_exists('log_caldav_action') ) { log_caldav_action( $put_action_type, $uid, $user_no, $collection_id, $request->path ); } else if ( isset($log_action) && $log_action ) { From 9dc026eb28ca8d144111cd294bb8500c5754d4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CPaul?= <“p.kallnbach@gorilla-computing.de”> Date: Mon, 23 Jun 2014 21:03:01 +0200 Subject: [PATCH 06/21] Support multiple text-match elements within a filter query. --- inc/caldav-REPORT-calquery.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/inc/caldav-REPORT-calquery.php b/inc/caldav-REPORT-calquery.php index 365b8905..63c77f97 100644 --- a/inc/caldav-REPORT-calquery.php +++ b/inc/caldav-REPORT-calquery.php @@ -88,11 +88,13 @@ function apply_filter( $filters, $item ) { /** * Process a filter fragment returning an SQL fragment + * Changed by GitHub user moosemark 2013-11-29 to allow multiple text-matches - SQL parameter now has numeric count appended. */ $need_post_filter = false; $range_filter = null; -function SqlFilterFragment( $filter, $components, $property = null, $parameter = null ) { - global $need_post_filter, $range_filter, $target_collection; +$parameter_match_num = 0; +function SqlFilterFragment( $filter, $components, $property = null, $parameter = null) { + global $need_post_filter, $range_filter, $target_collection, $parameter_match_num; $sql = ""; $params = array(); if ( !is_array($filter) ) { @@ -180,10 +182,13 @@ function SqlFilterFragment( $filter, $components, $property = null, $parameter = $comparison = 'ILIKE'; break; } - $params[':text_match'] = '%'.$search.'%'; - $fragment = sprintf( 'AND (%s%s %s :text_match) ', + /* Append the match number to the SQL parameter, to allow multiple text match conditions within the same query */ + $params[':text_match_'.$parameter_match_num] = '%'.$search.'%'; + $fragment = sprintf( 'AND (%s%s %s :text_match_%s) ', (isset($negate) && strtolower($negate) == "yes" ? $property.' IS NULL OR NOT ': ''), - $property, $comparison ); + $property, $comparison, $parameter_match_num ); + $parameter_match_num++; + dbg_error_log('calquery', ' text-match: %s', $fragment ); $sql .= $fragment; break; @@ -233,6 +238,7 @@ function SqlFilterFragment( $filter, $components, $property = null, $parameter = case 'COMPLETED': /** @todo this should be moved into the properties supported in SQL. */ default: $need_post_filter = true; + unset($subproperty); dbg_error_log("calquery", "Could not handle 'prop-filter' on %s in SQL", $propertyname ); continue; } From ba5c7e90e110c462818bd41f3bf6088e6883172d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CPaul?= <“p.kallnbach@gorilla-computing.de”> Date: Mon, 23 Jun 2014 21:35:47 +0200 Subject: [PATCH 07/21] CardDAV Query Report --- inc/caldav-REPORT-cardquery.php | 299 +++++++++++++++++++++----------- 1 file changed, 194 insertions(+), 105 deletions(-) diff --git a/inc/caldav-REPORT-cardquery.php b/inc/caldav-REPORT-cardquery.php index fdc82149..07b4e6b3 100644 --- a/inc/caldav-REPORT-cardquery.php +++ b/inc/caldav-REPORT-cardquery.php @@ -47,13 +47,24 @@ if ( empty($properties) ) $properties['DAV::allprop'] = 1; * There can only be *one* FILTER element. */ $qry_filters = $xmltree->GetPath('/urn:ietf:params:xml:ns:carddav:addressbook-query/urn:ietf:params:xml:ns:carddav:filter/*'); -if ( count($qry_filters) != 1 ) { -/* $qry_filters = $qry_filters[0]; // There can only be one FILTER element -} -else { */ +if ( count($qry_filters) == 0 ) { $qry_filters = false; } +$qry_limit = -1; // everything +$qry_filters_combination='OR'; +if ( is_array($qry_filters) ) { + $filters_parent = $xmltree->GetPath('/urn:ietf:params:xml:ns:carddav:addressbook-query/urn:ietf:params:xml:ns:carddav:filter')[0]; + // only anyof (OR) or allof (AND) allowed, if missing anyof is default (RFC6352 10.5) + if ( $filters_parent->GetAttribute("test") == 'allof' ) { + $qry_filters_combination='AND'; + } + + $limits = $xmltree->GetPath('/urn:ietf:params:xml:ns:carddav:addressbook-query/urn:ietf:params:xml:ns:carddav:limit/urn:ietf:params:xml:ns:carddav:nresults'); + if ( count($limits) == 1) { + $qry_limit = intval($limits[0]->GetContent()); + } +} /** * While we can construct our SQL to apply some filters in the query, other filters @@ -61,126 +72,174 @@ else { */ * * @param array $filter An array of XMLElement which is the filter definition * @param string $item The database row retrieved for this calendar item +* @param string $filter_type possible values AND or OR (for OR only one filter fragment must match) * * @return boolean True if the check succeeded, false otherwise. */ -function apply_filter( $filters, $item ) { +function apply_filter( $filters, $item, $filter_type) { global $session, $c, $request; if ( count($filters) == 0 ) return true; dbg_error_log("cardquery","Applying filter for item '%s'", $item->dav_name ); $vcard = new vComponent( $item->caldav_data ); - return $vcard->TestFilter($filters); + + if ( $filter_type === 'AND' ) { + return $vcard->TestFilter($filters); + } else { + foreach($filters AS $filter) { + $filter_fragment[0] = $filter; + if ( $vcard->TestFilter($filter_fragment) ) { + return true; + } + } + return false; + } } /** * Process a filter fragment returning an SQL fragment */ -$need_post_filter = false; +$post_filters = array(); $matchnum = 0; function SqlFilterCardDAV( $filter, $components, $property = null, $parameter = null ) { - global $need_post_filter, $target_collection, $matchnum; + global $post_filters, $target_collection, $matchnum; $sql = ""; $params = array(); - if ( !is_array($filter) ) { - dbg_error_log( "cardquery", "Filter is of type '%s', but should be an array of XML Tags.", gettype($filter) ); - } - foreach( $filter AS $k => $v ) { - $tag = $v->GetNSTag(); - dbg_error_log("cardquery", "Processing $tag into SQL - %d, '%s', %d\n", count($components), $property, isset($parameter) ); + $tag = $filter->GetNSTag(); + dbg_error_log("cardquery", "Processing $tag into SQL - %d, '%s', %d\n", count($components), $property, isset($parameter) ); - $not_defined = ""; - switch( $tag ) { - case 'urn:ietf:params:xml:ns:carddav:text-match': - $search = $v->GetContent(); - $negate = $v->GetAttribute("negate-condition"); - $collation = $v->GetAttribute("collation"); - switch( strtolower($collation) ) { - case 'i;octet': - $comparison = 'LIKE'; - break; - case 'i;ascii-casemap': - case 'i;unicode-casemap': - default: - $comparison = 'ILIKE'; - break; + $not_defined = ""; + switch( $tag ) { + case 'urn:ietf:params:xml:ns:carddav:is-not-defined': + $sql .= $property . 'IS NULL'; + break; + + case 'urn:ietf:params:xml:ns:carddav:text-match': + if ( empty($property) ) { + return false; + } + + $collation = $filter->GetAttribute("collation"); + switch( strtolower($collation) ) { + case 'i;octet': + $comparison = 'LIKE'; + break; + case 'i;ascii-casemap': + case 'i;unicode-casemap': + default: + $comparison = 'ILIKE'; + break; + } + + $search = $filter->GetContent(); + $match = $filter->GetAttribute("match-type"); + switch( strtolower($match) ) { + case 'equals': + break; + case 'starts-with': + $search = $search.'%'; + break; + case 'ends-with': + $search = $search.'%'; + break; + case 'contains': + default: + $search = '%'.$search.'%'; + break; + } + + $pname = ':text_match_'.$matchnum++; + $params[$pname] = $search; + + $negate = $filter->GetAttribute("negate-condition"); + $negate = ( (isset($negate) && strtolower($negate) ) == "yes" ) ? "NOT " : ""; + dbg_error_log("cardquery", " text-match: (%s%s %s '%s') ", $negate, $property, $comparison, $search ); + $sql .= sprintf( "(%s%s %s $pname)", $negate, $property, $comparison ); + break; + + case 'urn:ietf:params:xml:ns:carddav:prop-filter': + $propertyname = $filter->GetAttribute("name"); + switch( $propertyname ) { + case 'VERSION': + case 'UID': + case 'NICKNAME': + case 'FN': + case 'NOTE': + case 'ORG': + case 'URL': + case 'FBURL': + case 'CALADRURI': + case 'CALURI': + $property = strtolower($propertyname); + break; + + case 'N': + $property = 'name'; + break; + + default: + $post_filters[] = $filter; + dbg_error_log("cardquery", "Could not handle 'prop-filter' on %s in SQL", $propertyname ); + return false; + } + + $test_type = $filter->GetAttribute("test"); + switch( $test_type ) { + case 'allOf': + $test_type = 'AND'; + break; + case 'anyOf': + default: + $test_type = 'OR'; + } + + $subfilters = $filter->GetContent(); + if (count($subfilters) <= 1) { + $success = SqlFilterCardDAV( $subfilters[0], $components, $property, $parameter ); + if ( $success !== false ) { + $sql .= $success['sql']; + $params = array_merge( $params, $success['params'] ); } - $pname = ':text_match_'.$matchnum++; - $match_type = $v->GetAttribute("match-type"); - switch( strtolower($match_type) ) { - case 'starts-with': - $params[$pname] = $search.'%'; - break; - case 'ends-with': - $params[$pname] = '%'.$search; - break; - case 'equals': - $params[$pname] = $search; - case 'contains': - default: - $params[$pname] = '%'.$search.'%'; - break; + } else { + $subfilter_added_counter=0; + foreach ($subfilters as $subfilter) { + $success = SqlFilterCardDAV( $subfilter, $components, $property, $parameter ); + if ( $success === false ) continue; else { + if ($subfilter_added_counter <= 0) { + $sql .= '(' . $success['sql']; + } else { + $sql .= $test_type . ' ' . $success['sql']; + } + $params = array_merge( $params, $success['params'] ); + $subfilter_added_counter++; + } } - dbg_error_log("cardquery", " text-match: (%s%s %s '%s') ", (isset($negate) && strtolower($negate) == "yes" ? "NOT ": ""), - $property, $comparison, $params[$pname] ); - $sql .= sprintf( "AND (%s%s %s $pname) ", (isset($negate) && strtolower($negate) == "yes" ? "NOT ": ""), - $property, $comparison ); - break; - - case 'urn:ietf:params:xml:ns:carddav:prop-filter': - $propertyname = $v->GetAttribute("name"); - switch( $propertyname ) { - case 'VERSION': - case 'UID': - case 'NICKNAME': - case 'FN': - case 'NOTE': - case 'ORG': - case 'URL': - case 'FBURL': - case 'CALADRURI': - case 'CALURI': - $property = strtolower($propertyname); - break; - - case 'N': - $property = 'name'; - break; - - default: - $need_post_filter = true; - dbg_error_log("cardquery", "Could not handle 'prop-filter' on %s in SQL", $propertyname ); - continue; + if ($subfilter_added_counter > 0) { + $sql .= ')'; } - $subfilter = $v->GetContent(); - $success = SqlFilterCardDAV( $subfilter, $components, $property, $parameter ); - if ( $success === false ) continue; else { - $sql .= $success['sql']; - $params = array_merge( $params, $success['params'] ); - } - break; + } + break; - case 'urn:ietf:params:xml:ns:carddav:param-filter': - $need_post_filter = true; - return false; /** Figure out how to handle PARAM-FILTER conditions in the SQL */ - /* - $parameter = $v->GetAttribute("name"); - $subfilter = $v->GetContent(); - $success = SqlFilterCardDAV( $subfilter, $components, $property, $parameter ); - if ( $success === false ) continue; else { - $sql .= $success['sql']; - $params = array_merge( $params, $success['params'] ); - } - break; - */ + case 'urn:ietf:params:xml:ns:carddav:param-filter': + $post_filters[] = $filter; + return false; /** Figure out how to handle PARAM-FILTER conditions in the SQL */ + /* + $parameter = $filter->GetAttribute("name"); + $subfilter = $filter->GetContent(); + $success = SqlFilterCardDAV( $subfilter, $components, $property, $parameter ); + if ( $success === false ) continue; else { + $sql .= $success['sql']; + $params = array_merge( $params, $success['params'] ); + } + break; + */ - default: - dbg_error_log("cardquery", "Could not handle unknown tag '%s' in calendar query report", $tag ); - break; - } + default: + dbg_error_log("cardquery", "Could not handle unknown tag '%s' in calendar query report", $tag ); + break; } dbg_error_log("cardquery", "Generated SQL was '%s'", $sql ); return array( 'sql' => $sql, 'params' => $params ); @@ -213,23 +272,50 @@ $params = array(); $where = ' WHERE caldav_data.collection_id = ' . $target_collection->resource_id(); if ( is_array($qry_filters) ) { dbg_log_array( 'cardquery', 'qry_filters', $qry_filters, true ); - $components = array(); - $filter_fragment = SqlFilterCardDAV( $qry_filters, $components ); - if ( $filter_fragment !== false ) { - $where .= ' '.$filter_fragment['sql']; - $params = $filter_fragment['params']; + + $appended_where_counter=0; + foreach ($qry_filters as $qry_filter) { + $components = array(); + $filter_fragment = SqlFilterCardDAV( $qry_filter, $components ); + if ( $filter_fragment !== false ) { + $filter_fragment_sql = $filter_fragment['sql']; + if ( empty($filter_fragment_sql) ) { + continue; + } + + if ( $appended_where_counter == 0 ) { + $where .= ' AND (' . $filter_fragment_sql; + $params = $filter_fragment['params']; + } else { + $where .= ' ' . $qry_filters_combination . ' ' . $filter_fragment_sql; + $params = array_merge( $params, $filter_fragment['params'] ); + } + $appended_where_counter++; + } + } + if ( $appended_where_counter > 0 ) { + $where .= ')'; } } else { dbg_error_log( 'cardquery', 'No query filters' ); } +$need_post_filter = !empty($post_filters); +if ( $need_post_filter && ( $qry_filters_combination == 'OR' )) { + // we need a post_filter step, and it should be sufficient, that only one + // filter is enough to display the item => we can't prefilter values via SQL + $where = ''; + $params = array(); + $post_filters = $qry_filters; +} + $sql = 'SELECT * FROM caldav_data INNER JOIN addressbook_resource USING(dav_id)'. $where; if ( isset($c->strict_result_ordering) && $c->strict_result_ordering ) $sql .= " ORDER BY dav_id"; $qry = new AwlQuery( $sql, $params ); if ( $qry->Exec("cardquery",__LINE__,__FILE__) && $qry->rows() > 0 ) { while( $address_object = $qry->Fetch() ) { - if ( !$need_post_filter || apply_filter( $qry_filters, $address_object ) ) { + if ( !$need_post_filter || apply_filter( $post_filters, $address_object, $qry_filters_combination ) ) { if ( $bound_from != $target_collection->dav_name() ) { $address_object->dav_name = str_replace( $bound_from, $target_collection->dav_name(), $address_object->dav_name); } @@ -239,9 +325,12 @@ if ( $qry->Exec("cardquery",__LINE__,__FILE__) && $qry->rows() > 0 ) { $address_object->caldav_data = $vcard->Render(); } $responses[] = component_to_xml( $properties, $address_object ); + if ( ($qry_limit > 0) && ( count($responses) >= $qry_limit ) ) { + break; + } } } } $multistatus = new XMLElement( "multistatus", $responses, $reply->GetXmlNsArray() ); -$request->XMLResponse( 207, $multistatus ); +$request->XMLResponse( 207, $multistatus ); \ No newline at end of file From e9136766604af5a56df1504897936ea652346cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CPaul?= <“p.kallnbach@gorilla-computing.de”> Date: Mon, 23 Jun 2014 21:44:13 +0200 Subject: [PATCH 08/21] inc/drivers_ldap: fix 'Undefined variable' --- inc/drivers_ldap.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index cf727914..52e37762 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -119,6 +119,7 @@ class ldapDrivers global $c; $query = $this->ldap_query_all; + $ret = array(); foreach($this->baseDNUsers as $baseDNUsers) { $entry = $query($this->connect,$baseDNUsers,$this->filterUsers,$attributes); @@ -150,6 +151,7 @@ class ldapDrivers global $c; $query = $this->ldap_query_all; + $ret = array(); foreach($this->baseDNGroups as $baseDNGroups) { $entry = $query($this->connect,$baseDNGroups,$this->filterGroups,$attributes); From 96a5a3120393a322a4b2ab2e670230a532581d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CPaul?= <“p.kallnbach@gorilla-computing.de”> Date: Mon, 23 Jun 2014 21:55:11 +0200 Subject: [PATCH 09/21] Fixed fetching new external resources on BIND --- inc/caldav-PUT-functions.php | 2 +- inc/external-fetch.php | 59 +++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index e30ee372..bd5d55cc 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -28,7 +28,7 @@ $bad_events = null; /** * A regex which will match most reasonable timezones acceptable to PostgreSQL. */ -$tz_regex = ':^(Africa|America|Antarctica|Arctic|Asia|Atlantic|Australia|Brazil|Canada|Chile|Etc|Europe|Indian|Mexico|Mideast|Pacific|US)/[a-z_]+$:i'; +$GLOBALS['tz_regex'] = ':^(Africa|America|Antarctica|Arctic|Asia|Atlantic|Australia|Brazil|Canada|Chile|Etc|Europe|Indian|Mexico|Mideast|Pacific|US)/[a-z_]+$:i'; /** * This function launches an error diff --git a/inc/external-fetch.php b/inc/external-fetch.php index 6417feb5..1c2937a2 100644 --- a/inc/external-fetch.php +++ b/inc/external-fetch.php @@ -22,9 +22,9 @@ function create_external ( $path,$is_calendar,$is_addressbook ) if ($is_calendar) $resourcetypes .= ''; $qry = new AwlQuery(); if ( ! $qry->QDo( 'INSERT INTO collection ( user_no, parent_container, dav_name, dav_etag, dav_displayname, - is_calendar, is_addressbook, resourcetypes, created, modified ) + is_calendar, is_addressbook, resourcetypes, created ) VALUES( :user_no, :parent_container, :dav_name, :dav_etag, :dav_displayname, - :is_calendar, :is_addressbook, :resourcetypes, current_timestamp, current_timestamp )', + :is_calendar, :is_addressbook, :resourcetypes, current_timestamp )', array( ':user_no' => $request->user_no, ':parent_container' => '/.external/', @@ -55,43 +55,48 @@ function fetch_external ( $bind_id, $min_age = '1 hour' ) $sql .= ' ORDER BY modified DESC LIMIT 1'; $qry = new AwlQuery( $sql, $params ); if ( $qry->Exec('DAVResource') && $qry->rows() > 0 && $row = $qry->Fetch() ) { - $local_ts = new DateTime($row->modified); $curl = curl_init ( $row->external_url ); curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, true ); - curl_setopt ( $curl, CURLOPT_HEADER, true ); - curl_setopt ( $curl, CURLOPT_FILETIME, true ); - curl_setopt ( $curl, CURLOPT_NOBODY, true ); - curl_setopt ( $curl, CURLOPT_TIMEVALUE, $local_ts->format("U") ); - curl_setopt ( $curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE ); - dbg_error_log("external", "checking external resource for remote changes " . $row->external_url ); - $ics = curl_exec ( $curl ); - $info = curl_getinfo ( $curl ); - if ( $info['http_code'] === 304 || isset($info['filetime']) && new DateTime("@" . $info['filetime']) <= $local_ts ) { - dbg_error_log("external", "external resource unchanged " . $info['filetime'] . ' < ' . $local_ts->getTimestamp() ); - curl_close ( $curl ); - // BUGlet: should track server-time instead of local-time - $qry = new AwlQuery( 'UPDATE collection SET modified=NOW() WHERE collection_id = :cid', array ( ':cid' => $row->collection_id ) ); - $qry->Exec('DAVResource'); - return true; + if ( $row->modified ) { + $local_ts = new DateTime($row->modified); + curl_setopt ( $curl, CURLOPT_HEADER, true ); + curl_setopt ( $curl, CURLOPT_FILETIME, true ); + curl_setopt ( $curl, CURLOPT_NOBODY, true ); + curl_setopt ( $curl, CURLOPT_TIMEVALUE, $local_ts->format("U") ); + curl_setopt ( $curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE ); + dbg_error_log("external", "checking external resource for remote changes " . $row->external_url ); + $ics = curl_exec ( $curl ); + $info = curl_getinfo ( $curl ); + if ( $info['http_code'] === 304 || (isset($info['filetime']) && $info['filetime'] != -1 && new DateTime("@" . $info['filetime']) <= $local_ts )) { + dbg_error_log("external", "external resource unchanged " . $info['filetime'] . ' < ' . $local_ts->getTimestamp() . ' (' . $info['http_code'] . ')'); + curl_close ( $curl ); + // BUGlet: should track server-time instead of local-time + $qry = new AwlQuery( 'UPDATE collection SET modified=NOW() WHERE collection_id = :cid', array ( ':cid' => $row->collection_id ) ); + $qry->Exec('DAVResource'); + return true; + } + dbg_error_log("external", "external resource changed, re importing" . $info['filetime'] ); + } + else { + dbg_error_log("external", "fetching external resource for the first time " . $row->external_url ); } - dbg_error_log("external", "external resource changed, re importing" . $info['filetime'] ); curl_setopt ( $curl, CURLOPT_NOBODY, false ); curl_setopt ( $curl, CURLOPT_HEADER, false ); $ics = curl_exec ( $curl ); curl_close ( $curl ); if ( is_string ( $ics ) && strlen ( $ics ) > 20 ) { - // BUGlet: should track server-time instead of local-time - $qry = new AwlQuery( 'UPDATE collection SET modified=NOW(), dav_etag=:etag WHERE collection_id = :cid', - array ( ':cid' => $row->collection_id, ':etag' => md5($ics) ) ); - $qry->Exec('DAVResource'); + // BUGlet: should track server-time instead of local-time + $qry = new AwlQuery( 'UPDATE collection SET modified=NOW(), dav_etag=:etag WHERE collection_id = :cid', + array ( ':cid' => $row->collection_id, ':etag' => md5($ics) ) ); + $qry->Exec('DAVResource'); require_once ( 'caldav-PUT-functions.php'); import_collection ( $ics , $row->user_no, $row->path, 'External Fetch' , false ) ; return true; } - } - else { - dbg_error_log("external", "external resource up to date or not found id(%s)", $bind_id ); - } + } + else { + dbg_error_log("external", "external resource up to date or not found id(%s)", $bind_id ); + } return false; } From ab046e5e2148a5c44b3102636589371dad996b9e Mon Sep 17 00:00:00 2001 From: Jim Fenton Date: Wed, 2 Jul 2014 17:11:59 -0700 Subject: [PATCH 10/21] Removed PayPal donation request and Flattr button --- docs/website/images/flattr-badge-large.png | Bin 4077 -> 0 bytes docs/website/images/paypal_donate_button.png | Bin 1052 -> 0 bytes docs/website/index.php | 9 --------- 3 files changed, 9 deletions(-) delete mode 100644 docs/website/images/flattr-badge-large.png delete mode 100644 docs/website/images/paypal_donate_button.png diff --git a/docs/website/images/flattr-badge-large.png b/docs/website/images/flattr-badge-large.png deleted file mode 100644 index c03a4fa3084f3c7b4109a3c13e657ef0eaccdd53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4077 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
  • writing and reviewing patches
  • designing future functionality
  • thinking of more interesting ways to contribute to DAViCal!
  • -
  • you could also
    - - - -
    something or - -Flattr this -since paid work is my biggest distraction from free software.
  • Can you think of more?

    From 29a0898a10394053123e81481faa2b219abe1a1f Mon Sep 17 00:00:00 2001 From: Jim Fenton Date: Fri, 18 Jul 2014 14:28:02 -0700 Subject: [PATCH 11/21] Update downloading information --- docs/website/index.php | 11 +++-- docs/website/installation.php | 92 ++++++++++++----------------------- 2 files changed, 36 insertions(+), 67 deletions(-) diff --git a/docs/website/index.php b/docs/website/index.php index 84e56100..6122a2dc 100644 --- a/docs/website/index.php +++ b/docs/website/index.php @@ -3,8 +3,9 @@ include("inc/page-header.php"); ?>

    About DAViCal

    -

    DAViCal is a server for calendar sharing. It is an implementation of the CalDAV protocol which is designed -for storing calendaring resources (in iCalendar format) on a remote shared server.

    +

    DAViCal is a server for calendar sharing. It is an implementation +of the CalDAV protocol which is designed for storing calendaring +resources (in iCalendar format) on a remote shared server.

    An increasing number of calendar clients support the maintenance of shared remote calendars through CalDAV, including Mozilla Calendar (Sunbird/Lightning), Evolution, Mulberry, Chandler, and various other closed-source products @@ -30,9 +31,9 @@ and writing the same calendar entries over time, and scheduling of meetings with versions of Linux, FreeBSD, Mac OSX and even Microsoft Windows. We definitely do not recommend using Windows for this unless you are completely hobbled by silly internal IT policies and have to do so.

    -

    Getting DAViCal and Installing DAViCal

    -

    You can download DAViCal from http://debian.mcmillan.net.nz/

    -

    Start looking on the DAViCal Installation Page for more places to download, and +

    Getting and Installing DAViCal

    +

    Start by looking on the DAViCal + Installation Page for instructions on places to download, and detailed instructions as to what to do when you have it.

    There is a lot of information on the wiki about DAViCal configuration settings but in most cases the configuration will need very few of these settings.

    diff --git a/docs/website/installation.php b/docs/website/installation.php index 353d672e..6c199551 100644 --- a/docs/website/installation.php +++ b/docs/website/installation.php @@ -5,73 +5,41 @@

    Before Starting

    Debian Users

    -

    Ideally you will be running a recent Debian (or Ubuntu) release and will -be able to add:

    -
    -deb http://debian.mcmillan.net.nz/debian lenny awm
    -
    -

    to your /etc/apt/sources.list. Once you have done that you -can use apt-get or synaptic or some other equivalent package -manager to fetch and install DAViCal and all the dependencies.

    - -

    This repository is signed by Andrew McMillan's public key, which you can install so that -you don't get asked for confirmation all the time:

    - -
    -sudo apt-key advanced --keyserver pgp.net.nz --recv-keys F6E0FA5CF0307507BB23A512EAFCFEBF8FEB8EBF
    -
    - -

    Skip to the "Database Setup" part if you have done that already.

    - +

    Recent Debian (and Ubuntu) releases have DAViCal 1.1.1 and AWL 0.53 + (a library referenced by DAViCal) available in their repositories, + and you can use apt-get or similar tools to download and install + DAViCal. Once you have done that, you should be able to proceed to + the Database Setup section, below.

    Other Linux Users

    -

    Please write something up about your experiences in the Wiki, adding distribution specific -notes to pages somewhere under here: - http://wiki.davical.org/w/Installation_Stuff

    +

    The DAViCal wiki contains + information on installation on other versions of Linux. Please feel + free to contribute your experiences, using the mailing list if you + don't have a wiki account.

    -

    RPM Packages of DAViCal

    -

    We have created RPM packages of DAViCal and libawl-php from the .deb packages -using "alien". These are reported to work fine, so use them and then proceed to the -Pre-requisites section below. If you would like to work with us to create native -RPM packages please get in touch!

    +

    In many cases, you will need to download the latest versions of +the DAViCal and awl packages from +the repository on +GitLab. More details on this are on +the Downloading + page on the wiki.

    -

    SuSE Linux

    -

    On SuSE Linux you may need to look in /var/lib/pgsql/data/ for the pg_hba.conf file.

    - -

    Gentoo

    -

    Davical and the awl library ebuilds are available on the sunrise overlay. -You'll have to add this overlay to your system:

    -
    -emerge layman
    -layman -f -a sunrise
    -echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf
    -
    - -

    From there, you can keep the overlay in sync with the command:

    -
    layman -s sunrise
    - -

    Davical can now be installed with a normal:

    -
    emerge davical
    - -

    Slackware, BSD and the rest

    - -

    You will need to download the latest versions of the DAViCal and awl packages -from the sourceforge download page for DAViCal.

    -

    You will need to untar these. Preferably you will untar them from within the "/usr/share" directory and everything -will be in it's expected location (well, except the docs, but it will at least be tidy and everything will be in one place).

    - -

    We would like to hear from non-Debian users regarding things which might have been missed, or things you have -learned about the system, so please write about your installation experiences on the Wiki, or post a message -in the Sourceforge forums.

    +

    We would like to hear from non-Debian users regarding things which +might have been missed, or things you have learned about the system, +so please write about your installation experiences on the Wiki, or +post a message on the mailing list.

    Non-Linux Users

    -

    We would really like to hear from you. As far as we can see there is no reason why this -can't all work on FreeBSD, Microsoft Windows, VMS, Mac OS or whatever else, as long as the -pre-requisites are able to be installed.

    -

    For Unix and unix-like operating systems the "Other Linux Users" instructions are likely -to be reasonably close to what you need. For other systems everything will need some -adjustment, and in particular some of the path name and shell expectations coded into -the database creation scripts are likely to need love.

    +

    We would really like to hear from you. As far as we can see there +is no reason why this can't all work on FreeBSD, Microsoft Windows, +VMS, Mac OS or whatever else, as long as the pre-requisites are able +to be installed.

    + +

    For Unix and unix-like operating systems the "Other Linux Users" +instructions are likely to be reasonably close to what you need. For +other systems everything will need some adjustment, and in particular +some of the path name and shell expectations coded into the database +creation scripts are likely to need love.

    We're available to answer questions, anyway :-)

    Pre-requisites

    @@ -94,7 +62,7 @@ if you want to increase the security or scalability of your installation.

    Since the CalDAV store takes over a significant amount of path -hierarchy, it can be easier in it's own virtual +hierarchy, it can be easier in its own virtual host. If you want it to operate within the web root of some other application there are instructions on the Wiki about doing this, as well as other fancy tricks such as configuring URL rewriting in From 931651ca325a2044669de7da014be614684069e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CPaul?= <“p.kallnbach@gorilla-computing.de”> Date: Tue, 2 Sep 2014 20:01:28 +0200 Subject: [PATCH 12/21] Remove quoted SQL language identifiers --- dba/better_perms.sql | 16 +++++------ dba/caldav_functions.sql | 56 ++++++++++++++++++------------------- dba/davical.sql | 6 ++-- dba/patches/1.1.12.sql | 2 +- dba/patches/1.1.12a.sql | 2 +- dba/patches/1.2.1.sql | 2 +- dba/patches/1.2.10a.sql | 2 +- dba/patches/1.2.1a.sql | 2 +- dba/patches/1.2.1b.sql | 2 +- dba/patches/1.2.6.sql | 18 ++++++------ dba/patches/1.2.7.sql | 4 +-- dba/rrule_functions-8.1.sql | 38 ++++++++++++------------- dba/rrule_functions.sql | 40 +++++++++++++------------- 13 files changed, 95 insertions(+), 95 deletions(-) diff --git a/dba/better_perms.sql b/dba/better_perms.sql index 0fe1837d..35c1e4b1 100644 --- a/dba/better_perms.sql +++ b/dba/better_perms.sql @@ -45,7 +45,7 @@ BEGIN RETURN out_bits; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- This legacy conversion function will eventually be removed, once all logic -- has been converted to use bitmaps, or to use the bits_to_priv() output. @@ -98,7 +98,7 @@ BEGIN RETURN out_priv; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; CREATE or REPLACE FUNCTION get_permissions( INT, INT ) RETURNS TEXT AS $$ DECLARE @@ -151,12 +151,12 @@ BEGIN RETURN ''; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; CREATE or REPLACE FUNCTION get_group_role_no() RETURNS INT AS $$ SELECT role_no FROM roles WHERE role_name = 'Group' -$$ LANGUAGE 'sql' IMMUTABLE; +$$ LANGUAGE sql IMMUTABLE; CREATE or REPLACE FUNCTION has_legacy_privilege( INT, TEXT, INT ) RETURNS BOOLEAN AS $$ DECLARE @@ -205,7 +205,7 @@ BEGIN RETURN FALSE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; -- Given a verbose DAV: or CalDAV: privilege name return the bitmask @@ -242,7 +242,7 @@ BEGIN ELSE 0 END)::BIT(24); END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- Given an array of verbose DAV: or CalDAV: privilege names return the bitmask @@ -269,7 +269,7 @@ BEGIN RETURN out_bits; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- This legacy conversion function will eventually be removed, once all logic @@ -368,4 +368,4 @@ BEGIN RETURN out_priv; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; diff --git a/dba/caldav_functions.sql b/dba/caldav_functions.sql index 5be1fc1e..9733a007 100644 --- a/dba/caldav_functions.sql +++ b/dba/caldav_functions.sql @@ -74,7 +74,7 @@ BEGIN RETURN our_answer; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; CREATE or REPLACE FUNCTION calculate_later_timestamp( TIMESTAMP WITH TIME ZONE, TIMESTAMP WITH TIME ZONE, TEXT ) RETURNS TIMESTAMP WITH TIME ZONE AS $$ @@ -239,12 +239,12 @@ BEGIN RETURN our_answer; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; CREATE or REPLACE FUNCTION usr_is_role( INT, TEXT ) RETURNS BOOLEAN AS $$ SELECT EXISTS( SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_member.user_no=$1 AND roles.role_name=$2 ) -$$ LANGUAGE 'sql' IMMUTABLE STRICT; +$$ LANGUAGE sql IMMUTABLE STRICT; CREATE or REPLACE FUNCTION legacy_get_permissions( INT, INT ) RETURNS TEXT AS $$ DECLARE @@ -333,13 +333,13 @@ BEGIN RETURN ''; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; -- Function to convert a PostgreSQL date into UTC + the format used by iCalendar CREATE or REPLACE FUNCTION to_ical_utc( TIMESTAMP WITH TIME ZONE ) RETURNS TEXT AS $$ SELECT to_char( $1 at time zone 'UTC', 'YYYYMMDD"T"HH24MISS"Z"' ) -$$ LANGUAGE 'sql' IMMUTABLE STRICT; +$$ LANGUAGE sql IMMUTABLE STRICT; -- Function to set an arbitrary DAV property CREATE or REPLACE FUNCTION set_dav_property( TEXT, INTEGER, TEXT, TEXT ) RETURNS BOOLEAN AS $$ @@ -365,7 +365,7 @@ BEGIN END IF; RETURN TRUE; END; -$$ LANGUAGE 'plpgsql' STRICT; +$$ LANGUAGE plpgsql STRICT; -- List a user's relationships as a text string CREATE or REPLACE FUNCTION relationship_list( INT8 ) RETURNS TEXT AS $$ @@ -385,7 +385,7 @@ BEGIN END LOOP; RETURN rlist; END; -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; DROP FUNCTION rename_davical_user( TEXT, TEXT ); DROP TRIGGER usr_modified ON usr CASCADE; @@ -518,7 +518,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS $$ RETURN NEW; END -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data FOR EACH ROW EXECUTE PROCEDURE sync_dav_id(); @@ -573,7 +573,7 @@ BEGIN RETURN out_bits; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- This legacy conversion function will eventually be removed, once all logic -- has been converted to use bitmaps, or to use the bits_to_priv() output. @@ -626,7 +626,7 @@ BEGIN RETURN out_priv; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; CREATE or REPLACE FUNCTION get_permissions( INT, INT ) RETURNS TEXT AS $$ DECLARE @@ -679,12 +679,12 @@ BEGIN RETURN ''; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; CREATE or REPLACE FUNCTION get_group_role_no() RETURNS INT AS $$ SELECT role_no FROM roles WHERE role_name = 'Group' -$$ LANGUAGE 'sql' IMMUTABLE; +$$ LANGUAGE sql IMMUTABLE; CREATE or REPLACE FUNCTION has_legacy_privilege( INT, TEXT, INT ) RETURNS BOOLEAN AS $$ DECLARE @@ -733,7 +733,7 @@ BEGIN RETURN FALSE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; -- Given a verbose DAV: or CalDAV: privilege name return the bitmask @@ -770,7 +770,7 @@ BEGIN ELSE 0 END)::BIT(24); END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- Given an array of verbose DAV: or CalDAV: privilege names return the bitmask @@ -797,7 +797,7 @@ BEGIN RETURN out_bits; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- NOTE: Round-trip through this and then back through privilege_to_bits @@ -892,7 +892,7 @@ BEGIN RETURN out_priv; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- Expanded group memberships out to some depth @@ -902,7 +902,7 @@ CREATE or REPLACE FUNCTION expand_memberships( INT8, INT ) RETURNS SETOF INT8 AS SELECT expanded.g_id FROM (SELECT CASE WHEN $2 > 0 THEN expand_memberships( group_id, $2 - 1) END AS g_id FROM group_member WHERE member_id = $1) AS expanded WHERE expanded.g_id IS NOT NULL; -$$ LANGUAGE 'sql' STABLE STRICT; +$$ LANGUAGE sql STABLE STRICT; -- Expanded group members out to some depth CREATE or REPLACE FUNCTION expand_members( INT8, INT ) RETURNS SETOF INT8 AS $$ @@ -911,7 +911,7 @@ CREATE or REPLACE FUNCTION expand_members( INT8, INT ) RETURNS SETOF INT8 AS $$ SELECT expanded.m_id FROM (SELECT CASE WHEN $2 > 0 THEN expand_members( member_id, $2 - 1) END AS m_id FROM group_member WHERE group_id = $1) AS expanded WHERE expanded.m_id IS NOT NULL; -$$ LANGUAGE 'sql' STABLE STRICT; +$$ LANGUAGE sql STABLE STRICT; @@ -949,7 +949,7 @@ BEGIN RETURN out_conferred; END; -$$ LANGUAGE 'plpgsql' STABLE STRICT; +$$ LANGUAGE plpgsql STABLE STRICT; -- Privileges from accessor to grantor, by user_no @@ -972,7 +972,7 @@ BEGIN RETURN out_conferred; END; -$$ LANGUAGE 'plpgsql' STABLE STRICT; +$$ LANGUAGE plpgsql STABLE STRICT; -- Privileges from accessor (by principal_id) to path @@ -1046,7 +1046,7 @@ BEGIN RETURN out_conferred; END; -$$ LANGUAGE 'plpgsql' STABLE STRICT; +$$ LANGUAGE plpgsql STABLE STRICT; -- List a user's memberships as a text string @@ -1066,7 +1066,7 @@ BEGIN END LOOP; RETURN mlist; END; -$$ LANGUAGE 'plpgsql' STRICT; +$$ LANGUAGE plpgsql STRICT; -- List a user's members as a text string @@ -1086,7 +1086,7 @@ BEGIN END LOOP; RETURN mlist; END; -$$ LANGUAGE 'plpgsql' STRICT; +$$ LANGUAGE plpgsql STRICT; -- List the privileges as a text string @@ -1113,7 +1113,7 @@ BEGIN END IF; RETURN plist; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; DROP TRIGGER principal_modified ON principal CASCADE; @@ -1175,7 +1175,7 @@ CREATE or REPLACE FUNCTION p_has_proxy_access_to( INT8, INT ) RETURNS SETOF INT8 WHERE (default_privileges & 5::BIT(24)) != 0::BIT(24) AND principal_id != $1 ) subquery; -$$ LANGUAGE 'sql' STABLE STRICT; +$$ LANGUAGE sql STABLE STRICT; -- A list of the principals who can proxy to this principal @@ -1185,7 +1185,7 @@ CREATE or REPLACE FUNCTION grants_proxy_access_from_p( INT8, INT ) RETURNS SETOF WHERE by_collection IS NULL AND by_principal != $1 AND by_principal IN (SELECT expand_members(g2.to_principal,$2) FROM grants g2 WHERE g2.by_principal = $1) ; -$$ LANGUAGE 'sql' STABLE STRICT; +$$ LANGUAGE sql STABLE STRICT; @@ -1209,7 +1209,7 @@ BEGIN VALUES( in_collection_id, in_status, tmp_int, in_dav_name); RETURN TRUE; END -$$ LANGUAGE 'plpgsql' VOLATILE STRICT; +$$ LANGUAGE plpgsql VOLATILE STRICT; CREATE or REPLACE FUNCTION new_sync_token( INT8, INT8 ) RETURNS INT8 AS $$ @@ -1254,7 +1254,7 @@ BEGIN -- Returning the new token RETURN new_token; END -$$ LANGUAGE 'plpgsql' STRICT; +$$ LANGUAGE plpgsql STRICT; DROP TRIGGER alarm_changed ON calendar_alarm CASCADE; diff --git a/dba/davical.sql b/dba/davical.sql index 347ebc34..e1f28097 100644 --- a/dba/davical.sql +++ b/dba/davical.sql @@ -36,7 +36,7 @@ BEGIN ELSE 0 END)::BIT(24); END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- Given an array of verbose DAV: or CalDAV: privilege names return the bitmask CREATE or REPLACE FUNCTION privilege_to_bits( TEXT[] ) RETURNS BIT(24) AS $$ @@ -62,7 +62,7 @@ BEGIN RETURN out_bits; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- This sequence is used in a number of places so that any DAV resource will have a unique ID @@ -262,7 +262,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS $$ RETURN NEW; END -$$ LANGUAGE 'plpgsql'; +$$ LANGUAGE plpgsql; CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data FOR EACH ROW EXECUTE PROCEDURE sync_dav_id(); diff --git a/dba/patches/1.1.12.sql b/dba/patches/1.1.12.sql index b50a6da1..dde540d4 100644 --- a/dba/patches/1.1.12.sql +++ b/dba/patches/1.1.12.sql @@ -46,7 +46,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS ' RETURN NEW; END -' LANGUAGE 'plpgsql'; +' LANGUAGE plpgsql; CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data FOR EACH ROW EXECUTE PROCEDURE sync_dav_id(); diff --git a/dba/patches/1.1.12a.sql b/dba/patches/1.1.12a.sql index 525da349..5c364afe 100644 --- a/dba/patches/1.1.12a.sql +++ b/dba/patches/1.1.12a.sql @@ -48,7 +48,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS ' RETURN NEW; END -' LANGUAGE 'plpgsql'; +' LANGUAGE plpgsql; CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data FOR EACH ROW EXECUTE PROCEDURE sync_dav_id(); diff --git a/dba/patches/1.2.1.sql b/dba/patches/1.2.1.sql index 197a6457..0b530c4b 100644 --- a/dba/patches/1.2.1.sql +++ b/dba/patches/1.2.1.sql @@ -42,7 +42,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS ' RETURN NEW; END -' LANGUAGE 'plpgsql'; +' LANGUAGE plpgsql; -- CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data -- FOR EACH ROW EXECUTE PROCEDURE sync_dav_id(); diff --git a/dba/patches/1.2.10a.sql b/dba/patches/1.2.10a.sql index 02d5f25d..d75fd020 100644 --- a/dba/patches/1.2.10a.sql +++ b/dba/patches/1.2.10a.sql @@ -28,7 +28,7 @@ CREATE or REPLACE FUNCTION check_db_revision( INT, INT, INT ) RETURNS BOOLEAN AS RAISE EXCEPTION ''Database has not been upgraded to %.%.%'', major, minor, patch; RETURN FALSE; END; -' LANGUAGE 'plpgsql'; +' LANGUAGE plpgsql; -- Just in case these constraints got added manually, so we won't fail diff --git a/dba/patches/1.2.1a.sql b/dba/patches/1.2.1a.sql index 648cb7c3..c7f3b90a 100644 --- a/dba/patches/1.2.1a.sql +++ b/dba/patches/1.2.1a.sql @@ -42,7 +42,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS ' RETURN NEW; END -' LANGUAGE 'plpgsql'; +' LANGUAGE plpgsql; -- CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data -- FOR EACH ROW EXECUTE PROCEDURE sync_dav_id(); diff --git a/dba/patches/1.2.1b.sql b/dba/patches/1.2.1b.sql index f4e006da..7d346c44 100644 --- a/dba/patches/1.2.1b.sql +++ b/dba/patches/1.2.1b.sql @@ -42,7 +42,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS ' RETURN NEW; END -' LANGUAGE 'plpgsql'; +' LANGUAGE plpgsql; -- CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data -- FOR EACH ROW EXECUTE PROCEDURE sync_dav_id(); diff --git a/dba/patches/1.2.6.sql b/dba/patches/1.2.6.sql index 7fb6e532..6672b0f0 100644 --- a/dba/patches/1.2.6.sql +++ b/dba/patches/1.2.6.sql @@ -50,7 +50,7 @@ BEGIN RETURN out_bits; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- This legacy conversion function will eventually be removed, once all logic -- has been converted to use bitmaps, or to use the bits_to_priv() output. @@ -103,7 +103,7 @@ BEGIN RETURN out_priv; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; CREATE or REPLACE FUNCTION get_permissions( INT, INT ) RETURNS TEXT AS $$ DECLARE @@ -156,12 +156,12 @@ BEGIN RETURN ''; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; CREATE or REPLACE FUNCTION get_group_role_no() RETURNS INT AS $$ SELECT role_no FROM roles WHERE role_name = 'Group' -$$ LANGUAGE 'sql' IMMUTABLE; +$$ LANGUAGE sql IMMUTABLE; CREATE or REPLACE FUNCTION has_legacy_privilege( INT, TEXT, INT ) RETURNS BOOLEAN AS $$ DECLARE @@ -210,7 +210,7 @@ BEGIN RETURN FALSE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; -- Given a verbose DAV: or CalDAV: privilege name return the bitmask @@ -247,7 +247,7 @@ BEGIN ELSE 0 END)::BIT(24); END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- Given an array of verbose DAV: or CalDAV: privilege names return the bitmask @@ -274,7 +274,7 @@ BEGIN RETURN out_bits; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; -- This legacy conversion function will eventually be removed, once all logic @@ -372,7 +372,7 @@ BEGIN RETURN out_priv; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; @@ -491,7 +491,7 @@ BEGIN RETURN out_bits; END $$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; +LANGUAGE plpgsql IMMUTABLE STRICT; ALTER TABLE relationship_type ADD COLUMN bit_confers BIT(24) DEFAULT privilege_to_bits(ARRAY['DAV::read','DAV::write']); diff --git a/dba/patches/1.2.7.sql b/dba/patches/1.2.7.sql index 1b5147d2..d0c6ba88 100644 --- a/dba/patches/1.2.7.sql +++ b/dba/patches/1.2.7.sql @@ -54,7 +54,7 @@ BEGIN VALUES( in_collection_id, in_status, tmp_int, in_dav_name); RETURN TRUE; END -$$ LANGUAGE 'plpgsql' VOLATILE STRICT; +$$ LANGUAGE plpgsql VOLATILE STRICT; CREATE or REPLACE FUNCTION new_sync_token( INT8, INT8 ) RETURNS INT8 AS $$ @@ -76,4 +76,4 @@ BEGIN INSERT INTO sync_tokens(collection_id, sync_token) VALUES( in_collection_id, tmp_int ); RETURN tmp_int; END -$$ LANGUAGE 'plpgsql' STRICT; +$$ LANGUAGE plpgsql STRICT; diff --git a/dba/rrule_functions-8.1.sql b/dba/rrule_functions-8.1.sql index 0175c8c6..b5108f2c 100644 --- a/dba/rrule_functions-8.1.sql +++ b/dba/rrule_functions-8.1.sql @@ -75,7 +75,7 @@ BEGIN RETURN result; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; -- Return a SETOF dates within the month of a particular date which match a string of BYDAY rule specifications @@ -170,7 +170,7 @@ BEGIN RETURN; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; -- Return a SETOF dates within the month of a particular date which match a string of BYDAY rule specifications @@ -204,7 +204,7 @@ BEGIN RETURN; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; -- Return a SETOF dates within the week of a particular date which match a single BYDAY rule specification @@ -238,12 +238,12 @@ BEGIN RETURN; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; CREATE or REPLACE FUNCTION event_has_exceptions( TEXT ) RETURNS BOOLEAN AS $$ SELECT $1 ~ E'\nRECURRENCE-ID(;TZID=[^:]+)?:[[:space:]]*[[:digit:]]{8}(T[[:digit:]]{6})?' -$$ LANGUAGE 'sql' IMMUTABLE STRICT; +$$ LANGUAGE sql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -261,7 +261,7 @@ BEGIN END IF; RETURN TRUE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; ------------------------------------------------------------------------------------------------------ @@ -277,7 +277,7 @@ BEGIN END IF; RETURN TRUE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; ------------------------------------------------------------------------------------------------------ @@ -293,7 +293,7 @@ BEGIN END IF; RETURN TRUE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; ------------------------------------------------------------------------------------------------------ @@ -309,7 +309,7 @@ BEGIN END IF; RETURN TRUE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; ------------------------------------------------------------------------------------------------------ @@ -356,7 +356,7 @@ BEGIN END IF; CLOSE curse; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; ------------------------------------------------------------------------------------------------------ @@ -396,7 +396,7 @@ BEGIN RETURN NEXT after; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -428,7 +428,7 @@ BEGIN END LOOP; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -473,7 +473,7 @@ BEGIN END LOOP; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -507,7 +507,7 @@ BEGIN END IF; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -535,7 +535,7 @@ BEGIN RETURN NEXT after; END IF; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -632,7 +632,7 @@ BEGIN END LOOP; -- RETURN QUERY; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -651,7 +651,7 @@ BEGIN RETURN NEXT rowvar.d; END LOOP; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -701,9 +701,9 @@ BEGIN RETURN FOUND; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; CREATE or REPLACE FUNCTION icalendar_interval_to_SQL( TEXT ) RETURNS interval AS $function$ SELECT CASE WHEN substring($1,1,1) = '-' THEN -1 ELSE 1 END * regexp_replace( regexp_replace($1, '[PT-]', '', 'g'), '([A-Z])', E'\\1 ', 'g')::interval; -$function$ LANGUAGE 'sql' IMMUTABLE STRICT; +$function$ LANGUAGE sql IMMUTABLE STRICT; diff --git a/dba/rrule_functions.sql b/dba/rrule_functions.sql index 1ea896d4..11691034 100644 --- a/dba/rrule_functions.sql +++ b/dba/rrule_functions.sql @@ -75,7 +75,7 @@ BEGIN RETURN result; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; -- Return a SETOF dates within the month of a particular date which match a string of BYDAY rule specifications @@ -161,7 +161,7 @@ BEGIN RETURN; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; -- Return a SETOF dates within the month of a particular date which match a string of BYDAY rule specifications @@ -195,7 +195,7 @@ BEGIN RETURN; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; -- Return a SETOF dates within the week of a particular date which match a single BYDAY rule specification @@ -229,12 +229,12 @@ BEGIN RETURN; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; CREATE or REPLACE FUNCTION event_has_exceptions( TEXT ) RETURNS BOOLEAN AS $$ SELECT $1 ~ E'\nRECURRENCE-ID(;TZID=[^:]+)?:[[:space:]]*[[:digit:]]{8}(T[[:digit:]]{6})?' -$$ LANGUAGE 'sql' IMMUTABLE STRICT; +$$ LANGUAGE sql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -252,7 +252,7 @@ BEGIN END IF; RETURN TRUE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; ------------------------------------------------------------------------------------------------------ @@ -268,7 +268,7 @@ BEGIN END IF; RETURN TRUE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; ------------------------------------------------------------------------------------------------------ @@ -284,7 +284,7 @@ BEGIN END IF; RETURN TRUE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; ------------------------------------------------------------------------------------------------------ @@ -300,7 +300,7 @@ BEGIN END IF; RETURN TRUE; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; ------------------------------------------------------------------------------------------------------ @@ -340,7 +340,7 @@ BEGIN END IF; CLOSE curse; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; ------------------------------------------------------------------------------------------------------ @@ -380,7 +380,7 @@ BEGIN RETURN NEXT after; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -410,7 +410,7 @@ BEGIN RETURN QUERY SELECT d FROM rrule_bysetpos_filter(curse,rrule.bysetpos) d; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -453,7 +453,7 @@ BEGIN RETURN QUERY SELECT d FROM rrule_bysetpos_filter(curse,rrule.bysetpos) d; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -483,7 +483,7 @@ BEGIN END IF; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -510,7 +510,7 @@ BEGIN RETURN NEXT after; END IF; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -610,7 +610,7 @@ BEGIN END LOOP; -- RETURN QUERY; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -626,7 +626,7 @@ BEGIN maxdate := current_date + '10 years'::interval; RETURN QUERY SELECT d FROM rrule_event_instances_range( basedate, repeatrule, basedate, maxdate, 300 ) d; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; ------------------------------------------------------------------------------------------------------ @@ -676,7 +676,7 @@ BEGIN RETURN FOUND; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE; +$$ LANGUAGE plpgsql IMMUTABLE; -- Create a composite type for the parts of the RRULE. @@ -707,10 +707,10 @@ BEGIN END LOOP; END; -$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; +$$ LANGUAGE plpgsql IMMUTABLE STRICT; CREATE or REPLACE FUNCTION icalendar_interval_to_SQL( TEXT ) RETURNS interval AS $function$ SELECT CASE WHEN substring($1,1,1) = '-' THEN -1 ELSE 1 END * regexp_replace( regexp_replace($1, '[PT-]', '', 'g'), '([A-Z])', E'\\1 ', 'g')::interval; -$function$ LANGUAGE 'sql' IMMUTABLE STRICT; +$function$ LANGUAGE sql IMMUTABLE STRICT; From e87a5abc266e5bba646e0da3783eceb95378d44e Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Sun, 14 Sep 2014 15:36:35 +0200 Subject: [PATCH 13/21] Takeover for the Davical Development Team --- debian/changelog | 9 +++++++-- debian/control | 9 +++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 55a56149..f6f86d6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,16 @@ -davical (1.1.2-1) unstable; urgency=low +davical (1.1.3~git20140914-1) unstable; urgency=low + [ Andrew McMillan ] * New upstream release (closes: #656395, #702403, #703290, #703383, #703387) * Updated the control file Vcs-* fields to the new addresses of the canonical git upstream repository. * Removed README.Debian which didn’t contain any useful information. - -- Andrew McMillan Wed, 01 May 2013 10:05:33 +1200 + [ Florian Schlichting ] + * Takeover for the Davical Development Team (closes: #742498) + * Upload to Debian (closes: #726577) + + -- Florian Schlichting Sun, 14 Sep 2014 15:29:54 +0200 davical (1.1.1-1) unstable; urgency=high diff --git a/debian/control b/debian/control index f5ab02cd..6aa9760b 100644 --- a/debian/control +++ b/debian/control @@ -1,11 +1,13 @@ Source: davical Section: web Priority: extra -Maintainer: Andrew McMillan +Maintainer: Davical Development Team +Uploaders: Andrew McMillan , + Florian Schlichting Standards-Version: 3.9.2 Build-Depends: debhelper (>= 7), libawl-php, gettext -Vcs-git: git://github.com/DAViCal/davical.git -Vcs-browser: https://github.com/DAViCal/davical +Vcs-git: https://gitlab.com/davical-project/davical.git +Vcs-browser: https://gitlab.com/davical-project/davical Homepage: http://davical.org/ Package: davical @@ -33,4 +35,3 @@ Description: The DAViCal CalDAV & CardDAV Server - technical documentation This package contains detailed technical documentation for the classes and methods in the DAViCal programs. Some user-centric configuration documentation is also included. - From 469b578ebbddf031118388bdd29c42cacdbc6273 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Sun, 14 Sep 2014 15:42:06 +0200 Subject: [PATCH 14/21] Use short-form debian/rules and fix source format declaration (closes: #730941) --- debian/rules | 88 +++----------------------------------------- debian/source/format | 2 +- 2 files changed, 7 insertions(+), 83 deletions(-) diff --git a/debian/rules b/debian/rules index 1f6d0525..f940aa7f 100755 --- a/debian/rules +++ b/debian/rules @@ -1,90 +1,14 @@ #!/usr/bin/make -f -# -# rules for DAViCal -# -# This file allows you to build any of the binary packages independantly, via binary- targets. -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') -# This has to be exported to make some magic below work. -export DH_OPTIONS +get-orig-source: + tar cJf ../davical_$(VERSION).orig.tar.xz --exclude-vcs --exclude=.gitattributes . -build: build-stamp -build-stamp: - dh_testdir - $(MAKE) - touch build-stamp +%: + dh $@ -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - $(MAKE) clean - -rm -f build - - dh_clean - -install: DH_OPTIONS= -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - - dh_install - -# This single target is used to build all the packages, all at once, or -# one at a time. So keep in mind: any options passed to commands here will -# affect _all_ packages. Anything you want to only affect one package -# should be put in another target, such as the install target. -binary-common: - dh_testdir - dh_testroot +override_dh_installchangelogs: dh_installchangelogs ChangeLog - dh_installdocs --exclude=.gitignore -# dh_installexamples -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installcatalogs -# dh_installpam -# dh_installmime -# dh_installinit -# dh_installman -# dh_installcron -# dh_installinfo -# dh_installwm -# dh_installudev -# dh_lintian -# dh_undocumented -# dh_strip -# dh_link - dh_compress --exclude=.js - dh_fixperms rm debian/davical/usr/share/davical/htdocs/.htaccess || true -# dh_perl -# dh_python -# dh_makeshlibs - dh_installdeb -# dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb -# Build architecture independant packages using the common target. -binary-indep: build install - $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common - -# Build architecture dependant packages using the common target. -binary-arch: build install - -# Any other binary targets build just one binary package at a time. -binary-%: build install - make -f debian/rules binary-common DH_OPTIONS=-p$* - -binary: binary-indep binary-arch - -.PHONY: build clean binary-indep binary-arch binary-common binary install diff --git a/debian/source/format b/debian/source/format index 89ae9db8..163aaf8d 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) From f42a69bc6a10d6d7ab3a47488adb454df38f6083 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Sun, 14 Sep 2014 16:09:13 +0200 Subject: [PATCH 15/21] Clean up duplicate files (symlink identical files in api documentation) --- debian/davical-doc.links | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 debian/davical-doc.links diff --git a/debian/davical-doc.links b/debian/davical-doc.links new file mode 100644 index 00000000..6dc6ef07 --- /dev/null +++ b/debian/davical-doc.links @@ -0,0 +1,4 @@ +usr/share/doc/davical-doc/api/media/images/Class_logo.png usr/share/doc/davical-doc/api/media/images/Interface_logo.png +usr/share/doc/davical-doc/api/media/images/StaticVariable.png usr/share/doc/davical-doc/api/media/images/Variable.png +usr/share/doc/davical-doc/api/media/images/PrivateClass_logo.png usr/share/doc/davical-doc/api/media/images/private_class_logo.png +usr/share/doc/davical-doc/api/media/images/Method.png usr/share/doc/davical-doc/api/media/images/StaticMethod.png From c38809d5cf71512f3428542bbbbbf34e0f3da6dc Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Sun, 14 Sep 2014 16:47:37 +0200 Subject: [PATCH 16/21] debian/control: update and sort dependencies, add php5, php5-cli (closes: #717043), php5-curl to Recommends (closes: #656390) --- debian/control | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/debian/control b/debian/control index 6aa9760b..00e8e372 100644 --- a/debian/control +++ b/debian/control @@ -8,13 +8,21 @@ Standards-Version: 3.9.2 Build-Depends: debhelper (>= 7), libawl-php, gettext Vcs-git: https://gitlab.com/davical-project/davical.git Vcs-browser: https://gitlab.com/davical-project/davical -Homepage: http://davical.org/ +Homepage: http://www.davical.org/ Package: davical Architecture: all -Depends: ${misc:Depends}, debconf (>= 1.0.32), php5-pgsql, postgresql-client (>= 8.1), libawl-php (>= 0.54-1~), libawl-php (<< 0.55), libdbd-pg-perl, libyaml-perl -Recommends: postgresql (>= 8.3) -Description: The DAViCal CalDAV & CardDAV Server +Depends: ${misc:Depends}, ${perl:Depends}, + libawl-php (>= 0.54-1~), libawl-php (<< 0.55), + libdbd-pg-perl, + libyaml-perl, + php5, + php5-cli, + php5-pgsql, + postgresql-client +Recommends: php5-curl, + postgresql +Description: PHP CalDAV and CardDAV Server The DAViCal CalDAV Server is designed to store CalDAV calendars and CardDAV addressbooks, such as those from Evolution, Sunbird/Lightning, Mulberry, iCal, iPhone or SOHO Organizer, in a central location, @@ -25,7 +33,7 @@ Package: davical-doc Section: doc Architecture: all Depends: ${misc:Depends} -Description: The DAViCal CalDAV & CardDAV Server - technical documentation +Description: PHP CalDAV and CardDAV Server - technical documentation The DAViCal CalDAV Server is designed to store CalDAV calendars and CardDAV addressbooks, such as those from Evolution, Sunbird/Lightning, Mulberry, iCal, iPhone or SOHO Organizer, in a central location, @@ -33,5 +41,5 @@ Description: The DAViCal CalDAV & CardDAV Server - technical documentation basic administration interface. . This package contains detailed technical documentation for the - classes and methods in the DAViCal programs. Some user-centric + classes and methods in the DAViCal programs. Some user-centric configuration documentation is also included. From f25f1fc81811e263ebd442bb02763937d6ae3a7c Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Sun, 14 Sep 2014 17:43:17 +0200 Subject: [PATCH 17/21] Add doc-base registration for api doc and website in davical-doc --- debian/davical-doc.doc-base.api | 12 ++++++++++++ debian/davical-doc.doc-base.website | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 debian/davical-doc.doc-base.api create mode 100644 debian/davical-doc.doc-base.website diff --git a/debian/davical-doc.doc-base.api b/debian/davical-doc.doc-base.api new file mode 100644 index 00000000..9063dbea --- /dev/null +++ b/debian/davical-doc.doc-base.api @@ -0,0 +1,12 @@ +Document: davical-api +Title: DAViCal API Documentation +Section: Programming/PHP +Abstract: Technical documentation for DAViCal + The DAViCal CalDAV & CardDAV Server is designed to store CalDAV calendars and + CardDAV addressbooks in a central location, providing shared calendars, + free/busy publication and a basic administration interface. This API + documentation details the classes and methods in die DAViCal programs. + +Format: HTML +Index: /usr/share/doc/davical-doc/api/index.html +Files: /usr/share/doc/davical-doc/api/*.html /usr/share/doc/davical-doc/api/*/*.html /usr/share/doc/davical-doc/api/*/*/*.html diff --git a/debian/davical-doc.doc-base.website b/debian/davical-doc.doc-base.website new file mode 100644 index 00000000..87c619df --- /dev/null +++ b/debian/davical-doc.doc-base.website @@ -0,0 +1,12 @@ +Document: davical-website +Title: DAViCal Website +Section: Data Management +Abstract: The DAViCal Website + The DAViCal CalDAV & CardDAV Server can store calendars and addressbooks in a + central location, providing shared calendars, free/busy publication and a + basic administration interface. This offline copy of the website provides + configuration information for both the server and a diverse range of clients. + +Format: HTML +Index: /usr/share/doc/davical-doc/website/index.php.gz +Files: /usr/share/doc/davical-doc/website/*.php /usr/share/doc/davical-doc/website/*.php.gz /usr/share/doc/davical-doc/website/*/*.php From 4c8c48830ac0e2692a53ebf433a470418ad447dc Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Sun, 14 Sep 2014 17:58:25 +0200 Subject: [PATCH 18/21] Bump dh compat to level 9 --- debian/compat | 2 +- debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/compat b/debian/compat index 7ed6ff82..ec635144 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/debian/control b/debian/control index 00e8e372..6dc23e0a 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: Davical Development Team Uploaders: Andrew McMillan , Florian Schlichting Standards-Version: 3.9.2 -Build-Depends: debhelper (>= 7), libawl-php, gettext +Build-Depends: debhelper (>= 9), libawl-php, gettext Vcs-git: https://gitlab.com/davical-project/davical.git Vcs-browser: https://gitlab.com/davical-project/davical Homepage: http://www.davical.org/ From dfb10a7782fe81124f03b7f5c418674e29e6d788 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Sun, 14 Sep 2014 18:00:41 +0200 Subject: [PATCH 19/21] Add a debian/watch file --- debian/watch | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 debian/watch diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..1b500d77 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +https://gitlab.com/davical-project/davical/tags \/davical-project\/davical\/repository\/archive.tar.gz\?ref=r([\d.]*) From 1f8a4a93bef6ab64f66ee046459af5e08e07eb39 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Sun, 14 Sep 2014 21:33:37 +0200 Subject: [PATCH 20/21] Switch d/copyright to copyright-format 1.0, amend CREDITS from git log --- CREDITS | 45 +++++++++++++++- Makefile | 4 +- debian/copyright | 132 ++++++++++++++++++++++++++++++++++------------- 3 files changed, 141 insertions(+), 40 deletions(-) diff --git a/CREDITS b/CREDITS index d8d9bb67..a1dd165b 100644 --- a/CREDITS +++ b/CREDITS @@ -18,4 +18,47 @@ And a big thank you to the translators: Many other people have contributed bug reports, fixes and in many small ways. These are acknowledged in the changelog -and version control history. +and version control history: + +Aiko Barz +Andrew McMillan +Andrew Ruthven +Aurelien Requiem +Christian Kier +Christoph Anton Mitterer +Cyril Giraud +Daniel Aleksandersen +DAViCal Administrator +Dávid Takács +Emmanuel Seyman +fbiete@gmail.com +Felix Möller +Florian Schlichting +Francois Marier +Francois Perichon +Frank Steinberg +Henri Sivonen +Ján Máté +Jason Alavaliant +Jens Zahner +Jeppe Bob Dyrby +Jeroen van Disseldorp +Jim Fenton +Jim Hague +lebarjack +Leho Kraav +Masahiro Mikami +Matthias Althaus +Matthias Beyer +Matthias Mohr +Maxime Delorme +Michael Trausch +Milan Medlik +Patrick Näf Moser +Paul Willoughby +Peter Schaefer-Hutter +Philipp Matthias Hahn +Raphael Hertzog +Rob Ostensen +Vincent Van Houtte +Wolfgang Herget diff --git a/Makefile b/Makefile index 56002fc7..21952e67 100755 --- a/Makefile +++ b/Makefile @@ -55,8 +55,8 @@ snapshot: release clean: rm -f built-docs built-po -find . -name "*~" -delete - -rm docs/translation.pdf - -rm davical.spec + rm -f docs/translation.pdf + rm -f davical.spec .PHONY: clean-all clean-all: clean diff --git a/debian/copyright b/debian/copyright index 5e9e0932..b7f165fa 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,47 +1,105 @@ -This package was debianized by Andrew McMillan +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://gitlab.com/davical-project/davical +Upstream-Name: davical +Upstream-Contact: davical-devel@lists.sourceforge.net -It was downloaded from http://debian.mcmillan.net.nz/packages/davical/ +Files: * +Copyright: 2006 - 2013, Andrew McMillan + 2006 - 2008, Catalyst IT Ltd + 2008 - 2013, Morphoss Ltd + 2007 - 2014, Davical contributors (see CREDITS for details) +License: GPL-2+ -Upstream Author: Andrew McMillan +Files: dba/caldav_functions.sql htdocs/public.php htdocs/tools.php + inc/pubsub.php inc/caldav-MKCOL.php inc/log_caldav_action.php + inc/caldav-ACL.php inc/caldav-PROPPATCH.php inc/RRule.php + inc/HTTPAuthSession.php inc/caldav-client.php inc/DAViCalSession.php + inc/caldav-REPORT.php inc/caldav-MOVE.php +Copyright: 2006 - 2013, Andrew McMillan + 2006 - 2008, Catalyst IT Ltd + 2008 - 2013, Morphoss Ltd + 2007 - 2014, Davical contributors (see CREDITS for details) +License: GPL-2 -Copyright: 2006-2011 Andrew McMillan +Files: htdocs/tz.php inc/CalDAVRequest.php inc/iSchedule-POST.php + inc/DAVResource.php inc/external-fetch.php inc/DAVTicket.php + inc/iSchedule.php inc/tz/* scripts/tz-update.php scripts/refresh-alarms.php + scripts/archive-old-events.php +Copyright: 2006 - 2013, Andrew McMillan + 2006 - 2008, Catalyst IT Ltd + 2008 - 2013, Morphoss Ltd + 2007 - 2014, Davical contributors (see CREDITS for details) +License: GPL-3+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. +Files: inc/caldav-client-v2.php +Copyright: 2006 - 2013, Andrew McMillan + 2006 - 2008, Catalyst IT Ltd + 2008 - 2013, Morphoss Ltd + 2007 - 2014, Davical contributors (see CREDITS for details) +License: LGPL-3+ - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +Files: inc/check_UTF8.php +Copyright: 1998, Netscape Communications Corporation + 2003, Henri Sivonen, hsivonen@iki.fi +License: NPL-1.1_or_GPL-2+_or_LGPL-2.1+ + The contents of this file are subject to the Netscape Public License + Version 1.1 (the "License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.mozilla.org/NPL/ + . + Software distributed under the License is distributed on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + for the specific language governing rights and limitations under the + License. + . + Alternatively, the contents of this file may be used under the terms of + either the GNU General Public License Version 2 or later (the "GPL"), or + the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + in which case the provisions of the GPL or the LGPL are applicable instead + of those above. If you wish to allow use of your version of this file only + under the terms of either the GPL or the LGPL, and not to allow others to + use your version of this file under the terms of the NPL, indicate your + decision by deleting the provisions above and replace them with the notice + and other provisions required by the GPL or the LGPL. If you do not delete + the provisions above, a recipient may use your version of this file under + the terms of any one of the NPL, the GPL or the LGPL. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA +Files: debian/* +Copyright: 2006-2012, Andrew McMillan + 2014, Florian Schlichting +License: GPL-2+ -You are free to distribute this software under the terms of the GNU General -Public License. On Debian systems, the complete text of the GNU General -Public License can be found in /usr/share/common-licenses/GPL file. +License: GPL-2+ + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + . + On Debian systems, the complete text of version 2 of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-2'. +License: GPL-2 + This program is free software; you can redistribute it and/or modify it + under the terms of version 2 of the GNU General Public License as + published by the Free Software Foundation. + . + On Debian systems, the complete text of version 2 of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-2'. -License for Translation Building code -===================================== -The following files inherit their license separately: - scripts/po/extract.pl - scripts/po/rebuild-translations.sh +License: GPL-3+ + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3, or (at your option) any + later version. + . + On Debian systems, the complete text of version 3 of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-3'. -The process used for building the translations for DAViCal is based on -prior code originally from the Horde project and subsequently from the -Gallery project. It has also been somewhat further modified here. - -The applicable Horde license is the LGPL, as identified here: - http://cvs.horde.org/co.php/horde/COPYING?r=2.1 - -Authors: - Copyright 2000-2002 Joris Braakman - Copyright 2001-2002 Chuck Hagenbuch - Copyright 2001-2002 Jan Schneider - Copyright 2002-2003 Bharat Mediratta - Copyright 2006-2008 Andrew McMillan +License: LGPL-3+ + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 3, or (at your option) + any later version. + . + On Debian systems, the complete text of version 3 of the GNU Lesser + General Public License can be found in `/usr/share/common-licenses/LGPL-3'. From ab2541e6c0f58fb168424bfe2451b75269036199 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Sun, 14 Sep 2014 21:37:47 +0200 Subject: [PATCH 21/21] Declare compliance with Debian Policy 3.9.5 and update d/changelog --- debian/changelog | 10 ++++++++++ debian/control | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f6f86d6b..4e49e857 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,16 @@ davical (1.1.3~git20140914-1) unstable; urgency=low [ Florian Schlichting ] * Takeover for the Davical Development Team (closes: #742498) + * Use short-form debian/rules and fix source format declaration + (closes: #730941) + * Clean up duplicate files (symlink identical files in api documentation) + * debian/control: update and sort dependencies, add php5, php5-cli + (closes: #717043), php5-curl to Recommends (closes: #656390) + * Add doc-base registration for api doc and website in davical-doc + * Bump dh compat to level 9 + * Add a debian/watch file + * Switch d/copyright to copyright-format 1.0, amend CREDITS from git log + * Declare compliance with Debian Policy 3.9.5 * Upload to Debian (closes: #726577) -- Florian Schlichting Sun, 14 Sep 2014 15:29:54 +0200 diff --git a/debian/control b/debian/control index 6dc23e0a..351b6415 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: extra Maintainer: Davical Development Team Uploaders: Andrew McMillan , Florian Schlichting -Standards-Version: 3.9.2 +Standards-Version: 3.9.5 Build-Depends: debhelper (>= 9), libawl-php, gettext Vcs-git: https://gitlab.com/davical-project/davical.git Vcs-browser: https://gitlab.com/davical-project/davical