*/
public static function _handleFile($link)
{
- if (!CubeIT_Util_Url::isDistant($link->to)) {
- $e = explode('.', $link->to);
+ $to=preg_replace('/^data\/links\//','',$link->to);
+ if (!CubeIT_Util_Url::isDistant($to)) {
+ $e = explode('.', $to);
$ext = array_pop($e);
if ($ext === 'oam' || $ext === 'zip') {
if ($ext === 'oam') {
- $d = $link->unzipFile($link->to, true);
+ $d = $link->unzipFile($to, true);
$config = $link->getConfigOAM($d['dir']);
$link->copyExternalDir($d['dir'], $d['fdir']);
} else if ($ext === 'zip') {
- $d = $link->unzipFile($link->to, false);
+ $d = $link->unzipFile($to, false);
$config = $link->getConfigZip($d['dir']);
$link->copyExternalDir($d['dir'], $d['fdir']);
}
}
} else {
$link->_defaultTooltip = 'click to open the file';
- $link->copyExternalFile($link->to);
- return wsHTML5Link::getUniversalLocation($link->to);
+ $link->copyExternalFile($to);
+ return wsHTML5Link::getUniversalLocation($to);
}
}
- return $link->to;
+ return $to;
}
}