diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2013-12-18 14:03:31 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2013-12-18 14:03:31 +0000 |
commit | da47846dfbcad92d2a0fd7c5f15f57bada71ded5 (patch) | |
tree | c174ccc88227bb5753ee5b2b888636d6020bd0f5 /main/owncloud | |
parent | 58d6cebcdcee809ac4c64ff9191dc4e808698461 (diff) | |
download | aports-da47846dfbcad92d2a0fd7c5f15f57bada71ded5.tar.bz2 aports-da47846dfbcad92d2a0fd7c5f15f57bada71ded5.tar.xz |
main/owncloud: add missing patch
Diffstat (limited to 'main/owncloud')
-rw-r--r-- | main/owncloud/APKBUILD | 2 | ||||
-rw-r--r-- | main/owncloud/owncloud-5.0.13-remove-shares-where-files-do-not-exist-postgres.patch | 44 |
2 files changed, 45 insertions, 1 deletions
diff --git a/main/owncloud/APKBUILD b/main/owncloud/APKBUILD index af3bbdfb55..241ff60995 100644 --- a/main/owncloud/APKBUILD +++ b/main/owncloud/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname="owncloud" pkgver="5.0.14a" -pkgrel=1 +pkgrel=2 pkgdesc="Your own WebDAV-based cloud service" url="http://owncloud.org" arch="noarch" diff --git a/main/owncloud/owncloud-5.0.13-remove-shares-where-files-do-not-exist-postgres.patch b/main/owncloud/owncloud-5.0.13-remove-shares-where-files-do-not-exist-postgres.patch new file mode 100644 index 0000000000..be239aa1d7 --- /dev/null +++ b/main/owncloud/owncloud-5.0.13-remove-shares-where-files-do-not-exist-postgres.patch @@ -0,0 +1,44 @@ +From 8509994c2a7f3cdddbb48b8a1f6a952b437a315c Mon Sep 17 00:00:00 2001 +From: Jamie McClelland <jm@mayfirst.org> +Date: Sat, 23 Nov 2013 19:47:45 -0500 +Subject: [PATCH] fix update to remove shares where file doesn't exist on + postgres + +Without patch, breaks with: Failed to upgrade "files_sharing". +Exception="SQLSTATE[22P02]: Invalid text representation: 7 ERROR: +invalid input syntax for integer: "5,179"" + +See: https://github.com/owncloud/core/issues/5758 +--- + apps/files_sharing/appinfo/update.php | 17 +++-------------- + 1 file changed, 3 insertions(+), 14 deletions(-) + +diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php +index 0d827da..721b53e 100644 +--- a/apps/files_sharing/appinfo/update.php ++++ b/apps/files_sharing/appinfo/update.php +@@ -71,18 +71,7 @@ + + // clean up oc_share table from files which are no longer exists + if (version_compare($installedVersion, '0.3.5', '<')) { +- +- // get all shares where the original file no longer exists +- $findShares = \OC_DB::prepare('SELECT `file_source` FROM `*PREFIX*share` LEFT JOIN `*PREFIX*filecache` ON `file_source` = `*PREFIX*filecache`.`fileid` WHERE `*PREFIX*filecache`.`fileid` IS NULL AND `*PREFIX*share`.`item_type` IN (\'file\', \'folder\')'); +- $sharesFound = $findShares->execute(array())->fetchAll(); +- +- // delete those shares from the oc_share table +- if (is_array($sharesFound) && !empty($sharesFound)) { +- $delArray = array(); +- foreach ($sharesFound as $share) { +- $delArray[] = $share['file_source']; +- } +- $removeShares = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `file_source` IN (?)'); +- $result = $removeShares->execute(array(implode(',', $delArray))); +- } ++ // delete all shares where the original file no longer exists ++ $removeShares = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `file_source` IN (SELECT `file_source` FROM `*PREFIX*share` LEFT JOIN `*PREFIX*filecache` ON `file_source` = `*PREFIX*filecache`.`fileid` WHERE `*PREFIX*filecache`.`fileid` IS NULL AND `*PREFIX*share`.`item_type` IN (\'file\', \'folder\'))'); ++ $result = $removeShares->execute(array(implode(',', $delArray))); + } +-- +1.8.4 + |