Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/dav/lib/CalDAV/BirthdayService.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ class BirthdayService {
/** @var GroupPrincipalBackend */
private $principalBackend;

/** @var CalDavBackend */
private $calDavBackEnd;

/** @var CardDavBackend */
private $cardDavBackEnd;

/**
* BirthdayService constructor.
*
Expand Down
2 changes: 2 additions & 0 deletions apps/dav/lib/CardDAV/ContactsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
use OCP\IURLGenerator;

class ContactsManager {
/** @var CardDavBackend */
private $backend;

/**
* ContactsManager constructor.
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/DAV/Sharing/Xml/Invite.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Invite implements XmlSerializable {
* The organizer contains information about the person who shared the
* object.
*
* @var array
* @var array|null
*/
protected $organizer;

Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Files/CustomPropertiesBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CustomPropertiesBackend implements BackendInterface {
private $connection;

/**
* @var IUser
* @var string
*/
private $user;

Expand Down
6 changes: 6 additions & 0 deletions apps/dav/lib/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ class Server {
/** @var IRequest */
private $request;

/** @var string */
private $baseUri;

/** @var Connector\Sabre\Server */
private $server;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be protected

PHP Fatal error: Cannot access private property OCA\DAV\Server::$server in /drone/src/github.com/nextcloud/server/apps/dav/tests/unit/ServerTest.php


public function __construct(IRequest $request, $baseUri) {
$this->request = $request;
$this->baseUri = $baseUri;
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/tests/unit/ServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public function test() {
$r = $this->getMockBuilder('\OCP\IRequest')
->disableOriginalConstructor()->getMock();
$s = new Server($r, '/');
$this->assertNotNull($s->server);
$this->assertInstanceOf('OCA\DAV\Server', $s);
}
}
2 changes: 1 addition & 1 deletion apps/federation/lib/BackgroundJob/GetSharedSecret.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function execute($jobList, ILogger $logger = null) {
* @param JobList $jobList
* @param ILogger $logger
*/
protected function parentExecute($jobList, $logger) {
protected function parentExecute($jobList, $logger = null) {
parent::execute($jobList, $logger);
}

Expand Down
4 changes: 2 additions & 2 deletions apps/federation/lib/DbHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DbHandler {
private $connection;

/** @var IL10N */
private $l;
private $IL10N;

/** @var string */
private $dbTable = 'trusted_servers';
Expand Down Expand Up @@ -87,7 +87,7 @@ public function addServer($url) {
return (int)$this->connection->lastInsertId('*PREFIX*'.$this->dbTable);
} else {
$message = 'Internal failure, Could not add ownCloud as trusted server: ' . $url;
$message_t = $this->l->t('Could not add server');
$message_t = $this->IL10N->t('Could not add server');
throw new HintException($message, $message_t);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/files_external/js/rollingqueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var RollingQueue = function (functionList, queueWindow, callback) {
throw "functionList must be an array";
}

for (i = 0; i < this.queueWindow; i++) {
for (var i = 0; i < this.queueWindow; i++) {
this.launchNext();
}
};
Expand Down Expand Up @@ -134,4 +134,4 @@ if (!OCA.External.StatusManager) {

OCA.External.StatusManager.RollingQueue = RollingQueue;

})();
})();
6 changes: 4 additions & 2 deletions apps/files_external/js/statusmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
*
*/

/** @global Handlebars */

if (!OCA.External) {
OCA.External = {};
}
Expand Down Expand Up @@ -502,7 +504,7 @@ OCA.External.StatusManager.Utils = {
trFolder = $('#fileList tr[data-file=\"' + OCA.External.StatusManager.Utils.jqSelEscape(folder) + '\"]');
}
trFolder.removeClass('externalErroredRow').removeClass('externalDisabledRow');
tdChilds = trFolder.find("td:first-child div.thumbnail");
var tdChilds = trFolder.find("td:first-child div.thumbnail");
tdChilds.each(function () {
var thisElement = $(this);
thisElement.css('background-image', thisElement.data('oldImage'));
Expand All @@ -525,7 +527,7 @@ OCA.External.StatusManager.Utils = {
});
} else {
file = $("#fileList tr[data-file=\"" + this.jqSelEscape(filename) + "\"] > td:first-child div.thumbnail");
parentTr = file.parents('tr:first');
var parentTr = file.parents('tr:first');
route = OCA.External.StatusManager.Utils.getIconRoute(parentTr);
parentTr.attr("data-icon", route);
file.css('background-image', "url(" + route + ")").css('display', 'none').css('display', 'inline');
Expand Down
3 changes: 3 additions & 0 deletions apps/files_external/lib/Lib/Storage/AmazonS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ class AmazonS3 extends \OC\Files\Storage\Common {
*/
private $rescanDelay = 10;

/** @var string */
private $id;

/**
* @param string $path
* @return string correctly encoded path
Expand Down
4 changes: 2 additions & 2 deletions apps/files_external/lib/Lib/Storage/SFTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class SFTP extends \OC\Files\Storage\Common {
private $auth;

/**
* @var SFTP
*/
* @var \phpseclib\Net\SFTP
*/
protected $client;

/**
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Storage/SMB.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function hasUpdated($path, $time) {
/**
* @param string $path
* @param string $mode
* @return resource
* @return resource|false
*/
public function fopen($path, $mode) {
$fullPath = $this->buildPath($path);
Expand Down
4 changes: 4 additions & 0 deletions apps/files_external/lib/Lib/Storage/Swift.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ class Swift extends \OC\Files\Storage\Common {
* @var array
*/
private $params;

/** @var string */
private $id;

/**
* @var array
*/
Expand Down
2 changes: 1 addition & 1 deletion apps/files_sharing/ajax/shareinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
$share = $shareManager->getShareByToken($token);
$sharePermissions= (int)$share->getPermissions();

if(!($share->getPermissions() & \OCP\Constants::PERMISSION_READ)) {
if($rootInfo === false || !($share->getPermissions() & \OCP\Constants::PERMISSION_READ)) {
OCP\JSON::error(array('data' => 'Share is not readable.'));
exit();
}
Expand Down
2 changes: 2 additions & 0 deletions apps/files_sharing/js/sharetabview.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*
*/

/* @global Handlebars */

(function() {
var TEMPLATE =
'<div>' +
Expand Down
27 changes: 12 additions & 15 deletions apps/files_sharing/lib/Controllers/ShareController.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,19 +285,6 @@ public function showShare($token, $path = '') {
throw $e;
}

$rootFolder = null;
if ($share->getNode() instanceof \OCP\Files\Folder) {
/** @var \OCP\Files\Folder $rootFolder */
$rootFolder = $share->getNode();

try {
$path = $rootFolder->get($path);
} catch (\OCP\Files\NotFoundException $e) {
$this->emitAccessShareHook($share, 404, 'Share not found');
throw new NotFoundException();
}
}

$shareTmpl = [];
$shareTmpl['displayName'] = $this->userManager->get($share->getShareOwner())->getDisplayName();
$shareTmpl['owner'] = $share->getShareOwner();
Expand All @@ -316,7 +303,17 @@ public function showShare($token, $path = '') {
// Show file list
$hideFileList = false;
if ($share->getNode() instanceof \OCP\Files\Folder) {
$shareTmpl['dir'] = $rootFolder->getRelativePath($path->getPath());
/** @var \OCP\Files\Folder $rootFolder */
$rootFolder = $share->getNode();

try {
$folderNode = $rootFolder->get($path);
} catch (\OCP\Files\NotFoundException $e) {
$this->emitAccessShareHook($share, 404, 'Share not found');
throw new NotFoundException();
}

$shareTmpl['dir'] = $rootFolder->getRelativePath($folderNode->getPath());

/*
* The OC_Util methods require a view. This just uses the node API
Expand All @@ -333,7 +330,7 @@ public function showShare($token, $path = '') {
$hideFileList = $share->getPermissions() & \OCP\Constants::PERMISSION_READ ? false : true;

$folder = new Template('files', 'list', '');
$folder->assign('dir', $rootFolder->getRelativePath($path->getPath()));
$folder->assign('dir', $rootFolder->getRelativePath($folderNode->getPath()));
$folder->assign('dirToken', $token);
$folder->assign('permissions', \OCP\Constants::PERMISSION_READ);
$folder->assign('isPublic', true);
Expand Down
3 changes: 2 additions & 1 deletion apps/files_sharing/lib/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
namespace OCA\Files_Sharing;

use Doctrine\DBAL\Connection;
use OCP\ICache;
use OCP\IDBConnection;
use OC\Cache\CappedMemoryCache;

Expand All @@ -38,7 +39,7 @@ class Migration {
/** @var IDBConnection */
private $connection;

/** @var array with all shares we already saw */
/** @var ICache with all shares we already saw */
private $shareCache;

/** @var string */
Expand Down
2 changes: 2 additions & 0 deletions apps/files_versions/js/versionstabview.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*
*/

/* @global Handlebars */

(function() {
var TEMPLATE_ITEM =
'<li data-revision="{{timestamp}}">' +
Expand Down