Author: ralfbecker
New Revision: 55454
URL: http://svn.stylite.de/viewvc/egroupware?rev=55454&view=rev
Log:
replace egw_sharing with Api\Vfs\Sharing
Modified:
trunk/mail/inc/class.mail_compose.inc.php
trunk/mail/profile.php
— trunk/mail/inc/class.mail_compose.inc.php (original)
+++ trunk/mail/inc/class.mail_compose.inc.php Mon Mar 21 11:30:48 2016
@@ -5,10 +5,12 @@
+use EGroupware\Api\Vfs;
/**
- Mail interface class for compose mails in popup
@@ -327,10 +329,10 @@
foreach ($_content[‘selectFromVFSForCompose’] as $i => $path)
{
$_content[‘uploadForCompose’][] = array(
-
'name' => egw_vfs::basename($path),
-
'type' => egw_vfs::mime_content_type($path),
-
'file' => egw_vfs::PREFIX.$path,
-
'size' => filesize(egw_vfs::PREFIX.$path),
-
'name' => Vfs::basename($path),
-
'type' => Vfs::mime_content_type($path),
-
'file' => Vfs::PREFIX.$path,
-
'size' => filesize(Vfs::PREFIX.$path),
);
}
unset($_content['selectFromVFSForCompose']);
@@ -352,9 +354,9 @@
unset($_content[‘uploadForCompose’][$i]);
continue;
}
-
if (is_dir($upload['file']) && (!$_content['filemode'] || $_content['filemode'] == Vfs\Sharing::ATTACH))
-
{
-
$_content['filemode'] = Vfs\Sharing::READONLY;
egw_framework::message(lang('Directories have to be shared.'), 'info');
}
}
@@ -879,8 +881,8 @@
if (isset($_REQUEST[‘preset’][‘file’]))
{
$content[‘filemode’] = !empty($_REQUEST[‘preset’][‘filemode’]) &&
-
isset(Vfs\Sharing::$modes[$_REQUEST['preset']['filemode']]) ?
-
$_REQUEST['preset']['filemode'] : Vfs\Sharing::ATTACH;
$names = (array)$_REQUEST['preset']['name'];
$types = (array)$_REQUEST['preset']['type'];
@@ -895,14 +897,14 @@
//error_log(METHOD.LINE.$path.’->’.array2string(parse_url($path,PHP_URL_SCHEME == ‘vfs’)));
if (parse_url($path,PHP_URL_SCHEME == ‘vfs’))
{
-
//Vfs::load_wrapper('vfs');
-
$type = Vfs::mime_content_type($path);
// special handling for attaching vCard of iCal --> use their link-title as name
if (substr($path,-7) != '/.entry' ||
!(list($app,$id) = array_slice(explode('/',$path),-3)) ||
!($name = egw_link::title($app, $id)))
{
@@ -912,12 +914,12 @@
$formData = array(
‘name’ => $name,
‘type’ => $type,
-
'file' => egw_vfs::decodePath($path),
-
'size' => filesize(egw_vfs::decodePath($path)),
-
'file' => Vfs::decodePath($path),
-
'size' => filesize(Vfs::decodePath($path)),
);
@@ -1241,7 +1243,7 @@
if (isset($content[‘mimeType’])) $preserv[‘mimeType’] = $content[‘mimeType’];
$sel_options[‘mimeType’] = self::$mimeTypes;
$sel_options[‘priority’] = self::$priorities;
@@ -1416,7 +1418,7 @@
if(count($merge_ids) <= 1)
{
$results = $this->mail_bo->importMessageToMergeAndSend(
-
$document_merge, egw_vfs::PREFIX . $_REQUEST['document'], $merge_ids, $folder, $merged_mail_id
-
$document_merge, Vfs::PREFIX . $_REQUEST['document'], $merge_ids, $folder, $merged_mail_id
);
// Open compose
@@ -1838,7 +1840,7 @@
//error_log(METHOD.LINE.array2string($_GET));
if (parse_url($attachment[‘tmp_name’],PHP_URL_SCHEME) == ‘vfs’)
{
@@ -2304,7 +2306,7 @@
$signature = mail_bo::merge($signature,array($GLOBALS[‘egw’]->accounts->id2name($GLOBALS[‘egw_info’][‘user’][‘account_id’],‘person_id’)));
}
*/
-
if ($_formData['attachments'] && $_formData['filemode'] != Vfs\Sharing::ATTACH && !$_autosaving)
{
$attachment_links = $this->getAttachmentLinks($_formData['attachments'], $_formData['filemode'],
$_formData['mimeType'] == 'html',
@@ -2422,11 +2424,11 @@
}
}
// attach files not for autosaving
@@ -2451,7 +2453,7 @@
* We only care about file attachments, not forwarded messages or parts
*
* @param array $attachments
-
-
@param string $filemode egw_sharing::(ATTACH|LINK|READONL|WRITABLE)
-
-
@param string $filemode Vfs\Sharing::(ATTACH|LINK|READONL|WRITABLE)
-
@param boolean $html
-
@param array $recipients =array()
-
@param string $expiration =null
@@ -2460,7 +2462,7 @@
*/
protected function getAttachmentLinks(array $attachments, $filemode, $html, $recipients=array(), $expiration=null, $password=null)
{
@@ -2472,26 +2474,26 @@
$path = $GLOBALS[‘egw_info’][‘server’][‘temp_dir’].SEP.basename($path);
}
// create share
-
if ($filemode == Vfs\Sharing::WRITABLE || $expiration || $password)
{
$share = stylite_sharing::create($path, $filemode, $attachment['name'], $recipients, $expiration, $password);
}
else
{
-
$share = egw_sharing::create($path, $filemode, $attachment['name'], $recipients);
-
}
-
$link = egw_sharing::share2link($share);
-
-
$name = egw_vfs::basename($attachment['name'] ? $attachment['name'] : $attachment['file']);
-
$share = Vfs\Sharing::create($path, $filemode, $attachment['name'], $recipients);
-
}
-
$link = Vfs\Sharing::share2link($share);
-
-
$name = Vfs::basename($attachment['name'] ? $attachment['name'] : $attachment['file']);
if ($html)
{
$links[] = html::a_href($name, $link).' '.
@@ -3475,7 +3477,7 @@
// Actually do the merge
$folder = $merged_mail_id = null;
$results = $this->mail_bo->importMessageToMergeAndSend(
-
$document_merge, Vfs::PREFIX . $_REQUEST['document'],
// Send an extra non-numeric ID to force actual send of document
// instead of save as draft
array((int)$contact_id, ''),
— trunk/mail/profile.php (original)
+++ trunk/mail/profile.php Mon Mar 21 11:30:48 2016
@@ -24,11 +24,10 @@
‘disable_Template_class’ => True,
‘noheader’ => True,
‘currentapp’ => ‘mail’,
$headertime = microtime(true);
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs