From 1b3e52af2dc4f2872c666784b284a5ba0a8de61d Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 12 Jan 2015 18:33:39 -0800 Subject: theme toggle issue when viewing mod/cloud of another channel --- mod/cloud.php | 9 --------- 1 file changed, 9 deletions(-) (limited to 'mod/cloud.php') diff --git a/mod/cloud.php b/mod/cloud.php index abeae88eb..3643e599c 100644 --- a/mod/cloud.php +++ b/mod/cloud.php @@ -41,15 +41,6 @@ if(! defined('TRINIDAD')) { * @param App &$a */ function cloud_init(&$a) { - // call ($currenttheme)_init since we're operating outside of index.php - $theme_info_file = "view/theme/" . current_theme() . "/php/theme.php"; - if (file_exists($theme_info_file)){ - require_once($theme_info_file); - if (function_exists(str_replace('-', '_', current_theme()) . '_init')) { - $func = str_replace('-', '_', current_theme()) . '_init'; - $func($a); - } - } require_once('include/reddav.php'); -- cgit v1.2.3 From 98acefe22837a916d9a2330ceec250b0572b65d2 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Jan 2015 18:12:04 -0800 Subject: revert recent 3.0 changes to mod/cloud so we can work on this completely in another branch and not destabilise core --- mod/cloud.php | 49 +++++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 30 deletions(-) (limited to 'mod/cloud.php') diff --git a/mod/cloud.php b/mod/cloud.php index 3643e599c..ad85eba34 100644 --- a/mod/cloud.php +++ b/mod/cloud.php @@ -3,7 +3,7 @@ * @file mod/cloud.php * @brief Initialize RedMatrix's cloud (SabreDAV). * - * Module for accessing the DAV storage area from a web client. + * Module for accessing the DAV storage area. */ use Sabre\DAV; @@ -12,36 +12,31 @@ use RedMatrix\RedDAV; // composer autoloader for SabreDAV require_once('vendor/autoload.php'); -if(! defined('TRINIDAD')) { - // workaround for HTTP-auth in CGI mode - if (x($_SERVER, 'REDIRECT_REMOTE_USER')) { - $userpass = base64_decode(substr($_SERVER["REDIRECT_REMOTE_USER"], 6)) ; - if(strlen($userpass)) { - list($name, $password) = explode(':', $userpass); - $_SERVER['PHP_AUTH_USER'] = $name; - $_SERVER['PHP_AUTH_PW'] = $password; - } +// workaround for HTTP-auth in CGI mode +if (x($_SERVER, 'REDIRECT_REMOTE_USER')) { + $userpass = base64_decode(substr($_SERVER["REDIRECT_REMOTE_USER"], 6)) ; + if(strlen($userpass)) { + list($name, $password) = explode(':', $userpass); + $_SERVER['PHP_AUTH_USER'] = $name; + $_SERVER['PHP_AUTH_PW'] = $password; } +} - if (x($_SERVER, 'HTTP_AUTHORIZATION')) { - $userpass = base64_decode(substr($_SERVER["HTTP_AUTHORIZATION"], 6)) ; - if(strlen($userpass)) { - list($name, $password) = explode(':', $userpass); - $_SERVER['PHP_AUTH_USER'] = $name; - $_SERVER['PHP_AUTH_PW'] = $password; - } +if (x($_SERVER, 'HTTP_AUTHORIZATION')) { + $userpass = base64_decode(substr($_SERVER["HTTP_AUTHORIZATION"], 6)) ; + if(strlen($userpass)) { + list($name, $password) = explode(':', $userpass); + $_SERVER['PHP_AUTH_USER'] = $name; + $_SERVER['PHP_AUTH_PW'] = $password; } } - - /** * @brief Fires up the SabreDAV server. * * @param App &$a */ function cloud_init(&$a) { - require_once('include/reddav.php'); if (! is_dir('store')) @@ -121,19 +116,13 @@ function cloud_init(&$a) { } if ((! $auth->observer) && (! $isapublic_file) && (! $davguest)) { - if(defined('TRINIDAD')) { + try { + $auth->Authenticate($server, t('RedMatrix - Guests: Username: {your email address}, Password: +++')); + } + catch (Exception $e) { logger('mod_cloud: auth exception' . $e->getMessage()); http_status_exit($e->getHTTPCode(), $e->getMessage()); } - else { - try { - $auth->Authenticate($server, t('RedMatrix channel')); - } - catch (Exception $e) { - logger('mod_cloud: auth exception' . $e->getMessage()); - http_status_exit($e->getHTTPCode(), $e->getMessage()); - } - } } require_once('include/RedDAV/RedBrowser.php'); -- cgit v1.2.3