diff --git a/etemplate/inc/class.editor.inc.php b/etemplate/inc/class.editor.inc.php index f2650f5444..68dbd444b1 100644 --- a/etemplate/inc/class.editor.inc.php +++ b/etemplate/inc/class.editor.inc.php @@ -492,7 +492,7 @@ } elseif ($content['import_xml']) { - $msg = $this->import_xml($content['file']); + $msg = $this->import_xml($content['file']['tmp_name']); } elseif ($content['db_tools']) { diff --git a/etemplate/inc/class.link_widget.inc.php b/etemplate/inc/class.link_widget.inc.php index 92ba56180e..718f38589f 100644 --- a/etemplate/inc/class.link_widget.inc.php +++ b/etemplate/inc/class.link_widget.inc.php @@ -49,14 +49,21 @@ switch ($type = $cell['type']) { case 'link-to': - if ($value['button'] == 'search' && count($ids = $this->link->query($value['app'],$value['query']))) + if ($value['button'] == 'upload' && !empty($value['file']) && $value['file']['tmp_name'] != 'none') + { + $value = $extension_data; + $value['remark'] = ''; + + $tpl = new etemplate('etemplate.link_widget.attach'); + } + elseif ($value['button'] == 'search' && count($ids = $this->link->query($value['app'],$value['query']))) { $extension_data['app'] = $value['app']; - + $value = $extension_data; $value['options-id'] = $ids; $value['remark'] = ''; - + $tpl = new etemplate('etemplate.link_widget.create'); } else @@ -97,8 +104,8 @@ for($row=$tpl->rows-1; list(,$link) = each($links); ++$row) { $value[$row] = $link; - $value[$row]['title'] = $this->link->title($link['app'],$link['id']); - $value[$row]['view'] = $this->link->view($link['app'],$link['id']); + $value[$row]['title'] = $this->link->title($link['app'],$link['id'],$link); + $value[$row]['view'] = $this->link->view($link['app'],$link['id'],$link); } break; } @@ -113,35 +120,32 @@ function post_process($name,&$value,&$extension_data,&$loop,&$tmpl,$value_in) { - if ($value['search']) + $buttons = array('search','create','new','upload','attach'); + while (!$button && list(,$name) = each($buttons)) { - $button = 'search'; + $button = $value[$name] ? $name : ''; } - elseif ($value['create']) - { - $button = 'create'; - } - elseif ($value['new']) - { - $button = 'new'; - } - elseif (is_array($value['unlink'])) + if (is_array($value['unlink'])) { $button = 'unlink'; list($unlink) = @each($value['unlink']); } - //echo "
start: link_widget::post_process: button='$button', unlink='$unlink', value ="; _debug_array($value); unset($value[$button]); $value = array_merge($extension_data,$value); - + + if ($button && $this->debug) + { + echo "
start: link_widget::post_process: button='$button', unlink='$unlink', value ="; _debug_array($value); + } switch ($button) { case 'create': if ($value['to_app']) // make the link { - $link_id = $this->link->link($value['to_app'],$value['to_id'],$value['app'],$value['id'],$value['remark']); - //echo "
link($value[to_app],$value[to_id],$value[app],$value[id],'$value[remark]')
\n"; + $link_id = $this->link->link($value['to_app'],$value['to_id'], + $value['app'],$value['id'],$value['remark']); + if (isset($value['primary']) && !$value['anz_links'] ) { $value['primary'] = $link_id; @@ -154,6 +158,34 @@ $loop = True; break; + case 'attach': + if (is_array($value['file']) && $value['to_app']) + { + $link_id = $this->link->link($value['to_app'],$value['to_id'], + 'vfs',$value['file'],$value['remark']); + unlink($value['file']['tmp_name']); + unset($value['file']); + } + $extension_data = $value; + $loop = True; + break; + + case 'upload': // need to rename file, as php deletes it otherwise + if (is_array($value['file']) && !empty($value['file']['tmp_name']) && + $value['file']['tmp_name'] != 'none') + { + move_uploaded_file($value['file']['tmp_name'],$value['file']['tmp_name'].'+'); + $value['file']['tmp_name'] .= '+'; + $extension_data = $value; + } + else + { + unset($value['file']); + $button = ''; + } + $loop = True; + break; + case 'unlink': $this->link->unlink($unlink,$value['to_app'],&$value['to_id']); //echo "unlink(link-id=$unlink,$value[to_app],$value[to_id])
\n"; diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index 5f1c964b9d..39bdca7127 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -459,7 +459,7 @@ { $options .= " onFocus=\"self.status='".addslashes(lang($help))."'; return true;\""; $options .= " onBlur=\"self.status=''; return true;\""; - if ($cell['type'] == 'button') // for button additionally when mouse over button + if ($cell['type'] == 'button' || $cell['type'] == 'file') // for button additionally when mouse over button { $options .= " onMouseOver=\"self.status='".addslashes(lang($help))."'; return true;\""; $options .= " onMouseOut=\"self.status=''; return true;\""; @@ -701,11 +701,10 @@ break; case 'file': $html .= $this->html->input_hidden($path = str_replace($name,$name.'_path',$form_name),'.'); - $html .= $this->html->input($form_name,'','file'); + $html .= $this->html->input($form_name,'','file',$options); $GLOBALS['phpgw_info']['etemplate']['form_options'] = "enctype=\"multipart/form-data\" onSubmit=\"set_element2(this,'$path','$form_name')\""; $GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = $cell['type']; - $GLOBALS['phpgw_info']['etemplate']['to_process'][$path] = 'file-path'; break; case 'vbox': case 'hbox': @@ -872,6 +871,24 @@ } $this->set_array($content,$form_name,$value); break; + case 'file': + $parts = explode('[',str_replace(']','',$form_name)); + $name = array_shift($parts); + $index = count($parts) ? '['.implode('][',$parts).']' : ''; + $value = array(); + $parts = array('tmp_name','type','size','name'); + while (list(,$part) = each($parts)) + { + $value[$part] = $this->get_array($GLOBALS['HTTP_POST_FILES'][$name],$part.$index); + } + $value['path'] = $this->get_array($content_in,substr($form_name,0,-1).'_path]'); + $value['ip'] = get_var('REMOTE_ADDR',Array('SERVER')); + if (function_exists('is_uploaded_file') && !is_uploaded_file($value['tmp_name'])) + { + $value = array(); // to be on the save side + } + //_debug_array($value); + // fall-throught default: $this->set_array($content,$form_name,$value); break; diff --git a/etemplate/setup/etemplates.inc.php b/etemplate/setup/etemplates.inc.php index 13a0df4f50..5dc0afcfcb 100644 --- a/etemplate/setup/etemplates.inc.php +++ b/etemplate/setup/etemplates.inc.php @@ -1,8 +1,28 @@ 'etemplate.editor.buttons','template' => '','lang' => '','group' => '0','version' => '0.9.13.004','data' => 'a:2:{i:0;a:0:{}i:1;a:10:{s:1:\"A\";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)\";}s:1:\"B\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:14:\"Show (no save)\";s:4:\"name\";s:4:\"show\";s:4:\"help\";s:61:\"shows/displays eTemplate for testing, does NOT save it before\";}s:1:\"C\";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\";}s:1:\"D\";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\";}s:1:\"E\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:4:\"Edit\";s:4:\"name\";s:4:\"edit\";s:4:\"help\";s:30:\"edit the eTemplate spez. above\";}s:1:\"F\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Delete\";s:4:\"name\";s:6:\"delete\";s:4:\"help\";s:33:\"deletes the eTemplate spez. above\";}s:1:\"G\";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\";}s:1:\"H\";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)\";}s:1:\"I\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"J\";a:5:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:2:\"20\";s:5:\"label\";s:46:\"Width, Height, Border, class, Spacing, Padding\";s:4:\"name\";s:4:\"size\";s:4:\"help\";s:93:\"width, height, border-line-thickness, CSS-class name, Celspacing, Cellpadding (for TABLE tag)\";}}}','size' => '','style' => '','modified' => '1034517479',); + +$templ_data[] = array('name' => 'etemplate.tab_widget.test','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:5:{i:0;a:1:{s:1:\"A\";s:3:\"250\";}i:1;a:2:{s:1:\"A\";a:4:{s:4:\"type\";s:4:\"text\";s:5:\"label\";s:7:\"Surname\";s:4:\"name\";s:7:\"surname\";s:4:\"help\";s:7:\"Surname\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"text\";s:5:\"label\";s:10:\"Familyname\";s:4:\"name\";s:10:\"familyname\";s:4:\"help\";s:10:\"Familyname\";}}i:2;a:2:{s:1:\"A\";a:5:{s:4:\"type\";s:3:\"tab\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:16:\"Privat|Work|Note\";s:4:\"name\";s:16:\"privat|work|note\";s:4:\"help\";s:42:\"privat address|work address|free note-text\";}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:4:\"span\";s:3:\"all\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:4;a:2:{s:1:\"A\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:4:\"Save\";s:4:\"name\";s:4:\"save\";s:4:\"help\";s:12:\"Save changes\";}s:1:\"B\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Cancel\";s:4:\"name\";s:6:\"cancel\";s:4:\"help\";s:26:\"Cancel, discarding changes\";}}}','size' => '','style' => '','modified' => '1033814007',); + +$templ_data[] = array('name' => 'etemplate.editor.col_header','template' => '','lang' => '','group' => '0','version' => '0.9.13.003','data' => 'a:2:{i:0;a:4:{s:1:\"A\";s:2:\"5%\";s:1:\"B\";s:2:\"5%\";s:1:\"C\";s:3:\"50%\";s:1:\"D\";s:3:\"40%\";}i:1;a:6:{s:1:\"A\";a:5:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:1:\"+\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:13:\"insert_col[0]\";s:4:\"help\";s:33:\"insert new column in front of all\";}s:1:\"B\";a:5:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:3:\">|<\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:17:\"exchange_col[$c_]\";s:4:\"help\";s:25:\"exchange this two columns\";}s:1:\"C\";a:5:{s:4:\"type\";s:5:\"label\";s:4:\"size\";s:1:\"b\";s:7:\"no_lang\";s:1:\"1\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:4:\".col\";}s:1:\"D\";a:6:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:1:\"5\";s:5:\"label\";s:14:\"Width, Disable\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:12:\"width[$col_]\";s:4:\"help\";s:122:\"width of col (in % or pixel), disable col: [! = not]bolink::title('$app','$id')
\n"; + } + if ($app == 'vfs') + { + if (is_array($link)) + { + $size = $link['size']; + if ($size_k = intval($size / 1024)) + { + if (intval($size_k / 1024)) + { + $size = sprintf('%3.1dM',doubleval($size_k)/1024.0); + } + else + { + $size = $size_k.'k'; + } + } + $size = ' '.$size; + } + return $id.$size; + } if ($app == '' || !is_array($reg = $this->app_register[$app]) || !isset($reg['title'])) { return array(); @@ -290,8 +383,12 @@ @abstract view entry $id of $app @result array with name-value pairs for link to view-methode of $app to view $id */ - function view($app,$id) + function view($app,$id,$link='') { + if ($app == 'vfs' && !empty($id) && is_array($link)) + { + return $this->vfs_view($link); + } if ($app == '' || !is_array($reg = $this->app_register[$app]) || !isset($reg['view']) || !isset($reg['view_id'])) { return array(); @@ -313,6 +410,335 @@ } return $view; } + + function vfs_view($link='') + { + if (is_array($link)) + { + return array( + 'menuaction' => 'infolog.bolink.vfs_view', + 'app' => $link['app2'], + 'id' => $link['id2'], + 'filename' => $link['id'] + ); + } + $app = get_var('app','GET'); + $id = get_var('id','GET'); + $filename = get_var('filename','GET'); + + if (empty($app) || empty($id) || empty($filename) /* || !$this->bo->check_access($info_id,PHPGW_ACL_READ)*/) + { + Header('Location: ' . $GLOBALS['phpgw']->link('/')); + exit(); + } + $browser = CreateObject('phpgwapi.browser'); + + $local = $this->attached_local($app,$id,$filename, + get_var('REMOTE_ADDR',Array('SERVER')),$browser->is_windows()); + + if ($local) + { + Header('Location: ' . $local); + exit(); + } + $info = $this->info_attached($app,$id,$filename); + $browser->content_header($filename,$info['mime_type']); + echo $this->read_attached($app,$id,$filename); + + exit(); + } + + /*! + @function vfs_path + @syntax vfs_path ( $app,$id,$file='' ) + @abstract path to the attached files of $app/$ip + @discussion All link-files are based in the vfs-subdir 'infolog'. For other apps + @discussion separate subdirs with name app are created. + */ + function vfs_path($app,$id='',$file='') + { + $path = $this->vfs_basedir . ($app == '' || $app == 'infolog' ? '' : '/'.$app) . + ($id != '' ? '/' . $id : '') . ($file != '' ? '/' . $file : ''); + + if ($this->debug) + { + echo "bolink::vfs_path('$app','$id','$file') = '$path'
\n"; + } + return $path; + } + + /*! + @function vfs_path + @syntax vfs_path ( $app,$id,$file='' ) + @abstract Put a file to the corrosponding place in the VFS and set the attributes + @param $app/$id entry which should the file should be linked with + @param $file array with informations about the file in format of the etemplate file-type + @param $file['name'] name of the file (no directory) + @param $file['type'] mine-type of the file + @param $file['tmp_name'] name of the uploaded file (incl. directory) + @param $file['path'] path of the file on the client computer + @param $file['ip'] of the client + @discussion path and ip are only needed if u want a symlink (if possible) + */ + function attach_file($app,$id,$file,$comment='') + { + if ($this->debug) + { + echo "attach_file: app='$app', id='$id', tmp_name='$file[tmp_name]', name='$file[name]', size='$file[size]', type='$file[type]', path='$file[path]', ip='$file[ip]', comment='$comment'
\n"; + } + // create the root for attached files in infolog, if it does not exists + if (!($this->vfs->file_exists($this->vfs_basedir,array(RELATIVE_ROOT)))) + { + $this->vfs->override_acl = 1; + $this->vfs->mkdir($this->vfs_basedir,array(RELATIVE_ROOT)); + $this->vfs->override_acl = 0; + } + + $dir=$this->vfs_path($app); + if (!($this->vfs->file_exists($dir,array(RELATIVE_ROOT)))) + { + $this->vfs->override_acl = 1; + $this->vfs->mkdir($dir,array(RELATIVE_ROOT)); + $this->vfs->override_acl = 0; + } + $dir=$this->vfs_path($app,$id); + if (!($this->vfs->file_exists($dir,array(RELATIVE_ROOT)))) + { + $this->vfs->override_acl = 1; + $this->vfs->mkdir($dir,array(RELATIVE_ROOT)); + $this->vfs->override_acl = 0; + } + $fname = $this->vfs_path($app,$id,$file['name']); + $tfname = ''; + if (!empty($file['path'])) + { + $file['path'] = str_replace('\\\\','/',$file['path']); // vfs uses only '/' + @reset($this->link_pathes); + while ((list($valid,$trans) = @each($this->link_pathes)) && !$tfname) + { // check case-insensitive for WIN etc. + $check = $valid[0] == '\\' || strstr(':',$valid) ? 'eregi' : 'ereg'; + $valid2 = str_replace('\\','/',$valid); + //echo "attach_file: ereg('".$this->send_file_ips[$valid]."', '$file[ip]')=".ereg($this->send_file_ips[$valid],$file['ip'])."
\n"; + if ($check('^('.$valid2.')(.*)$',$file['path'],$parts) && + ereg($this->send_file_ips[$valid],$file['ip']) && // right IP + $this->vfs->file_exists($trans.$parts[2],array(RELATIVE_NONE|VFS_REAL))) + { + $tfname = $trans.$parts[2]; + } + //echo "attach_file: full_fname='$file[path]', valid2='$valid2', trans='$trans', check=$check, tfname='$tfname', parts=(x,'${parts[1]}','${parts[2]}')
\n"; + } + if ($tfname && !$this->vfs->securitycheck($tfname)) + { + return False; //lang('Invalid filename').': '.$tfname; + } + } + $this->vfs->override_acl = 1; + if ($tfname) // file is local + { + $this->vfs->symlink($tfname,$fname,array(RELATIVE_NONE|VFS_REAL,RELATIVE_ROOT)); + } + else + { + $this->vfs->cp($file['tmp_name'],$fname,array(RELATIVE_NONE|VFS_REAL,RELATIVE_ROOT)); + } + $this->vfs->set_attributes ($fname, array (RELATIVE_ROOT), + array ('mime_type' => $file['type'], + 'comment' => stripslashes ($comment), + 'app' => $app)); + $this->vfs->override_acl = 0; + + $link = $this->info_attached($app,$id,$file['name']); + return is_array($link) ? $link['file_id'] : False; + } + + /*! + @function delete_attached + @syntax delete_attached( $app,$id,$filename ) + @author ralfbecker + @abstract deletes an attached file + @param $app > 0: file_id of an attchemnt or $app/$id entry which linked to + @param $filename + */ + function delete_attached($app,$id='',$fname = '') + { + if (intval($app) > 0) // is file_id + { + $link = $this->fileinfo2link($file_id=$app); + $app = $link['app2']; + $id = $link['id2']; + $fname = $link['id']; + } + if ($this->debug) + { + echo "bolink::delete_attached('$app','$id','$fname') file_id=$file_id
\n"; + } + if (empty($app) || empty($id)) + { + return False; // dont delete more than all attachments of an entry + } + $file = $this->vfs_path($app,$id,$fname); + + if ($this->vfs->file_exists($file,array(RELATIVE_ROOT))) + { + $this->vfs->override_acl = 1; + $Ok = $this->vfs->delete($file,array(RELATIVE_ROOT)); + $this->vfs->override_acl = 0; + return $Ok; + } + return False; + } + + /*! + @function info_attached + @syntax info_attached( $app,$id,$filename ) + @author ralfbecker + @abstract converts the infos vfs has about a file into a link + @param $app/$id entry which linked to + @param $filename + @returns a 'kind' of link-array + */ + function info_attached($app,$id,$filename) + { + $this->vfs->override_acl = 1; + $attachments = $this->vfs->ls($this->vfs_path($app,$id,$filename),array(REALTIVE_NONE)); + $this->vfs->override_acl = 0; + + if (!count($attachments) || !$attachments[0]['name']) + { + return False; + } + return $this->fileinfo2link($attachments[0]); + } + + /*! + @function fileinfo2link + @syntax fileinfo2link( $fileinfo ) + @author ralfbecker + @abstract converts a fileinfo (row in the vfs-db-table) in a link + @param $fileinfo a row from the vfs-db-table (eg. returned by the vfs ls function) + or a file_id of that table + @returns a 'kind' of link-array + */ + function fileinfo2link($fileinfo) + { + if (!is_array($fileinfo)) + { + $fileinfo = $this->vfs->fileinfo($fileinfo); + list(,$fileinfo) = each($fileinfo); + + if (!is_array($fileinfo)) + { + return False; + } + } + $lastmod = $fileinfo[!empty($fileinfo['modified']) ? 'modified' : 'created']; + list($y,$m,$d) = explode('-',$lastmod); + $lastmod = mktime(0,0,0,$m,$d,$y); + + $dir_parts = array_reverse(explode('/',$fileinfo['directory'])); + + return array( + 'app' => 'vfs', + 'id' => $fileinfo['name'], + 'app2' => $dir_parts[1], + 'id2' => $dir_parts[0], + 'remark' => $fileinfo['comment'], + 'owner' => $fileinfo['owner_id'], + 'link_id' => -$fileinfo['file_id'], + 'lastmod' => $lastmod, + 'size' => $fileinfo['size'], + 'mime_type' => $fileinfo['mime_type'] + ); + } + + /*! + @function list_attached + @syntax list_attached( $app,$id ) + @author ralfbecker + @abstract lists all attachments to $app/$id + @returns a 'kind' of link-array + */ + function list_attached($app,$id) + { + $this->vfs->override_acl = 1; + $attachments = $this->vfs->ls($this->vfs_path($app,$id),array(REALTIVE_NONE)); + $this->vfs->override_acl = 0; + + if (!count($attachments) || !$attachments[0]['name']) + { + return False; + } + while (list(,$fileinfo) = each($attachments)) + { + $link = $this->fileinfo2link($fileinfo); + $attached[$link['link_id']] = $link; + } + return $attached; + } + + /*! + @function is_win_path + @syntax is_win_path( $path ) + @author ralfbecker + @abstract checks if path starts with a '\\' or has a ':' in it + */ + function is_win_path($path) + { + return $path[0] == '\\' || strstr($path,':'); + } + + /*! + @function read_attached + @syntax read_attached($app,$id,$filename) + @author ralfbecker + @abstract reads the attached file and returns the content + */ + function read_attached($app,$id,$filename) + { + if (empty($app) || !$id || empty($filename) /*|| !$this->check_access($info_id,PHPGW_ACL_READ)*/) + { + return False; + } + $this->vfs->override_acl = 1; + return $this->vfs->read($this->vfs_path($app,$id,$filename),array(RELATIVE_ROOT)); + } + + /*! + @function attached_local + @syntax attached_local($app,$id,$filename,$ip,$win_user) + @author ralfbecker + @abstract Checks if filename should be local availible and if so returns + @abstract 'file:/path' for HTTP-redirect else return False + */ + function attached_local($app,$id,$filename,$ip,$win_user) + { + //echo "attached_local(app=$app, id='$id', filename='$filename', ip='$ip', win_user='$win_user', count(send_file_ips)=".count($this->send_file_ips).")
\n"; + + if (!$id || !$filename || /* !$this->check_access($info_id,PHPGW_ACL_READ) || */ + !count($this->send_file_ips)) + { + return False; + } + $link = $this->vfs->readlink ($this->vfs_path($app,$id,$filename), array (RELATIVE_ROOT)); + + if ($link) + { + reset($this->link_pathes); $fname = ''; + while ((list($valid,$trans) = each($this->link_pathes)) && !$fname) + { + if (!$this->is_win_path($valid) == !$win_user && // valid for this OS + eregi('^'.$trans.'(.*)$',$link,$parts) && // right path + ereg($this->send_file_ips[$valid],$ip)) // right IP + { + $fname = $valid . $parts[1]; + $fname = !$win_user ? str_replace('\\','/',$fname) : str_replace('/','\\',$fname); + return 'file:'.($win_user ? '//' : '' ).$fname; + } + // echo "attached_local: link=$link, valid=$valid, trans='$trans', fname='$fname', parts=(x,'${parts[1]}','${parts[2]}')
\n"; + } + } + return False; + } /*! @function calendar_title diff --git a/infolog/inc/class.solink.inc.php b/infolog/inc/class.solink.inc.php index baef505ff4..c29241be25 100644 --- a/infolog/inc/class.solink.inc.php +++ b/infolog/inc/class.solink.inc.php @@ -61,7 +61,7 @@ */ function link( $app1,$id1,$app2,$id2,$remark='',$owner=0,$lastmod=0 ) { - //if ($this->debug) + if ($this->debug) { echo "solink.link('$app1',$id1,'$app2',$id2,'$remark',$owner)
\n"; } diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index b0bc093ee1..f43f5eca2d 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -75,9 +75,6 @@ 'sp' => '- Subprojects from', 're' => 'Re:' ); - //$this->html = CreateObject('etemplate.html'); - //$this->categories = CreateObject('phpgwapi.categories'); - //$this->nextmatchs = CreateObject('phpgwapi.nextmatchs'); $this->link = &$this->bo->link; $this->tmpl = CreateObject('etemplate.etemplate'); @@ -1439,7 +1436,7 @@ if(get_var('save',Array('POST'))) { - $this->bo->link_pathes = array(); $this->bo->send_file_ips = array(); + $this->bo->link_pathes = $this->bo->send_file_ips = array(); $valid = get_var('valid',Array('POST')); $trans = get_var('trans',Array('POST')); @@ -1469,7 +1466,7 @@ 'title' => lang('InfoLog').' - '.lang('configuration'), 'text' => lang('file-attachments via symlinks instead of uploads and retrieval via file:/path for direct lan-clients'), 'action_url' => $this->html->link('/index.php',$this->menuaction('admin')), - 'bg_h_color' => $GLOBALS['phpgw_info']['theme']['th_bg'], + 'bg_h_color' => 'th', 'save_button' => $this->html->submit_button('save','Save'), 'done_button' => $this->html->submit_button('done','Done'), 'lang_valid' => lang('valid path on clientsidevfs::$cmd('$from','$to',$relatives[0],$relatives[1])
\n"; + } $account_id = $GLOBALS['phpgw_info']['user']['account_id']; $f = $this->path_parts ($from, array ($relatives[0])); @@ -1338,6 +1338,11 @@ if ($this->file_type ($f->fake_full_path, array ($f->mask)) != 'Directory') { + if ($this->debug) + { + echo "$cmd('$f->read_full_path','$t->real_full_path')
\n"; + } + if (!$cmd ($f->real_full_path, $t->real_full_path)) { return False; @@ -1394,6 +1399,10 @@ } else /* It's a directory */ { + if ($this->debug) + { + echo "mkdir('$t->real_full_path')
\n"; + } /* First, make the initial directory */ $this->mkdir ($to, array ($relatives[1])); @@ -1452,7 +1461,8 @@ } /*! - @function readlink + @function readlink + @syntax readlink( $file,$relatives ) @abstract read linkdata (target path) for symlink created by symlink @param $path vfs file/directory @param $relatives Relativity array @@ -1461,11 +1471,33 @@ */ function readlink($file,$relatives = '') { - $pp = $this->path_parts ($file, array (RELATIVE_ROOT)); + if (!is_array($relatives)) + { + $relatives = array (RELATIVE_ROOT); + } + $pp = $this->path_parts ($file,$relatives); return @readlink($pp->real_full_path); } + /*! + @function fileinfo + @syntax readlink( $file_id ) + @abstract read infos (row in the db) about a file + @param $file_id identifying the file + @result array with row from db or False + */ + function fileinfo($file_id) + { + $GLOBALS['phpgw']->db->query ($sql="SELECT * FROM phpgw_vfs WHERE file_id=$file_id", __LINE__, __FILE__); + + if (!$GLOBALS['phpgw']->db->next_record()) + { + return False; + } + return array($file_id => $GLOBALS['phpgw']->db->Record); + } + /*! @function mv @abstract move file/directory @@ -2001,6 +2033,10 @@ $p = $this->path_parts ($file, array ($relatives[0])); + if ($this->debug) + { + echo "vfs::file_type('$file',$relatives[0]) p = "; _debug_array($p); + } if (!$this->acl_check ($p->fake_full_path, array ($p->mask), PHPGW_ACL_READ, True)) { return False; @@ -2035,7 +2071,7 @@ @abstract check if file/directory exists @param $string file/directory to check existance of @param $relatives Relativity array - @result Boolean True/False + @result file_id or False */ function file_exists ($string, $relatives = '') { @@ -2054,7 +2090,7 @@ } $query = $GLOBALS['phpgw']->db->query ("SELECT name FROM phpgw_vfs WHERE directory='$p->fake_leading_dirs_clean' AND name='$p->fake_name_clean'" . $this->extra_sql (VFS_SQL_SELECT), __LINE__, __FILE__); - + if ($GLOBALS['phpgw']->db->next_record ()) { return True; diff --git a/infolog/setup/etemplates.inc.php b/infolog/setup/etemplates.inc.php index ba551ae9c3..1b21722887 100644 --- a/infolog/setup/etemplates.inc.php +++ b/infolog/setup/etemplates.inc.php @@ -1,5 +1,5 @@ 'infolog.edit','template' => '','lang' => '','gr $templ_data[] = array('name' => 'infolog.edit','template' => '','lang' => '','group' => '0','version' => '0.9.15.002','data' => 'a:13:{i:0;a:11:{s:1:\"A\";s:3:\"103\";s:1:\"B\";s:3:\"300\";s:1:\"C\";s:3:\"100\";s:2:\"c3\";s:2:\"th\";s:2:\"c4\";s:3:\"row\";s:2:\"c5\";s:3:\"row\";s:2:\"c6\";s:3:\"row\";s:2:\"c8\";s:2:\"th\";s:2:\"c9\";s:3:\"row\";s:3:\"c10\";s:3:\"row\";s:3:\"c11\";s:2:\"th\";}i:1;a:4:{s:1:\"A\";a:4:{s:4:\"type\";s:5:\"label\";s:4:\"size\";s:1:\"b\";s:4:\"span\";s:12:\"3,headertext\";s:4:\"name\";s:9:\"appheader\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:5:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:10:\"Categories\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:4:\"cats\";s:4:\"help\";s:37:\"Edit or create categories for IngoLog\";}}i:2;a:4:{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\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:3;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:4:\"Type\";}s:1:\"B\";a:5:{s:4:\"type\";s:6:\"select\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:9:\"info_type\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:46:\"Type of the log-entry: Note, Phonecall or ToDo\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:4;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:8:\"Category\";}s:1:\"B\";a:5:{s:4:\"type\";s:10:\"select-cat\";s:4:\"size\";s:4:\"None\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:8:\"info_cat\";s:4:\"help\";s:32:\"select a category for this entry\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:5;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Contact\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:5:\"40,64\";s:4:\"name\";s:9:\"info_from\";s:4:\"help\";s:80:\"Custom contact-information, leave emtpy to use information from most recent link\";}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:11:\"Phone/Email\";}s:1:\"D\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:5:\"40,64\";s:4:\"name\";s:9:\"info_addr\";s:4:\"help\";s:76:\"Custom contact-address, leave empty to use information from most recent link\";}}i:6;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Subject\";}s:1:\"B\";a:6:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:5:\"64,64\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:12:\"info_subject\";s:6:\"needed\";s:1:\"1\";s:4:\"help\";s:29:\"a short subject for the entry\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:7;a:4:{s:1:\"A\";a:5:{s:4:\"type\";s:3:\"tab\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:28:\"Description|Links|Delegation\";s:4:\"name\";s:28:\"description|links|delegation\";s:4:\"help\";s:78:\"longer textual description|Links of this entry|responsible user, priority, ...\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:8;a:4:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:21:\"Dates, Status, Access\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:9;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:9:\"Startdate\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"hbox\";s:4:\"size\";s:5:\"2,0,0\";i:1;a:3:{s:4:\"type\";s:4:\"date\";s:4:\"name\";s:14:\"info_startdate\";s:4:\"help\";s:115:\"when should the ToDo or Phonecall be started, it shows up from that date in the filter open or own open (startpage)\";}i:2;a:4:{s:4:\"type\";s:8:\"checkbox\";s:5:\"label\";s:8:\"%s Today\";s:4:\"name\";s:9:\"set_today\";s:4:\"help\";s:21:\"check to set startday\";}}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Enddate\";}s:1:\"D\";a:3:{s:4:\"type\";s:4:\"date\";s:4:\"name\";s:12:\"info_enddate\";s:4:\"help\";s:49:\"til when should the ToDo or Phonecall be finished\";}}i:10;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:6:\"Status\";}s:1:\"B\";a:3:{s:4:\"type\";s:6:\"select\";s:4:\"name\";s:11:\"info_status\";s:4:\"help\";s:12:\"@status_help\";}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Private\";}s:1:\"D\";a:4:{s:4:\"type\";s:8:\"checkbox\";s:4:\"size\";s:14:\"private,public\";s:4:\"name\";s:11:\"info_access\";s:4:\"help\";s:87:\"should this entry only be visible to you and people you grant privat access via the ACL\";}}i:11;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:5:\"Owner\";}s:1:\"B\";a:4:{s:4:\"type\";s:14:\"select-account\";s:4:\"size\";s:3:\",,2\";s:4:\"name\";s:10:\"info_owner\";s:8:\"readonly\";s:1:\"1\";}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:13:\"Last modified\";}s:1:\"D\";a:3:{s:4:\"type\";s:4:\"date\";s:4:\"name\";s:17:\"info_datemodified\";s:8:\"readonly\";s:1:\"1\";}}i:12;a:4:{s:1:\"A\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:4:\"Save\";s:4:\"name\";s:4:\"save\";s:4:\"help\";s:16:\"Saves this entry\";}s:1:\"B\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Cancel\";s:4:\"name\";s:6:\"cancel\";s:4:\"help\";s:31:\"leave without saveing the entry\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:5:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Delete\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:6:\"delete\";s:4:\"help\";s:17:\"delete this entry\";}}}','size' => '100%','style' => '.headertext { color: black; font-size: 120%; }','modified' => '1034875600',); +$templ_data[] = array('name' => 'infolog.edit','template' => '','lang' => '','group' => '0','version' => '0.9.15.003','data' => 'a:13:{i:0;a:11:{s:1:\"A\";s:3:\"103\";s:1:\"B\";s:3:\"300\";s:1:\"C\";s:3:\"100\";s:2:\"c3\";s:2:\"th\";s:2:\"c4\";s:3:\"row\";s:2:\"c5\";s:3:\"row\";s:2:\"c6\";s:3:\"row\";s:2:\"c8\";s:2:\"th\";s:2:\"c9\";s:3:\"row\";s:3:\"c10\";s:3:\"row\";s:3:\"c11\";s:2:\"th\";}i:1;a:4:{s:1:\"A\";a:4:{s:4:\"type\";s:5:\"label\";s:4:\"size\";s:1:\"b\";s:4:\"span\";s:12:\"3,headertext\";s:4:\"name\";s:9:\"appheader\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:5:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:10:\"Categories\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:4:\"cats\";s:4:\"help\";s:37:\"Edit or create categories for IngoLog\";}}i:2;a:4:{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\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:3;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:4:\"Type\";}s:1:\"B\";a:5:{s:4:\"type\";s:6:\"select\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:9:\"info_type\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:46:\"Type of the log-entry: Note, Phonecall or ToDo\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:4;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:8:\"Category\";}s:1:\"B\";a:5:{s:4:\"type\";s:10:\"select-cat\";s:4:\"size\";s:4:\"None\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:8:\"info_cat\";s:4:\"help\";s:32:\"select a category for this entry\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:5;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Contact\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:5:\"40,64\";s:4:\"name\";s:9:\"info_from\";s:4:\"help\";s:80:\"Custom contact-information, leave emtpy to use information from most recent link\";}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:11:\"Phone/Email\";}s:1:\"D\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:5:\"40,64\";s:4:\"name\";s:9:\"info_addr\";s:4:\"help\";s:76:\"Custom contact-address, leave empty to use information from most recent link\";}}i:6;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Subject\";}s:1:\"B\";a:6:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:5:\"64,64\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:12:\"info_subject\";s:6:\"needed\";s:1:\"1\";s:4:\"help\";s:29:\"a short subject for the entry\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:7;a:4:{s:1:\"A\";a:5:{s:4:\"type\";s:3:\"tab\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:28:\"Description|Links|Delegation\";s:4:\"name\";s:28:\"description|links|delegation\";s:4:\"help\";s:78:\"longer textual description|Links of this entry|responsible user, priority, ...\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:8;a:4:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:21:\"Dates, Status, Access\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}}i:9;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:9:\"Startdate\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"hbox\";s:4:\"size\";s:5:\"2,0,0\";i:1;a:3:{s:4:\"type\";s:4:\"date\";s:4:\"name\";s:14:\"info_startdate\";s:4:\"help\";s:115:\"when should the ToDo or Phonecall be started, it shows up from that date in the filter open or own open (startpage)\";}i:2;a:4:{s:4:\"type\";s:8:\"checkbox\";s:5:\"label\";s:8:\"%s Today\";s:4:\"name\";s:9:\"set_today\";s:4:\"help\";s:21:\"check to set startday\";}}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Enddate\";}s:1:\"D\";a:3:{s:4:\"type\";s:4:\"date\";s:4:\"name\";s:12:\"info_enddate\";s:4:\"help\";s:49:\"til when should the ToDo or Phonecall be finished\";}}i:10;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:6:\"Status\";}s:1:\"B\";a:3:{s:4:\"type\";s:6:\"select\";s:4:\"name\";s:11:\"info_status\";s:4:\"help\";s:12:\"@status_help\";}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Private\";}s:1:\"D\";a:4:{s:4:\"type\";s:8:\"checkbox\";s:4:\"size\";s:14:\"private,public\";s:4:\"name\";s:11:\"info_access\";s:4:\"help\";s:87:\"should this entry only be visible to you and people you grant privat access via the ACL\";}}i:11;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:5:\"Owner\";}s:1:\"B\";a:4:{s:4:\"type\";s:14:\"select-account\";s:4:\"size\";s:3:\",,2\";s:4:\"name\";s:10:\"info_owner\";s:8:\"readonly\";s:1:\"1\";}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:13:\"Last modified\";}s:1:\"D\";a:4:{s:4:\"type\";s:4:\"hbox\";s:4:\"size\";s:5:\"2,0,0\";i:1;a:4:{s:4:\"type\";s:14:\"select-account\";s:4:\"size\";s:3:\",,2\";s:4:\"name\";s:13:\"info_modifier\";s:8:\"readonly\";s:1:\"1\";}i:2;a:4:{s:4:\"type\";s:4:\"date\";s:4:\"span\";s:10:\",lpadding5\";s:4:\"name\";s:17:\"info_datemodified\";s:8:\"readonly\";s:1:\"1\";}}}i:12;a:4:{s:1:\"A\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:4:\"Save\";s:4:\"name\";s:4:\"save\";s:4:\"help\";s:16:\"Saves this entry\";}s:1:\"B\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Cancel\";s:4:\"name\";s:6:\"cancel\";s:4:\"help\";s:31:\"leave without saveing the entry\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:5:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Delete\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:6:\"delete\";s:4:\"help\";s:17:\"delete this entry\";}}}','size' => '100%','style' => '.headertext { color: black; font-size: 120%; } +.lpadding5 { padding-left: 5px; };','modified' => '1034974858',); + $templ_data[] = array('name' => 'infolog.edit.delegation','template' => '','lang' => '','group' => '0','version' => '0.9.15.001','data' => 'a:7:{i:0;a:8:{s:1:\"A\";s:3:\"100\";s:2:\"h6\";s:3:\"120\";s:2:\"c1\";s:2:\"th\";s:2:\"c2\";s:3:\"row\";s:2:\"c3\";s:2:\"th\";s:2:\"c4\";s:3:\"row\";s:2:\"c5\";s:3:\"row\";s:2:\"c6\";s:3:\"row\";}i:1;a:2:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:8:\"Priority\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:2;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:8:\"Priority\";}s:1:\"B\";a:3:{s:4:\"type\";s:6:\"select\";s:4:\"name\";s:8:\"info_pri\";s:4:\"help\";s:31:\"select a priority for this task\";}}i:3;a:2:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:10:\"Delegation\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:4;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:11:\"Responsible\";}s:1:\"B\";a:4:{s:4:\"type\";s:14:\"select-account\";s:4:\"size\";s:5:\"Owner\";s:4:\"name\";s:16:\"info_responsible\";s:4:\"help\";s:66:\"select a responsible user: a person you want to delegate this task\";}}i:5;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Confirm\";}s:1:\"B\";a:3:{s:4:\"type\";s:6:\"select\";s:4:\"name\";s:12:\"info_confirm\";s:4:\"help\";s:87:\"do you want a confirmation of the responsible on: accepting, finishing the task or both\";}}i:6;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}}','size' => '100%','style' => '','modified' => '1034160051',); $templ_data[] = array('name' => 'infolog.edit.description','template' => '','lang' => '','group' => '0','version' => '0.9.15.001','data' => 'a:3:{i:0;a:3:{s:1:\"A\";s:3:\"100\";s:2:\"c1\";s:2:\"th\";s:2:\"c2\";s:3:\"row\";}i:1;a:2:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:11:\"Description\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:2;a:2:{s:1:\"A\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"B\";a:5:{s:4:\"type\";s:8:\"textarea\";s:4:\"size\";s:5:\"15,80\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:8:\"info_des\";s:4:\"help\";s:44:\"enter a textual description of the log-entry\";}}}','size' => '100%,,0','style' => '','modified' => '1034103624',); @@ -17,6 +20,8 @@ $templ_data[] = array('name' => 'infolog.edit.links','template' => '','lang' => $templ_data[] = array('name' => 'infolog.edit.links','template' => '','lang' => '','group' => '0','version' => '0.9.15.002','data' => 'a:5:{i:0;a:6:{s:1:\"A\";s:3:\"100\";s:2:\"h4\";s:3:\"164\";s:2:\"c1\";s:2:\"th\";s:2:\"c2\";s:3:\"row\";s:2:\"c3\";s:2:\"th\";s:2:\"c4\";s:11:\"row_off,top\";}i:1;a:2:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:16:\"Create new links\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:2;a:2:{s:1:\"A\";a:3:{s:4:\"type\";s:7:\"link-to\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:7:\"link_to\";}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:4:\"span\";s:3:\"all\";s:5:\"label\";s:14:\"Existing links\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:4;a:2:{s:1:\"A\";a:3:{s:4:\"type\";s:9:\"link-list\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:7:\"link_to\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}}','size' => '100%','style' => '','modified' => '1034157822',); +$templ_data[] = array('name' => 'infolog.edit.links','template' => '','lang' => '','group' => '0','version' => '0.9.15.003','data' => 'a:5:{i:0;a:6:{s:1:\"A\";s:3:\"100\";s:2:\"h4\";s:3:\"164\";s:2:\"c1\";s:2:\"th\";s:2:\"c2\";s:3:\"row\";s:2:\"c3\";s:2:\"th\";s:2:\"c4\";s:11:\"row_off,top\";}i:1;a:1:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:16:\"Create new links\";}}i:2;a:1:{s:1:\"A\";a:2:{s:4:\"type\";s:7:\"link-to\";s:4:\"name\";s:7:\"link_to\";}}i:3;a:1:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:14:\"Existing links\";}}i:4;a:1:{s:1:\"A\";a:2:{s:4:\"type\";s:9:\"link-list\";s:4:\"name\";s:7:\"link_to\";}}}','size' => '100%','style' => '','modified' => '1035030836',); + $templ_data[] = array('name' => 'infolog.index','template' => '','lang' => '','group' => '0','version' => '0.9.15.001','data' => 'a:5:{i:0;a:1:{s:1:\"A\";s:3:\"90%\";}i:1;a:5:{s:1:\"A\";a:5:{s:4:\"type\";s:5:\"label\";s:4:\"size\";s:1:\"b\";s:4:\"span\";s:11:\",headertext\";s:5:\"label\";s:7:\"InfoLog\";s:4:\"name\";s:9:\"appheader\";}s:1:\"B\";a:3:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:11:\",headertext\";s:5:\"label\";s:4:\"Add:\";}s:1:\"C\";a:6:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:4:\"task\";s:5:\"label\";s:4:\"ToDo\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:9:\"add[task]\";s:4:\"help\";s:14:\"Add a new ToDo\";}s:1:\"D\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:5:\"phone\";s:5:\"label\";s:9:\"Phonecall\";s:4:\"name\";s:10:\"add[phone]\";s:4:\"help\";s:19:\"Add a new Phonecall\";}s:1:\"E\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:4:\"note\";s:5:\"label\";s:4:\"Note\";s:4:\"name\";s:9:\"add[note]\";s:4:\"help\";s:14:\"Add a new Note\";}}i:2;a:5:{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\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}}i:3;a:5:{s:1:\"A\";a:4:{s:4:\"type\";s:9:\"nextmatch\";s:4:\"size\";s:18:\"infolog.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\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}}i:4;a:5:{s:1:\"A\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:3:\"Add\";s:4:\"name\";s:9:\"add[note]\";s:4:\"help\";s:15:\"Add a new Entry\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}}}','size' => '100%,,0,,0,0','style' => '.headertext { color: black; font-size: 120%; }','modified' => '1034338369',); $templ_data[] = array('name' => 'infolog.index','template' => '','lang' => '','group' => '0','version' => '0.9.15.002','data' => 'a:6:{i:0;a:2:{s:1:\"A\";s:3:\"90%\";s:2:\"h3\";s:7:\",!@main\";}i:1;a:5:{s:1:\"A\";a:4:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:11:\",headertext\";s:5:\"label\";s:7:\"InfoLog\";s:4:\"name\";s:9:\"appheader\";}s:1:\"B\";a:3:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:11:\",headertext\";s:5:\"label\";s:4:\"Add:\";}s:1:\"C\";a:6:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:4:\"task\";s:5:\"label\";s:4:\"ToDo\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:9:\"add[task]\";s:4:\"help\";s:14:\"Add a new ToDo\";}s:1:\"D\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:5:\"phone\";s:5:\"label\";s:9:\"Phonecall\";s:4:\"name\";s:10:\"add[phone]\";s:4:\"help\";s:19:\"Add a new Phonecall\";}s:1:\"E\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:4:\"note\";s:5:\"label\";s:4:\"Note\";s:4:\"name\";s:9:\"add[note]\";s:4:\"help\";s:14:\"Add a new Note\";}}i:2;a:5:{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\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}}i:3;a:5:{s:1:\"A\";a:4:{s:4:\"type\";s:8:\"template\";s:4:\"size\";s:4:\"main\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:4:\"rows\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}}i:4;a:5:{s:1:\"A\";a:4:{s:4:\"type\";s:9:\"nextmatch\";s:4:\"size\";s:18:\"infolog.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\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}}i:5;a:5:{s:1:\"A\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:3:\"Add\";s:4:\"name\";s:9:\"add[note]\";s:4:\"help\";s:15:\"Add a new Entry\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}}}','size' => '100%,,0,,0,0','style' => '.headertext { color: black; font-size: 120%; }','modified' => '1034538966',); diff --git a/infolog/templates/default/edit.xet b/infolog/templates/default/edit.xet index 44cd656e72..046114cfaf 100644 --- a/infolog/templates/default/edit.xet +++ b/infolog/templates/default/edit.xet @@ -71,7 +71,7 @@