diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/appinfo/app.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/install.php | 22 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/update.php | 1 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/version | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/mountprovider.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 7 | ||||
-rw-r--r-- | apps/user_ldap/appinfo/app.php | 3 | ||||
-rw-r--r-- | apps/user_ldap/appinfo/install.php | 3 | ||||
-rw-r--r-- | apps/user_ldap/appinfo/update.php | 3 | ||||
-rw-r--r-- | apps/user_ldap/appinfo/version | 2 |
10 files changed, 37 insertions, 16 deletions
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php index 9000fafd8dd..295d013beff 100644 --- a/apps/files_sharing/appinfo/app.php +++ b/apps/files_sharing/appinfo/app.php @@ -58,10 +58,6 @@ $application->setupPropagation(); \OCP\Util::addScript('files_sharing', 'external'); \OCP\Util::addStyle('files_sharing', 'sharetabview'); -// FIXME: registering a job here will cause additional useless SQL queries -// when the route is not cron.php, needs a better way -\OC::$server->getJobList()->add('OCA\Files_sharing\Lib\DeleteOrphanedSharesJob'); - \OC::$server->getActivityManager()->registerExtension(function() { return new \OCA\Files_Sharing\Activity( \OC::$server->query('L10NFactory'), diff --git a/apps/files_sharing/appinfo/install.php b/apps/files_sharing/appinfo/install.php new file mode 100644 index 00000000000..f076a17e444 --- /dev/null +++ b/apps/files_sharing/appinfo/install.php @@ -0,0 +1,22 @@ +<?php +/** + * @author Joas Schilling <nickvergessen@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +\OC::$server->getJobList()->add('OCA\Files_sharing\Lib\DeleteOrphanedSharesJob'); diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php index e98b60ea36d..66b8b78cacf 100644 --- a/apps/files_sharing/appinfo/update.php +++ b/apps/files_sharing/appinfo/update.php @@ -28,3 +28,4 @@ if (version_compare($installedVersion, '0.6.0', '<')) { $m->addAcceptRow(); } +\OC::$server->getJobList()->add('OCA\Files_sharing\Lib\DeleteOrphanedSharesJob'); diff --git a/apps/files_sharing/appinfo/version b/apps/files_sharing/appinfo/version index b6160487433..844f6a91acb 100644 --- a/apps/files_sharing/appinfo/version +++ b/apps/files_sharing/appinfo/version @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/apps/files_sharing/lib/mountprovider.php b/apps/files_sharing/lib/mountprovider.php index 3f59fd131d0..14a79625993 100644 --- a/apps/files_sharing/lib/mountprovider.php +++ b/apps/files_sharing/lib/mountprovider.php @@ -66,12 +66,6 @@ class MountProvider implements IMountProvider { return $share['permissions'] > 0; }); $shares = array_map(function ($share) use ($user, $storageFactory) { - try { - Filesystem::initMountPoints($share['uid_owner']); - } catch(NoUserException $e) { - \OC::$server->getLogger()->warning('The user \'' . $share['uid_owner'] . '\' of share with ID \'' . $share['id'] . '\' can\'t be retrieved.', array('app' => 'files_sharing')); - return null; - } // for updating etags for the share owner when we make changes to this share. $ownerPropagator = $this->propagationManager->getChangePropagator($share['uid_owner']); diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index c7529df0617..1ac401f3cf8 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -55,6 +55,10 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { $this->ownerView = $arguments['ownerView']; } + private function init() { + Filesystem::initMountPoints($this->share['uid_owner']); + } + /** * get id of the mount point * @@ -80,6 +84,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { * @return array Returns array with the keys path, permissions, and owner or false if not found */ public function getFile($target) { + $this->init(); if (!isset($this->files[$target])) { // Check for partial files if (pathinfo($target, PATHINFO_EXTENSION) === 'part') { @@ -319,7 +324,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { } public function rename($path1, $path2) { - + $this->init(); // we need the paths relative to data/user/files $relPath1 = $this->getMountPoint() . '/' . $path1; $relPath2 = $this->getMountPoint() . '/' . $path2; diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index 68fd1b698e0..60c2accdccb 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -59,9 +59,6 @@ if(count($configPrefixes) > 0) { OC_Group::useBackend($groupBackend); } -OCP\Backgroundjob::registerJob('OCA\user_ldap\lib\Jobs'); -OCP\Backgroundjob::registerJob('\OCA\User_LDAP\Jobs\CleanUp'); - \OCP\Util::connectHook( '\OCA\Files_Sharing\API\Server2Server', 'preLoginNameUsedAsUserName', diff --git a/apps/user_ldap/appinfo/install.php b/apps/user_ldap/appinfo/install.php index 0b3f84b8baf..f70eb746480 100644 --- a/apps/user_ldap/appinfo/install.php +++ b/apps/user_ldap/appinfo/install.php @@ -23,3 +23,6 @@ $state = OCP\Config::getSystemValue('ldapIgnoreNamingRules', 'doSet'); if($state === 'doSet') { OCP\Config::setSystemValue('ldapIgnoreNamingRules', false); } + +OCP\Backgroundjob::registerJob('OCA\user_ldap\lib\Jobs'); +OCP\Backgroundjob::registerJob('\OCA\User_LDAP\Jobs\CleanUp'); diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php index 4907db0cdae..33a7219644b 100644 --- a/apps/user_ldap/appinfo/update.php +++ b/apps/user_ldap/appinfo/update.php @@ -34,3 +34,6 @@ if(version_compare($installedVersion, '0.6.2', '<')) { \OC::$server->getConfig()->deleteAppValue('user_ldap', $prefix . "ldap_nocase"); } } + +OCP\Backgroundjob::registerJob('OCA\user_ldap\lib\Jobs'); +OCP\Backgroundjob::registerJob('\OCA\User_LDAP\Jobs\CleanUp'); diff --git a/apps/user_ldap/appinfo/version b/apps/user_ldap/appinfo/version index b6160487433..844f6a91acb 100644 --- a/apps/user_ldap/appinfo/version +++ b/apps/user_ldap/appinfo/version @@ -1 +1 @@ -0.6.2 +0.6.3 |