';
// }
//}
if (!$node instanceof DAV\ICollection)
return;
// We also know fairly certain that if an object is a non-extended
// SimpleCollection, we won't need to show the panel either.
if (get_class($node)==='Sabre\\DAV\\SimpleCollection')
return;
$output.= '
'.t('Create new folder').'
'.t('Upload file').'
';
}
/**
* This method takes a path/name of an asset and turns it into url
* suiteable for http access.
*
* @param string $assetName
* @return string
*/
protected function getAssetUrl($assetName) {
return z_root() .'/cloud/?sabreAction=asset&assetName=' . urlencode($assetName);
}
protected function findAttachHash($owner, $parentHash, $attachName) {
$r = q("select * from attach where uid = %d and folder = '%s' and filename = '%s' order by edited desc limit 1",
intval($owner), dbesc($parentHash), dbesc($attachName)
);
$hash = "";
if($r) {
foreach($r as $rr) {
$hash = $rr['hash'];
}
}
return $hash;
}
protected function findAttachIdByHash($attachHash) {
$r = q("select * from attach where hash = '%s' order by edited desc limit 1",
dbesc($attachHash)
);
$id = "";
if($r) {
foreach($r as $rr) {
$id = $rr['id'];
}
}
return $id;
}
}