mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
allow to additionally use just a name for which content array contains a path to upload pictures
This commit is contained in:
parent
988c79319d
commit
5bf8630620
@ -49,7 +49,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
|
|||||||
'type':'boolean',
|
'type':'boolean',
|
||||||
'description': 'Have the toolbar expanded (visible)'
|
'description': 'Have the toolbar expanded (visible)'
|
||||||
},
|
},
|
||||||
'base_href': {
|
'base_href': { // seems not to be used anymore
|
||||||
'name': 'Image base path',
|
'name': 'Image base path',
|
||||||
'default': et2_no_init,
|
'default': et2_no_init,
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
@ -71,7 +71,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
|
|||||||
},
|
},
|
||||||
imageUpload: {
|
imageUpload: {
|
||||||
name: "imageUpload",
|
name: "imageUpload",
|
||||||
description: "Url to upload images dragged in or id of link_to widget to it's vfs upload",
|
description: "Url to upload images dragged in or id of link_to widget to it's vfs upload. Can also be just a name for which content array contains a path to upload the picture.",
|
||||||
type: "string",
|
type: "string",
|
||||||
default: null
|
default: null
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,8 @@ class Vfs extends File
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$data = self::$request->content[$widget_id];
|
$data = self::$request->content[$widget_id];
|
||||||
$path = self::store_file($path = self::get_vfs_path($data['to_app'].':'.$data['to_id']).'/', $_FILES['upload']);
|
$path = self::store_file($path = (!is_array($data) && $data[0] == '/' ? $data :
|
||||||
|
self::get_vfs_path($data['to_app'].':'.$data['to_id'])).'/', $_FILES['upload']);
|
||||||
|
|
||||||
// store temp. vfs-path like links to be able to move it to correct location after entry is stored
|
// store temp. vfs-path like links to be able to move it to correct location after entry is stored
|
||||||
if (!$data['to_id'] || is_array($data['to_id']))
|
if (!$data['to_id'] || is_array($data['to_id']))
|
||||||
|
Loading…
Reference in New Issue
Block a user