mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-11 07:50:16 +01:00
Backporting fixes to support the following special characters in
filenames: " ' & # ? Commit r30066-30127 (without mail support!)
This commit is contained in:
parent
07b478fc9e
commit
625b28a0e9
@ -177,11 +177,15 @@ class HTTP_WebDAV_Server
|
||||
|
||||
$this->base_uri = $uri;
|
||||
$this->uri = $uri . $path_info;
|
||||
|
||||
// set path
|
||||
// $_SERVER['PATH_INFO'] is already urldecoded
|
||||
//$this->path = $this->_urldecode($path_info);
|
||||
$this->path = $path_info;
|
||||
// quote '#' (e.g. OpenOffice uses this for lock-files)
|
||||
$this->path = strtr($path_info,array(
|
||||
'%' => '%25',
|
||||
'#' => '%23',
|
||||
'?' => '%3F',
|
||||
));
|
||||
if (!strlen($this->path)) {
|
||||
if ($this->_SERVER["REQUEST_METHOD"] == "GET") {
|
||||
// redirect clients that try to GET a collection
|
||||
|
@ -127,6 +127,14 @@ class boetemplate extends soetemplate
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Regular expression matching a PHP variable in a string, eg.
|
||||
*
|
||||
* "replies[$row][reply_message]" should only match $row
|
||||
* "delete[$row_cont[path]]" should match $row_cont[path]
|
||||
*/
|
||||
const PHP_VAR_PREG = '\$[A-Za-z0-9_]+(\[[A-Za-z0-9_]+\])*';
|
||||
|
||||
/**
|
||||
* allows a few variables (eg. row-number) to be used in field-names
|
||||
*
|
||||
@ -157,7 +165,7 @@ class boetemplate extends soetemplate
|
||||
static function expand_name($name,$c,$row,$c_='',$row_='',$cont='')
|
||||
{
|
||||
$is_index_in_content = $name[0] == '@';
|
||||
if (strpos($name,'$') !== false)
|
||||
if (($pos_var=strpos($name,'$')) !== false)
|
||||
{
|
||||
if (!$cont)
|
||||
{
|
||||
@ -169,6 +177,44 @@ class boetemplate extends soetemplate
|
||||
$row_cont = $cont[$row];
|
||||
$col_row_cont = $cont[$col.$row];
|
||||
|
||||
// check if name is enclosed in single quotes as argument eg. to an event handler or
|
||||
// used as name for a button like "delete[$row_cont[something]]" --> quote contained quotes (' or ")
|
||||
if (in_array($name[$pos_var-1],array('[',"'")) && preg_match('/[\'\[]('.self::PHP_VAR_PREG.')[\'\]]+/',$name,$matches))
|
||||
{
|
||||
eval('$value = '.$matches[1].';');
|
||||
if (is_array($value) && $name[$pos_var-1] == "'") // arrays are only supported for '
|
||||
{
|
||||
foreach($value as &$val)
|
||||
{
|
||||
$val = "'".str_replace(array("'",'"'),array('\\\'','"'),$val)."'";
|
||||
}
|
||||
$value = '[ '.implode(', ',$value).' ]';
|
||||
$name = str_replace("'".$matches[1]."'",$value,$name);
|
||||
}
|
||||
else
|
||||
{
|
||||
$value = str_replace(array("'",'"'),array('\\\'','"'),$value);
|
||||
$name = str_replace($matches[1],$value,$name);
|
||||
}
|
||||
}
|
||||
// check if name is assigned in an url --> urlendcode contained & as %26, as egw::link explodes it on &
|
||||
if ($name[$pos_var-1] == '=' && preg_match('/[&?]([A-Za-z0-9_]+(\[[A-Za-z0-9_]+\])*)=('.self::PHP_VAR_PREG.')/',$name,$matches))
|
||||
{
|
||||
eval('$value = '.$matches[3].';');
|
||||
if (is_array($value)) // works only reasonable, if get-parameter uses array notation, eg. &file[]=$cont[filenames]
|
||||
{
|
||||
foreach($value as &$val)
|
||||
{
|
||||
$val = str_replace('&',urlencode('&'),$val);
|
||||
}
|
||||
$name = str_replace($matches[3],implode('&'.$matches[1].'=',$value),$name);
|
||||
}
|
||||
else
|
||||
{
|
||||
$value = str_replace('&',urlencode('&'),$value);
|
||||
$name = str_replace($matches[3],$value,$name);
|
||||
}
|
||||
}
|
||||
eval('$name = "'.str_replace('"','\\"',$name).'";');
|
||||
}
|
||||
if ($is_index_in_content)
|
||||
|
@ -659,7 +659,7 @@ class etemplate extends boetemplate
|
||||
// make the content availible as class-public for extensions
|
||||
$this->content =& $content;
|
||||
|
||||
$html = "\n\n<!-- BEGIN eTemplate $this->name -->\n<div id=\"$this->name\">\n\n";
|
||||
$html = "\n\n<!-- BEGIN eTemplate $this->name -->\n<div id=\"".str_replace('"','"',$this->name)."\">\n\n";
|
||||
if (!self::$styles_included[$this->name])
|
||||
{
|
||||
self::$styles_included[$this->name] = True;
|
||||
@ -874,7 +874,7 @@ class etemplate extends boetemplate
|
||||
$onclick = $this->expand_name($onclick,$c,$r,$content['.c'],$content['.row'],$content);
|
||||
}
|
||||
$row_data[".$col"] .= ' onclick="'.$this->js_pseudo_funcs($onclick,$cname).'"' .
|
||||
($cell['id'] ? ' id="'.$cell['id'].'"' : '');
|
||||
($cell['id'] ? ' id="'.str_replace('"','"',$cell['id']).'"' : '');
|
||||
}
|
||||
$colspan = $span == 'all' ? $grid['cols']-$c : 0+$span;
|
||||
if ($colspan > 1)
|
||||
@ -1171,7 +1171,7 @@ class etemplate extends boetemplate
|
||||
}
|
||||
if ($form_name != '')
|
||||
{
|
||||
$options = 'id="'.($cell['id'] ? $cell['id'] : $form_name).'" '.$options;
|
||||
$options = 'id="'.str_replace('"','"',$cell['id'] ? $cell['id'] : $form_name).'" '.$options;
|
||||
}
|
||||
switch ($type)
|
||||
{
|
||||
@ -1374,7 +1374,7 @@ class etemplate extends boetemplate
|
||||
{
|
||||
$onclick = ($onclick ? preg_replace('/^return(.*);$/','if (\\1) ',$onclick) : '').
|
||||
(((string)$cell['onchange'] === '1' || $img) ?
|
||||
'return submitit('.self::$name_form.",'".addslashes($form_name)."');" : $cell['onchange']).'; return false;';
|
||||
'return submitit('.self::$name_form.",'".$form_name."');" : $cell['onchange']).'; return false;';
|
||||
|
||||
if (!html::$netscape4 && substr($img,-1) == '%' && is_numeric($percent = substr($img,0,-1)))
|
||||
{
|
||||
@ -1601,7 +1601,7 @@ class etemplate extends boetemplate
|
||||
}
|
||||
$html .= html::image($app,$img,strlen($label) > 1 && !$cell['no_lang'] ? lang($label) : $label,
|
||||
'border="0"'.($imagemap?' usemap="#'.html::htmlspecialchars($imagemap).'"':'').
|
||||
($id || $value ? ' id="'.($id ? $id : $name).'"' : ''));
|
||||
($id || $value ? ' id="'.str_replace('"','"',$id ? $id : $name).'"' : ''));
|
||||
$extra_label = False;
|
||||
break;
|
||||
case 'file': // size: size of the filename field
|
||||
@ -1670,7 +1670,7 @@ class etemplate extends boetemplate
|
||||
if (strlen($child['onclick']) > 1)
|
||||
{
|
||||
$rows[$box_row]['.'.$box_col] .= ' onclick="'.$this->js_pseudo_funcs($child['onclick'],$cname).'"'.
|
||||
($child['id'] ? ' id="'.$child['id'].'"' : '');
|
||||
($child['id'] ? ' id="'.str_replace('"','"',$child['id']).'"' : '');
|
||||
}
|
||||
// allow to set further attributes in the tablecell, beside the class
|
||||
if (is_array($cl))
|
||||
@ -1693,7 +1693,7 @@ class etemplate extends boetemplate
|
||||
{
|
||||
$html = html::table($rows,html::formatOptions($cell_options,',,cellpadding,cellspacing').
|
||||
($type != 'groupbox' ? html::formatOptions($class,'class').
|
||||
($cell['name'] ? ' id="'.$form_name.'"' : '') : '').
|
||||
($cell['name'] ? ' id="'.str_replace('"','"',$form_name).'"' : '') : '').
|
||||
($cell['align'] && $orient != 'horizontal' || $sub_cell_has_align ? ' width="100%"' : '')); // alignment only works if table has full width
|
||||
if ($type != 'groupbox') $class = ''; // otherwise we create an extra div
|
||||
}
|
||||
@ -1708,7 +1708,7 @@ class etemplate extends boetemplate
|
||||
{
|
||||
$label = lang($label);
|
||||
}
|
||||
$html = html::fieldset($html,$label,($cell['name'] ? ' id="'.$form_name.'"' : '').
|
||||
$html = html::fieldset($html,$label,($cell['name'] ? ' id="'.str_replace('"','"',$form_name).'"' : '').
|
||||
($class ? ' class="'.$class.'"' : ''));
|
||||
$class = ''; // otherwise we create an extra div
|
||||
}
|
||||
@ -1972,8 +1972,10 @@ class etemplate extends boetemplate
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match_all("/form::name\\('([^']+)'\\)/",$on,$matches)) {
|
||||
foreach($matches[1] as $n => $matche_name) {
|
||||
if (preg_match_all("/form::name\\('([^']+)'\\)/",$on,$matches))
|
||||
{
|
||||
foreach($matches[1] as $n => $matche_name)
|
||||
{
|
||||
$matches[1][$n] = '\''.self::form_name($cname,$matche_name).'\'';
|
||||
}
|
||||
$on = str_replace($matches[0],$matches[1],$on);
|
||||
@ -1993,18 +1995,24 @@ class etemplate extends boetemplate
|
||||
$on = str_replace($matches[0],"'<style>".str_replace(array("\n","\r"),'',$tpl->style)."</style>'",$on);
|
||||
}
|
||||
}
|
||||
if (strpos($on,'confirm(') !== false && preg_match('/confirm\(["\']{1}(.*)["\']{1}\)/U',$on,$matches)) {
|
||||
|
||||
// translate messages in confirm()
|
||||
if (strpos($on,'confirm(') !== false && preg_match('/confirm\(["\']{1}(.*)["\']{1}\)/U',$on,$matches))
|
||||
{
|
||||
$question = lang($matches[1]).(substr($matches[1],-1) != '?' ? '?' : ''); // add ? if not there, saves extra phrase
|
||||
$on = str_replace($matches[0],'confirm(\''.str_replace("'","\\'",$question).'\')',$on);
|
||||
}
|
||||
|
||||
if (strpos($on,'window.open(') !== false && preg_match("/window.open\('(.*)','(.*)','dependent=yes,width=(.*),height=(.*),scrollbars=yes,status=(.*)'\)/",$on,$matches)) {
|
||||
$on = str_replace($matches[0], "egw_openWindowCentered2('{$matches[1]}', '{$matches[2]}', '{$matches[3]}', '{$matches[4]}', '{$matches[5]}')", $on);
|
||||
// replace window.open() with EGw's egw_openWindowCentered2()
|
||||
if (strpos($on,'window.open(') !== false && preg_match("/window.open\('(.*)','(.*)','dependent=yes,width=(.*),height=(.*),scrollbars=yes,status=(.*)'\)/",$on,$matches))
|
||||
{
|
||||
$on = str_replace($matches[0], "egw_openWindowCentered2('$matches[1]', '$matches[2]', $matches[3], $matches[4], '$matches[5]')", $on);
|
||||
}
|
||||
|
||||
// replace xajax calls to code in widgets, with the "etemplate" handler,
|
||||
// this allows to call widgets with the current app, otherwise everyone would need etemplate run rights
|
||||
if (strpos($on,"xajax_doXMLHTTP('etemplate.") !== false) {
|
||||
if (strpos($on,"xajax_doXMLHTTP('etemplate.") !== false)
|
||||
{
|
||||
$on = preg_replace("/^xajax_doXMLHTTP\('etemplate\.([a-z]+_widget\.[a-zA-Z0-9_]+)\'/",'xajax_doXMLHTTP(\''.$GLOBALS['egw_info']['flags']['currentapp'].'.\\1.etemplate\'',$on);
|
||||
}
|
||||
|
||||
|
@ -198,6 +198,9 @@ class etemplate_request
|
||||
//echo '<p>'.__METHOD__."($form_name,$type,".array2string($data).")</p>\n";
|
||||
$data['type'] = $type;
|
||||
|
||||
// unquote single and double quotes, as this is how they get returned in $_POST
|
||||
$form_name = str_replace(array('\\\'','"'),array('\'','"'),$form_name);
|
||||
|
||||
$this->data['to_process'][$form_name] = $data;
|
||||
$this->data_modified = true;
|
||||
}
|
||||
@ -215,6 +218,9 @@ class etemplate_request
|
||||
//echo '<p>'.__METHOD__."($form_name,$attribute,$value,$add_to_array)</p>\n";
|
||||
if (!$form_name) return;
|
||||
|
||||
// unquote single and double quotes, as this is how they get returned in $_POST
|
||||
$form_name = str_replace(array('\\\'','"'),array('\'','"'),$form_name);
|
||||
|
||||
if ($add_to_array)
|
||||
{
|
||||
$this->data['to_process'][$form_name][$attribute][] = $value;
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @copyright 2008/9 by RalfBecker@outdoor-training.de
|
||||
* @copyright 2008-10 by RalfBecker@outdoor-training.de
|
||||
* @package etemplate
|
||||
* @subpackage extensions
|
||||
* @version $Id$
|
||||
@ -16,6 +16,7 @@
|
||||
*
|
||||
* Contains the following widgets:
|
||||
* - vfs aka File name+link: clickable filename, with evtl. clickable path-components
|
||||
* - vfs-name aka Filename: filename automatically urlencoded on return (urldecoded on display to user)
|
||||
* - vfs-size aka File size: human readable filesize, eg. 1.4k
|
||||
* - vfs-mode aka File mode: posix mode as string eg. drwxr-x---
|
||||
* - vfs-mime aka File icon: mime type icon or thumbnail (if configured AND enabled in the user-prefs)
|
||||
@ -51,6 +52,7 @@ class vfs_widget
|
||||
*/
|
||||
var $human_name = array(
|
||||
'vfs' => 'File name+link', // clickable filename, with evtl. clickable path-components
|
||||
'vfs-name' => 'File name', // filename automatically urlencoded
|
||||
'vfs-size' => 'File size', // human readable filesize
|
||||
'vfs-mode' => 'File mode', // posix mode as string eg. drwxr-x---
|
||||
'vfs-mime' => 'File icon', // mime type icon or thumbnail
|
||||
@ -76,14 +78,14 @@ class vfs_widget
|
||||
{
|
||||
//echo "<p>".__METHOD__."($form_name,$value,".array2string($cell).",...)</p>\n";
|
||||
$type = $cell['type'];
|
||||
if ($type != 'vfs-upload') $cell['readonly'] = true; // to not call post-process
|
||||
if (!in_array($type,array('vfs-name','vfs-upload'))) $cell['readonly'] = true; // to not call post-process
|
||||
|
||||
// check if we have a path and not the raw value, in that case we have to do a stat first
|
||||
if (in_array($type,array('vfs-size','vfs-mode','vfs-uid','vfs-gid')) && !is_numeric($value) || $type == 'vfs' && !$value)
|
||||
{
|
||||
if (!$value || !($stat = egw_vfs::stat($value)))
|
||||
{
|
||||
if ($value) $value = lang("File '%1' not found!",$value);
|
||||
if ($value) $value = lang("File '%1' not found!",urldecode($value));
|
||||
$cell = etemplate::empty_cell();
|
||||
return true; // allow extra value;
|
||||
}
|
||||
@ -206,7 +208,7 @@ class vfs_widget
|
||||
soetemplate::add_child($cell,$sep);
|
||||
unset($sep);
|
||||
}
|
||||
$value['c'.$n] = $component !== '' ? $component : '/';
|
||||
$value['c'.$n] = $component !== '' ? urldecode($component) : '/';
|
||||
$path .= ($path != '/' ? '/' : '').$component;
|
||||
// replace id's in /apps again with human readable titles
|
||||
$path_parts = explode('/',$path);
|
||||
@ -264,6 +266,15 @@ class vfs_widget
|
||||
//_debug_array($comps); _debug_array($cell); _debug_array($value);
|
||||
break;
|
||||
|
||||
case 'vfs-name': // size: [length][,maxLength[,allowPath]]
|
||||
$cell['type'] = 'text';
|
||||
list($length,$maxLength,$allowPath) = $options = explode(',',$cell['size']);
|
||||
$preg = $allowPath ? '' : '/[^\\/]/'; // no slash '/' allowed, if not allowPath set
|
||||
$cell['size'] = "$length,$maxLength,$preg";
|
||||
$value = urldecode($value);
|
||||
$extension_data = array('type' => $type,'allowPath' => $allowPath);
|
||||
break;
|
||||
|
||||
case 'vfs-mime':
|
||||
if (!$value)
|
||||
{
|
||||
@ -322,7 +333,7 @@ class vfs_widget
|
||||
list($span,$class) = explode(',',$cell['span'],2);
|
||||
$class .= ($class ? ' ' : '') . ($broken ? 'vfsIsBrokenLink' : 'vfsIsLink');
|
||||
$cell['span'] = $span.','.$class;
|
||||
$cell['label'] = ($broken ? lang('Broken link') : lang('Link')).': '.egw_vfs::readlink($path).
|
||||
$cell['label'] = ($broken ? lang('Broken link') : lang('Link')).': '.urldecode(egw_vfs::readlink($path)).
|
||||
(!$broken ? ' ('.$cell['label'].')' : '');
|
||||
}
|
||||
break;
|
||||
@ -344,7 +355,7 @@ class vfs_widget
|
||||
*/
|
||||
static function file_widget(&$value,$path,$name,$label=null)
|
||||
{
|
||||
$value = empty($label) ? basename($path) : lang($label); // display (translated) Label or filename (if label empty)
|
||||
$value = empty($label) ? urldecode(egw_vfs::basename($path)) : lang($label); // display (translated) Label or filename (if label empty)
|
||||
|
||||
$vfs_link = etemplate::empty_cell('label',$name,array(
|
||||
'size' => ','.egw_vfs::download_url($path).',,,_blank,,'.$path,
|
||||
@ -420,11 +431,24 @@ class vfs_widget
|
||||
*/
|
||||
function post_process($name,&$value,&$extension_data,&$loop,&$tmpl,$value_in)
|
||||
{
|
||||
if (!$extension_data || $extension_data['type'] != 'vfs-upload')
|
||||
//error_log(__METHOD__."('$name',".array2string($value).','.array2string($extension_data).",$loop,,".array2string($value_in).')');
|
||||
//echo '<p>'.__METHOD__."('$name',".array2string($value).','.array2string($extension_data).",$loop,,".array2string($value_in).")</p>\n";
|
||||
|
||||
if (!$extension_data) return false;
|
||||
|
||||
switch($extension_data['type'])
|
||||
{
|
||||
return false;
|
||||
case 'vfs-name':
|
||||
$value = $extension_data['allowPath'] ? egw_vfs::encodePath($value_in) : egw_vfs::encodePathComponent($value_in);
|
||||
return true;
|
||||
|
||||
case 'vfs-upload':
|
||||
break; // handeled below
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
//echo '<p>'.__METHOD__."('$name',".array2string($value).','.array2string($extension_data).",$loop,,".array2string($value_in)."</p>\n";
|
||||
// from here on vfs-upload only!
|
||||
|
||||
// check if delete icon clicked
|
||||
if ($_POST['submit_button'] == ($fname = str_replace($extension_data['value'],$extension_data['path'],$name)) ||
|
||||
@ -438,7 +462,7 @@ class vfs_widget
|
||||
{
|
||||
if (!egw_vfs::unlink($extension_data['path'].$file))
|
||||
{
|
||||
etemplate::set_validation_error($name,lang('Error deleting %1!',$extension_data['path'].$file));
|
||||
etemplate::set_validation_error($name,lang('Error deleting %1!',urldecode($extension_data['path'].$file)));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -446,7 +470,7 @@ class vfs_widget
|
||||
}
|
||||
elseif (!egw_vfs::unlink($extension_data['path']))
|
||||
{
|
||||
etemplate::set_validation_error($name,lang('Error deleting %1!',$extension_data['path']));
|
||||
etemplate::set_validation_error($name,lang('Error deleting %1!',urldecode($extension_data['path'])));
|
||||
}
|
||||
$loop = true;
|
||||
return false;
|
||||
@ -495,11 +519,11 @@ class vfs_widget
|
||||
}
|
||||
else // multiple upload with dir given (trailing slash)
|
||||
{
|
||||
$path .= $filename;
|
||||
$path .= egw_vfs::encodePathComponent($filename);
|
||||
}
|
||||
if (!egw_vfs::file_exists($dir = egw_vfs::dirname($path)) && !egw_vfs::mkdir($dir,null,STREAM_MKDIR_RECURSIVE))
|
||||
{
|
||||
etemplate::set_validation_error($name,lang('Error create parent directory %1!',$dir));
|
||||
etemplate::set_validation_error($name,lang('Error create parent directory %1!',urldecode($dir)));
|
||||
return false;
|
||||
}
|
||||
if (!copy($tmp_name,egw_vfs::PREFIX.$path))
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* eGroupWare - eTemplates for Application etemplate
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2010-01-13 11:32
|
||||
* generated by soetemplate::dump4setup() 2010-05-11 14:15
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package etemplate
|
||||
@ -85,7 +85,7 @@ $templ_data[] = array('name' => 'etemplate.editor.list_result','template' => '',
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.editor.list_result.list','template' => '','lang' => '','group' => '0','version' => '0.9.15.002','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:3:"nmh";s:2:"c2";s:3:"nmr";}i:1;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";s:5:"label";s:4:"Name";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";s:5:"label";s:8:"Template";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";s:5:"label";s:4:"Lang";}s:1:"D";a:4:{s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";s:5:"label";s:7:"Version";s:5:"align";s:6:"center";}s:1:"E";a:6:{s:4:"type";s:6:"button";s:4:"span";s:11:",lr_padding";s:5:"label";s:6:"Search";s:5:"align";s:6:"center";s:4:"name";s:6:"search";s:4:"help";s:38:"start new search for the above pattern";}s:1:"F";a:5:{s:4:"type";s:6:"button";s:4:"span";s:11:",lr_padding";s:5:"label";s:6:"Delete";s:4:"name";s:15:"delete_selected";s:4:"help";s:55:"delete ALL selected eTemplates, WITHOUT further inquiry";}}i:2;a:6:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";}s:1:"B";a:4:{s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[template]";}s:1:"C";a:4:{s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[lang]";}s:1:"D";a:4:{s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";s:7:"no_lang";s:1:"1";s:4:"name";s:15:"${row}[version]";}s:1:"E";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:6:"center";i:1;a:5:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:10:"read[$row]";s:4:"help";s:34:"load this template into the editor";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:12:"delete[$row]";s:4:"help";s:21:"delete this eTemplate";}}s:1:"F";a:4:{s:4:"type";s:8:"checkbox";s:5:"align";s:6:"center";s:4:"name";s:14:"selected[$row]";s:4:"help";s:34:"select this eTemplate to delete it";}}}s:4:"rows";i:2;s:4:"cols";i:6;s:4:"size";s:13:",,,lr_padding";}}','size' => ',,,lr_padding','style' => 'td.lr_padding { padding-left: 5px; padding-right: 5px; }','modified' => '1035768728',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.editor.new','template' => '','lang' => '','group' => '0','version' => '1.0.1.004','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:2:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:6:",!@xml";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"html";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:2;a:2:{s:1:"A";a:5:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:10:"Export XML";s:4:"span";s:3:"all";i:1;a:2:{s:4:"type";s:4:"html";s:4:"name";s:3:"xml";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";s:4:"span";s:3:"all";i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:21:"etemplate.editor.keys";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Read";s:4:"name";s:4:"read";s:4:"help";s:49:"read eTemplate from database (for the keys above)";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:77:"save the eTemplate under the above keys (name, ...), change them for a SaveAs";}i:4;a:5:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:6:"delete";s:4:"help";s:30:"Delete the spezified eTemplate";s:7:"onclick";s:49:"return confirm(\'Delete the spezified eTemplate\');";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:10:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"7";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:6:"button";s:4:"name";s:6:"styles";s:5:"label";s:10:"CSS-Styles";s:4:"help";s:59:"edit embeded CSS styles or of the applications app.css file";s:7:"onclick";s:293:"window.open(egw::link(\'/index.php\',\'menuaction=etemplate.editor.styles&name=$cont[name]&template=$cont[template]&lang=$cont[lang]&version=$cont[version]\'),\'etemplate_editor_styles\',\'dependent=yes,width=600,height=450,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:11:"Show values";s:4:"name";s:6:"values";s:4:"help";s:65:"shows / allows you to enter values into the eTemplate for testing";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Dump4Setup";s:4:"name";s:4:"dump";s:4:"help";s:88:"writes a \'etemplates.inc.php\' file (for application in Name) in the setup-dir of the app";}i:4;a:4:{s:4:"type";s:6:"button";s:5:"label";s:14:"Write Langfile";s:4:"name";s:8:"langfile";s:4:"help";s:85:"creates an english (\'en\') langfile from label and helptexts (for application in Name)";}i:5;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Export XML";s:4:"name";s:10:"export_xml";s:4:"help";s:43:"export the loaded eTemplate into a xml-file";}i:6;a:3:{s:4:"type";s:4:"file";s:4:"name";s:4:"file";s:4:"help";s:18:"xml-file to import";}i:7;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Import XML";s:4:"name";s:10:"import_xml";s:4:"help";s:35:"import an eTemplate from a xml-file";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:4:"span";s:3:"all";s:4:"name";s:7:"onclick";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"size";s:4:"cont";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:7;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1108983483',);
|
||||
$templ_data[] = array('name' => 'etemplate.editor.new','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:2:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:6:",!@xml";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"html";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:2;a:2:{s:1:"A";a:5:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:10:"Export XML";s:4:"span";s:3:"all";i:1;a:2:{s:4:"type";s:4:"html";s:4:"name";s:3:"xml";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";s:4:"span";s:3:"all";i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:21:"etemplate.editor.keys";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Read";s:4:"name";s:4:"read";s:4:"help";s:49:"read eTemplate from database (for the keys above)";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:77:"save the eTemplate under the above keys (name, ...), change them for a SaveAs";}i:4;a:5:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:6:"delete";s:4:"help";s:30:"Delete the spezified eTemplate";s:7:"onclick";s:49:"return confirm(\'Delete the spezified eTemplate\');";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:10:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"7";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:6:"button";s:4:"name";s:6:"styles";s:5:"label";s:10:"CSS-Styles";s:4:"help";s:59:"edit embeded CSS styles or of the applications app.css file";s:7:"onclick";s:259:"window.open(egw::link(\'/index.php\',\'menuaction=etemplate.editor.styles&name=$cont[name]&template=$cont[template]&lang=$cont[lang]&version=$cont[version]\'),\'etemplate_editor_styles\',\'dependent=yes,width=600,height=450,scrollbars=yes,status=yes\'); return false;";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:11:"Show values";s:4:"name";s:6:"values";s:4:"help";s:65:"shows / allows you to enter values into the eTemplate for testing";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Dump4Setup";s:4:"name";s:4:"dump";s:4:"help";s:88:"writes a \'etemplates.inc.php\' file (for application in Name) in the setup-dir of the app";}i:4;a:4:{s:4:"type";s:6:"button";s:5:"label";s:14:"Write Langfile";s:4:"name";s:8:"langfile";s:4:"help";s:85:"creates an english (\'en\') langfile from label and helptexts (for application in Name)";}i:5;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Export XML";s:4:"name";s:10:"export_xml";s:4:"help";s:43:"export the loaded eTemplate into a xml-file";}i:6;a:3:{s:4:"type";s:4:"file";s:4:"name";s:4:"file";s:4:"help";s:18:"xml-file to import";}i:7;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Import XML";s:4:"name";s:10:"import_xml";s:4:"help";s:35:"import an eTemplate from a xml-file";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:4:"span";s:3:"all";s:4:"name";s:7:"onclick";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"size";s:4:"cont";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:7;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1108983483',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.editor.options','template' => '','lang' => '','group' => '0','version' => '0.9.15.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:7:{s:1:"A";a:5:{s:4:"type";s:4:"text";s:4:"size";s:1:"8";s:5:"label";s:5:"Width";s:4:"name";s:5:"width";s:4:"help";s:70:"Width of the table in % or pixels for the table-tag and (optional) div";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:1:"8";s:5:"label";s:6:"Height";s:4:"name";s:6:"height";s:4:"help";s:71:"Height of the table in % or pixels for the table-tag and (optional) div";}s:1:"C";a:5:{s:4:"type";s:6:"select";s:5:"label";s:8:"Overflow";s:7:"no_lang";s:1:"1";s:4:"name";s:8:"overflow";s:4:"help";s:96:"what happens with overflowing content: visible (default), hidden, scroll, auto (browser decides)";}s:1:"D";a:4:{s:4:"type";s:3:"int";s:5:"label";s:6:"Border";s:4:"name";s:6:"border";s:4:"help";s:39:"Border-line-thickness for the table-tag";}s:1:"E";a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"12";s:5:"label";s:5:"Class";s:4:"name";s:5:"class";s:4:"help";s:27:"CSS class for the table-tag";}s:1:"F";a:4:{s:4:"type";s:3:"int";s:5:"label";s:7:"Spacing";s:4:"name";s:7:"spacing";s:4:"help";s:29:"Cellspacing for the table-tag";}s:1:"G";a:4:{s:4:"type";s:3:"int";s:5:"label";s:7:"Padding";s:4:"name";s:7:"padding";s:4:"help";s:29:"Cellpadding for the table-tag";}}}s:4:"rows";i:1;s:4:"cols";i:7;}}','size' => '','style' => '','modified' => '1033317392',);
|
||||
|
||||
@ -149,6 +149,10 @@ $templ_data[] = array('name' => 'etemplate.nextmatch_widget.header_only','templa
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.nextmatch_widget.nm_row','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:7:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:11:{s:1:"A";s:2:"1%";s:1:"B";s:2:"1%";s:1:"D";s:3:"30%";s:1:"G";s:2:"5%";s:1:"I";s:2:"1%";s:2:"c1";s:2:"th";s:1:"C";s:3:"30%";s:1:"F";s:3:"15%";s:1:"J";s:2:"1%";s:1:"K";s:20:",@no_columnselection";s:1:"L";s:15:",@no_csv_export";}i:1;a:12:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"size";s:24:"first.gif,first-grey.gif";s:5:"label";s:5:"First";s:4:"name";s:5:"first";s:4:"help";s:21:"go to the first entry";}s:1:"B";a:5:{s:4:"type";s:6:"button";s:4:"size";s:22:"left.gif,left-grey.gif";s:5:"label";s:4:"Left";s:4:"name";s:4:"left";s:4:"help";s:34:"go to the previous page of entries";}s:1:"C";a:7:{s:4:"type";s:10:"select-cat";s:4:"size";s:19:"-1,,,$cont[cat_app]";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";s:8:"onchange";i:1;s:4:"help";s:17:"select a Category";s:5:"align";s:6:"center";}s:1:"D";a:6:{s:4:"type";s:6:"select";s:5:"label";s:13:"@filter_label";s:5:"align";s:6:"center";s:4:"name";s:6:"filter";s:8:"onchange";s:16:"@filter_onchange";s:4:"help";s:12:"@filter_help";}s:1:"E";a:6:{s:4:"type";s:6:"select";s:5:"label";s:14:"@filter2_label";s:5:"align";s:6:"center";s:4:"name";s:7:"filter2";s:8:"onchange";s:17:"@filter2_onchange";s:4:"help";s:13:"@filter2_help";}s:1:"F";a:6:{s:4:"type";s:4:"text";s:5:"align";s:5:"right";s:4:"name";s:6:"search";s:8:"onchange";i:1;s:4:"help";s:28:"a pattern to be searched for";s:4:"size";s:2:"12";}s:1:"G";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Search";s:4:"name";s:12:"start_search";s:4:"help";s:19:"to start the search";}s:1:"H";a:6:{s:4:"type";s:6:"select";s:4:"name";s:8:"num_rows";s:7:"no_lang";s:1:"1";s:8:"onchange";i:1;s:4:"help";s:37:"How many entries should the list show";s:4:"span";s:12:",nm_num_rows";}s:1:"I";a:5:{s:4:"type";s:6:"button";s:4:"size";s:24:"right.gif,right-grey.gif";s:5:"label";s:5:"Right";s:4:"name";s:5:"right";s:4:"help";s:30:"go to the next page of entries";}s:1:"J";a:5:{s:4:"type";s:6:"button";s:4:"size";s:22:"last.gif,last-grey.gif";s:5:"label";s:4:"Last";s:4:"name";s:4:"last";s:4:"help";s:20:"go to the last entry";}s:1:"K";a:5:{s:4:"type";s:3:"box";s:4:"size";s:1:"2";i:1;a:5:{s:4:"type";s:6:"button";s:4:"size";s:10:"selectcols";s:5:"label";s:14:"Select columns";s:4:"help";s:41:"Select the columns to display in the list";s:7:"onclick";s:174:"document.getElementById(form::name(\'colselection\')).style.display=document.getElementById(form::name(\'colselection\')).style.display==\'block\' ? \'none\' : \'block\'; return false;";}i:2;a:7:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";i:1;a:5:{s:4:"type";s:6:"select";s:4:"size";s:3:"012";s:4:"name";s:10:"selectcols";s:4:"help";s:41:"Select the columns to display in the list";s:7:"no_lang";s:1:"1";}i:2;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:8:"savecols";i:1;a:1:{s:4:"type";s:4:"hbox";}}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:6:"cancel";s:5:"label";s:6:"Cancel";s:7:"onclick";s:87:"document.getElementById(form::name(\'colselection\')).style.display=\'none\'; return false;";}i:3;a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:13:"default_prefs";s:5:"label";s:10:"as default";s:4:"help";s:58:"Save selected columns as default preference for all users.";}}s:4:"span";s:13:",colselection";s:4:"name";s:12:"colselection";s:5:"label";s:14:"Select columns";}s:4:"span";s:11:",selectcols";}s:1:"L";a:4:{s:4:"type";s:6:"button";s:4:"name";s:6:"export";s:4:"size";s:8:"filesave";s:5:"label";s:10:"CSV Export";}}}s:4:"rows";i:1;s:4:"cols";i:12;s:4:"size";s:11:"100%,,,,0,3";s:4:"span";s:17:",nextmatch_header";s:7:"options";a:3:{i:0;s:4:"100%";i:4;s:1:"0";i:5;s:1:"3";}}}','size' => '100%,,,,0,3','style' => '','modified' => '1113294054',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.nm-test','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:4:"rows";}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1248806355',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.nm-test.rows','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:2:"h2";s:7:",!@$row";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:6:"Header";s:4:"name";s:6:"header";}}i:2;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:14:"${row}[header]";}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1248806366',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.popup.manual','template' => '','lang' => '','group' => '0','version' => '1.2','data' => 'a:1:{i:0;a:5:{s:4:"type";s:6:"manual";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"span";s:20:",popupManual noPrint";}}','size' => '','style' => '.popupManual { position: absolute; right: 27px; top: 24px; }','modified' => '1131553453',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.stack-test','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"deck";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:10:"Hallo Ralf";s:4:"name";s:4:"ralf";}i:2;a:3:{s:4:"type";s:5:"label";s:5:"label";s:10:"Hallo Welt";s:4:"name";s:4:"welt";}}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1047754314',);
|
||||
@ -181,6 +185,8 @@ $templ_data[] = array('name' => 'etemplate.test.grid-export','template' => '','l
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.test.infolog','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:13:"infolog-value";s:4:"name";s:4:"test";s:7:"options";a:0:{}}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1242560130',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.test.select','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:6:"select";s:4:"size";s:15:"Addressbook ...";s:4:"name";s:4:"test";}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1248421034',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.test.table','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:3:{s:2:"h1";s:4:",h,h";s:2:"h3";s:4:",f,f";s:2:"h2";s:3:",,h";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Kopf1";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Kopf2";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:12:"2. Kopfzeile";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Footer1";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Footer2";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Body1";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Body2";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"2. Body1";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"2. Body2";}}}s:4:"rows";i:5;s:4:"cols";i:2;s:4:"size";s:3:",,1";s:7:"options";a:1:{i:2;s:1:"1";}}}','size' => ',,1','style' => '','modified' => '1235388984',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.test.Ymd','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:4:"text";s:5:"label";s:19:"Date YYYYmmddHHiiss";s:4:"name";s:4:"date";}}i:2;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"date";s:4:"size";s:5:"YmdHi";s:5:"label";s:4:"Date";s:4:"name";s:4:"date";s:8:"readonly";s:1:"1";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:13:"date-timeonly";s:4:"size";s:5:"YmdHi";s:5:"label";s:4:"Time";s:4:"name";s:4:"date";s:8:"readonly";s:1:"1";}}}s:4:"rows";i:3;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1179320861',);
|
||||
|
@ -19,7 +19,7 @@
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="etemplate.editor.new" template="" lang="" group="0" version="1.0.1.004">
|
||||
<template id="etemplate.editor.new" template="" lang="" group="0" version="1.7.001">
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
@ -44,7 +44,7 @@
|
||||
</row>
|
||||
<row>
|
||||
<hbox span="all">
|
||||
<button id="styles" label="CSS-Styles" statustext="edit embeded CSS styles or of the applications app.css file" onclick="window.open(egw::link('/index.php','menuaction=etemplate.editor.styles&name=$cont[name]&template=$cont[template]&lang=$cont[lang]&version=$cont[version]'),'etemplate_editor_styles','dependent=yes,width=600,height=450,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button id="styles" label="CSS-Styles" statustext="edit embeded CSS styles or of the applications app.css file" onclick="window.open(egw::link('/index.php','menuaction=etemplate.editor.styles&name=$cont[name]&template=$cont[template]&lang=$cont[lang]&version=$cont[version]'),'etemplate_editor_styles','dependent=yes,width=600,height=450,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button label="Show values" id="values" statustext="shows / allows you to enter values into the eTemplate for testing"/>
|
||||
<button label="Dump4Setup" id="dump" statustext="writes a 'etemplates.inc.php' file (for application in Name) in the setup-dir of the app"/>
|
||||
<button label="Write Langfile" id="langfile" statustext="creates an english ('en') langfile from label and helptexts (for application in Name)"/>
|
||||
|
@ -127,7 +127,7 @@ class filemanager_ui
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg .= lang('The requested path %1 is not available.',$path);
|
||||
$msg .= lang('The requested path %1 is not available.',urldecode($path));
|
||||
}
|
||||
// reset lettersearch as it confuses users (they think the dir is empty)
|
||||
$content['nm']['searchletter'] = false;
|
||||
@ -153,6 +153,11 @@ class filemanager_ui
|
||||
$clipboard_files = egw_session::appsession('clipboard_files','filemanager');
|
||||
$clipboard_type = egw_session::appsession('clipboard_type','filemanager');
|
||||
|
||||
// be tolerant with (in previous versions) not correct urlencoded pathes
|
||||
if ($content['nm']['path'][0] == '/' && !egw_vfs::stat($content['nm']['path'],true) && egw_vfs::stat(urldecode($content['nm']['path'])))
|
||||
{
|
||||
$content['nm']['path'] = urldecode($content['nm']['path']);
|
||||
}
|
||||
if ($content['button'])
|
||||
{
|
||||
if ($content['button'])
|
||||
@ -200,11 +205,11 @@ class filemanager_ui
|
||||
$abs_target = $target[0] == '/' ? $target : egw_vfs::concat($content['nm']['path'],$target);
|
||||
if (!egw_vfs::stat($abs_target))
|
||||
{
|
||||
$content['nm']['msg'] = lang('Link target %1 not found!',$abs_target);
|
||||
$content['nm']['msg'] = lang('Link target %1 not found!',urldecode($abs_target));
|
||||
break;
|
||||
}
|
||||
$content['nm']['msg'] = egw_vfs::symlink($target,$link) ?
|
||||
lang('Symlink to %1 created.',$target) : lang('Error creating symlink to target %1!',$target);
|
||||
lang('Symlink to %1 created.',$target) : lang('Error creating symlink to target %1!',urldecode($target));
|
||||
break;
|
||||
case 'paste':
|
||||
$content['nm']['msg'] = self::action($clipboard_type.'_paste',$clipboard_files,$content['nm']['path']);
|
||||
@ -221,8 +226,9 @@ class filemanager_ui
|
||||
$upload_success = $upload_failure = array();
|
||||
foreach(isset($content['upload'][0]) ? $content['upload'] : array($content['upload']) as $upload)
|
||||
{
|
||||
// strip '?', '/' and '#' from filenames, as they are forbidden for sqlfs / make problems
|
||||
$to = egw_vfs::concat($content['nm']['path'],str_replace(array('?','/','#'),'',$upload['name']));
|
||||
// encode chars which special meaning in url/vfs (some like / get removed!)
|
||||
$to = egw_vfs::concat($content['nm']['path'],egw_vfs::encodePathComponent($upload['name']));
|
||||
|
||||
if ($upload && is_uploaded_file($upload['tmp_name']) &&
|
||||
(egw_vfs::is_writable($content['nm']['path']) || egw_vfs::is_writable($to)) &&
|
||||
copy($upload['tmp_name'],egw_vfs::PREFIX.$to))
|
||||
@ -238,7 +244,7 @@ class filemanager_ui
|
||||
if ($upload_success)
|
||||
{
|
||||
$content['nm']['msg'] = count($upload_success) == 1 && !$upload_failure ? lang('File successful uploaded.') :
|
||||
lang('%1 successful uploaded.',implode(', ',$upload_success));
|
||||
lang('%1 successful uploaded.',urldecode(implode(', ',$upload_success)));
|
||||
}
|
||||
if ($upload_failure)
|
||||
{
|
||||
@ -256,9 +262,9 @@ class filemanager_ui
|
||||
$dir_is_writable = egw_vfs::is_writable($content['nm']['path']);
|
||||
}
|
||||
$content['paste_tooltip'] = $clipboard_files ? '<p><b>'.lang('%1 the following files into current directory',
|
||||
$clipboard_type=='copy'?lang('Copy'):lang('Move')).':</b><br />'.implode('<br />',$clipboard_files).'</p>' : '';
|
||||
$clipboard_type=='copy'?lang('Copy'):lang('Move')).':</b><br />'.urldecode(implode('<br />',$clipboard_files)).'</p>' : '';
|
||||
$content['linkpaste_tooltip'] = $clipboard_files ? '<p><b>'.lang('%1 the following files into current directory',
|
||||
lang('link')).':</b><br />'.implode('<br />',$clipboard_files).'</p>' : '';
|
||||
lang('link')).':</b><br />'.urldecode(implode('<br />',$clipboard_files)).'</p>' : '';
|
||||
$content['upload_size'] = etemplate::max_upload_size_message();
|
||||
//_debug_array($content);
|
||||
|
||||
@ -297,8 +303,8 @@ class filemanager_ui
|
||||
$name = explode('/',str_replace('\\','/',$name)); // in case of win clients
|
||||
$name = array_pop($name);
|
||||
|
||||
// strip '?', '/' and '#' from filenames, as they are forbidden for sqlfs / make problems
|
||||
$path = egw_vfs::concat($dir,str_replace(array('?','/','#'),'',$name));
|
||||
// encode chars which special meaning in url/vfs (some like / get removed!)
|
||||
$path = egw_vfs::concat($dir,egw_vfs::encodePathComponent($name));
|
||||
|
||||
if(egw_vfs::deny_script($path))
|
||||
{
|
||||
@ -314,7 +320,7 @@ class filemanager_ui
|
||||
}
|
||||
else
|
||||
{
|
||||
$response->addScript("if (!confirm('".addslashes(lang('Do you want to overwrite the existing file %1?',$path))."')) document.getElementById('$id').value='';");
|
||||
$response->addScript("if (!confirm('".addslashes(lang('Do you want to overwrite the existing file %1?',urldecode($path)))."')) document.getElementById('$id').value='';");
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -386,7 +392,7 @@ class filemanager_ui
|
||||
{
|
||||
if (preg_match('/^\/?(home|apps|)\/*$/',$path))
|
||||
{
|
||||
return lang("Cautiously rejecting to remove folder '$path'!");
|
||||
return lang("Cautiously rejecting to remove folder '%1'!",urldecode($path));
|
||||
}
|
||||
}
|
||||
// now we use find to loop through all files and dirs: (selected only contains dirs now)
|
||||
@ -530,13 +536,18 @@ class filemanager_ui
|
||||
}
|
||||
egw_session::appsession('index','filemanager',$query);
|
||||
|
||||
// be tolerant with (in previous versions) not correct urlencoded pathes
|
||||
if (!egw_vfs::stat($query['path'],true) && egw_vfs::stat(urldecode($query['path'])))
|
||||
{
|
||||
$query['path'] = urldecode($query['path']);
|
||||
}
|
||||
if (!egw_vfs::stat($query['path'],true) || !egw_vfs::is_dir($query['path']) || !egw_vfs::check_access($query['path'],egw_vfs::READABLE))
|
||||
{
|
||||
// we will leave here, since we are not allowed, or the location does not exist. Index must handle that, and give
|
||||
// an appropriate message
|
||||
egw::redirect_link('/index.php',array('menuaction'=>'filemanager.filemanager_ui.index',
|
||||
'path' => self::get_home_dir(),
|
||||
'msg' => lang('The requested path %1 is not available.',$query['path']),
|
||||
'msg' => lang('The requested path %1 is not available.',urldecode($query['path'])),
|
||||
));
|
||||
}
|
||||
$rows = $dir_is_writable = array();
|
||||
@ -616,7 +627,7 @@ class filemanager_ui
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Filemanager').': '.$query['path'];
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Filemanager').': '.urldecode($query['path']);
|
||||
}
|
||||
return egw_vfs::$find_total;
|
||||
}
|
||||
@ -682,10 +693,12 @@ class filemanager_ui
|
||||
$path =& $content['path'];
|
||||
|
||||
list($button) = @each($content['button']); unset($content['button']);
|
||||
if ($button == 'sudo' || $content['sudo']['user'])
|
||||
// need to check 'setup' button (submit button in sudo popup), as some browsers (eg. chrome) also fill the hidden field
|
||||
if ($button == 'sudo' && egw_vfs::$is_root || $button == 'setup' && $content['sudo']['user'])
|
||||
{
|
||||
$msg = $this->sudo($content['sudo']['user'],$content['sudo']['passwd']) ? lang('Root access granted.') :
|
||||
($content['sudo']['user'] ? lang('Wrong username or password!') : lang('Root access stopped.'));
|
||||
$msg = $this->sudo($button == 'setup' ? $content['sudo']['user'] : '',$content['sudo']['passwd']) ?
|
||||
lang('Root access granted.') : ($button == 'setup' && $content['sudo']['user'] ?
|
||||
lang('Wrong username or password!') : lang('Root access stopped.'));
|
||||
unset($content['sudo']);
|
||||
$content['is_owner'] = egw_vfs::has_owner_rights($path);
|
||||
}
|
||||
@ -712,14 +725,14 @@ class filemanager_ui
|
||||
}
|
||||
if (egw_vfs::rename($path,$to))
|
||||
{
|
||||
$msg .= lang('Renamed %1 to %2.',basename($path),basename($to)).' ';
|
||||
$msg .= lang('Renamed %1 to %2.',urldecode(basename($path)),urldecode(basename($to))).' ';
|
||||
$content['old']['name'] = $content[$name];
|
||||
$path = $to;
|
||||
$content['mime'] = mime_magic::filename2mime($path); // recheck mime type
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg .= lang('Rename of %1 to %2 failed!',basename($path),basename($to)).' ';
|
||||
$msg .= lang('Rename of %1 to %2 failed!',urldecode(basename($path)),urldecode(basename($to))).' ';
|
||||
if (egw_vfs::deny_script($to))
|
||||
{
|
||||
$msg .= lang('You are NOT allowed to upload a script!').' ';
|
||||
@ -922,7 +935,7 @@ class filemanager_ui
|
||||
));
|
||||
}
|
||||
$GLOBALS['egw_info']['flags']['java_script'] = "<script>window.focus();</script>\n";
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Preferences').' '.$path;
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Preferences').' '.urldecode($path);
|
||||
|
||||
$tpl->exec('filemanager.filemanager_ui.file',$content,$sel_options,$readonlys,$preserve,2);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* eGroupWare - eTemplates for Application filemanager
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2009-11-27 14:47
|
||||
* generated by soetemplate::dump4setup() 2010-05-12 14:33
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package filemanager
|
||||
@ -27,13 +27,13 @@ $templ_data[] = array('name' => 'filemanager.file.custom','template' => '','lang
|
||||
|
||||
$templ_data[] = array('name' => 'filemanager.file.eacl','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:4:",top";s:2:"c2";s:7:",bottom";s:2:"h2";s:11:",!@is_owner";}i:1;a:3:{s:1:"A";a:5:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:4:"span";s:3:"all";s:5:"label";s:28:"Extended access control list";i:1;a:7:{s:4:"type";s:4:"grid";s:4:"size";s:17:"100%,200,,,,,auto";s:4:"data";a:3:{i:0;a:7:{s:1:"A";s:2:"80";s:1:"B";s:2:"80";s:1:"D";s:2:"16";s:2:"h2";s:4:",!@1";s:1:"C";s:3:"20%";s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Rights";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Inherited";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:2;a:4:{s:1:"A";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:13:"${row}[owner]";s:8:"readonly";s:1:"1";}s:1:"B";a:3:{s:4:"type";s:6:"select";s:4:"name";s:14:"${row}[rights]";s:8:"readonly";s:1:"1";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[path]";}s:1:"D";a:5:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:39:"delete[$row_cont[ino]-$row_cont[owner]]";s:7:"onclick";s:43:"return confirm(\'Delete this extended ACL\');";}}}s:4:"name";s:4:"eacl";s:4:"rows";i:2;s:4:"cols";i:4;s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"200";i:6;s:4:"auto";}}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:2;a:3:{s:1:"A";a:5:{s:4:"type";s:14:"select-account";s:4:"size";s:15:"select one,both";s:4:"name";s:11:"eacl[owner]";s:4:"span";s:12:",eaclAccount";s:5:"label";s:5:"Owner";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:12:"eacl[rights]";s:4:"span";s:11:",eaclRights";s:5:"label";s:6:"Rights";s:4:"help";s:67:"You can only grant additional rights, you can NOT take rights away!";}s:1:"C";a:3:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:12:"button[eacl]";}}}s:4:"rows";i:2;s:4:"cols";i:3;s:4:"size";s:12:"450,300,,,10";s:7:"options";a:3:{i:0;s:3:"450";i:1;s:3:"300";i:4;s:2:"10";}}}','size' => '450,300,,,10','style' => '','modified' => '1207724932',);
|
||||
|
||||
$templ_data[] = array('name' => 'filemanager.file.general','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:10:{i:0;a:4:{s:1:"A";s:2:"80";s:2:"h1";s:2:"60";s:2:"h3";s:10:",!@is_link";s:2:"h6";s:9:",@is_link";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:5:"image";s:4:"name";s:4:"icon";s:4:"span";s:9:",mimeHuge";s:5:"align";s:6:"center";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:6:"needed";s:1:"1";s:4:"span";s:9:",fileName";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Link";s:4:"size";s:10:",,,symlink";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"span";s:9:",fileName";s:4:"name";s:7:"symlink";s:8:"readonly";s:1:"1";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:4:"mime";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Directory";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:3:"dir";}}i:6;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Size";}s:1:"B";a:3:{s:4:"type";s:8:"vfs-size";s:4:"name";s:4:"size";s:4:"size";s:1:"1";}}i:7;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Created";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:5:"ctime";s:8:"readonly";s:1:"1";}}i:8;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Modified";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:5:"mtime";s:8:"readonly";s:1:"1";}}i:9;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:10:",,,comment";s:5:"label";s:7:"Comment";}s:1:"B";a:3:{s:4:"type";s:8:"textarea";s:4:"name";s:7:"comment";s:4:"span";s:8:",comment";}}}s:4:"rows";i:9;s:4:"cols";i:2;s:4:"size";s:12:"450,300,,,10";s:7:"options";a:3:{i:0;s:3:"450";i:1;s:3:"300";i:4;s:2:"10";}}}','size' => '450,300,,,10','style' => '','modified' => '1204554817',);
|
||||
$templ_data[] = array('name' => 'filemanager.file.general','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:10:{i:0;a:4:{s:1:"A";s:2:"80";s:2:"h1";s:2:"60";s:2:"h3";s:10:",!@is_link";s:2:"h6";s:9:",@is_link";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:5:"image";s:4:"name";s:4:"icon";s:4:"span";s:9:",mimeHuge";s:5:"align";s:6:"center";}s:1:"B";a:4:{s:4:"type";s:8:"vfs-name";s:4:"name";s:4:"name";s:6:"needed";s:1:"1";s:4:"span";s:9:",fileName";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Link";s:4:"size";s:10:",,,symlink";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"span";s:9:",fileName";s:4:"name";s:7:"symlink";s:8:"readonly";s:1:"1";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:4:"mime";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Directory";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:3:"dir";}}i:6;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Size";}s:1:"B";a:3:{s:4:"type";s:8:"vfs-size";s:4:"name";s:4:"size";s:4:"size";s:1:"1";}}i:7;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Created";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:5:"ctime";s:8:"readonly";s:1:"1";}}i:8;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Modified";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:5:"mtime";s:8:"readonly";s:1:"1";}}i:9;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:10:",,,comment";s:5:"label";s:7:"Comment";}s:1:"B";a:3:{s:4:"type";s:8:"textarea";s:4:"name";s:7:"comment";s:4:"span";s:8:",comment";}}}s:4:"rows";i:9;s:4:"cols";i:2;s:4:"size";s:12:"450,300,,,10";s:7:"options";a:3:{i:0;s:3:"450";i:1;s:3:"300";i:4;s:2:"10";}}}','size' => '450,300,,,10','style' => '','modified' => '1204554817',);
|
||||
|
||||
$templ_data[] = array('name' => 'filemanager.file.perms','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:1:{s:2:"h3";s:9:",!@is_dir";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:12:"Accessrights";i:1;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:3:{s:1:"A";s:2:"80";s:2:"h5";s:2:",1";s:2:"h4";s:8:",@is_dir";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}s:1:"B";a:2:{s:4:"type";s:6:"select";s:4:"name";s:12:"perms[owner]";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Group";}s:1:"B";a:2:{s:4:"type";s:6:"select";s:4:"name";s:12:"perms[group]";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Other";}s:1:"B";a:2:{s:4:"type";s:6:"select";s:4:"name";s:12:"perms[other]";}}i:4;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:10:"Executable";s:4:"name";s:17:"perms[executable]";}}i:5;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:43:"Only owner can rename or delete the content";s:4:"name";s:13:"perms[sticky]";}}}s:4:"rows";i:5;s:4:"cols";i:2;s:7:"options";a:0:{}}}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:5:"Owner";i:1;a:5:{s:4:"type";s:4:"grid";s:7:"options";a:0:{}s:4:"data";a:3:{i:0;a:1:{s:1:"A";s:2:"80";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"User";}s:1:"B";a:4:{s:4:"type";s:14:"select-account";s:4:"size";s:13:"root,accounts";s:4:"name";s:3:"uid";s:5:"label";s:12:"@ro_uid_root";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Group";}s:1:"B";a:4:{s:4:"type";s:14:"select-account";s:4:"size";s:11:"root,groups";s:4:"name";s:3:"gid";s:5:"label";s:12:"@ro_gid_root";}}}s:4:"rows";i:2;s:4:"cols";i:2;}}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:43:"Modify all Subdirectories and their content";s:4:"name";s:11:"modify_subs";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:12:"450,300,,,10";s:7:"options";a:3:{i:0;s:3:"450";i:1;s:3:"300";i:4;s:2:"10";}}}','size' => '450,300,,,10','style' => '','modified' => '1204567746',);
|
||||
|
||||
$templ_data[] = array('name' => 'filemanager.file.preview','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:5:{s:2:"c1";s:4:",top";s:2:"h1";s:16:",!@mime=/^image/";s:2:"h3";s:22:",@mime=/^(image|text)/";s:2:"h2";s:18:"280,!@text_content";s:2:"c2";s:4:",top";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:4:"name";s:4:"link";s:4:"span";s:13:",previewImage";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"textarea";s:4:"name";s:12:"text_content";s:4:"span";s:12:",previewText";s:8:"readonly";s:1:"1";}}i:3;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"No preview available";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:18:"450,300,,,10,,auto";s:7:"options";a:4:{i:0;s:3:"450";i:1;s:3:"300";i:6;s:4:"auto";i:4;s:2:"10";}}}','size' => '450,300,,,10,,auto','style' => '','modified' => '1204567479',);
|
||||
|
||||
$templ_data[] = array('name' => 'filemanager.index','template' => '','lang' => '','group' => '0','version' => '1.7.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:2:{s:1:"A";s:3:"250";s:2:"h1";s:10:",!@nm[msg]";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:7:"nm[msg]";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:13:{s:4:"type";s:4:"hbox";s:4:"size";s:2:"10";i:1;a:4:{s:4:"type";s:5:"image";s:5:"label";s:2:"Up";s:4:"name";s:4:"goup";s:4:"size";s:40:"filemanager.filemanager_ui.index&path=..";}i:2;a:4:{s:4:"type";s:5:"image";s:4:"name";s:6:"gohome";s:4:"size";s:39:"filemanager.filemanager_ui.index&path=~";s:5:"label";s:25:"Go to your home directory";}s:4:"span";s:3:"all";i:3;a:6:{s:4:"type";s:4:"text";s:4:"name";s:8:"nm[path]";s:4:"size";s:2:"80";s:5:"label";s:4:"Path";s:8:"onchange";i:1;s:4:"span";s:8:",address";}i:4;a:4:{s:4:"type";s:6:"button";s:4:"name";s:10:"button[go]";s:4:"size";s:9:"key_enter";s:5:"label";s:5:"Go to";}i:5;a:2:{s:4:"type";s:5:"image";s:4:"name";s:15:"buttonseparator";}i:6;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:13:"Edit settings";s:4:"name";s:23:"edit[{$cont[nm][path]}]";s:4:"help";s:39:"Rename, change permissions or ownership";s:7:"onclick";s:194:"window.open(egw::link(\'/index.php\',\'menuaction=filemanager.filemanager_ui.file&path={$cont[nm][path]}\'),\'fileprefs\',\'dependent=yes,width=495,height=425,scrollbars=yes,status=yes\'); return false;";}i:7;a:5:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[createdir]";s:4:"size";s:35:"button_createdir,createdir_disabled";s:5:"label";s:16:"Create directory";s:7:"onclick";s:128:"var dir = prompt(egw::lang(\'New directory\')); if (!dir) return false; document.getElementById(form::name(\'nm[path]\')).value=dir;";}i:8;a:5:{s:4:"type";s:6:"button";s:4:"size";s:18:"link,link_disabled";s:5:"label";s:13:"Create a link";s:4:"name";s:15:"button[symlink]";s:7:"onclick";s:129:"var link = prompt(egw::lang(\'Link target\')); if (!link) return false; document.getElementById(form::name(\'nm[path]\')).value=link;";}i:9;a:4:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[paste]";s:4:"size";s:28:"editpaste,editpaste_disabled";s:4:"help";s:20:"$cont[paste_tooltip]";}i:10;a:4:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[linkpaste]";s:4:"size";s:28:"linkpaste,linkpaste_disabled";s:4:"help";s:24:"$cont[linkpaste_tooltip]";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"size";s:22:"filemanager.index.rows";s:4:"span";s:3:"all";s:4:"name";s:2:"nm";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:4:"file";s:4:"name";s:8:"upload[]";s:4:"help";s:42:"Select file to upload in current directory";s:8:"onchange";s:99:"xajax_doXMLHTTP(\'filemanager_ui::ajax_check_upload_target\',this.id,this.value,\'{$cont[nm][path]}\');";}i:2;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Upload";s:4:"name";s:14:"button[upload]";}}s:1:"B";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:4:{s:4:"type";s:6:"select";s:4:"name";s:6:"action";s:4:"size";s:16:"Select action...";s:8:"onchange";i:1;}i:2;a:8:{s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:70:"toggle_all(this.form,form::name(\'nm[rows][checked][]\')); return false;";s:6:"needed";s:1:"1";s:4:"span";s:14:",checkAllArrow";}}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1237464702',);
|
||||
$templ_data[] = array('name' => 'filemanager.index','template' => '','lang' => '','group' => '0','version' => '1.7.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:2:{s:1:"A";s:3:"250";s:2:"h1";s:10:",!@nm[msg]";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:7:"nm[msg]";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:13:{s:4:"type";s:4:"hbox";s:4:"size";s:2:"10";i:1;a:4:{s:4:"type";s:5:"image";s:5:"label";s:2:"Up";s:4:"name";s:4:"goup";s:4:"size";s:40:"filemanager.filemanager_ui.index&path=..";}i:2;a:4:{s:4:"type";s:5:"image";s:4:"name";s:6:"gohome";s:4:"size";s:39:"filemanager.filemanager_ui.index&path=~";s:5:"label";s:25:"Go to your home directory";}s:4:"span";s:3:"all";i:3;a:6:{s:4:"type";s:8:"vfs-name";s:4:"name";s:8:"nm[path]";s:4:"size";s:5:"80,,1";s:5:"label";s:4:"Path";s:8:"onchange";i:1;s:4:"span";s:8:",address";}i:4;a:4:{s:4:"type";s:6:"button";s:4:"name";s:10:"button[go]";s:4:"size";s:9:"key_enter";s:5:"label";s:5:"Go to";}i:5;a:2:{s:4:"type";s:5:"image";s:4:"name";s:15:"buttonseparator";}i:6;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:13:"Edit settings";s:4:"name";s:23:"edit[{$cont[nm][path]}]";s:4:"help";s:39:"Rename, change permissions or ownership";s:7:"onclick";s:194:"window.open(egw::link(\'/index.php\',\'menuaction=filemanager.filemanager_ui.file&path={$cont[nm][path]}\'),\'fileprefs\',\'dependent=yes,width=495,height=425,scrollbars=yes,status=yes\'); return false;";}i:7;a:5:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[createdir]";s:4:"size";s:35:"button_createdir,createdir_disabled";s:5:"label";s:16:"Create directory";s:7:"onclick";s:128:"var dir = prompt(egw::lang(\'New directory\')); if (!dir) return false; document.getElementById(form::name(\'nm[path]\')).value=dir;";}i:8;a:5:{s:4:"type";s:6:"button";s:4:"size";s:18:"link,link_disabled";s:5:"label";s:13:"Create a link";s:4:"name";s:15:"button[symlink]";s:7:"onclick";s:129:"var link = prompt(egw::lang(\'Link target\')); if (!link) return false; document.getElementById(form::name(\'nm[path]\')).value=link;";}i:9;a:4:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[paste]";s:4:"size";s:28:"editpaste,editpaste_disabled";s:4:"help";s:20:"$cont[paste_tooltip]";}i:10;a:4:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[linkpaste]";s:4:"size";s:28:"linkpaste,linkpaste_disabled";s:4:"help";s:24:"$cont[linkpaste_tooltip]";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"size";s:22:"filemanager.index.rows";s:4:"span";s:3:"all";s:4:"name";s:2:"nm";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:4:"file";s:4:"name";s:8:"upload[]";s:4:"help";s:42:"Select file to upload in current directory";s:8:"onchange";s:99:"xajax_doXMLHTTP(\'filemanager_ui::ajax_check_upload_target\',this.id,this.value,\'{$cont[nm][path]}\');";}i:2;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Upload";s:4:"name";s:14:"button[upload]";}}s:1:"B";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:4:{s:4:"type";s:6:"select";s:4:"name";s:6:"action";s:4:"size";s:16:"Select action...";s:8:"onchange";i:1;}i:2;a:8:{s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:70:"toggle_all(this.form,form::name(\'nm[rows][checked][]\')); return false;";s:6:"needed";s:1:"1";s:4:"span";s:14:",checkAllArrow";}}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1237464702',);
|
||||
|
||||
$templ_data[] = array('name' => 'filemanager.index.rows','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:6:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:1:"B";s:3:"30%";s:1:"D";s:3:"120";s:1:"E";s:3:"120";s:1:"K";s:2:"70";}i:1;a:11:{s:1:"A";a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Type";s:4:"name";s:4:"mime";s:5:"align";s:6:"center";}s:1:"B";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}s:1:"C";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Size";s:4:"name";s:4:"size";}s:1:"D";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Modified";s:4:"name";s:5:"mtime";}s:1:"E";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Created";s:4:"name";s:5:"ctime";}s:1:"F";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Permissions";s:4:"name";s:4:"mode";}s:1:"G";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:3:"uid";s:5:"label";s:5:"Owner";}s:1:"H";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:3:"gid";s:5:"label";s:5:"Group";}s:1:"I";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Comment";s:4:"name";s:7:"comment";}s:1:"J";a:3:{s:4:"type";s:22:"nextmatch-customfields";s:8:"readonly";s:1:"1";s:4:"name";s:12:"customfields";}s:1:"K";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";}i:2;a:8:{s:4:"type";s:6:"button";s:4:"size";s:5:"check";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:60:"toggle_all(this.form,form::name(\'checked[]\')); return false;";s:6:"needed";s:1:"1";s:5:"align";s:5:"right";}}}i:2;a:11:{s:1:"A";a:3:{s:4:"type";s:8:"vfs-mime";s:4:"name";s:12:"${row}[path]";s:5:"align";s:6:"center";}s:1:"B";a:3:{s:4:"type";s:3:"vfs";s:4:"name";s:4:"$row";s:7:"no_lang";s:1:"1";}s:1:"C";a:3:{s:4:"type";s:8:"vfs-size";s:4:"name";s:12:"${row}[size]";s:5:"align";s:5:"right";}s:1:"D";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:13:"${row}[mtime]";s:8:"readonly";s:1:"1";}s:1:"E";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:13:"${row}[ctime]";s:8:"readonly";s:1:"1";}s:1:"F";a:2:{s:4:"type";s:8:"vfs-mode";s:4:"name";s:12:"${row}[mode]";}s:1:"G";a:3:{s:4:"type";s:7:"vfs-uid";s:4:"name";s:11:"${row}[uid]";s:7:"no_lang";s:1:"1";}s:1:"H";a:3:{s:4:"type";s:7:"vfs-gid";s:4:"name";s:11:"${row}[gid]";s:7:"no_lang";s:1:"1";}s:1:"I";a:2:{s:4:"type";s:5:"label";s:4:"name";s:15:"${row}[comment]";}s:1:"J";a:3:{s:4:"type";s:17:"customfields-list";s:4:"name";s:4:"$row";s:4:"span";s:13:",customfields";}s:1:"K";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:13:"Edit settings";s:4:"name";s:21:"edit[$row_cont[path]]";s:4:"help";s:39:"Rename, change permissions or ownership";s:7:"onclick";s:192:"window.open(egw::link(\'/index.php\',\'menuaction=filemanager.filemanager_ui.file&path=$row_cont[path]\'),\'fileprefs\',\'dependent=yes,width=495,height=425,scrollbars=yes,status=yes\'); return false;";}i:2;a:7:{s:4:"type";s:6:"button";s:4:"name";s:23:"delete[$row_cont[path]]";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"help";s:29:"Delete this file or directory";s:7:"onclick";s:48:"return confirm(\'Delete this file or directory\');";s:5:"align";s:6:"center";}i:3;a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:9:"checked[]";s:5:"align";s:5:"right";s:4:"size";s:17:""$row_cont[path]"";}s:5:"align";s:5:"right";}}}s:4:"rows";i:2;s:4:"cols";i:11;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1259329664',);
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
<rows>
|
||||
<row height="60">
|
||||
<image src="icon" class="mimeHuge" align="center"/>
|
||||
<textbox id="name" needed="1" class="fileName"/>
|
||||
<vfs-name id="name" needed="1" class="fileName"/>
|
||||
</row>
|
||||
<row>
|
||||
<hrule span="all"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="filemanager.index.rows" template="" lang="" group="0" version="1.5.002">
|
||||
<template id="filemanager.index.rows" template="" lang="" group="0" version="1.7.001">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
@ -43,7 +43,7 @@
|
||||
<vfs-uid id="${row}[uid]" no_lang="1"/>
|
||||
<vfs-gid id="${row}[gid]" no_lang="1"/>
|
||||
<description id="${row}[comment]"/>
|
||||
<customfields-list readonly="true" id="$row"/>
|
||||
<customfields-list id="$row" class="customfields"/>
|
||||
<hbox align="right">
|
||||
<button image="edit" label="Edit settings" id="edit[$row_cont[path]]" statustext="Rename, change permissions or ownership" onclick="window.open(egw::link('/index.php','menuaction=filemanager.filemanager_ui.file&path=$row_cont[path]'),'fileprefs','dependent=yes,width=495,height=425,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button id="delete[$row_cont[path]]" image="delete" label="Delete" statustext="Delete this file or directory" onclick="return confirm('Delete this file or directory');" align="center"/>
|
||||
@ -68,7 +68,7 @@
|
||||
<hbox span="all">
|
||||
<image label="Up" src="goup" options="filemanager.filemanager_ui.index&path=.."/>
|
||||
<image src="gohome" options="filemanager.filemanager_ui.index&path=~" label="Go to your home directory"/>
|
||||
<textbox id="nm[path]" size="80" label="Path" onchange="1" class="address"/>
|
||||
<vfs-name id="nm[path]" options="80,,1" label="Path" onchange="1" class="address"/>
|
||||
<button id="button[go]" image="key_enter" label="Go to"/>
|
||||
<image src="buttonseparator"/>
|
||||
<button image="edit" label="Edit settings" id="edit[{$cont[nm][path]}]" statustext="Rename, change permissions or ownership" onclick="window.open(egw::link('/index.php','menuaction=filemanager.filemanager_ui.file&path={$cont[nm][path]}'),'fileprefs','dependent=yes,width=495,height=425,scrollbars=yes,status=yes'); return false;"/>
|
||||
|
@ -1014,7 +1014,8 @@ class egw_session
|
||||
* Please note, the values of the query get url encoded!
|
||||
*
|
||||
* @param string $url a url relative to the egroupware install root, it can contain a query too
|
||||
* @param array/string $extravars query string arguements as string or array (prefered)
|
||||
* @param array|string $extravars query string arguements as string or array (prefered)
|
||||
* if string is used ambersands in vars have to be already urlencoded as '%26', function ensures they get NOT double encoded
|
||||
* @return string generated url
|
||||
*/
|
||||
public static function link($url, $extravars = '')
|
||||
@ -1064,7 +1065,7 @@ class egw_session
|
||||
}
|
||||
|
||||
// check if the url already contains a query and ensure that vars is an array and all strings are in extravars
|
||||
list($url,$othervars) = explode('?',$url);
|
||||
list($url,$othervars) = explode('?',$url,2);
|
||||
if ($extravars && is_array($extravars))
|
||||
{
|
||||
$vars += $extravars;
|
||||
@ -1081,6 +1082,7 @@ class egw_session
|
||||
foreach(explode('&',$extravars) as $expr)
|
||||
{
|
||||
list($var,$val) = explode('=', $expr,2);
|
||||
if (strpos($val,'%26') != false) $val = str_replace('%26','&',$val); // make sure to not double encode &
|
||||
if (substr($var,-2) == '[]')
|
||||
{
|
||||
$vars[substr($var,0,-2)][] = $val;
|
||||
|
@ -1162,7 +1162,9 @@ class egw_vfs extends vfs_stream_wrapper
|
||||
{
|
||||
$path = parse_url($path,PHP_URL_PATH);
|
||||
}
|
||||
return '/webdav.php'.strtr($path,array('%' => '%25','+' => '%2B',' ' => '%20'));
|
||||
// we do NOT need to encode % itself, as our path are already url encoded, with the exception of ' ' and '+'
|
||||
// we urlencode double quotes '"', as that fixes many problems in html markup
|
||||
return '/webdav.php'.strtr($path,array('+' => '%2B',' ' => '%20','"' => '%22'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1341,6 +1343,46 @@ class egw_vfs extends vfs_stream_wrapper
|
||||
return "/apps/$app/entry/$id";
|
||||
}
|
||||
|
||||
/**
|
||||
* Encoding of various special characters, which can NOT be unencoded in file-names, as they have special meanings in URL's
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
static public $encode = array(
|
||||
'%' => '%25',
|
||||
'#' => '%23',
|
||||
'?' => '%3F',
|
||||
'/' => '', // better remove it completly
|
||||
);
|
||||
|
||||
/**
|
||||
* Encode a path component: replacing certain chars with their urlencoded counterparts
|
||||
*
|
||||
* Not all chars get encoded, slashes '/' are silently removed!
|
||||
*
|
||||
* To reverse the encoding, eg. to display a filename to the user, you can use urldecode()
|
||||
*
|
||||
* @param string|array $component
|
||||
* @return string|array
|
||||
*/
|
||||
static public function encodePathComponent($component)
|
||||
{
|
||||
return str_replace(array_keys(self::$encode),array_values(self::$encode),$component);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode a path: replacing certain chars with their urlencoded counterparts
|
||||
*
|
||||
* To reverse the encoding, eg. to display a filename to the user, you can use urldecode()
|
||||
*
|
||||
* @param string $path
|
||||
* @return string
|
||||
*/
|
||||
static public function encodePath($path)
|
||||
{
|
||||
return implode('/',self::encodePathComponent(explode('/',$path)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise our static vars
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user