Overview

Request 3276 (accepted)

New release 0.5.14.6

Submit package Kolab:16:Testing / chwala to package Kolab:16 / chwala

chwala.spec Changed
x
 
1
@@ -38,7 +38,7 @@
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
@@ -62,7 +62,7 @@
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
@@ -73,6 +73,9 @@
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
@@ -134,8 +134,8 @@
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
@@ -1523,7 +1523,7 @@
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
@@ -62,8 +62,7 @@
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
@@ -963,6 +962,12 @@
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
@@ -973,8 +978,7 @@
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
@@ -1004,7 +1008,7 @@
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
@@ -306,7 +306,7 @@
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
@@ -563,8 +563,8 @@
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
@@ -637,8 +637,8 @@
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
@@ -97,8 +97,10 @@
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,7 +2,7 @@
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
@@ -1,4 +1,4 @@
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
Request History
mollekopf's avatar

mollekopf created request about 1 year ago

New release 0.5.14.6


mollekopf's avatar

mollekopf accepted request about 1 year ago