diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/app.php | 2 | ||||
-rw-r--r-- | lib/private/files/filesystem.php | 2 | ||||
-rw-r--r-- | lib/private/files/view.php | 6 | ||||
-rw-r--r-- | lib/private/server.php | 2 | ||||
-rw-r--r-- | lib/private/share/hooks.php | 4 | ||||
-rw-r--r-- | lib/private/updater.php | 8 |
6 files changed, 18 insertions, 6 deletions
diff --git a/lib/private/app.php b/lib/private/app.php index 6c38cdb8223..6f0abf58e17 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -1173,6 +1173,8 @@ class OC_App { $appData = self::getAppInfo($appId); if (array_key_exists('ocsid', $appData)) { OC_Appconfig::setValue($appId, 'ocsid', $appData['ocsid']); + } elseif(OC_Appconfig::getValue($appId, 'ocsid', null) !== null) { + OC_Appconfig::deleteKey($appId, 'ocsid'); } foreach ($appData['remote'] as $name => $path) { OCP\CONFIG::setAppValue('core', 'remote_' . $name, $appId . '/' . $path); diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index 9c125f56c62..7d45d949b47 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -344,7 +344,7 @@ class Filesystem { if (is_null($userObject)) { \OCP\Util::writeLog('files', ' Backends provided no user object for '.$user, \OCP\Util::ERROR); - throw new \OC\User\NoUserException(); + throw new \OC\User\NoUserException('Backends provided no user object for ' . $user); } $homeStorage = \OC_Config::getValue( 'objectstore' ); diff --git a/lib/private/files/view.php b/lib/private/files/view.php index b07225cca56..1ad59fd9123 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -898,7 +898,8 @@ class View { if ($this->fakeRoot === $defaultRoot) { return true; } - return (strlen($this->fakeRoot) > strlen($defaultRoot)) && (substr($this->fakeRoot, 0, strlen($defaultRoot) + 1) === $defaultRoot . '/'); + $fullPath = $this->getAbsolutePath($path); + return (strlen($fullPath) > strlen($defaultRoot)) && (substr($fullPath, 0, strlen($defaultRoot) + 1) === $defaultRoot . '/'); } /** @@ -908,10 +909,11 @@ class View { * @return bool */ private function runHooks($hooks, $path, $post = false) { + $relativePath = $path; $path = $this->getHookPath($path); $prefix = ($post) ? 'post_' : ''; $run = true; - if ($this->shouldEmitHooks($path)) { + if ($this->shouldEmitHooks($relativePath)) { foreach ($hooks as $hook) { if ($hook != 'read') { \OC_Hook::emit( diff --git a/lib/private/server.php b/lib/private/server.php index 957de1450b2..452a9ff489e 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -122,6 +122,8 @@ class Server extends SimpleContainer implements IServerContainer { }); $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { \OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); + //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks + \OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); }); return $groupManager; }); diff --git a/lib/private/share/hooks.php b/lib/private/share/hooks.php index 66b197b921b..3cf5ceb1177 100644 --- a/lib/private/share/hooks.php +++ b/lib/private/share/hooks.php @@ -61,12 +61,12 @@ class Hooks extends \OC\Share\Constants { $itemTarget = $sourceExists['item_target']; } else { $itemTarget = Helper::generateTarget($item['item_type'], $item['item_source'], self::SHARE_TYPE_USER, $arguments['uid'], - $item['owner'], null, $item['parent']); + $item['uid_owner'], null, $item['parent']); // do we also need a file target if ($item['item_type'] === 'file' || $item['item_type'] === 'folder') { $fileTarget = Helper::generateTarget('file', $item['file_target'], self::SHARE_TYPE_USER, $arguments['uid'], - $item['owner'], null, $item['parent']); + $item['uid_owner'], null, $item['parent']); } else { $fileTarget = null; } diff --git a/lib/private/updater.php b/lib/private/updater.php index d28060c100a..4d2f3ab7d75 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -159,14 +159,20 @@ class Updater extends BasicEmitter { } $this->emit('\OC\Updater', 'maintenanceStart'); + $success = true; try { $this->doUpgrade($currentVersion, $installedVersion); } catch (\Exception $exception) { - $this->emit('\OC\Updater', 'failure', array($exception->getMessage())); + \OCP\Util::logException('update', $exception); + $this->emit('\OC\Updater', 'failure', array(get_class($exception) . ': ' .$exception->getMessage())); + $success = false; } $this->config->setSystemValue('maintenance', false); $this->emit('\OC\Updater', 'maintenanceEnd'); + $this->emit('\OC\Updater', 'updateEnd', array($success)); + + return $success; } /** |