Comment and custom fields for filemanager / sqlfs

This commit is contained in:
Ralf Becker 2008-10-05 17:07:36 +00:00
parent f64c51778b
commit 0a7d4f9782
14 changed files with 517 additions and 93 deletions

View File

@ -6,7 +6,7 @@
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> * @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package filemanager * @package filemanager
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id: class.filemanager_hooks.inc.php 25002 2008-03-03 12:16:11Z ralfbecker $ * @version $Id: class.filemanager_hooks.inc.php 25002 2008-03-03 12:16:11Z ralfbecker $
*/ */
/** /**
@ -16,7 +16,7 @@ class filemanager_hooks
{ {
static $appname = 'filemanager'; static $appname = 'filemanager';
static $foldercount = 1; static $foldercount = 1;
/** /**
* Data for Filemanagers sidebox menu * Data for Filemanagers sidebox menu
* *
@ -44,9 +44,9 @@ class filemanager_hooks
$file['Basedirectory'] = $GLOBALS['egw']->link('/index.php',array('menuaction'=>self::$appname.'.filemanager_ui.index','path'=>$rootpath)); $file['Basedirectory'] = $GLOBALS['egw']->link('/index.php',array('menuaction'=>self::$appname.'.filemanager_ui.index','path'=>$rootpath));
} }
if (!empty($file_prefs['startfolder'])) $file['Startfolder']= $GLOBALS['egw']->link('/index.php',array('menuaction'=>self::$appname.'.filemanager_ui.index','path'=>$file_prefs['startfolder'])); if (!empty($file_prefs['startfolder'])) $file['Startfolder']= $GLOBALS['egw']->link('/index.php',array('menuaction'=>self::$appname.'.filemanager_ui.index','path'=>$file_prefs['startfolder']));
for ($i=1; $i<=self::$foldercount; $i++) for ($i=1; $i<=self::$foldercount; $i++)
{ {
if (!empty($file_prefs['folderlink'.$i])) if (!empty($file_prefs['folderlink'.$i]))
{ {
$foldername = array_pop(explode('/',$file_prefs['folderlink'.$i])); $foldername = array_pop(explode('/',$file_prefs['folderlink'.$i]));
$file[lang('Link %1: %2',$i,$foldername)]= $GLOBALS['egw']->link('/index.php',array( $file[lang('Link %1: %2',$i,$foldername)]= $GLOBALS['egw']->link('/index.php',array(
@ -69,6 +69,7 @@ class filemanager_hooks
{ {
$file = Array( $file = Array(
'Site Configuration' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname='.self::$appname), 'Site Configuration' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname='.self::$appname),
'Custom fields' => $GLOBALS['egw']->link('/index.php','menuaction=admin.customfields.edit&appname='.self::$appname),
); );
if ($location == 'admin') { if ($location == 'admin') {
display_section(self::$appname,$file); display_section(self::$appname,$file);
@ -76,13 +77,13 @@ class filemanager_hooks
display_sidebox(self::$appname,lang('Admin'),$file); display_sidebox(self::$appname,lang('Admin'),$file);
} }
} }
static function preferences($location = 'preferences') static function preferences($location = 'preferences')
{ {
$file = array( $file = array(
'Preferences' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uisettings.index&appname='.self::$appname), 'Preferences' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uisettings.index&appname='.self::$appname),
); );
if ($location == 'preferences') if ($location == 'preferences')
{ {
display_section(self::$appname,$file); display_section(self::$appname,$file);
} else { } else {
@ -106,14 +107,14 @@ class filemanager_hooks
'no' => lang('No'), 'no' => lang('No'),
'yes' => lang('Yes') 'yes' => lang('Yes')
); );
$GLOBALS['settings'] = array( $GLOBALS['settings'] = array(
'showbase' => array( 'showbase' => array(
'type' => 'select', 'type' => 'select',
'name' => 'showbase', 'name' => 'showbase',
'values' => $yes_no, 'values' => $yes_no,
'label' => lang('Show link to filemanagers basedirectory (/) in side box menu?'), 'label' => lang('Show link to filemanagers basedirectory (/) in side box menu?'),
'help' => lang('Default behavior is NO. The link will not be shown, but you are still able to navigate to this location, 'help' => lang('Default behavior is NO. The link will not be shown, but you are still able to navigate to this location,
or configure this paricular location as startfolder or folderlink.'), or configure this paricular location as startfolder or folderlink.'),
'xmlrpc' => True, 'xmlrpc' => True,
'amin' => False 'amin' => False
@ -123,7 +124,7 @@ class filemanager_hooks
'name' => 'alwayssortfolderstotop', 'name' => 'alwayssortfolderstotop',
'values' => $yes_no, 'values' => $yes_no,
'label' => lang('Sort folders always to the top?'), 'label' => lang('Sort folders always to the top?'),
'help' => lang('Default behavior is NO. If you set this to YES, folders will always appear at the top of the list, 'help' => lang('Default behavior is NO. If you set this to YES, folders will always appear at the top of the list,
no matter what you sort by. It will slow your mustang down as well.'), no matter what you sort by. It will slow your mustang down as well.'),
'xmlrpc' => True, 'xmlrpc' => True,
'amin' => False 'amin' => False

View File

@ -22,6 +22,19 @@ class filemanager_ui
'file' => true, 'file' => true,
); );
/**
* Constructor
*
*/
function __construct()
{
// strip slashes from _GET parameters, if someone still has magic_quotes_gpc on
if (get_magic_quotes_gpc() && $_GET)
{
$_GET = etemplate::array_stripslashes($_GET);
}
}
/** /**
* Main filemanager page * Main filemanager page
* *
@ -61,7 +74,7 @@ class filemanager_ui
$path[0] == '/' && egw_vfs::is_dir($path) && egw_vfs::check_access($path, egw_vfs::READABLE)) $path[0] == '/' && egw_vfs::is_dir($path) && egw_vfs::check_access($path, egw_vfs::READABLE))
{ {
$content['nm']['path'] = $path; $content['nm']['path'] = $path;
} }
} }
if (isset($_GET['msg'])) $msg = $_GET['msg']; if (isset($_GET['msg'])) $msg = $_GET['msg'];
if (isset($_GET['path']) && ($path = $_GET['path'])) if (isset($_GET['path']) && ($path = $_GET['path']))
@ -69,7 +82,7 @@ class filemanager_ui
if ($path[0] == '/' && egw_vfs::is_dir($path) && egw_vfs::check_access($path,egw_vfs::READABLE)) if ($path[0] == '/' && egw_vfs::is_dir($path) && egw_vfs::check_access($path,egw_vfs::READABLE))
{ {
$content['nm']['path'] = $path; $content['nm']['path'] = $path;
} }
else else
{ {
$msg .= lang('The requested path %1 is not available.',$path); $msg .= lang('The requested path %1 is not available.',$path);
@ -143,7 +156,8 @@ class filemanager_ui
$content['nm']['msg'] = self::action($clipboard_type.'_paste',$clipboard_files,$content['nm']['path']); $content['nm']['msg'] = self::action($clipboard_type.'_paste',$clipboard_files,$content['nm']['path']);
break; break;
case 'upload': case 'upload':
$to = egw_vfs::concat($content['nm']['path'],$content['upload']['name']); // strip '?', '/' and '#' from filenames, as they are forbidden for sqlfs / make problems
$to = egw_vfs::concat($content['nm']['path'],str_replace(array('?','/','#'),'',$content['upload']['name']));
if ($content['upload'] && is_uploaded_file($content['upload']['tmp_name']) && if ($content['upload'] && is_uploaded_file($content['upload']['tmp_name']) &&
(egw_vfs::is_writable($content['nm']['path']) || egw_vfs::is_writable($to)) && (egw_vfs::is_writable($content['nm']['path']) || egw_vfs::is_writable($to)) &&
copy($content['upload']['tmp_name'],egw_vfs::PREFIX.$to)) copy($content['upload']['tmp_name'],egw_vfs::PREFIX.$to))
@ -363,12 +377,12 @@ class filemanager_ui
{ {
$rows = array(); $rows = array();
$query['total'] = 0; $query['total'] = 0;
// we will leave here, since we are not allowed, or the location does not exist. Index must handle that, and give // we will leave here, since we are not allowed, or the location does not exist. Index must handle that, and give
// an appropriate message // an appropriate message
$GLOBALS['egw']->redirect($GLOBALS['egw']->link('/index.php',array('menuaction'=>'filemanager.filemanager_ui.index', $GLOBALS['egw']->redirect($GLOBALS['egw']->link('/index.php',array('menuaction'=>'filemanager.filemanager_ui.index',
'path'=>$query['path'], 'path'=>$query['path'],
'msg' => lang('Directory not found or no permission to access it!')))); 'msg' => lang('Directory not found or no permission to access it!'))));
} }
$rows = $dir_is_writable = array(); $rows = $dir_is_writable = array();
if($query['searchletter'] && !empty($query['search'])) if($query['searchletter'] && !empty($query['search']))
@ -415,7 +429,7 @@ class filemanager_ui
$dir = dirname($path); $dir = dirname($path);
if (!isset($dir_is_writable[$dir])) $dir_is_writable[$dir] = egw_vfs::is_writable($dir); if (!isset($dir_is_writable[$dir])) $dir_is_writable[$dir] = egw_vfs::is_writable($dir);
if (!$dir_is_writable[$dir]) $readonlys["delete[$path]"] = true; // no rights to delete the file if (!$dir_is_writable[$dir]) $readonlys["delete[$path]"] = true; // no rights to delete the file
} }
$numofdirs = egw_vfs::$find_total; $numofdirs = egw_vfs::$find_total;
$dirsretrieved = count($dirs); $dirsretrieved = count($dirs);
@ -457,7 +471,9 @@ class filemanager_ui
$rows = array_merge($dirs,$files); $rows = array_merge($dirs,$files);
//_debug_array($readonlys); //_debug_array($readonlys);
return egw_vfs::$find_total = $numofdirs + $numoffiles; return egw_vfs::$find_total = $numofdirs + $numoffiles;
} else { }
else
{
foreach(egw_vfs::find($query['path'],array( foreach(egw_vfs::find($query['path'],array(
'mindepth' => 1, 'mindepth' => 1,
'maxdepth' => $query['filter'] ? $query['filter'] : null, 'maxdepth' => $query['filter'] ? $query['filter'] : null,
@ -487,6 +503,7 @@ class filemanager_ui
//echo $path; _debug_array($row); //echo $path; _debug_array($row);
$rows[++$n] = $row; $rows[++$n] = $row;
$path2n[$path] = $n;
$dir = dirname($path); $dir = dirname($path);
if (!isset($dir_is_writable[$dir])) if (!isset($dir_is_writable[$dir]))
@ -499,6 +516,23 @@ class filemanager_ui
} }
} }
} }
// query comments and cf's for the displayed rows
$cols_to_show = explode(',',$GLOBALS['egw_info']['user']['preferences']['filemanager']['nextmatch-filemanager.index.rows']);
$cfs = config::get_customfields('filemanager');
$all_cfs = in_array('customfields',$cols_to_show) && $cols_to_show[count($cols_to_show)-1][0] != '#';
if ($path2n && (in_array('comment',$cols_to_show) || in_array('customfields',$cols_to_show)) &&
($path2props = egw_vfs::propfind(array_keys($path2n),'http://egroupware.org/')))
{
foreach($path2props as $path => $props)
{
$row =& $rows[$path2n[$path]];
foreach($props as $prop)
{
if (!$all_cfs && $prop['name'][0] == '#' && !in_array($prop['name'],$cols_to_show)) continue;
$row[$prop['name']] = strlen($prop['value']) < 64 ? $prop['value'] : substr($prop['value'],0,64).' ...';
}
}
}
//_debug_array($readonlys); //_debug_array($readonlys);
return egw_vfs::$find_total; return egw_vfs::$find_total;
} }
@ -511,7 +545,7 @@ class filemanager_ui
*/ */
function file(array $content=null,$msg='') function file(array $content=null,$msg='')
{ {
static $tabs = 'general|perms|eacl|preview'; static $tabs = 'general|perms|eacl|preview|custom';
$tpl = new etemplate('filemanager.file'); $tpl = new etemplate('filemanager.file');
@ -531,6 +565,10 @@ class filemanager_ui
$content['mime'] = egw_vfs::mime_content_type($path); $content['mime'] = egw_vfs::mime_content_type($path);
$content['icon'] = egw_vfs::mime_icon($content['mime']); $content['icon'] = egw_vfs::mime_icon($content['mime']);
$content['gid'] *= -1; // our widgets use negative gid's $content['gid'] *= -1; // our widgets use negative gid's
if (($props = egw_vfs::propfind($path)))
{
foreach($props as $prop) $content[$prop['name']] = $prop['value'];
}
} }
$content[$tabs] = $_GET['tabs']; $content[$tabs] = $_GET['tabs'];
if (!($content['is_dir'] = egw_vfs::is_dir($path))) if (!($content['is_dir'] = egw_vfs::is_dir($path)))
@ -561,44 +599,63 @@ class filemanager_ui
list($button) = @each($content['button']); unset($content['button']); list($button) = @each($content['button']); unset($content['button']);
if (in_array($button,array('save','apply'))) if (in_array($button,array('save','apply')))
{ {
$props = array();
foreach($content['old'] as $name => $old_value) foreach($content['old'] as $name => $old_value)
{ {
if (isset($content[$name]) && $old_value != $content[$name]) if (isset($content[$name]) && $old_value != $content[$name])
{ {
switch($name) if ($name == 'name')
{ {
case 'name': if (egw_vfs::rename($path,$to = egw_vfs::concat($content['dir'],$content['name'])))
if (egw_vfs::rename($path,$to = egw_vfs::concat($content['dir'],$content['name']))) {
{ $msg .= lang('Renamed %1 to %2.',$path,$to).' ';
$msg .= lang('Renamed %1 to %2.',$path,$to).' '; $content['old']['name'] = $content[$name];
$content['old']['name'] = $content[$name]; $path = $to;
$path = $to; }
} else
else {
{ $msg .= lang('Rename of %1 to %2 failed!',$path,$to).' ';
$msg .= lang('Rename of %1 to %2 failed!',$path,$to).' '; }
}
break;
default:
static $name2cmd = array('uid' => 'chown','gid' => 'chgrp','perms' => 'chmod');
$cmd = array('egw_vfs',$name2cmd[$name]);
$value = $name == 'perms' ? self::perms2mode($content['perms']) : $content[$name];
if ($content['modify_subs'] && $name == 'perms')
{
egw_vfs::find($path,array('type'=>'d'),$cmd,array($value));
egw_vfs::find($path,array('type'=>'f'),$cmd,array($value & 0666)); // no execute for files
}
elseif ($content['modify_subs'])
{
egw_vfs::find($path,null,$cmd,array($value));
}
else
{
call_user_func_array($cmd,array($path,$value));
}
$msg .= lang('Permissions changed for %1.',$path.($content['modify_subs']?' '.lang('and all it\'s childeren'):''));
break;
} }
elseif ($name[0] == '#' || $name == 'comment')
{
$props[] = array('name' => $name, 'value' => $content[$name] ? $content[$name] : null);
}
else
{
static $name2cmd = array('uid' => 'chown','gid' => 'chgrp','perms' => 'chmod');
$cmd = array('egw_vfs',$name2cmd[$name]);
$value = $name == 'perms' ? self::perms2mode($content['perms']) : $content[$name];
if ($content['modify_subs'] && $name == 'perms')
{
egw_vfs::find($path,array('type'=>'d'),$cmd,array($value));
egw_vfs::find($path,array('type'=>'f'),$cmd,array($value & 0666)); // no execute for files
}
elseif ($content['modify_subs'])
{
egw_vfs::find($path,null,$cmd,array($value));
}
else
{
call_user_func_array($cmd,array($path,$value));
}
$msg .= lang('Permissions changed for %1.',$path.($content['modify_subs']?' '.lang('and all it\'s childeren'):''));
}
}
}
if ($props)
{
if (egw_vfs::proppatch($path,$props))
{
foreach($props as $prop)
{
$content['old'][$prop['name']] = $prop['value'];
}
$msg .= lang('Properties saved.');
}
else
{
$msg .= lang('Saving properties failed!');
} }
} }
} }
@ -648,7 +705,19 @@ class filemanager_ui
} }
} }
$readonlys['name'] = !egw_vfs::is_writable($content['dir']); $readonlys['name'] = !egw_vfs::is_writable($content['dir']);
$readonlys['comment'] = !egw_vfs::is_writable($path);
if (!($cfs = config::get_customfields('filemanager')))
{
$readonlys[$tabs]['custom'] = true;
}
elseif (!egw_vfs::is_writable($path))
{
foreach($cfs as $name => $data)
{
$readonlys['#'.$name] = true;
}
}
$readonlys[$tabs]['eacl'] = true; // eacl off by default $readonlys[$tabs]['eacl'] = true; // eacl off by default
if ($content['is_dir']) if ($content['is_dir'])
{ {
@ -687,7 +756,12 @@ class filemanager_ui
'name' => $content['name'], 'name' => $content['name'],
'uid' => $content['uid'], 'uid' => $content['uid'],
'gid' => $content['gid'], 'gid' => $content['gid'],
'comment' => (string)$content['comment'],
); );
if ($cfs) foreach($cfs as $name => $data)
{
$preserve['old']['#'.$name] = (string)$content['#'.$name];
}
} }
$GLOBALS['egw_info']['flags']['java_script'] = "<script>window.focus();</script>\n"; $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').' '.$path;
@ -695,6 +769,21 @@ class filemanager_ui
$tpl->exec('filemanager.filemanager_ui.file',$content,$sel_options,$readonlys,$preserve,2); $tpl->exec('filemanager.filemanager_ui.file',$content,$sel_options,$readonlys,$preserve,2);
} }
/**
* Check if the rename target exists and would be overwritten
*
* @param string $source
* @param string $target
* @return string
*/
static public function ajax_check_rename_target($source,$target)
{
$response = new xajaxResponse();
$response->addAlert("source='$source' --> target='$target'");
return $response->getXML();
}
/** /**
* Convert perms array back to integer mode * Convert perms array back to integer mode
* *

View File

@ -111,6 +111,7 @@ please select a file to delete. filemanager de Bitte wählen Sie eine Datei zum
preview filemanager de Vorschau preview filemanager de Vorschau
preview %1 filemanager de Vorschau %1 preview %1 filemanager de Vorschau %1
preview of %1 filemanager de Vorschau von %1 preview of %1 filemanager de Vorschau von %1
properties saved. filemanager de Eigenschaften gespeichert.
quick jump to filemanager de Springe zu quick jump to filemanager de Springe zu
read & write access filemanager de Lese- und Schreibzugriff read & write access filemanager de Lese- und Schreibzugriff
read access only filemanager de Nur Lesezugriff read access only filemanager de Nur Lesezugriff
@ -125,6 +126,7 @@ save %1 filemanager de %1 speichern
save %1, and go back to file listing filemanager de %1 speichern, und zurück zur Verzeichnisansicht save %1, and go back to file listing filemanager de %1 speichern, und zurück zur Verzeichnisansicht
save changes filemanager de Änderungen speichern save changes filemanager de Änderungen speichern
saved %1 filemanager de %1 gespeichert saved %1 filemanager de %1 gespeichert
saving properties failed! filemanager de Speichern der Eigenschaften fehlgeschlagen!
search for '%1' filemanager de nach %1 suchen search for '%1' filemanager de nach %1 suchen
searchstring filemanager de Suchbegriff searchstring filemanager de Suchbegriff
select action... filemanager de Befehl auswählen... select action... filemanager de Befehl auswählen...

View File

@ -111,6 +111,7 @@ please select a file to delete. filemanager en Please select a file to delete.
preview filemanager en Preview preview filemanager en Preview
preview %1 filemanager en Preview %1 preview %1 filemanager en Preview %1
preview of %1 filemanager en Preview of %1 preview of %1 filemanager en Preview of %1
properties saved. filemanager en Properties saved.
quick jump to filemanager en Quick jump to quick jump to filemanager en Quick jump to
read & write access filemanager en Read & write access read & write access filemanager en Read & write access
read access only filemanager en Read access only read access only filemanager en Read access only
@ -125,6 +126,7 @@ save %1 filemanager en Save %1
save %1, and go back to file listing filemanager en Save %1, and go back to file listing save %1, and go back to file listing filemanager en Save %1, and go back to file listing
save changes filemanager en Save changes save changes filemanager en Save changes
saved %1 filemanager en Saved %1 saved %1 filemanager en Saved %1
saving properties failed! filemanager en Saving properties failed!
search for '%1' filemanager en Search for '%1' search for '%1' filemanager en Search for '%1'
searchstring filemanager en searchstring searchstring filemanager en searchstring
select action... filemanager en Select action... select action... filemanager en Select action...

View File

@ -1,8 +1,8 @@
<?php <?php
/** /**
* eGroupWare - eTemplates for Application filemanager * eGroupWare - eTemplates for Application filemanager
* http://www.egroupware.org * http://www.egroupware.org
* generated by soetemplate::dump4setup() 2008-04-18 13:06 * generated by soetemplate::dump4setup() 2008-10-05 19:27
* *
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package filemanager * @package filemanager
@ -16,17 +16,27 @@ $templ_data[] = array('name' => 'filemanager.file','template' => '','lang' => ''
$templ_data[] = array('name' => 'filemanager.file','template' => '','lang' => '','group' => '0','version' => '1.5.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:3:"tab";s:5:"label";s:40:"General|Permissions|Extended ACL|Preview";s:4:"name";s:26:"general|perms|eacl|preview";s:4:"span";s:3:"all";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";}i:2;a:3:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";}i:3;a:4:{s:4:"type";s:10:"buttononly";s:5:"label";s:6:"Cancel";s:4:"name";s:14:"button[cancel]";s:7:"onclick";s:15:"window.close();";}}}}s:4:"rows";i:3;s:4:"cols";i:1;}}','size' => '','style' => '.eaclAccount select,.eaclRights select { width: 160px; }','modified' => '1207725030',); $templ_data[] = array('name' => 'filemanager.file','template' => '','lang' => '','group' => '0','version' => '1.5.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:3:"tab";s:5:"label";s:40:"General|Permissions|Extended ACL|Preview";s:4:"name";s:26:"general|perms|eacl|preview";s:4:"span";s:3:"all";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";}i:2;a:3:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";}i:3;a:4:{s:4:"type";s:10:"buttononly";s:5:"label";s:6:"Cancel";s:4:"name";s:14:"button[cancel]";s:7:"onclick";s:15:"window.close();";}}}}s:4:"rows";i:3;s:4:"cols";i:1;}}','size' => '','style' => '.eaclAccount select,.eaclRights select { width: 160px; }','modified' => '1207725030',);
$templ_data[] = array('name' => 'filemanager.file','template' => '','lang' => '','group' => '0','version' => '1.5.003','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:3:"tab";s:5:"label";s:54:"General|Permissions|Extended ACL|Preview|Custom fields";s:4:"name";s:33:"general|perms|eacl|preview|custom";s:4:"span";s:3:"all";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";}i:2;a:3:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";}i:3;a:4:{s:4:"type";s:10:"buttononly";s:5:"label";s:6:"Cancel";s:4:"name";s:14:"button[cancel]";s:7:"onclick";s:15:"window.close();";}}}}s:4:"rows";i:3;s:4:"cols";i:1;}}','size' => '','style' => '.eaclAccount select,.eaclRights select { width: 160px; }','modified' => '1223224423',);
$templ_data[] = array('name' => 'filemanager.file.custom','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:4:",top";}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:12:"customfields";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:18:"450,300,,,10,,auto";}}','size' => '450,300,,,10,,auto','style' => '','modified' => '1223224487',);
$templ_data[] = array('name' => 'filemanager.file.eacl','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: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:4:{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: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.eacl','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: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:4:{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: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.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:9:{i:0;a:2:{s:1:"A";s:2:"80";s:2:"h1";s:2:"60";}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: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:4;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:5;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:5:"label";s:4:"name";s:5:"hsize";s:5:"label";s:17:"%s ($cont[size]b)";}}i:6;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:7;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:8;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:8;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.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:9:{i:0;a:2:{s:1:"A";s:2:"80";s:2:"h1";s:2:"60";}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: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:4;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:5;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:5:"label";s:4:"name";s:5:"hsize";s:5:"label";s:17:"%s ($cont[size]b)";}}i:6;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:7;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:8;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:8;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.5.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:2:{s:1:"A";s:2:"80";s:2:"h1";s:2:"60";}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:5:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:6:"needed";s:1:"1";s:4:"span";s:9:",fileName";s:8:"onchange";s:94:"xajax_doXMLHTTP(\'filemanager_ui::ajax_check_rename_target\',document.location.href,this.value);";}}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: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:4;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:5;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:5:"label";s:4:"name";s:5:"hsize";s:5:"label";s:17:"%s ($cont[size]b)";}}i:6;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:7;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";}}}s:4:"rows";i:7;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.5.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:9:{i:0;a:2:{s:1:"A";s:2:"80";s:2:"h1";s:2:"60";}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:5:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:6:"needed";s:1:"1";s:4:"span";s:9:",fileName";s:8:"onchange";s:94:"xajax_doXMLHTTP(\'filemanager_ui::ajax_check_rename_target\',document.location.href,this.value);";}}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: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:4;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:5;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:5:"label";s:4:"name";s:5:"hsize";s:5:"label";s:17:"%s ($cont[size]b)";}}i:6;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:7;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:8;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:8;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.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.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.5.001','data' => 'a:1:{i:0;a:4:{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:10:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"7";i:1;a:4:{s:4:"type";s:6:"button";s:4:"size";s:4:"goup";s:5:"label";s:2:"Up";s:4:"name";s:10:"button[up]";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[home]";s:4:"size";s:6:"gohome";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:5:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[createdir]";s:4:"size";s:16:"button_createdir";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:7;a:4:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[paste]";s:4:"size";s:9:"editpaste";s:4:"help";s:20:"$cont[paste_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:3:{s:4:"type";s:4:"file";s:4:"name";s:6:"upload";s:4:"help";s:42:"Select file to upload in current directory";}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;}}','size' => '','style' => '','modified' => '1204374710',); $templ_data[] = array('name' => 'filemanager.index','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:4:{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:10:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"7";i:1;a:4:{s:4:"type";s:6:"button";s:4:"size";s:4:"goup";s:5:"label";s:2:"Up";s:4:"name";s:10:"button[up]";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[home]";s:4:"size";s:6:"gohome";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:5:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[createdir]";s:4:"size";s:16:"button_createdir";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:7;a:4:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[paste]";s:4:"size";s:9:"editpaste";s:4:"help";s:20:"$cont[paste_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:3:{s:4:"type";s:4:"file";s:4:"name";s:6:"upload";s:4:"help";s:42:"Select file to upload in current directory";}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;}}','size' => '','style' => '','modified' => '1204374710',);
$templ_data[] = array('name' => 'filemanager.index.rows','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: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:"J";s:2:"70";}i:1;a:10:{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: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:10:{s:1:"A";a:4:{s:4:"type";s:5:"image";s:5:"label";s:15:"$row_cont[mime]";s:4:"name";s:12:"${row}[icon]";s:5:"align";s:6:"center";}s:1:"B";a:4:{s:4:"type";s:5:"label";s:4:"size";s:14:",@${row}[link]";s:4:"name";s:12:"${row}[name]";s:7:"no_lang";s:1:"1";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[hsize]";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:3:{s:4:"type";s:5:"label";s:5:"label";s:16:"$row_cont[perms]";s:4:"span";s:6:",perms";}s:1:"G";a:3:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[user]";s:7:"no_lang";s:1:"1";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[group]";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: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=400,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:15:"$row_cont[path]";}s:5:"align";s:5:"right";}}}s:4:"rows";i:2;s:4:"cols";i:10;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1204370567',); $templ_data[] = array('name' => 'filemanager.index','template' => '','lang' => '','group' => '0','version' => '1.5.002','data' => 'a:1:{i:0;a:4:{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:10:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"7";i:1;a:4:{s:4:"type";s:6:"button";s:4:"size";s:4:"goup";s:5:"label";s:2:"Up";s:4:"name";s:10:"button[up]";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[home]";s:4:"size";s:6:"gohome";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:5:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[createdir]";s:4:"size";s:16:"button_createdir";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:7;a:4:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[paste]";s:4:"size";s:9:"editpaste";s:4:"help";s:20:"$cont[paste_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:3:{s:4:"type";s:4:"file";s:4:"name";s:6:"upload";s:4:"help";s:42:"Select file to upload in current directory";}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;}}','size' => '','style' => '','modified' => '1223226240',);
$templ_data[] = array('name' => 'filemanager.index.rows','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: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:4:{s:4:"type";s:5:"image";s:5:"label";s:15:"$row_cont[mime]";s:4:"name";s:12:"${row}[icon]";s:5:"align";s:6:"center";}s:1:"B";a:4:{s:4:"type";s:5:"label";s:4:"size";s:14:",@${row}[link]";s:4:"name";s:12:"${row}[name]";s:7:"no_lang";s:1:"1";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[hsize]";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:3:{s:4:"type";s:5:"label";s:5:"label";s:16:"$row_cont[perms]";s:4:"span";s:6:",perms";}s:1:"G";a:3:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[user]";s:7:"no_lang";s:1:"1";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[group]";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:8:"readonly";s:1:"1";s:4:"name";s:4:"$row";}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=400,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:15:"$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' => '1204370567',);
$templ_data[] = array('name' => 'filemanager.search','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:4:{i:0;a:9:{s:4:"type";s:8:"groupbox";s:4:"name";s:10:"debuginfos";s:4:"size";s:1:"4";s:5:"label";s:10:"Debuginfos";s:8:"disabled";s:1:"1";i:1;a:3:{s:4:"type";s:8:"textarea";s:4:"name";s:7:"message";s:8:"readonly";s:1:"1";}i:2;a:1:{s:4:"type";s:5:"label";}i:3;a:1:{s:4:"type";s:5:"label";}i:4;a:1:{s:4:"type";s:5:"label";}}i:1;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:2:{s:1:"C";s:3:"120";s:1:"D";s:3:"120";}i:1;a:5:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:12:"searchstring";s:4:"name";s:17:"searchstringlabel";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"span";s:1:"2";s:4:"name";s:12:"searchstring";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:3:{s:4:"type";s:6:"button";s:5:"label";s:12:"start search";s:4:"name";s:12:"start_search";}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:2;a:5:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"mime type";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:8:"checkall";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:3:"All";s:4:"name";s:8:"alllabel";}s:1:"D";a:4:{s:4:"type";s:5:"label";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:5:"files";s:4:"name";s:14:"checkonlyfiles";}}}s:4:"rows";i:1;s:4:"cols";i:1;}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:3;a:5:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:14:"checkonlyfiles";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:5:"files";s:4:"name";s:9:"filelabel";}s:1:"D";a:4:{s:4:"type";s:6:"button";s:5:"label";s:12:"clear search";s:4:"name";s:12:"clear_search";s:7:"onclick";s:71:"menuaction=filemanager.uifilemanager.index&action=search&actioncd=clear";}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:4;a:5:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:13:"checkonlydirs";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"directory";s:4:"name";s:8:"dirlabel";}s:1:"D";a:4:{s:4:"type";s:8:"checkbox";s:5:"label";s:5:"Debug";s:4:"name";s:5:"debug";s:8:"disabled";s:1:"1";}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:5;a:5:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:15:"created between";s:4:"name";s:12:"createdlabel";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:13:"searchcreated";}s:1:"C";a:3:{s:4:"type";s:4:"date";s:4:"name";s:15:"datecreatedfrom";s:4:"size";s:2:",8";}s:1:"D";a:3:{s:4:"type";s:4:"date";s:4:"name";s:13:"datecreatedto";s:4:"size";s:2:",8";}s:1:"E";a:4:{s:4:"type";s:8:"textarea";s:4:"name";s:17:"searchcreatedtext";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}}i:6;a:5:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:16:"modified between";s:4:"name";s:13:"modifiedlabel";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:14:"searchmodified";}s:1:"C";a:3:{s:4:"type";s:4:"date";s:4:"name";s:16:"datemodifiedfrom";s:4:"size";s:2:",8";}s:1:"D";a:3:{s:4:"type";s:4:"date";s:4:"name";s:14:"datemodifiedto";s:4:"size";s:2:",8";}s:1:"E";a:4:{s:4:"type";s:8:"textarea";s:4:"name";s:18:"searchmodifiedtext";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:6;s:4:"cols";i:5;}i:2;a:1:{s:4:"type";s:5:"hrule";}i:3;a:3:{s:4:"type";s:9:"nextmatch";s:4:"size";s:4:"rows";s:4:"name";s:2:"nm";}}','size' => '','style' => '','modified' => '1173101430',); $templ_data[] = array('name' => 'filemanager.search','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:4:{i:0;a:9:{s:4:"type";s:8:"groupbox";s:4:"name";s:10:"debuginfos";s:4:"size";s:1:"4";s:5:"label";s:10:"Debuginfos";s:8:"disabled";s:1:"1";i:1;a:3:{s:4:"type";s:8:"textarea";s:4:"name";s:7:"message";s:8:"readonly";s:1:"1";}i:2;a:1:{s:4:"type";s:5:"label";}i:3;a:1:{s:4:"type";s:5:"label";}i:4;a:1:{s:4:"type";s:5:"label";}}i:1;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:2:{s:1:"C";s:3:"120";s:1:"D";s:3:"120";}i:1;a:5:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:12:"searchstring";s:4:"name";s:17:"searchstringlabel";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"span";s:1:"2";s:4:"name";s:12:"searchstring";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:3:{s:4:"type";s:6:"button";s:5:"label";s:12:"start search";s:4:"name";s:12:"start_search";}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:2;a:5:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"mime type";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:8:"checkall";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:3:"All";s:4:"name";s:8:"alllabel";}s:1:"D";a:4:{s:4:"type";s:5:"label";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:5:"files";s:4:"name";s:14:"checkonlyfiles";}}}s:4:"rows";i:1;s:4:"cols";i:1;}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:3;a:5:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:14:"checkonlyfiles";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:5:"files";s:4:"name";s:9:"filelabel";}s:1:"D";a:4:{s:4:"type";s:6:"button";s:5:"label";s:12:"clear search";s:4:"name";s:12:"clear_search";s:7:"onclick";s:71:"menuaction=filemanager.uifilemanager.index&action=search&actioncd=clear";}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:4;a:5:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:13:"checkonlydirs";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"directory";s:4:"name";s:8:"dirlabel";}s:1:"D";a:4:{s:4:"type";s:8:"checkbox";s:5:"label";s:5:"Debug";s:4:"name";s:5:"debug";s:8:"disabled";s:1:"1";}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:5;a:5:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:15:"created between";s:4:"name";s:12:"createdlabel";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:13:"searchcreated";}s:1:"C";a:3:{s:4:"type";s:4:"date";s:4:"name";s:15:"datecreatedfrom";s:4:"size";s:2:",8";}s:1:"D";a:3:{s:4:"type";s:4:"date";s:4:"name";s:13:"datecreatedto";s:4:"size";s:2:",8";}s:1:"E";a:4:{s:4:"type";s:8:"textarea";s:4:"name";s:17:"searchcreatedtext";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}}i:6;a:5:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:16:"modified between";s:4:"name";s:13:"modifiedlabel";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:14:"searchmodified";}s:1:"C";a:3:{s:4:"type";s:4:"date";s:4:"name";s:16:"datemodifiedfrom";s:4:"size";s:2:",8";}s:1:"D";a:3:{s:4:"type";s:4:"date";s:4:"name";s:14:"datemodifiedto";s:4:"size";s:2:",8";}s:1:"E";a:4:{s:4:"type";s:8:"textarea";s:4:"name";s:18:"searchmodifiedtext";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:6;s:4:"cols";i:5;}i:2;a:1:{s:4:"type";s:5:"hrule";}i:3;a:3:{s:4:"type";s:9:"nextmatch";s:4:"size";s:4:"rows";s:4:"name";s:2:"nm";}}','size' => '','style' => '','modified' => '1173101430',);

View File

@ -1,10 +1,11 @@
/** /**
* CSS for new eTemplate filemanager UI * CSS for new eTemplate filemanager UI
*/ */
.perms { font-family: monospace; font-weight: bold; } .perms { font-family: monospace; font-weight: bold; }
.address input { font-size: 140%; font-weight: bold; } .address input { font-size: 140%; font-weight: bold; }
.mimeHuge img { width: 64px; height: 64px; } .mimeHuge img { width: 64px; height: 64px; }
.fileName input { font-weight: bold; width: 100%; } .fileName input { font-weight: bold; width: 100%; }
.previewImage img { max-width: 430px; max-height: 275px; border: 1px solid black; } .comment textarea { width: 100%; height: 35px; }
.previewText div { } .previewImage img { max-width: 430px; max-height: 275px; border: 1px solid black; }
.previewText div { }

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- $Id$ --> <!-- $Id$ -->
<overlay> <overlay>
<template id="filemanager.file.general" template="" lang="" group="0" version="1.5.001"> <template id="filemanager.file.general" template="" lang="" group="0" version="1.5.003">
<grid width="450" height="300" spacing="10"> <grid width="450" height="300" spacing="10">
<columns> <columns>
<column width="80"/> <column width="80"/>
@ -10,7 +10,7 @@
<rows> <rows>
<row height="60"> <row height="60">
<image src="icon" class="mimeHuge" align="center"/> <image src="icon" class="mimeHuge" align="center"/>
<textbox id="name" needed="1" class="fileName"/> <textbox id="name" needed="1" class="fileName" onchange="xajax_doXMLHTTP('filemanager_ui::ajax_check_rename_target',document.location.href,this.value);"/>
</row> </row>
<row> <row>
<hrule span="all"/> <hrule span="all"/>
@ -36,8 +36,8 @@
<date-time id="mtime" readonly="true"/> <date-time id="mtime" readonly="true"/>
</row> </row>
<row> <row>
<description/> <description options=",,,comment" value="Comment"/>
<description/> <textbox multiline="true" id="comment" class="comment"/>
</row> </row>
</rows> </rows>
</grid> </grid>
@ -187,7 +187,19 @@
</rows> </rows>
</grid> </grid>
</template> </template>
<template id="filemanager.file" template="" lang="" group="0" version="1.5.002"> <template id="filemanager.file.custom" template="" lang="" group="0" version="1.5.001">
<grid width="450" height="300" spacing="10" overflow="auto">
<columns>
<column/>
</columns>
<rows>
<row valign="top">
<customfields/>
</row>
</rows>
</grid>
</template>
<template id="filemanager.file" template="" lang="" group="0" version="1.5.003">
<grid> <grid>
<columns> <columns>
<column/> <column/>
@ -203,12 +215,14 @@
<tab label="Permissions" statustext=""/> <tab label="Permissions" statustext=""/>
<tab label="Extended ACL" statustext=""/> <tab label="Extended ACL" statustext=""/>
<tab label="Preview" statustext=""/> <tab label="Preview" statustext=""/>
<tab label="Custom fields" statustext=""/>
</tabs> </tabs>
<tabpanels> <tabpanels>
<template id="filemanager.file.general"/> <template id="filemanager.file.general"/>
<template id="filemanager.file.perms"/> <template id="filemanager.file.perms"/>
<template id="filemanager.file.eacl"/> <template id="filemanager.file.eacl"/>
<template id="filemanager.file.preview"/> <template id="filemanager.file.preview"/>
<template id="filemanager.file.custom"/>
</tabpanels> </tabpanels>
</tabbox> </tabbox>
</row> </row>

