]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge branch 'master' into fixing-3942-master
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 5 Jul 2013 22:02:11 +0000 (00:02 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Fri, 5 Jul 2013 22:02:11 +0000 (00:02 +0200)
Conflicts:
apps/files/ajax/upload.php

1  2 
apps/files/ajax/upload.php
apps/files_sharing/public.php
lib/public/share.php

index 0a61ff72d41184df208e2957e5f005f124b46e0a,54604d105631a51a515822c03213c93023f037fb..dde5d3c50af32e032567a812ce1be2465e96b13b
@@@ -27,17 -26,21 +26,18 @@@ if (empty($_POST['dirToken'])) 
        if (!($linkItem['permissions'] & OCP\PERMISSION_CREATE)) {
                OCP\JSON::checkLoggedIn();
        } else {
 +              // resolve reshares
 +              $rootLinkItem = OCP\Share::resolveReShare($linkItem);
 +
                // Setup FS with owner
 -              OC_Util::setupFS($linkItem['uid_owner']);
 -
 -              // translate linkItem to the real folder name on the file system
 -              $sharedItem = OCP\Share::getSharedItem($linkItem['item_type'], $linkItem['item_source'], $linkItem['uid_owner']);
 -              if (!$sharedItem || empty($sharedItem) || $sharedItem === false) {
 -                      OCP\JSON::error(array('data' => array_merge(array('message' => $l->t('Unable to set upload directory.')))));
 -                      die();
 -              }
+               OC_Util::tearDownFS();
 +              OC_Util::setupFS($rootLinkItem['uid_owner']);
  
                // The token defines the target directory (security reasons)
 +              $path = \OC\Files\Filesystem::getPath($linkItem['file_source']);
                $dir = sprintf(
                        "/%s/%s",
 -                      $sharedItem['path'],
 +                      $path,
                        isset($_POST['subdir']) ? $_POST['subdir'] : ''
                );
  
Simple merge
Simple merge