Projects
Kolab:16:Testing:Candidate
kolab-syncroton
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 58
View file
kolab-syncroton.spec
Changed
@@ -43,7 +43,7 @@ %global upstream_version 2.4.2 Name: kolab-syncroton -Version: 2.4.2.30 +Version: 2.4.2.31 Release: 1%{?dist} Summary: ActiveSync for Kolab Groupware
View file
debian.changelog
Changed
@@ -1,4 +1,4 @@ -kolab-syncroton (2.4.2.30-0~kolab1) unstable; urgency=low +kolab-syncroton (2.4.2.31-0~kolab1) unstable; urgency=low * Release version 2.4.2
View file
kolab-syncroton-2.4.2.tar.gz/bin/delete-device.php
Added
@@ -0,0 +1,97 @@ +#!/usr/bin/env php +<?php +/* + +--------------------------------------------------------------------------+ + | Kolab Sync (ActiveSync for Kolab) | + | | + | Copyright (C) 2024, Apheleia IT AG <contact@apheleia-it.ch> | + | | + | This program is free software: you can redistribute it and/or modify | + | it under the terms of the GNU Affero General Public License as published | + | by the Free Software Foundation, either version 3 of the License, or | + | (at your option) any later version. | + | | + | 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 Affero General Public License for more details. | + | | + | You should have received a copy of the GNU Affero General Public License | + | along with this program. If not, see <http://www.gnu.org/licenses/> | + +--------------------------------------------------------------------------+ + | Author: Christian Mollekopf <mollekopf@apheleia-it.ch> | + +--------------------------------------------------------------------------+ +*/ + + +define('RCUBE_INSTALL_PATH', realpath(dirname(__FILE__) . '/../') . '/'); +define('RCUBE_PLUGINS_DIR', RCUBE_INSTALL_PATH . 'lib/plugins/'); + +// Define include path +$include_path = RCUBE_INSTALL_PATH . 'lib' . PATH_SEPARATOR; +$include_path .= RCUBE_INSTALL_PATH . 'lib/ext' . PATH_SEPARATOR; +$include_path .= ini_get('include_path'); +set_include_path($include_path); + +// include composer autoloader (if available) +if (@file_exists(RCUBE_INSTALL_PATH . 'vendor/autoload.php')) { + require RCUBE_INSTALL_PATH . 'vendor/autoload.php'; +} + +// include global functions from Roundcube Framework +require_once 'Roundcube/bootstrap.php'; + +$opts = rcube_utils::get_opt( + 's' => 'since', // Deletes *all* devices that haven't been used since the given timestamp. Doesn't take owner and device id into account. Timestamp format e.g.: "2024-11-01" + 'o' => 'owner', + 'd' => 'deviceid', +); + +$rcube = \rcube::get_instance(); +$db = $rcube->get_dbh(); + +if (!empty($opts'since')) { + $since = $opts'since'; + $since = new DateTime($since); + print("Removing all devices that haven't been used since: " . $since->format('Y-m-d H:i:s') . "\n"); + + $db->query( + "DELETE FROM `syncroton_device`" + . " WHERE `lastping` < ? OR `lastping` = NULL", + $since->format('Y-m-d H:i:s') + ); + return; +} + +if (empty($opts'deviceid')) { + rcube::raise_error("Device id not specified (--deviceid).", false, true); +} +$device = $opts'deviceid'; + +if (empty($opts'owner')) { + rcube::raise_error("owner not specified (--owner).", false, true); +} +$owner = $opts'owner'; + +$select = $db->query( + "SELECT `user_id` FROM `users`" + . " WHERE `username` = ?" + . " ORDER BY `user_id` DESC", + \strtolower($owner) +); + +if ($data = $db->fetch_assoc($select)) { + $userid = $data'user_id'; +} else { + rcube::raise_error("User not found in roundcube database, aborting: $email.", false, true); +} + +print("Found the user with id: $userid\n"); + +$db->query( + "DELETE FROM syncroton_device WHERE owner_id = ? AND deviceid = ?", + $userid, + $device +); + +print("Deleted the device with the deviceid: $deviceid\n");
View file
kolab-syncroton-2.4.2.tar.gz/bin/inspect.php
Changed
@@ -226,7 +226,7 @@ foreach ($values'folders' ?? as $folderId => $folder) { println(" " . $folder'name' . " ($folderId)"); $messageCount = $folder'contentCount'; - $totalCount = $folder'imapMessagecount'; + $totalCount = $folder'imapMessagecount' ?? "unknown"; $modseq = $folder'modseq' ?? "none"; $imapModseq = $folder'imapModseq'; // We're not using modseq for groupware folders
View file
kolab-syncroton.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-syncroton Binary: kolab-syncroton Architecture: all -Version: 1:2.4.2.30-1~kolab1 +Version: 1:2.4.2.31-1~kolab1 Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Uploaders: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Homepage: http://www.kolab.org/
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
.