From 5327dfc64139839479d76fe76bef039b3075142e Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 26 Sep 2013 14:53:52 +0200 Subject: [PATCH 1/7] Implemented unified cross-plugin HTTP_Request2 object configuration (Request #2149) --- .../calendar/drivers/kolab/kolab_driver.php | 11 +--- .../kolab_files/lib/kolab_files_engine.php | 34 ++++------ plugins/kolab_files/package.xml | 4 ++ plugins/libkolab/config.inc.php.dist | 8 +-- plugins/libkolab/lib/kolab_storage_folder.php | 4 +- plugins/libkolab/libkolab.php | 64 +++++++++++++++++++ 6 files changed, 87 insertions(+), 38 deletions(-) diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php index 7ae80267..66a497be 100644 --- a/plugins/calendar/drivers/kolab/kolab_driver.php +++ b/plugins/calendar/drivers/kolab/kolab_driver.php @@ -874,8 +874,6 @@ class kolab_driver extends calendar_driver */ public function get_freebusy_list($email, $start, $end) { - require_once('HTTP/Request2.php'); - if (empty($email)/* || $end < time()*/) return false; @@ -888,14 +886,11 @@ class kolab_driver extends calendar_driver // ask kolab server first try { - $rcmail = rcube::get_instance(); - $request = new HTTP_Request2(kolab_storage::get_freebusy_url($email)); - $request->setConfig(array( + $request_config = array( 'store_body' => true, 'follow_redirects' => true, - 'ssl_verify_peer' => $rcmail->config->get('kolab_ssl_verify_peer', true), - )); - + ); + $request = libkolab::http_request(kolab_storage::get_freebusy_url($email), 'GET', $request_config); $response = $request->send(); // authentication required diff --git a/plugins/kolab_files/lib/kolab_files_engine.php b/plugins/kolab_files/lib/kolab_files_engine.php index 419dcb0b..fc14e807 100644 --- a/plugins/kolab_files/lib/kolab_files_engine.php +++ b/plugins/kolab_files/lib/kolab_files_engine.php @@ -581,35 +581,23 @@ class kolab_files_engine $url = $this->url . '/api/'; if (!$this->request) { - require_once 'HTTP/Request2.php'; + $config = array( + 'store_body' => true, + 'follow_redirects' => true, + ); + $this->request = libkolab::http_request($url, 'GET', $config); + } + else { + // cleanup try { - $request = new HTTP_Request2(); - $request->setConfig(array( - 'store_body' => true, - 'follow_redirects' => true, - 'ssl_verify_peer' => $this->rc->config->get('kolab_ssl_verify_peer', true), - 'ssl_verify_host' => $this->rc->config->get('kolab_ssl_verify_host', true), - )); - - $this->request = $request; + $this->request->setBody(''); + $this->request->setUrl($url); + $this->request->setMethod(HTTP_Request2::METHOD_GET); } catch (Exception $e) { rcube::raise_error($e, true, true); } - - // proxy User-Agent string - $this->request->setHeader('user-agent', $_SERVER['HTTP_USER_AGENT']); - } - - // cleanup - try { - $this->request->setBody(''); - $this->request->setUrl($url); - $this->request->setMethod(HTTP_Request2::METHOD_GET); - } - catch (Exception $e) { - rcube::raise_error($e, true, true); } if ($token) { diff --git a/plugins/kolab_files/package.xml b/plugins/kolab_files/package.xml index dbe6e828..8ac6e5b7 100644 --- a/plugins/kolab_files/package.xml +++ b/plugins/kolab_files/package.xml @@ -68,6 +68,10 @@ 1.7.0 + + libkolab + http://kolabsys.com + diff --git a/plugins/libkolab/config.inc.php.dist b/plugins/libkolab/config.inc.php.dist index aa0c8d09..6260f52a 100644 --- a/plugins/libkolab/config.inc.php.dist +++ b/plugins/libkolab/config.inc.php.dist @@ -12,9 +12,6 @@ $rcmail_config['kolab_format_version'] = '3.0'; // Defaults to https:///freebusy $rcmail_config['kolab_freebusy_server'] = 'https:///'; -// Set this option to disable SSL certificate checks when triggering Free/Busy (enabled by default) -$rcmail_config['kolab_ssl_verify_peer'] = false; - // Enables listing of only subscribed folders. This e.g. will limit // folders in calendar view or available addressbooks $rcmail_config['kolab_use_subscriptions'] = false; @@ -23,4 +20,7 @@ $rcmail_config['kolab_use_subscriptions'] = false; // for displaying resource folder names (experimental!) $rcmail_config['kolab_custom_display_names'] = false; -?> +// Configuration of HTTP requests. +// See http://pear.php.net/manual/en/package.http.http-request2.config.php +// for list of supported configuration options (array keys) +$rcmail_config['kolab_http_request'] = array(); diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php index ddb5b3c3..7da57ffb 100644 --- a/plugins/libkolab/lib/kolab_storage_folder.php +++ b/plugins/libkolab/lib/kolab_storage_folder.php @@ -1110,9 +1110,7 @@ class kolab_storage_folder require_once('HTTP/Request2.php'); try { - $rcmail = rcube::get_instance(); - $request = new HTTP_Request2($url); - $request->setConfig(array('ssl_verify_peer' => $rcmail->config->get('kolab_ssl_verify_peer', true))); + $request = libkolab::http_request($url); // set authentication credentials if ($auth_user && $auth_passwd) diff --git a/plugins/libkolab/libkolab.php b/plugins/libkolab/libkolab.php index b5ff968a..b5d1db72 100644 --- a/plugins/libkolab/libkolab.php +++ b/plugins/libkolab/libkolab.php @@ -27,6 +27,8 @@ class libkolab extends rcube_plugin { + static $http_requests = array(); + /** * Required startup method of a Roundcube plugin */ @@ -59,4 +61,66 @@ class libkolab extends rcube_plugin $p['fetch_headers'] = trim($p['fetch_headers'] .' X-KOLAB-TYPE X-KOLAB-MIME-VERSION'); return $p; } + + /** + * Wrapper function to load and initalize the HTTP_Request2 Object + * + * @param string|Net_Url2 Request URL + * @param string Request method ('OPTIONS','GET','HEAD','POST','PUT','DELETE','TRACE','CONNECT') + * @param array Configuration for this Request instance, that will be merged + * with default configuration + * + * @return HTTP_Request2 Request object + */ + public static function http_request($url = '', $method = 'GET', $config = array()) + { + $rcube = rcube::get_instance(); + $http_config = (array) $rcube->config->get('kolab_http_request'); + + // deprecated configuration options + if (empty($$http_config)) { + foreach (array('ssl_verify_peer', 'ssl_verify_host') as $option) { + $value = $rcube->config->get('kolab_' . $option, true); + if (is_bool($value)) { + $http_config[$option] = $value; + } + } + } + + if (!empty($config)) { + $http_config = array_merge($http_config, $config); + } + + $key = md5(serialize($http_config)); + + if (!($request = self::$http_requests[$key])) { + // load HTTP_Request2 + require_once 'HTTP/Request2.php'; + + try { + $request = new HTTP_Request2(); + $request->setConfig($http_config); + } + catch (Exception $e) { + rcube::raise_error($e, true, true); + } + + // proxy User-Agent string + $request->setHeader('user-agent', $_SERVER['HTTP_USER_AGENT']); + + self::$http_requests[$key] = $request; + } + + // cleanup + try { + $request->setBody(''); + $request->setUrl($url); + $request->setMethod($method); + } + catch (Exception $e) { + rcube::raise_error($e, true, true); + } + + return $request; + } } From 62756765b4b4706c77923e791176a717036aebe7 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 27 Sep 2013 08:33:46 +0200 Subject: [PATCH 2/7] Update de_DE (Bug #2244) --- plugins/owncloud/localization/de_DE.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/owncloud/localization/de_DE.inc b/plugins/owncloud/localization/de_DE.inc index f5cb8fb8..b3482da4 100644 --- a/plugins/owncloud/localization/de_DE.inc +++ b/plugins/owncloud/localization/de_DE.inc @@ -1,6 +1,6 @@ From cf7bb187cd913afd547c98391c83050a04f75b99 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 27 Sep 2013 08:36:28 +0200 Subject: [PATCH 3/7] Fix typo in folder name (Bug #2245) --- .../apps/kolab_auth/appinfo/app.php | 51 ++++++++++++++++ .../apps/kolab_auth/appinfo/info.xml | 13 +++++ .../apps/kolab_auth/appinfo/version | 1 + .../themes/kolab/core/css/styles.css | 15 +++++ .../themes/kolab/core/js/kolab.js | 58 +++++++++++++++++++ .../kolab/core/templates/layout.user.php | 56 ++++++++++++++++++ 6 files changed, 194 insertions(+) create mode 100644 plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/app.php create mode 100644 plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/info.xml create mode 100644 plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/version create mode 100755 plugins/owncloud/copy_to_owncloud/themes/kolab/core/css/styles.css create mode 100644 plugins/owncloud/copy_to_owncloud/themes/kolab/core/js/kolab.js create mode 100644 plugins/owncloud/copy_to_owncloud/themes/kolab/core/templates/layout.user.php diff --git a/plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/app.php b/plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/app.php new file mode 100644 index 00000000..02e3e151 --- /dev/null +++ b/plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/app.php @@ -0,0 +1,51 @@ + 'https:///', + 'kolabsecret' => '', + +*/ + + +// check for kolab auth token +if (!OC_User::isLoggedIn() && !empty($_GET['kolab_auth'])) { + OCP\Util::writeLog('kolab_auth', 'got kolab auth token', OCP\Util::INFO); + + // decode auth data from Roundcube + parse_str(oc_kolab_decode($_GET['kolab_auth']), $request); + + // send back as POST request with session cookie + $postdata = http_build_query($request, '', '&'); + + // add request signature using secret key + $postdata .= '&hmac=' . hash_hmac('sha256', $postdata, OC_Config::getValue('kolabsecret', '')); + + $context = stream_context_create(array( + 'http' => array( + 'method' => 'POST', + 'header'=> "Content-type: application/x-www-form-urlencoded\r\n" + . "Content-Length: " . strlen($postdata) . "\r\n" + . "Cookie: " . $request['cname'] . '=' . $request['session'] . "\r\n", + 'content' => $postdata, + ) + ) + ); + + $url = !empty($_SERVER['HTTP_REFERER']) ? dirname($_SERVER['HTTP_REFERER']) . '/' : OC_Config::getValue('kolaburl', ''); + $auth = @json_decode(file_get_contents($url . '?_action=owncloudsso', false, $context), true); + + // fake HTTP authentication with user credentials received from Roundcube + if ($auth['user'] && $auth['pass']) { + $_SERVER['PHP_AUTH_USER'] = $auth['user']; + $_SERVER['PHP_AUTH_PW'] = $auth['pass']; + } +} + +function oc_kolab_decode($str) +{ + // TODO: chose a more sophisticated encryption method + return base64_decode(str_pad(strrev($str), strlen($str) % 4, '=', STR_PAD_RIGHT)); +} + diff --git a/plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/info.xml b/plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/info.xml new file mode 100644 index 00000000..aad9cea7 --- /dev/null +++ b/plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/info.xml @@ -0,0 +1,13 @@ + + + kolab_auth + Kolab user authentication + Allow to authenticate an existing Kolab web client session + AGPL + Thomas Bruederli + 4.9 + true + + + + diff --git a/plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/version b/plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/version new file mode 100644 index 00000000..6e8bf73a --- /dev/null +++ b/plugins/owncloud/copy_to_owncloud/apps/kolab_auth/appinfo/version @@ -0,0 +1 @@ +0.1.0 diff --git a/plugins/owncloud/copy_to_owncloud/themes/kolab/core/css/styles.css b/plugins/owncloud/copy_to_owncloud/themes/kolab/core/css/styles.css new file mode 100755 index 00000000..290721bc --- /dev/null +++ b/plugins/owncloud/copy_to_owncloud/themes/kolab/core/css/styles.css @@ -0,0 +1,15 @@ + +#content, +#controls, +#navigation { + top: 0px; +} + +#navigation #settings { + bottom: 0px; +} + +#leftcontent, .leftcontent, +#rightcontent, .rightcontent { + top: 2.9em; +} \ No newline at end of file diff --git a/plugins/owncloud/copy_to_owncloud/themes/kolab/core/js/kolab.js b/plugins/owncloud/copy_to_owncloud/themes/kolab/core/js/kolab.js new file mode 100644 index 00000000..f5204567 --- /dev/null +++ b/plugins/owncloud/copy_to_owncloud/themes/kolab/core/js/kolab.js @@ -0,0 +1,58 @@ + +function kolab_connector() +{ + var remote; + + // public members + this.window = window; + + // export public methods + this.init = init; + this.init_picker = init_picker; + this.list_files = list_files; + + function init(rcube) + { + remote = rcube; + } + + function init_picker(rcube) + { + remote = rcube; + + if (window.FileActions) { + // reset already registered actions + // FileActions.actions.file = {}; + + FileActions.register('file','Pick', OC.PERMISSION_READ, '', function(filename){ + var dir = $('#dir').val(); + remote.file_picked(dir, filename); + }); + FileActions.setDefault('file', 'Pick'); + } + } + + function list_files() + { + var files = []; + $('#fileList tr').each(function(item){ + var row = $(item), + type = row.attrib('data-type'), + file = row.attrib('data-file'), + mime = row.attrib('data-mime'); + + if (type == 'file') { + files.push(file); + } + }); + + return files; + } +} + +$(document).ready(function(){ + // connect with Roundcube running in parent window + if (window.parent && parent.rcmail && parent.rcube_owncloud) { + parent.rcube_owncloud.connect(new kolab_connector()); + } +}); \ No newline at end of file diff --git a/plugins/owncloud/copy_to_owncloud/themes/kolab/core/templates/layout.user.php b/plugins/owncloud/copy_to_owncloud/themes/kolab/core/templates/layout.user.php new file mode 100644 index 00000000..a588eacb --- /dev/null +++ b/plugins/owncloud/copy_to_owncloud/themes/kolab/core/templates/layout.user.php @@ -0,0 +1,56 @@ + + + + <?php echo isset($_['application']) && !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud <?php echo OC_User::getUser()?' ('.OC_User::getUser().') ':'' ?> + + + + + + + + + + + + $value) { + echo "$name='$value' "; + }; + echo '/>'; + ?> + + + + + + +
+ +
+ + From ca49cfe6ede371ad6ad01e2c9977d14e0aadb51d Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 27 Sep 2013 08:39:59 +0200 Subject: [PATCH 4/7] Added kolab_files plugin to transifex config --- .tx/config | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.tx/config b/.tx/config index 581934bb..104cbb39 100644 --- a/.tx/config +++ b/.tx/config @@ -28,6 +28,11 @@ file_filter = plugins/kolab_delegation/localization/.inc source_file = plugins/kolab_delegation/localization/en_US.inc source_lang = en_US +[kolab.kolab_files] +file_filter = plugins/kolab_files/localization/.inc +source_file = plugins/kolab_files/localization/en_US.inc +source_lang = en_US + [kolab.kolab_folders] file_filter = plugins/kolab_folders/localization/.inc source_file = plugins/kolab_folders/localization/en_US.inc @@ -47,4 +52,3 @@ source_lang = en_US file_filter = plugins/libcalendaring/localization/.inc source_file = plugins/libcalendaring/localization/en_US.inc source_lang = en_US - From 657093d8386eb14ea8f9e58c0ca29d2e2297d5f1 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 27 Sep 2013 13:14:29 +0200 Subject: [PATCH 5/7] Use password_ldap_bind hook to provide LDAP user DN for password change. (Request #2217) Requires ldap_simple driver to be enabled in password plugin config. --- plugins/kolab_auth/kolab_auth.php | 17 ++++++ .../apps/kolab_auth/appinfo/app.php | 51 ---------------- .../apps/kolab_auth/appinfo/info.xml | 13 ----- .../apps/kolab_auth/appinfo/version | 1 - .../themes/kolab/core/css/styles.css | 15 ----- .../themes/kolab/core/js/kolab.js | 58 ------------------- .../kolab/core/templates/layout.user.php | 56 ------------------ 7 files changed, 17 insertions(+), 194 deletions(-) delete mode 100644 plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/app.php delete mode 100644 plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/info.xml delete mode 100644 plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/version delete mode 100755 plugins/owncloud/copy_to_owncload/themes/kolab/core/css/styles.css delete mode 100644 plugins/owncloud/copy_to_owncload/themes/kolab/core/js/kolab.js delete mode 100644 plugins/owncloud/copy_to_owncload/themes/kolab/core/templates/layout.user.php diff --git a/plugins/kolab_auth/kolab_auth.php b/plugins/kolab_auth/kolab_auth.php index b13ea930..fb3b0515 100644 --- a/plugins/kolab_auth/kolab_auth.php +++ b/plugins/kolab_auth/kolab_auth.php @@ -41,6 +41,9 @@ class kolab_auth extends rcube_plugin $this->add_hook('startup', array($this, 'startup')); $this->add_hook('user_create', array($this, 'user_create')); + // Hook for password change + $this->add_hook('password_ldap_bind', array($this, 'password_ldap_bind')); + // Hooks related to "Login As" feature $this->add_hook('template_object_loginform', array($this, 'login_form')); $this->add_hook('storage_connect', array($this, 'imap_connect')); @@ -448,6 +451,20 @@ class kolab_auth extends rcube_plugin return $args; } + /** + * Set user DN for password change (password plugin with ldap_simple driver) + */ + public function password_ldap_bind($args) + { + $args['user_dn'] = $_SESSION['kolab_dn']; + + $rcmail = rcube::get_instance(); + + $rcmail->config->set('password_ldap_method', 'user'); + + return $args; + } + /** * Sets SASL Proxy login/password for IMAP and Managesieve auth */ diff --git a/plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/app.php b/plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/app.php deleted file mode 100644 index 02e3e151..00000000 --- a/plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/app.php +++ /dev/null @@ -1,51 +0,0 @@ - 'https:///', - 'kolabsecret' => '', - -*/ - - -// check for kolab auth token -if (!OC_User::isLoggedIn() && !empty($_GET['kolab_auth'])) { - OCP\Util::writeLog('kolab_auth', 'got kolab auth token', OCP\Util::INFO); - - // decode auth data from Roundcube - parse_str(oc_kolab_decode($_GET['kolab_auth']), $request); - - // send back as POST request with session cookie - $postdata = http_build_query($request, '', '&'); - - // add request signature using secret key - $postdata .= '&hmac=' . hash_hmac('sha256', $postdata, OC_Config::getValue('kolabsecret', '')); - - $context = stream_context_create(array( - 'http' => array( - 'method' => 'POST', - 'header'=> "Content-type: application/x-www-form-urlencoded\r\n" - . "Content-Length: " . strlen($postdata) . "\r\n" - . "Cookie: " . $request['cname'] . '=' . $request['session'] . "\r\n", - 'content' => $postdata, - ) - ) - ); - - $url = !empty($_SERVER['HTTP_REFERER']) ? dirname($_SERVER['HTTP_REFERER']) . '/' : OC_Config::getValue('kolaburl', ''); - $auth = @json_decode(file_get_contents($url . '?_action=owncloudsso', false, $context), true); - - // fake HTTP authentication with user credentials received from Roundcube - if ($auth['user'] && $auth['pass']) { - $_SERVER['PHP_AUTH_USER'] = $auth['user']; - $_SERVER['PHP_AUTH_PW'] = $auth['pass']; - } -} - -function oc_kolab_decode($str) -{ - // TODO: chose a more sophisticated encryption method - return base64_decode(str_pad(strrev($str), strlen($str) % 4, '=', STR_PAD_RIGHT)); -} - diff --git a/plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/info.xml b/plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/info.xml deleted file mode 100644 index aad9cea7..00000000 --- a/plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/info.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - kolab_auth - Kolab user authentication - Allow to authenticate an existing Kolab web client session - AGPL - Thomas Bruederli - 4.9 - true - - - - diff --git a/plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/version b/plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/version deleted file mode 100644 index 6e8bf73a..00000000 --- a/plugins/owncloud/copy_to_owncload/apps/kolab_auth/appinfo/version +++ /dev/null @@ -1 +0,0 @@ -0.1.0 diff --git a/plugins/owncloud/copy_to_owncload/themes/kolab/core/css/styles.css b/plugins/owncloud/copy_to_owncload/themes/kolab/core/css/styles.css deleted file mode 100755 index 290721bc..00000000 --- a/plugins/owncloud/copy_to_owncload/themes/kolab/core/css/styles.css +++ /dev/null @@ -1,15 +0,0 @@ - -#content, -#controls, -#navigation { - top: 0px; -} - -#navigation #settings { - bottom: 0px; -} - -#leftcontent, .leftcontent, -#rightcontent, .rightcontent { - top: 2.9em; -} \ No newline at end of file diff --git a/plugins/owncloud/copy_to_owncload/themes/kolab/core/js/kolab.js b/plugins/owncloud/copy_to_owncload/themes/kolab/core/js/kolab.js deleted file mode 100644 index f5204567..00000000 --- a/plugins/owncloud/copy_to_owncload/themes/kolab/core/js/kolab.js +++ /dev/null @@ -1,58 +0,0 @@ - -function kolab_connector() -{ - var remote; - - // public members - this.window = window; - - // export public methods - this.init = init; - this.init_picker = init_picker; - this.list_files = list_files; - - function init(rcube) - { - remote = rcube; - } - - function init_picker(rcube) - { - remote = rcube; - - if (window.FileActions) { - // reset already registered actions - // FileActions.actions.file = {}; - - FileActions.register('file','Pick', OC.PERMISSION_READ, '', function(filename){ - var dir = $('#dir').val(); - remote.file_picked(dir, filename); - }); - FileActions.setDefault('file', 'Pick'); - } - } - - function list_files() - { - var files = []; - $('#fileList tr').each(function(item){ - var row = $(item), - type = row.attrib('data-type'), - file = row.attrib('data-file'), - mime = row.attrib('data-mime'); - - if (type == 'file') { - files.push(file); - } - }); - - return files; - } -} - -$(document).ready(function(){ - // connect with Roundcube running in parent window - if (window.parent && parent.rcmail && parent.rcube_owncloud) { - parent.rcube_owncloud.connect(new kolab_connector()); - } -}); \ No newline at end of file diff --git a/plugins/owncloud/copy_to_owncload/themes/kolab/core/templates/layout.user.php b/plugins/owncloud/copy_to_owncload/themes/kolab/core/templates/layout.user.php deleted file mode 100644 index a588eacb..00000000 --- a/plugins/owncloud/copy_to_owncload/themes/kolab/core/templates/layout.user.php +++ /dev/null @@ -1,56 +0,0 @@ - - - - <?php echo isset($_['application']) && !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud <?php echo OC_User::getUser()?' ('.OC_User::getUser().') ':'' ?> - - - - - - - - - - - - $value) { - echo "$name='$value' "; - }; - echo '/>'; - ?> - - - - - - -
- -
- - From 68fc690d8c066d006a3062fcf8162c3025e45f92 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 30 Sep 2013 12:08:04 +0200 Subject: [PATCH 6/7] libkolab plugin is now required here (Bug #2149) --- plugins/kolab_files/kolab_files.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/kolab_files/kolab_files.php b/plugins/kolab_files/kolab_files.php index 27500633..16f156ee 100644 --- a/plugins/kolab_files/kolab_files.php +++ b/plugins/kolab_files/kolab_files.php @@ -49,6 +49,9 @@ class kolab_files extends rcube_plugin $this->register_action('prefs', array($this, 'actions')); $this->register_action('open', array($this, 'actions')); + // we use libkolab::http_request() from libkolab with its configuration + $this->require_plugin('libkolab'); + $this->ui(); } From e4bcac46502ba17ed987e5c41c890ae4f7094fc6 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 30 Sep 2013 15:43:39 +0200 Subject: [PATCH 7/7] Fix typo in new http_request() method, fixes deprecated options handling --- plugins/libkolab/libkolab.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/libkolab/libkolab.php b/plugins/libkolab/libkolab.php index b5d1db72..48a50331 100644 --- a/plugins/libkolab/libkolab.php +++ b/plugins/libkolab/libkolab.php @@ -78,7 +78,7 @@ class libkolab extends rcube_plugin $http_config = (array) $rcube->config->get('kolab_http_request'); // deprecated configuration options - if (empty($$http_config)) { + if (empty($http_config)) { foreach (array('ssl_verify_peer', 'ssl_verify_host') as $option) { $value = $rcube->config->get('kolab_' . $option, true); if (is_bool($value)) {