fixed session creation for Pixelegg or Stylite template and added extra css for a simplified sharing GUI

This commit is contained in:
Ralf Becker 2014-12-09 12:08:00 +00:00
parent dfe03c8531
commit efc14ee2dc
5 changed files with 62 additions and 9 deletions

View File

@ -477,7 +477,11 @@ class filemanager_ui
'5' => 'Files from links', '5' => 'Files from links',
'0' => 'Files from subdirectories', '0' => 'Files from subdirectories',
); );
// sharing has no divAppbox, we need to set popupMainDiv instead, to be able to drop files everywhere
if (substr($_SERVER['SCRIPT_FILENAME'], -10) == '/share.php')
{
$tpl->setElementAttribute('nm[buttons][upload]', 'drop_target', 'popupMainDiv');
}
$tpl->exec('filemanager.filemanager_ui.index',$content,$sel_options,$readonlys,array('nm' => $content['nm'])); $tpl->exec('filemanager.filemanager_ui.index',$content,$sel_options,$readonlys,array('nm' => $content['nm']));
} }

View File

@ -63,12 +63,6 @@
</hbox> </hbox>
</template> </template>
<template id="filemanager.index" template="" lang="" group="0" version="1.9.003"> <template id="filemanager.index" template="" lang="" group="0" version="1.9.003">
<description id="msg" class="message"/>
<nextmatch id="nm" template="filemanager.index.rows" header_left="filemanager.index.header_left"/> <nextmatch id="nm" template="filemanager.index.rows" header_left="filemanager.index.header_left"/>
<styles>
input[type='file'] {
width: 50ex
}
</styles>
</template> </template>
</overlay> </overlay>

View File

@ -0,0 +1,47 @@
/**
* EGroupware - CSS Styles used by sharing GUI
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package etemplate
* @link http://www.egroupware.org
* @author Ralf Becker <rb@stylite.de>
* @copyright (c) 2014 by Ralf Becker <rb@stylite.de>
* @version $Id$
*/
div#popupMainDiv {
height: 100% !important;
padding: 0 !important;
background-image: none;
}
/**
* simplify NM UI for sharing
*/
div#filemanager-index_buttons img, div#filemanager-index_favorite_wrapper,
div.header_row_right, span.header_count, select#filemanager-index_filter, span.selectcols {
display: none !important;
}
div.filemanager_navigation label {
/*right: 265px !important;*/
}
div.search {
position: absolute;
top: 8px;
right: 215px;
}
div#filemanager-index_buttons div.et2_file {
margin-top: 6px;
}
div.et2_nextmatch div.nextmatch_header_row {
padding-bottom: 0px;
}
div.nextmatch_header {
padding-bottom: 0 !important;
padding-top: 10px !important;
}

View File

@ -362,7 +362,12 @@ class egw extends egw_minimal
// present a login page, if anon user has no right for an application // present a login page, if anon user has no right for an application
if ($this->session->session_flags == 'A') if ($this->session->session_flags == 'A')
{ {
throw new egw_exception_redirect('/logout.php'); // need to destroy a basic auth session here, because it will only be available on current url
if (($sessionid = egw_session::get_sessionid(true)))
{
$GLOBALS['egw']->session->destroy($sessionid);
}
throw new egw_exception_redirect(egw::link('/logout.php'));
} }
if ($currentapp == 'admin' || $GLOBALS['egw_info']['flags']['admin_only']) if ($currentapp == 'admin' || $GLOBALS['egw_info']['flags']['admin_only'])
{ {

View File

@ -108,7 +108,7 @@ class egw_sharing
$path_info = $matches[1]; $path_info = $matches[1];
} }
$path_info = substr($path_info, strlen($_SERVER['SCRIPT_NAME'])); $path_info = substr($path_info, strlen($_SERVER['SCRIPT_NAME']));
list(, $token/*, $path*/) = explode('/', $path_info, 3); list(, $token/*, $path*/) = preg_split('|[/?]|', $path_info, 3);
$_SERVER['PHP_AUTH_USER'] = $token; $_SERVER['PHP_AUTH_USER'] = $token;
if (!isset($_SERVER['PHP_AUTH_PW'])) $_SERVER['PHP_AUTH_PW'] = ''; if (!isset($_SERVER['PHP_AUTH_PW'])) $_SERVER['PHP_AUTH_PW'] = '';
@ -249,6 +249,9 @@ class egw_sharing
} }
// run full eTemplate2 UI for directories // run full eTemplate2 UI for directories
$_GET['path'] = '/'; $_GET['path'] = '/';
$_GET['cd'] = 'no';
$GLOBALS['egw_info']['flags']['js_link_registry'] = true;
egw_framework::includeCSS('/filemanager/templates/default/sharing.css');
$ui = new egw_sharing_filemanager(); $ui = new egw_sharing_filemanager();
$ui->index(); $ui->index();
} }