From 7f5bd51300bc7561118b6b4c00d2db6cd5fda371 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 19 Mar 2020 08:47:56 +0100 Subject: [PATCH] remove createDownloadLink and getDownloadLinks --- SeedDMS_Core/Core/inc.ClassDocument.php | 31 ------------------------- 1 file changed, 31 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index e86b53b52..35b8ed9f9 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -6102,37 +6102,6 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return $needwkflaction; } /* }}} */ - /** - * Create a new download link - * - * @param SeedDMS_Core_User $user - * @param string $expirationdate - * @return boolean true if link could be created, otherwise false - */ - function createDownloadLink($user, $expirationdate) { /* {{{ */ - $db = $this->_document->_dms->getDB(); - $hash = md5(uniqid()); - $queryStr = "INSERT INTO tblDownloadLinks (document, version, userID, hash) VALUES (".$this->_document->getID().", ".$this->_version.", ".$user->getID().", '".$hash."')"; - if (!$db->getResult($queryStr)) { - return false; - } - $id = $db->getInsertID(); - - return SeedDMS_Core_DownloadLink::getInstance($id, $this->_document->_dms); - } /* }}} */ - - /** - * Get all download links of version - * - * @param SeedDMS_Core_User $user - * @param object $user return only links created by this user - * @param boolean $all set to true if expired links shall be returned - * @return array list of links - */ - function getDownloadLinks($user=null, $all=false) { /* {{{ */ - return SeedDMS_Core_DownloadLink::getAllInstances($user, $this->_version, $this->_document->_dms); - } /* }}} */ - } /* }}} */