View File

@ -13,6 +13,7 @@
<column/> <column/>
<column/> <column/>
<column/> <column/>
<column/>
<column width="70"/> <column width="70"/>
</columns> </columns>
<rows> <rows>
@ -26,6 +27,7 @@
<nextmatch-sortheader id="uid" label="Owner"/> <nextmatch-sortheader id="uid" label="Owner"/>
<nextmatch-sortheader id="gid" label="Group"/> <nextmatch-sortheader id="gid" label="Group"/>
<nextmatch-header label="Comment" id="comment"/> <nextmatch-header label="Comment" id="comment"/>
<nextmatch-customfields readonly="true" id="customfields"/>
<hbox options="0,0"> <hbox options="0,0">
<description value="Actions"/> <description value="Actions"/>
<button image="check" label="Check all" id="check_all" statustext="Check all" onclick="toggle_all(this.form,form::name('checked[]')); return false;" needed="1" align="right"/> <button image="check" label="Check all" id="check_all" statustext="Check all" onclick="toggle_all(this.form,form::name('checked[]')); return false;" needed="1" align="right"/>
@ -41,6 +43,7 @@
<description id="${row}[user]" no_lang="1"/> <description id="${row}[user]" no_lang="1"/>
<description id="${row}[group]" no_lang="1"/> <description id="${row}[group]" no_lang="1"/>
<description id="${row}[comment]"/> <description id="${row}[comment]"/>
<customfields-list readonly="true" id="$row"/>
<hbox align="right"> <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&amp;path=$row_cont[path]'),'fileprefs','dependent=yes,width=495,height=400,scrollbars=yes,status=yes'); return false;"/> <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&amp;path=$row_cont[path]'),'fileprefs','dependent=yes,width=495,height=400,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"/> <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"/>
@ -50,7 +53,7 @@
</rows> </rows>
</grid> </grid>
</template> </template>
<template id="filemanager.index" template="" lang="" group="0" version="1.5.001"> <template id="filemanager.index" template="" lang="" group="0" version="1.5.002">
<grid> <grid>
<columns> <columns>
<column width="250"/> <column width="250"/>

