Overview
Request 3276 (accepted)
New release 0.5.14.6
- Created by mollekopf about 1 year ago
- In state accepted
-
Open review for
Admin
-
Open review for
vanmeeuwen
-
Open review for
mollekopf
-
Open review for
kolab-developers
chwala.spec
Changed
x
1
2
%global upstream_version 0.5.14
3
4
Name: chwala
5
-Version: 0.5.14.5
6
+Version: 0.5.14.6
7
Release: 1%{?dist}
8
Summary: Glorified WebDAV, done right
9
10
chwala-0.5.14.tar.gz/config/config.inc.php.dist
Changed
20
1
2
$config'fileapi_manticore' = null;
3
4
// WOPI/Office service URL. Enables use of collaborative editor supporting WOPI.
5
-// Note: this URL should be accessible from Chwala host and Roundcube host as well.
6
+// Note: this URL must be accessible from the Chwala host.
7
$config'fileapi_wopi_office' = null;
8
9
// Name of the user interface skin.
10
11
// the UI location is used with addition of /api/ suffix.
12
$config'file_api_url' = '';
13
14
+// Optional server variant of file_api_url if the wopi service needs to connect via an internal url back to chwala.
15
+$config'file_api_server_url' = null;
16
+
17
// Type of Chwala cache. Supported values: 'db', 'apc' and 'memcache'.
18
// Note: This is only for some additional data like WOPI capabilities.
19
$config'fileapi_cache' = 'db';
20
chwala-0.5.14.tar.gz/lib/drivers/kolab/kolab_file_storage.php
Changed
21
1
2
public function auth_info()
3
{
4
return array(
5
- 'username' => $this->config'username' ?: $_SESSION'username',
6
- 'password' => $this->config'password' ?: $this->rc->decrypt($_SESSION'password'),
7
+ 'username' => ($this->config'username' ?? null) ?: $_SESSION'username',
8
+ 'password' => ($this->config'password' ?? null) ?: $this->rc->decrypt($_SESSION'password'),
9
);
10
}
11
12
13
throw new Exception("Missing folder name", file_storage::ERROR);
14
}
15
16
- $folder = $this->get_folder_object($this->folder_in($folder_name));
17
+ $folder = $this->get_folder_object($folder_name);
18
19
if ($cache && !empty($this->icache$original_name)) {
20
return $this->icache$original_name;
21
chwala-0.5.14.tar.gz/lib/drivers/kolabfiles/kolabfiles_file_storage.php
Changed
43
1
2
{
3
$this->rc = rcube::get_instance();
4
$this->config =
5
- 'baseuri' => $this->rc->config->get('fileapi_kolabfiles_baseuri', 'https://' . $_SERVER"HTTP_HOST" . '/api/'),
6
- 'host' => $this->rc->config->get('fileapi_kolabfiles_host', $_SERVER"HTTP_HOST"),
7
+ 'baseuri' => $this->rc->config->get('fileapi_kolabfiles_baseuri', 'https://' . $_SERVER"HTTP_HOST" . '/api/')
8
;
9
}
10
11
12
throw new Exception("Autocomplete not implemented", file_storage::ERROR_UNSUPPORTED);
13
}
14
15
+ private static function getHost($url)
16
+ {
17
+ // Remove protocol prefix and path, we work with host only
18
+ return preg_replace('#(^https?://|/.*$)#i', '', $url);
19
+ }
20
+
21
/**
22
* Convert file/folder path into a global URI.
23
*
24
25
*/
26
public function path2uri($path)
27
{
28
- // Remove protocol prefix and path, we work with host only
29
- $host = preg_replace('#(^https?://|/.*$)#i', '', $this->config'host');
30
+ $host = self::getHost($this->config'baseuri');
31
32
if (!is_string($path) || !strlen($path)) {
33
$user = $_SESSION$this->title . 'user';
34
35
$user = rawurldecode($matches1);
36
$host = $matches2;
37
$path = file_utils::decode_path($matches3);
38
- $c_host = preg_replace('#(^https?://|/.*$)#i', '', $this->config'host');
39
+ $c_host = self::getHost($this->config'baseuri');
40
41
if (strlen($path)) {
42
list($file, $repo_id, $collection) = $this->find_collection($path, true);
43
chwala-0.5.14.tar.gz/lib/drivers/seafile/seafile_file_storage.php
Changed
32
1
2
if ($this->config'username') {
3
$metadata'form_values' = array(
4
'host' => $this->config'host',
5
- 'username' => $this->config'username',
6
+ 'username' => $this->config'username' ?? null,
7
);
8
}
9
10
11
'name' => $file'name',
12
'size' => (int) $file'size',
13
'type' => (string) $file'type',
14
- 'mtime' => file_utils::date_format($file'changed', $this->config'date_format', $this->config'timezone'),
15
- 'ctime' => file_utils::date_format($file'created', $this->config'date_format', $this->config'timezone'),
16
+ 'mtime' => file_utils::date_format($file'changed' ?? null, $this->config'date_format', $this->config'timezone'),
17
+ 'ctime' => file_utils::date_format($file'created' ?? null, $this->config'date_format', $this->config'timezone'),
18
'modified' => $file'changed' ? $file'changed'->format('U') : 0,
19
'created' => $file'created' ? $file'created'->format('U') : 0,
20
);
21
22
'name' => $file'name',
23
'size' => (int) $file'size',
24
'type' => (string) $file'type',
25
- 'mtime' => file_utils::date_format($file'changed', $this->config'date_format', $this->config'timezone'),
26
- 'ctime' => file_utils::date_format($file'created', $this->config'date_format', $this->config'timezone'),
27
+ 'mtime' => file_utils::date_format($file'changed' ?? null, $this->config'date_format', $this->config'timezone'),
28
+ 'ctime' => file_utils::date_format($file'created' ?? null, $this->config'date_format', $this->config'timezone'),
29
'modified' => $file'changed' ? $file'changed'->format('U') : 0,
30
'created' => $file'created' ? $file'created'->format('U') : 0,
31
);
32
chwala-0.5.14.tar.gz/lib/file_wopi.php
Changed
14
1
2
return;
3
}
4
5
- $office_url = rtrim($metadata'urlsrc', ' /?'); // collabora
6
- $service_url = $this->api->api_url() . '/wopi/files/' . $id;
7
+ $office_url = rtrim($metadata'urlsrc', ' /?'); // collabora
8
+ //Configurable if e.g. collabora does not connect via the public url
9
+ $service_url = $this->rc->config->get('file_api_server_url', $this->api->api_url());
10
+ $service_url = rtrim($service_url, ' /') . '/wopi/files/' . $id;
11
12
// @TODO: Parsing and replacing placeholder values
13
// https://wopi.readthedocs.io/en/latest/discovery.html#action-urls
14
chwala.dsc
Changed
10
1
2
Source: chwala
3
Binary: chwala
4
Architecture: all
5
-Version: 0.5.14.5-1~kolab1
6
+Version: 0.5.14.6-1~kolab1
7
Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
8
Uploaders: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
9
Homepage: http://kolab.org/about/chwala/
10
debian.changelog
Changed
7
1
2
-chwala (0.5.14.5-1~kolab1) unsable; urgency=low
3
+chwala (0.5.14.6-1~kolab1) unsable; urgency=low
4
5
* Release version 0.5.14
6
7
Refresh
Refresh
Login required, please
login
in order to comment
Request History
mollekopf created request about 1 year ago
New release 0.5.14.6
mollekopf accepted request about 1 year ago