case 'clear_items': case 'paste_items': if ($edit_perms && is_array($vars->items) && count($vars->items)) { foreach ($vars->items as $val) { if (isset($clipboard[$val])) { $file = $clipboard[$val]; if ($vars->actionID == 'paste_items') { try { if ($file['action'] == 'cut') { Gollem::moveFile($file['backend'], $file['path'], $file['name'], $backkey, $old_dir); } else { Gollem::copyFile($file['backend'], $file['path'], $file['name'], $backkey, $old_dir); } Gollem::expireCache($old_dir); if ($file['action'] == 'cut') { Gollem::expireCache($file['path']); } $notification->push(sprintf(_("%s was successfully pasted."), $file['name'], $old_dir), 'horde.success'); } catch (Horde_Vfs_Exception $e) { $notification->push(sprintf(_("Cannot paste \"%s\" (file cleared from clipboard): %s"), $file['name'], $e->getMessage()), 'horde.error'); } } unset($clipboard[$val]); } } $session->set('gollem', 'clipboard', array_values($clipboard)); } break; case 'change_sortby': if (isset($vars->sortby)) { $prefs->setValue('sortby', $vars->sortby);