[Pkg-owncloud-commits] [owncloud] 09/32: rely only on php DateTime to parse the db datetime string

David Prévot taffit at moszumanska.debian.org
Sun Dec 15 01:47:31 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit f8088ecd29af75072f96a3841709faf72c6e8fa1
Author: Jörn Friedrich Dreyer <jfd at butonic.de>
Date:   Thu Dec 12 19:09:21 2013 +0100

    rely only on php DateTime to parse the db datetime string
---
 lib/public/share.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/public/share.php b/lib/public/share.php
index 6b3397c..f0fd8e1 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -850,9 +850,8 @@ class Share {
 	protected static function expireItem(array $item) {
 		if (!empty($item['expiration'])) {
 			$now = new \DateTime();
-			$expirationDate = \Doctrine\DBAL\Types\Type::getType('datetime')
-				->convertToPhpValue($item['expiration'], \OC_DB::getConnection()->getDatabasePlatform());
-			if ($now > $expirationDate) {
+			$expires = new \DateTime($item['expiration']);
+			if ($now > $expires) {
 				self::unshareItem($item);
 				return true;
 			}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list