Projects
Kolab:16:Testing
iRony
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
iRony.spec
Changed
@@ -35,10 +35,9 @@ %endif %global _ap_sysconfdir %{_sysconfdir}/%{httpd_name} -%global upstream_version 0.4.8 Name: iRony -Version: 0.4.8.5 +Version: 0.4.7 Release: 1%{?dist} Summary: DAV for Kolab Groupware @@ -47,7 +46,7 @@ URL: http://kolab.org # From 7ebe1adc8b7c0f818d837d682b2b85202aac9303 -Source0: iRony-%{upstream_version}.tar.gz +Source0: iRony-%{version}.tar.gz Source1: iRony.conf Source2: iRony.logrotate @@ -74,7 +73,7 @@ Kolab Groupware solution. %prep -%setup -q -n %{name}-%{upstream_version} +%setup -q %build
View file
buildtarball.sh
Deleted
@@ -1,22 +0,0 @@ -#!/bin/bash - -set -e - -VERSION=0.4.8 -GIT_REF=master -NAME=iRony-$VERSION - -ROOT_DIR=$(pwd) - -rm -Rf /tmp/$NAME -mkdir /tmp/$NAME -cd /tmp/$NAME - -rm -f $NAME.tar.gz - -d "$NAME" && rm -rf "$NAME" -git clone --branch master ssh://git@git.kolab.org/diffusion/rI/iRony.git $NAME -pushd $NAME -git reset --hard $GIT_REF -git archive --prefix=$NAME/ -o "$ROOT_DIR/$NAME.tar.gz" HEAD - -cd "$PWD"
View file
debian.changelog
Changed
@@ -1,9 +1,3 @@ -irony (0.4.8.5-1~kolab1) unstable; urgency=low - - * New release - - -- Christian Mollekopf <mollekopf@apheleia-it.ch> Fri, 24 Feb 2023 12:12:13 +0100 - irony (0.4.7-1~kolab1) unstable; urgency=low * Disable unauthenticated access
View file
iRony-0.4.8.tar.gz/composer.json -> iRony-0.4.7.tar.gz/composer.json
Changed
@@ -3,9 +3,15 @@ "description": "iRony - The Kolab WebDAV/CalDAV/CardDAV Server", "license": "AGPL-3.0", "version": "0.4-dev", + "repositories": + { + "type": "vcs", + "url": "https://git.kolab.org/diffusion/PNL/php-net_ldap.git" + } + , "require": { - "php": ">=7.2", - "sabre/dav" : "~4.5.1" + "php": ">=5.4.1", + "sabre/dav" : "~2.1.6" }, "require-dev": { "pear/pear-core-minimal": "~1.10.1", @@ -16,6 +22,6 @@ "pear/net_smtp": "~1.7.1", "pear/net_ldap2": "~2.2.0", "kolab/net_ldap3": "dev-master", - "phpunit/phpunit": "^9.6" + "phpunit/phpunit": "~4.4.0" } }
View file
iRony-0.4.8.tar.gz/composer.json-dist -> iRony-0.4.7.tar.gz/composer.json-dist
Changed
@@ -4,7 +4,7 @@ "license": "AGPL-3.0", "version": "0.4-dev", "require": { - "php": ">=7.2" + "php": ">=5.3.3" }, "autoload": { "psr-0": {
View file
iRony-0.4.8.tar.gz/lib/Kolab/CalDAV/CalendarBackend.php -> iRony-0.4.7.tar.gz/lib/Kolab/CalDAV/CalendarBackend.php
Changed
@@ -347,7 +347,7 @@ if ($storage && ($event = $storage->get_object($uid))) { // deliver attachment content directly - if (!empty($part) && !empty($event'_attachments')) { + if ($part && !empty($event'_attachments')) { foreach ($event'_attachments' as $attachment) { if ($attachment'id' == $part) { header('Content-Type: ' . $attachment'mimetype'); @@ -423,7 +423,7 @@ } // map attachments attribute - $object'_attachments' = !empty($object'attachments') ? $object'attachments' : array(); + $object'_attachments' = $object'attachments'; unset($object'attachments'); // remove categories from object data (only for tasks yet) @@ -972,8 +972,7 @@ * Checks if specified message part is a vcalendar data * * @param rcube_message_part Part object - * - * @return bool True if part is of type vcard + * @return boolean True if part is of type vcard */ protected static function part_is_itip($part) { @@ -1026,7 +1025,6 @@ * Parse the given iCal string into a hash array kolab_format_event can handle * * @param string iCal data block - * * @return array Hash array with event properties or null on failure */ private function parse_calendar_data($calendarData, $uid) @@ -1113,8 +1111,7 @@ /** * Provide basic query for kolab_storage_folder::select() * - * @param bool Filter for inbox events (i.e. status=NEEDS-ACTION) - * + * @param boolean Filter for inbox events (i.e. status=NEEDS-ACTION) * @return array List of query parameters for kolab_storage_folder::select() */ private function _event_filter_query($inbox = false) @@ -1144,10 +1141,9 @@ /** * Check the given event if it matches the filter * - * @param array Hash array with event properties - * @param bool Filter for inbox events (i.e. status=NEEDS-ACTION) - * - * @return bool True if matches, false if not + * @param array Hash array with event properties + * @param boolean Filter for inbox events (i.e. status=NEEDS-ACTION) + * @return boolean True if matches, false if not */ private function _event_filter_compare($event, $inbox = false) { @@ -1157,14 +1153,13 @@ $user_emails = $this->get_user_emails(); } - if (!empty($event'attendees') && is_array($event'attendees')) { + if (is_array($event'attendees')) { foreach ($event'attendees' as $attendee) { if (in_array($attendee'email', $user_emails)) { - $status = !empty($attendee'status') ? $attendee'status' : null; - if ($status == 'DECLINED') { + if ($attendee'status' == 'DECLINED') { return false; } - if ($inbox && $status == 'NEEDS-ACTION') { + else if ($inbox && $attendee'status' == 'NEEDS-ACTION') { return true; } } @@ -1178,7 +1173,6 @@ * Generate an Etag string from the given event data * * @param array Hash array with event properties from libkolab - * * @return string Etag string */ private static function _get_etag($event)
View file
iRony-0.4.8.tar.gz/lib/Kolab/CardDAV/ContactsBackend.php -> iRony-0.4.7.tar.gz/lib/Kolab/CardDAV/ContactsBackend.php
Changed
@@ -134,16 +134,17 @@ public function get_storage_folder($id) { // resolve alias name - if (!empty($this->aliases$id)) { + if ($this->aliases$id) { $id = $this->aliases$id; } - if (!empty($this->folders$id)) { + if ($this->folders$id) { DAVBackend::check_storage_folder($this->folders$id); return $this->folders$id; } - - return DAVBackend::get_storage_folder($id, 'contact'); + else { + return DAVBackend::get_storage_folder($id, 'contact'); + } } /** @@ -209,7 +210,7 @@ } // resolve aliases (addressbook by folder name) - if (!empty($this->aliases$addressBookUri)) { + if ($this->aliases$addressBookUri) { $id = $this->aliases$addressBookUri; } @@ -681,12 +682,12 @@ $vc = new VObject\Component\VCard(); $vc->VERSION = '3.0'; // always set to 3.0 and let Sabre/DAV convert to 4.0 if necessary $vc->PRODID = '-//Kolab//iRony DAV Server ' . KOLAB_DAV_VERSION . '//Sabre//Sabre VObject ' . VObject\Version::VERSION . '//EN'; - $vc->UID = $contact'uid'; + $vc->add('UID', $contact'uid'); $vc->add('FN', $contact'name'); // distlists are KIND:group - if (isset($contact'_type') && $contact'_type' == 'distribution-list') { + if ($contact'_type' == 'distribution-list') { // group cards are actually vcard version 4 if (!$this->is_apple()) { $vc->version = '4.0'; @@ -709,18 +710,10 @@ $vc->add($prop_prefix . 'MEMBER', $value); } } - else { - $allname = ($contact'surname' ?? '') - . ($contact'firstname' ?? '') - . ($contact'middlename' ?? '') - . ($contact'prefix' ?? '') - . ($contact'suffix' ?? ''); - - if ($allname != '') { - $n = $vc->create('N'); - $n->setParts(array($contact'surname' ?? '', $contact'firstname' ?? '', $contact'middlename' ?? '', $contact'prefix' ?? '', $contact'suffix' ?? '')); - $vc->add($n); - } + else if ($contact'surname' . $contact'firstname' . $contact'middlename' . $contact'prefix' . $contact'suffix' != '') { + $n = $vc->create('N'); + $n->setParts(array(strval($contact'surname'), strval($contact'firstname'), strval($contact'middlename'), strval($contact'prefix'), strval($contact'suffix'))); + $vc->add($n); } if (!empty($contact'nickname')) @@ -759,48 +752,36 @@ } } - if (!empty($contact'email')) { - foreach ((array)$contact'email' as $email) { - $types = array('INTERNET'); - if (!empty($email'type')) - $types = array_merge($types, explode(',', strtoupper($email'type'))); - $vc->add('EMAIL', $email'address', array('type' => $types)); - } + foreach ((array)$contact'email' as $email) { + $types = array('INTERNET'); + if (!empty($email'type')) + $types = array_merge($types, explode(',', strtoupper($email'type'))); + $vc->add('EMAIL', $email'address', array('type' => $types)); } - if (!empty($contact'phone')) { - foreach ((array)$contact'phone' as $phone) { - $type = $this->phonetypes$phone'type' ?? $phone'type'; - $params = !empty($type) ? array('type' => explode(',', strtoupper($type))) : array(); - $vc->add('TEL', $phone'number', $params); - } + foreach ((array)$contact'phone' as $phone) { + $type = $this->phonetypes$phone'type' ?: $phone'type'; + $params = !empty($type) ? array('type' => explode(',', strtoupper($type))) : array(); + $vc->add('TEL', $phone'number', $params); } - if (!empty($contact'website')) { - if (!empty($contact'website')) { - foreach ((array)$contact'website' as $website) { - $params = !empty($website'type') ? array('type' => explode(',', strtoupper($website'type'))) : array(); - $vc->add('URL', $website'url', $params); - } - } + foreach ((array)$contact'website' as $website) { + $params = !empty($website'type') ? array('type' => explode(',', strtoupper($website'type'))) : array(); + $vc->add('URL', $website'url', $params); } - if (!empty($contact'im')) { - $improtocolmap = array_flip($this->improtocols); - foreach ((array)$contact'im' as $im) { - list($prot, $val) = explode(':', $im, 2); - if ($val && !$v4) $vc->add('x-' . ($improtocolmap$prot ?: $prot), $val); - else $vc->add('IMPP', $im); - } + $improtocolmap = array_flip($this->improtocols); + foreach ((array)$contact'im' as $im) { + list($prot, $val) = explode(':', $im, 2); + if ($val && !$v4) $vc->add('x-' . ($improtocolmap$prot ?: $prot), $val); + else $vc->add('IMPP', $im); } - if (!empty($contact'address')) { - foreach ((array)$contact'address' as $adr) { - $params = !empty($adr'type') ? array('type' => strtoupper($adr'type')) : array(); - $vadr = $vc->create('ADR', null, $params); - $vadr->setParts(array('','', $adr'street', $adr'locality', $adr'region', $adr'code', $adr'country')); - $vc->add($vadr); - } + foreach ((array)$contact'address' as $adr) { + $params = !empty($adr'type') ? array('type' => strtoupper($adr'type')) : array(); + $vadr = $vc->create('ADR', null, $params); + $vadr->setParts(array('','', $adr'street', $adr'locality', $adr'region', $adr'code', $adr'country')); + $vc->add($vadr); } if (!empty($contact'notes')) @@ -841,7 +822,7 @@ $vc->add('FBURL', $contact'freebusyurl'); } - if (!empty($contact'lang') && is_array($contact'lang')) { + if (is_array($contact'lang')) { foreach ($contact'lang' as $value) { $vc->add('LANG', $value); } @@ -854,10 +835,8 @@ } // add custom properties - if (!empty($contact'x-custom')) { - foreach ((array)$contact'x-custom' as $prop) { - $vc->add($prop0, $prop1); - } + foreach ((array)$contact'x-custom' as $prop) { + $vc->add($prop0, $prop1); } // send some known fields as itemN.X-AB* for Apple clients @@ -1087,9 +1066,8 @@ } } - if (isset($contact'im') && is_array($contact'im')) { + if (is_array($contact'im')) $contact'im' = array_unique($contact'im'); - } return $contact; } @@ -1164,9 +1142,9 @@ /** * Extract array values by a filter * - * @param array $arr Array to filter - * @param array|string $values Array or comma separated list of values to keep - * @param bool $inverse Invert key selection: remove the listed values + * @param array Array to filter + * @param keys Array or comma separated list of values to keep + * @param boolean Invert key selection: remove the listed values * * @return array The filtered array */ @@ -1176,15 +1154,15 @@ $values = explode(',', $values); } + // explode single, comma-separated value + if (count($arr) == 1 && strpos($arr0, ',')) { + $arr = explode(',', $arr0); + } + $result = array(); $keep = array_flip((array)$values); if (!empty($arr)) { - // explode single, comma-separated value - if (count($arr) == 1 && strpos($arr0, ',')) { - $arr = explode(',', $arr0); - } - foreach ($arr as $key => $val) { if ($inverse != isset($keepstrtolower($val))) { $result$key = $val;
View file
iRony-0.4.8.tar.gz/lib/Kolab/CardDAV/LDAPDirectory.php -> iRony-0.4.7.tar.gz/lib/Kolab/CardDAV/LDAPDirectory.php
Changed
@@ -62,7 +62,7 @@ $this->addressBookInfo = array( 'id' => self::DIRECTORY_NAME, 'uri' => self::DIRECTORY_NAME, - '{DAV:}displayname' => !empty($config'name') ? $config'name' : "LDAP Directory", + '{DAV:}displayname' => $config'name' ?: "LDAP Directory", '{urn:ietf:params:xml:ns:carddav}supported-address-data' => new CardDAV\Xml\Property\SupportedAddressData(), 'principaluri' => $principalUri, ); @@ -85,12 +85,12 @@ private function connect() { - if (!isset($this->ldap)) { - $this->ldap = new rcube_ldap($this->config, $this->config'debug'); - $this->ldap->set_pagesize(!empty($this->config'sizelimit') ? $this->config'sizelimit' : 10000); - } + if (!isset($this->ldap)) { + $this->ldap = new rcube_ldap($this->config, $this->config'debug'); + $this->ldap->set_pagesize($this->config'sizelimit' ?: 10000); + } - return $this->ldap->ready ? $this->ldap : null; + return $this->ldap->ready ? $this->ldap : null; } /** @@ -199,7 +199,7 @@ $children = array(); // return cached index - if (!$this->query && empty($this->config'searchonly') && $this->cache && ($cached_index = $this->cache->get('index'))) { + if (!$this->query && !$this->config'searchonly' && $this->cache && ($cached_index = $this->cache->get('index'))) { foreach ($cached_index as $uid => $c) { $obj = array( 'id' => $uid, @@ -214,7 +214,7 @@ } // query LDAP if we have a search query or listing is allowed - if (($this->query || empty($this->config'searchonly')) && ($ldap = $this->connect())) { + if (($this->query || !$this->config'searchonly') && ($ldap = $this->connect())) { // set pagesize from query limit attribute if ($this->query && $this->query->limit) { $this->ldap->set_pagesize(intval($this->query->limit));
View file
iRony-0.4.8.tar.gz/lib/Kolab/DAV/Auth/HTTPBasic.php -> iRony-0.4.7.tar.gz/lib/Kolab/DAV/Auth/HTTPBasic.php
Changed
@@ -28,8 +28,6 @@ use \rcube_user; use \rcube_utils; use Sabre\DAV; -use Sabre\HTTP\RequestInterface; -use Sabre\HTTP\ResponseInterface; /** * @@ -70,8 +68,8 @@ $cache->set($cache_key, array( 'user' => $auth'user', 'host' => $auth'host', - 'dn' => $_SESSION'kolab_dn' ?? null, - 'vars' => $_SESSION'kolab_auth_vars' ?? null, + 'dn' => $_SESSION'kolab_dn', + 'vars' => $_SESSION'kolab_auth_vars', )); } @@ -130,28 +128,6 @@ } /** - * When this method is called, the backend must check if authentication was - * successful. - * - * The returned value must be one of the following - * - * true, "principals/username" - * false, "reason for failure" - * - * @return array - */ - public function check(RequestInterface $request, ResponseInterface $response) - { - $result = parent::check($request, $response); - - if ($result0) { - $result1 = $this->principalPrefix . $this->getCurrentUser(); - } - - return $result; - } - - /** * Storage host selection */ protected function _select_host($username)
View file
iRony-0.4.8.tar.gz/lib/Kolab/DAV/Node.php -> iRony-0.4.7.tar.gz/lib/Kolab/DAV/Node.php
Changed
@@ -91,7 +91,7 @@ */ public function getLastModified() { - return !empty($this->data'modified') ? $this->data'modified' : null; + return $this->data'modified' ? $this->data'modified' : null; } /**
View file
iRony-0.4.8.tar.gz/public_html/index.php -> iRony-0.4.7.tar.gz/public_html/index.php
Changed
@@ -123,12 +123,12 @@ if ($services'CALDAV') { $caldav_backend = new \Kolab\CalDAV\CalendarBackend(); - $caldav_backend->setUserAgent($_SERVER'HTTP_USER_AGENT' ?? ''); + $caldav_backend->setUserAgent($_SERVER'HTTP_USER_AGENT'); $nodes = new \Kolab\CalDAV\CalendarRootNode($principal_backend, $caldav_backend); } if ($services'CARDDAV') { $carddav_backend = new \Kolab\CardDAV\ContactsBackend(); - $carddav_backend->setUserAgent($_SERVER'HTTP_USER_AGENT' ?? ''); + $carddav_backend->setUserAgent($_SERVER'HTTP_USER_AGENT'); $nodes = new \Kolab\CardDAV\AddressBookRoot($principal_backend, $carddav_backend); } if ($services'WEBDAV') { @@ -145,7 +145,7 @@ $server->setBaseUri($base_uri); // connect logger -if (isset($logger) && is_object($logger)) { +if (isset($loggeer) && is_object($logger)) { $server->addPlugin($logger); }
View file
iRony-0.4.8.tar.gz/test/Unit/CardDAV/ContactsBackend.php -> iRony-0.4.7.tar.gz/test/Unit/CardDAV/ContactsBackend.php
Changed
@@ -1,10 +1,14 @@ <?php use Kolab\CardDAV\ContactsBackend; -use PHPUnit\Framework\TestCase; -class ContactsBackendTest extends TestCase +class ContactsBackendTest extends PHPUnit_Framework_TestCase { + function setUp() + { + } + + /** * Test vCard PHOTO (T1082) */ @@ -19,7 +23,7 @@ $vcard = $backend->to_vcard($contact); - $this->assertMatchesRegularExpression('/PHOTO;ENCODING=b;TYPE=GIF:R0l/', $vcard); + $this->assertRegexp('/PHOTO;ENCODING=b;TYPE=GIF:R0l/', $vcard); } /** @@ -33,7 +37,7 @@ $vcard = "BEGIN:VCARD\nVERSION:$version\nN:Thompson;Default;;;\nUID:1\n$input\nEND:VCARD"; $contact = $backend->parse_vcard($vcard); - $this->assertSame($output, $contact'photo' ?? null); + $this->assertSame($output, $contact'photo'); } function data_T2043() @@ -60,7 +64,7 @@ $vcard = "BEGIN:VCARD\nVERSION:4.0\nN:Thompson;Default;;;\nUID:1\n$input\nEND:VCARD"; $contact = $backend->parse_vcard($vcard); - if ($result = ($contact$key ?? null)) { + if ($result = $contact$key) { $result = $result->format('Ymd'); } @@ -80,39 +84,4 @@ array("ANNIVERSARY;VALUE=text:circa 1800", null, 'anniversary'), ); } - - /** - * Test basic vCard generation - */ - function test_to_vcard() - { - $backend = new ContactsBackend(); - $contact = array( - 'uid' => '123', - 'name' => 'Test', - 'phone' => array( - array ( - 'number' => '+48', - 'type' => 'home', - ), - ), - ); - - $vcard = $backend->to_vcard($contact); - - $prodid = '-//Kolab//iRony DAV Server ' . KOLAB_DAV_VERSION . '//Sabre//Sabre VObject ' . Sabre\VObject\Version::VERSION . '//EN'; - $expected = <<<EOF - BEGIN:VCARD\r - VERSION:3.0\r - PRODID:$prodid\r - UID:123\r - FN:Test\r - TEL;TYPE=HOME:+48\r - END:VCARD\r - EOF; - - $this->assertSame(trim($expected), trim($vcard)); - - // TODO: Test all contact/group properties - } }
View file
iRony.dsc
Changed
@@ -2,7 +2,7 @@ Source: irony Binary: irony Architecture: all -Version: 1:0.4.8.5-1~kolab1 +Version: 0.4.7-1~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org/ @@ -15,5 +15,5 @@ Package-List: iRony deb admin extra Files: - 00000000000000000000000000000000 0 iRony-0.4.8.tar.gz + 00000000000000000000000000000000 0 iRony-0.4.7.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.