View File

@ -673,9 +673,7 @@ class egw_vfs extends vfs_stream_wrapper
*/ */
static function eacl($url,$rights=null,$owner=null) static function eacl($url,$rights=null,$owner=null)
{ {
$params = func_get_args(); return self::_call_on_backend('eacl',array($url,$rights,$owner));
return self::_call_on_backend('eacl',$params);
} }
/** /**
@ -688,9 +686,38 @@ class egw_vfs extends vfs_stream_wrapper
*/ */
static function get_eacl($path) static function get_eacl($path)
{ {
$params = func_get_args(); return self::_call_on_backend('get_eacl',array($path));
}
return self::_call_on_backend('get_eacl',$params); /**
* Store properties for a single ressource (file or dir)
*
* @param string $path string with path
* @param array $props array or array with values for keys 'name', 'ns', 'value' (null to delete the prop)
* @return boolean true if props are updated, false otherwise (eg. ressource not found)
*/
static function proppatch($path,array $props)
{
return self::_call_on_backend('proppatch',array($path,$props));
}
/**
* Default namespace for properties set by eGroupware: comment or custom fields (leading #)
*
*/
const DEFAULT_PROP_NAMESPACE = 'http://egroupware.org/';
/**
* Read properties for a ressource (file, dir or all files of a dir)
*
* @param array|string $path (array of) string with path
* @param string $ns='http://egroupware.org/' namespace if propfind should be limited to a single one, otherwise use null
* @return array|boolean array with props (values for keys 'name', 'ns', 'value'), or path => array of props for is_array($path)
* false if $path does not exist
*/
static function propfind($path,$ns=self::DEFAULT_PROP_NAMESPACE)
{
return self::_call_on_backend('propfind',array($path,$ns));
} }
/** /**

View File

@ -50,6 +50,10 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
* Our tablename * Our tablename
*/ */
const TABLE = 'egw_sqlfs'; const TABLE = 'egw_sqlfs';
/**
* Name of our property table
*/
const PROPS_TABLE = 'egw_sqlfs_props';
/** /**
* mode-bits, which have to be set for files * mode-bits, which have to be set for files
*/ */
@ -129,7 +133,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
* *
* @var array $path => info-array pairs * @var array $path => info-array pairs
*/ */
static private $stat_cache; static private $stat_cache = array();
/** /**
* Reference to the PDO object we use * Reference to the PDO object we use
* *
@ -494,9 +498,13 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
$stmt = self::$pdo->prepare('DELETE FROM '.self::TABLE.' WHERE fs_id=:fs_id'); $stmt = self::$pdo->prepare('DELETE FROM '.self::TABLE.' WHERE fs_id=:fs_id');
unset(self::$stat_cache[$path]); unset(self::$stat_cache[$path]);
if (($ret = $stmt->execute(array(':fs_id' => $stat['ino']))) && self::url2operation($url) == self::STORE2FS) if (($ret = $stmt->execute(array(':fs_id' => $stat['ino']))))
{ {
unlink(self::_fs_path($stat['ino'])); if (self::url2operation($url) == self::STORE2FS) unlink(self::_fs_path($stat['ino']));
// delete props
unset($stmt);
$stmt = self::$pdo->prepare('DELETE FROM '.self::PROPS_TABLE.' WHERE fs_id=?');
$stmt->execute(array($stat['ino']));
} }
return $ret; return $ret;
} }
@ -678,6 +686,10 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
if (($ret = $stmt->execute(array($stat['ino'])))) if (($ret = $stmt->execute(array($stat['ino']))))
{ {
self::eacl($path,null,false,$stat['ino']); // remove all (=false) evtl. existing extended acl for that dir self::eacl($path,null,false,$stat['ino']); // remove all (=false) evtl. existing extended acl for that dir
// delete props
unset($stmt);
$stmt = self::$pdo->prepare('DELETE FROM '.self::PROPS_TABLE.' WHERE fs_id=?');
$stmt->execute(array($stat['ino']));
} }
return $ret; return $ret;
} }
@ -840,7 +852,6 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
/** /**
* This method is called immediately when your stream object is created for examining directory contents with opendir(). * This method is called immediately when your stream object is created for examining directory contents with opendir().
* *
* @ToDo check all parent dirs for readable (fastest would be with sql query) !!!
* @param string $path URL that was passed to opendir() and that this object is expected to explore. * @param string $path URL that was passed to opendir() and that this object is expected to explore.
* @param $options * @param $options
* @return booelan * @return booelan
@ -1221,6 +1232,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
/** /**
* Return the path of given fs_id(s) * Return the path of given fs_id(s)
* *
* Searches the stat_cache first and then the db.
* Calls itself recursive to to determine the path of the parent/directory * Calls itself recursive to to determine the path of the parent/directory
* *
* @param int/array $fs_ids integer fs_id or array of them * @param int/array $fs_ids integer fs_id or array of them
@ -1229,8 +1241,23 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
static function id2path($fs_ids) static function id2path($fs_ids)
{ {
//error_log(__METHOD__.'('.print_r($fs_id,true).')'); //error_log(__METHOD__.'('.print_r($fs_id,true).')');
$ids = (array)$fs_ids; $ids = (array)$fs_ids;
$pathes = array();
// first check our stat-cache for the ids
foreach(self::$stat_cache as $path => $stat)
{
if (($key = array_search($stat['fs_id'],$ids)) !== false)
{
$pathes[$stat['fs_id']] = $path;
unset($ids[$key]);
if (!$ids)
{
//error_log(__METHOD__.'('.print_r($fs_ids,true).')='.print_r($pathes,true).' *from stat_cache*');
return is_array($fs_ids) ? $pathes : array_shift($pathes);
}
}
}
// now search via the database
if (count($ids) > 1) array_map(create_function('&$v','$v = (int)$v;'),$ids); if (count($ids) > 1) array_map(create_function('&$v','$v = (int)$v;'),$ids);
$query = 'SELECT fs_id,fs_dir,fs_name FROM '.self::TABLE.' WHERE fs_id'. $query = 'SELECT fs_id,fs_dir,fs_name FROM '.self::TABLE.' WHERE fs_id'.
(count($ids) == 1 ? '='.(int)$ids[0] : ' IN ('.implode(',',$ids).')'); (count($ids) == 1 ? '='.(int)$ids[0] : ' IN ('.implode(',',$ids).')');
@ -1239,7 +1266,6 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
{ {
self::_pdo(); self::_pdo();
} }
//$query = '/* sqlfs::id2path('.implode(',',$ids).') */ '.$query;
$stmt = self::$pdo->prepare($query); $stmt = self::$pdo->prepare($query);
$stmt->setFetchMode(PDO::FETCH_ASSOC); $stmt->setFetchMode(PDO::FETCH_ASSOC);
if (!$stmt->execute()) if (!$stmt->execute())
@ -1261,7 +1287,6 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
{ {
return false; // parent not found, should never happen ... return false; // parent not found, should never happen ...
} }
$pathes = array();
foreach($rows as $fs_id => $row) foreach($rows as $fs_id => $row)
{ {
$parent = $row['fs_dir'] > 1 ? $parents[$row['fs_dir']] : ''; $parent = $row['fs_dir'] > 1 ? $parents[$row['fs_dir']] : '';
@ -1298,6 +1323,8 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
return $stat; return $stat;
} }
private static $pdo_type;
/** /**
* Create pdo object / connection, as long as pdo is not generally used in eGW * Create pdo object / connection, as long as pdo is not generally used in eGW
* *
@ -1311,23 +1338,23 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
{ {
case 'mysqli': case 'mysqli':
case 'mysqlt': case 'mysqlt':
$type = 'mysql'; self::$pdo_type = 'mysql';
break; break;
default: default:
$type = $egw_db->Type; self::$pdo_type = $egw_db->Type;
break; break;
} }
switch($type) switch($type)
{ {
default: default:
$dsn = $type.':host='.$egw_db->Host.';port='.$egw_db->Port.';dbname='.$egw_db->Database; $dsn = self::$pdo_type.':host='.$egw_db->Host.';port='.$egw_db->Port.';dbname='.$egw_db->Database;
break; break;
} }
// check once if pdo extension and DB specific driver is loaded or can be loaded // check once if pdo extension and DB specific driver is loaded or can be loaded
static $pdo_available; static $pdo_available;
if (is_null($pdo_available)) if (is_null($pdo_available))
{ {
foreach(array('pdo','pdo_'.$type) as $ext) foreach(array('pdo','pdo_'.self::$pdo_type) as $ext)
{ {
if (!extension_loaded($ext) && function_exists('dl') && !dl($dl=PHP_SHLIB_PREFIX.$ext.'.'.PHP_SHLIB_SUFFIX)) if (!extension_loaded($ext) && function_exists('dl') && !dl($dl=PHP_SHLIB_PREFIX.$ext.'.'.PHP_SHLIB_SUFFIX))
{ {
@ -1345,7 +1372,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
} }
// set client charset of the connection // set client charset of the connection
$charset = $GLOBALS['egw']->translation->charset(); $charset = $GLOBALS['egw']->translation->charset();
switch($type) switch(self::$pdo_type)
{ {
case 'mysql': case 'mysql':
if (isset($egw_db->Link_ID->charset2mysql[$charset])) $charset = $egw_db->Link_ID->charset2mysql[$charset]; if (isset($egw_db->Link_ID->charset2mysql[$charset])) $charset = $egw_db->Link_ID->charset2mysql[$charset];
@ -1471,6 +1498,123 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
//error_log(__METHOD__."('$url') = $operation (1=DB, 2=FS)"); //error_log(__METHOD__."('$url') = $operation (1=DB, 2=FS)");
return $operation; return $operation;
} }
/**
* Store properties for a single ressource (file or dir)
*
* @param string|int $path string with path or integer fs_id
* @param array $props array or array with values for keys 'name', 'ns', 'value' (null to delete the prop)
* @return boolean true if props are updated, false otherwise (eg. ressource not found)
*/
static function proppatch($path,array &$props)
{
if (!is_numeric($path))
{
if (!($stat = self::url_stat($path,0)))
{
return false;
}
$id = $stat['ino'];
}
elseif(!($path = self::id2path($id=$path)))
{
return false;
}
if (!egw_vfs::check_access($path,EGW_ACL_EDIT,$stat))
{
return false; // permission denied
}
foreach($props as &$prop)
{
if (!isset($prop['ns'])) $prop['ns'] = egw_vfs::DEFAULT_PROP_NAMESPACE;
if (!isset($prop['value']) || self::$pdo_type != 'mysql') // for non mysql, we have to delete the prop anyway, as there's no REPLACE!
{
if (!isset($del_stmt))
{
$del_stmt = self::$pdo->prepare('DELETE FROM '.self::PROPS_TABLE.' WHERE fs_id=:fs_id AND prop_namespace=:prop_namespace AND prop_name=:prop_name');
$del_stmt->bindParam(':fs_id',$id);
}
$del_stmt->bindParam(':prop_namespace',$prop['ns']);
$del_stmt->bindParam(':prop_name',$prop['name']);
$del_stmt->execute();
}
if (isset($prop['value']))
{
if (!isset($ins_stmt))
{
$ins_stmt = self::$pdo->prepare((self::$pdo_type == 'mysql' ? 'REPLACE' : 'INSERT').
' INTO '.self::PROPS_TABLE.' (fs_id,prop_namespace,prop_name,prop_value) VALUES (:fs_id,:prop_namespace,:prop_name,:prop_value)');
$ins_stmt->bindParam(':fs_id',$id);
}
$ins_stmt->bindParam(':prop_namespace',$prop['ns']);
$ins_stmt->bindParam(':prop_name',$prop['name']);
$ins_stmt->bindParam(':prop_value',$prop['value']);
if (!$ins_stmt->execute())
{
return false;
}
}
}
return true;
}
/**
* Read properties for a ressource (file, dir or all files of a dir)
*
* @param array|string|int $path_ids (array of) string with path or integer fs_id
* @param string $ns='http://egroupware.org/' namespace if propfind should be limited to a single one, use null for all
* @return array|boolean false on error ($path_ids does not exist), array with props (values for keys 'name', 'ns', 'value'), or
* fs_id/path => array of props for $depth==1 or is_array($path_ids)
*/
static function propfind($path_ids,$ns=egw_vfs::DEFAULT_PROP_NAMESPACE)
{
$ids = is_array($path_ids) ? $path_ids : array($path_ids);
foreach($ids as &$id)
{
if (!is_numeric($id))
{
if (!($stat = self::url_stat($id,0)))
{
error_log(__METHOD__."(".array2string($path_ids).",$depth,$ns) path '$id' not found!");
return false;
}
$id = $stat['ino'];
}
}
if (count($ids) > 1) array_map(create_function('&$v','$v = (int)$v;'),$ids);
$query = 'SELECT * FROM '.self::PROPS_TABLE.' WHERE (fs_id'.
(count($ids) == 1 ? '='.(int)$ids[0] : ' IN ('.implode(',',$ids).')').')'.
(!is_null($ns) ? ' AND prop_namespace=?' : '');
$stmt = self::$pdo->prepare($query);
$stmt->setFetchMode(PDO::FETCH_ASSOC);
$stmt->execute(!is_null($ns) ? array($ns) : array());
$props = array();
foreach($stmt as $row)
{
$props[$row['fs_id']][] = array(
'value' => $row['prop_value'],
'name' => $row['prop_name'],
'ns' => $row['prop_namespace'],
);
}
if (!is_array($path_ids))
{
$props = $props[$row['fs_id']];
}
elseif ($props && isset($stat)) // need to map fs_id's to pathes
{
foreach(self::id2path(array_keys($props)) as $id => $path)
{
$props[$path] =& $props[$id];
unset($props[$id]);
}
}
foreach((array)$props as $k => $v) error_log(__METHOD__."($path_ids,$ns) $k => ".array2string($v));
return $props;
}
} }
stream_register_wrapper(sqlfs_stream_wrapper::SCHEME ,'sqlfs_stream_wrapper'); stream_register_wrapper(sqlfs_stream_wrapper::SCHEME ,'sqlfs_stream_wrapper');

