Skip to content

Commit

Permalink
[Patch] PHP Type fixes on ocs api share by link
Browse files Browse the repository at this point in the history
  • Loading branch information
nadir committed Apr 7, 2016
1 parent 2dacbcd commit 6f9d689
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/files_sharing/api/linkshareexecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public function __construct($path)
$this->shareWith = isset($_POST['password']) ? $_POST['password'] : null;
//check public link share
$this->publicUploadEnabled = \OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_public_upload', 'yes') === 'yes'? TRUE : FALSE;
if(isset($_POST['publicUpload']) && $this->publicUploadEnabled) {
throw new Exception("public upload disabled by the administrator");
if(isset($_POST['publicUpload']) && !$this->publicUploadEnabled) {
throw new \Exception("public upload disabled by the administrator");
}

$this->publicUpload = isset($_POST['publicUpload']) ? ($_POST['publicUpload'] === 'true'? TRUE : FALSE) : FALSE;
Expand Down Expand Up @@ -67,7 +67,7 @@ public function checkFileIntegrity()
}

if ($this->itemType === 'folder') {
$path = '/' . $uidOwner . '/files' . $this->path . '/';
$path = '/' . $this->uidOwner . '/files' . $this->path . '/';
$mountManager = \OC\Files\Filesystem::getMountManager();
$mounts = $mountManager->findIn($path);
foreach ($mounts as $mount) {
Expand All @@ -91,7 +91,7 @@ public function checkFileIntegrity()
public function checkForPreviousShares()
{
$updateExistingShare = false;
if (\OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes') == 'yes') {
if (\OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_links', 'yes') == 'yes') {

// when updating a link share
// FIXME Don't delete link if we update it
Expand Down

0 comments on commit 6f9d689

Please sign in to comment.