View File

@ -399,8 +399,53 @@ class vfs_stream_wrapper implements iface_stream_wrapper
*/ */
static protected function _call_on_backend($name,$params,$fail_silent=false) static protected function _call_on_backend($name,$params,$fail_silent=false)
{ {
$path = $params[0]; $pathes = $params[0];
$scheme2urls = array();
foreach(is_array($pathes) ? $pathes : array($pathes) as $path)
{
if (!($url = self::resolve_url($path)))
{
return false;
}
$scheme2urls[(string)parse_url($url,PHP_URL_SCHEME)][] = $url;
}
$ret = array();
foreach($scheme2urls as $scheme => $urls)
{
if ($scheme)
{
if (!class_exists($class = $scheme.'_stream_wrapper') || !method_exists($class,$name))
{
if (!$fail_silent) trigger_error("Can't $name for scheme $scheme!\n",E_USER_WARNING);
return false;
}
if (!is_array($pathes))
{
$params[0] = $url;
return call_user_func_array(array($scheme.'_stream_wrapper',$name),$params);
}
$params[0] = $urls;
if (!is_array($r = call_user_func_array(array($scheme.'_stream_wrapper',$name),$params)))
{
return $r;
}
$ret += $r;
}
// call the filesystem specific function (dont allow to use arrays!)
elseif(!function_exists($name) || is_array($pathes))
{
return false;
}
else
{
return $name($url,$time);
}
}
return $ret;
// old, non array aware code
if (!($url = self::resolve_url($params[0]))) if (!($url = self::resolve_url($params[0])))
{ {
return false; return false;

View File

@ -12,7 +12,7 @@
/* Basic information about this app */ /* Basic information about this app */
$setup_info['phpgwapi']['name'] = 'phpgwapi'; $setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'eGroupWare API'; $setup_info['phpgwapi']['title'] = 'eGroupWare API';
$setup_info['phpgwapi']['version'] = '1.5.012'; $setup_info['phpgwapi']['version'] = '1.5.015';
$setup_info['phpgwapi']['versions']['current_header'] = '1.28'; $setup_info['phpgwapi']['versions']['current_header'] = '1.28';
$setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1; $setup_info['phpgwapi']['app_order'] = 1;
@ -48,6 +48,7 @@ $setup_info['phpgwapi']['tables'][] = 'egw_index_keywords';
$setup_info['phpgwapi']['tables'][] = 'egw_index'; $setup_info['phpgwapi']['tables'][] = 'egw_index';
$setup_info['phpgwapi']['tables'][] = 'egw_cat2entry'; $setup_info['phpgwapi']['tables'][] = 'egw_cat2entry';
$setup_info['phpgwapi']['tables'][] = 'egw_locks'; $setup_info['phpgwapi']['tables'][] = 'egw_locks';
$setup_info['phpgwapi']['tables'][] = 'egw_sqlfs_props';
// hooks used by vfs_home_hooks to manage user- and group-directories for the new stream based VFS // hooks used by vfs_home_hooks to manage user- and group-directories for the new stream based VFS
$setup_info['phpgwapi']['hooks']['addaccount'] = 'phpgwapi.vfs_home_hooks.addAccount'; $setup_info['phpgwapi']['hooks']['addaccount'] = 'phpgwapi.vfs_home_hooks.addAccount';

View File

@ -270,7 +270,7 @@ $phpgw_baseline = array(
'history_record_id' => array('type' => 'int','precision' => '4','nullable' => False), 'history_record_id' => array('type' => 'int','precision' => '4','nullable' => False),
'history_appname' => array('type' => 'varchar','precision' => '64','nullable' => False), 'history_appname' => array('type' => 'varchar','precision' => '64','nullable' => False),
'history_owner' => array('type' => 'int','precision' => '4','nullable' => False), 'history_owner' => array('type' => 'int','precision' => '4','nullable' => False),
'history_status' => array('type' => 'char','precision' => '2','nullable' => False), 'history_status' => array('type' => 'varchar','precision' => '64','nullable' => False),
'history_new_value' => array('type' => 'text','nullable' => False), 'history_new_value' => array('type' => 'text','nullable' => False),
'history_timestamp' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'), 'history_timestamp' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'),
'history_old_value' => array('type' => 'text','nullable' => False) 'history_old_value' => array('type' => 'text','nullable' => False)
@ -440,14 +440,13 @@ $phpgw_baseline = array(
'fs_mode' => array('type' => 'int','precision' => '2','nullable' => False), 'fs_mode' => array('type' => 'int','precision' => '2','nullable' => False),
'fs_uid' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), 'fs_uid' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'fs_gid' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), 'fs_gid' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'fs_created' => array('type' => 'timestamp','precision' => '8','nullable' => False,'default' => 'current_timestamp'), 'fs_created' => array('type' => 'timestamp','precision' => '8','nullable' => False),
'fs_modified' => array('type' => 'timestamp','precision' => '8','nullable' => False), 'fs_modified' => array('type' => 'timestamp','precision' => '8','nullable' => False),
'fs_mime' => array('type' => 'varchar','precision' => '64','nullable' => False), 'fs_mime' => array('type' => 'varchar','precision' => '64','nullable' => False),
'fs_size' => array('type' => 'int','precision' => '8','nullable' => False), 'fs_size' => array('type' => 'int','precision' => '8','nullable' => False),
'fs_creator' => array('type' => 'int','precision' => '4','nullable' => False), 'fs_creator' => array('type' => 'int','precision' => '4','nullable' => False),
'fs_modifier' => array('type' => 'int','precision' => '4'), 'fs_modifier' => array('type' => 'int','precision' => '4'),
'fs_active' => array('type' => 'bool','nullable' => False,'default' => 't'), 'fs_active' => array('type' => 'bool','nullable' => False,'default' => 't'),
'fs_comment' => array('type' => 'varchar','precision' => '255'),
'fs_content' => array('type' => 'blob') 'fs_content' => array('type' => 'blob')
), ),
'pk' => array('fs_id'), 'pk' => array('fs_id'),
@ -506,5 +505,17 @@ $phpgw_baseline = array(
'fk' => array(), 'fk' => array(),
'ix' => array('lock_path','lock_expires'), 'ix' => array('lock_path','lock_expires'),
'uc' => array() 'uc' => array()
),
'egw_sqlfs_props' => array(
'fd' => array(
'fs_id' => array('type' => 'int','precision' => '4','nullable' => False),
'prop_namespace' => array('type' => 'varchar','precision' => '64','nullable' => False),
'prop_name' => array('type' => 'varchar','precision' => '64','nullable' => False),
'prop_value' => array('type' => 'text')
),
'pk' => array('fs_id','prop_namespace','prop_name'),
'fk' => array(),
'ix' => array(),
'uc' => array()
) )
); );

View File

@ -439,7 +439,7 @@ function phpgwapi_upgrade1_5_010()
*/ */
function phpgwapi_upgrade1_5_011() function phpgwapi_upgrade1_5_011()
{ {
if ($GLOBALS['DEBUG']) echo "<pre style='text-align: left;'>\n"; if ($GLOBALS['DEBUG'] && isset($_SERVER['HTTP_HOST'])) echo "<pre style='text-align: left;'>\n";
egw_vfs::$is_root = true; egw_vfs::$is_root = true;
egw_vfs::load_wrapper('sqlfs'); egw_vfs::load_wrapper('sqlfs');
egw_vfs::find('sqlfs://default/',array( egw_vfs::find('sqlfs://default/',array(
@ -466,7 +466,81 @@ function phpgwapi_upgrade1_5_011()
echo "phpgwapi_upgrade1_5_011() $url: $old_path not found!\n"; echo "phpgwapi_upgrade1_5_011() $url: $old_path not found!\n";
} }
')); '));
if ($GLOBALS['DEBUG']) echo "</pre>\n"; if ($GLOBALS['DEBUG'] && isset($_SERVER['HTTP_HOST'])) echo "</pre>\n";
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.5.012'; return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.5.012';
} }
function phpgwapi_upgrade1_5_012()
{
$GLOBALS['egw_setup']->oProc->CreateTable('egw_sqlfs_props',array(
'fd' => array(
'fs_id' => array('type' => 'int','precision' => '4','nullable' => False),
'prop_namespace' => array('type' => 'varchar','precision' => '64','nullable' => False),
'prop_name' => array('type' => 'varchar','precision' => '64','nullable' => False),
'prop_value' => array('type' => 'text')
),
'pk' => array('fs_id','prop_namespace','prop_name'),
'fk' => array(),
'ix' => array(),
'uc' => array()
));
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.5.013';
}
function phpgwapi_upgrade1_5_013()
{
foreach($GLOBALS['egw_setup']->db->select('egw_sqlfs','fs_id,fs_comment',"fs_comment IS NOT NULL AND fs_comment != ''",__LINE__,__FILE__) as $row)
{
$GLOBALS['egw_setup']->db->insert('egw_sqlfs_props',array(
'fs_id' => $row['fs_id'],
'prop_namespace' => 'http://egroupware.org/',
'prop_name' => 'comment',
'prop_value' => $row['fs_comment'],
),false,__LINE__,__FILE__);
}
$GLOBALS['egw_setup']->oProc->DropColumn('egw_sqlfs',array(
'fd' => array(
'fs_id' => array('type' => 'auto','nullable' => False),
'fs_dir' => array('type' => 'int','precision' => '4','nullable' => False),
'fs_name' => array('type' => 'varchar','precision' => '200','nullable' => False),
'fs_mode' => array('type' => 'int','precision' => '2','nullable' => False),
'fs_uid' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'fs_gid' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'fs_created' => array('type' => 'timestamp','precision' => '8','nullable' => False,'default' => 'current_timestamp'),
'fs_modified' => array('type' => 'timestamp','precision' => '8','nullable' => False),
'fs_mime' => array('type' => 'varchar','precision' => '64','nullable' => False),
'fs_size' => array('type' => 'int','precision' => '8','nullable' => False),
'fs_creator' => array('type' => 'int','precision' => '4','nullable' => False),
'fs_modifier' => array('type' => 'int','precision' => '4'),
'fs_active' => array('type' => 'bool','nullable' => False,'default' => 't'),
'fs_content' => array('type' => 'blob')
),
'pk' => array('fs_id'),
'fk' => array(),
'ix' => array(array('fs_dir','fs_active','fs_name')),
'uc' => array()
),'fs_comment');
// no automatic timestamp for created field, as it would update on every update
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_sqlfs','fs_created',array(
'type' => 'timestamp',
'precision' => '8',
'nullable' => False
));
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.5.014';
}
function phpgwapi_upgrade1_5_014()
{
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_history_log','history_status',array(
'type' => 'varchar',
'precision' => '64',
'nullable' => False
));
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.5.015';
}