Browse Source

Add visibility to all constants

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
tags/v19.0.0beta3
Christoph Wurst 4 years ago
parent
commit
28f8eb5dba
No account linked to committer's email address
100 changed files with 286 additions and 286 deletions
  1. 1
    1
      apps/comments/lib/AppInfo/Application.php
  2. 1
    1
      apps/dav/lib/AppInfo/Application.php
  3. 9
    9
      apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
  4. 3
    3
      apps/dav/lib/CalDAV/Activity/Provider/Event.php
  5. 1
    1
      apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php
  6. 1
    1
      apps/dav/lib/CalDAV/BirthdayService.php
  7. 11
    11
      apps/dav/lib/CalDAV/CalDavBackend.php
  8. 1
    1
      apps/dav/lib/CalDAV/Plugin.php
  9. 2
    2
      apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
  10. 1
    1
      apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
  11. 4
    4
      apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
  12. 1
    1
      apps/dav/lib/CalDAV/Search/SearchPlugin.php
  13. 1
    1
      apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
  14. 2
    2
      apps/dav/lib/CardDAV/CardDavBackend.php
  15. 1
    1
      apps/dav/lib/CardDAV/Xml/Groups.php
  16. 1
    1
      apps/dav/lib/Command/MoveCalendar.php
  17. 9
    9
      apps/dav/lib/Comments/CommentNode.php
  18. 5
    5
      apps/dav/lib/Comments/CommentsPlugin.php
  19. 1
    1
      apps/dav/lib/Comments/EntityCollection.php
  20. 1
    1
      apps/dav/lib/Connector/Sabre/Auth.php
  21. 1
    1
      apps/dav/lib/Connector/Sabre/ChecksumList.php
  22. 3
    3
      apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
  23. 1
    1
      apps/dav/lib/Connector/Sabre/Exception/Forbidden.php
  24. 1
    1
      apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
  25. 1
    1
      apps/dav/lib/Connector/Sabre/Exception/PasswordLoginForbidden.php
  26. 22
    22
      apps/dav/lib/Connector/Sabre/FilesPlugin.php
  27. 4
    4
      apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
  28. 1
    1
      apps/dav/lib/Connector/Sabre/ShareTypeList.php
  29. 1
    1
      apps/dav/lib/Connector/Sabre/ShareeList.php
  30. 4
    4
      apps/dav/lib/Connector/Sabre/SharesPlugin.php
  31. 1
    1
      apps/dav/lib/Connector/Sabre/TagList.php
  32. 4
    4
      apps/dav/lib/Connector/Sabre/TagsPlugin.php
  33. 1
    1
      apps/dav/lib/DAV/GroupPrincipalBackend.php
  34. 3
    3
      apps/dav/lib/DAV/Sharing/Backend.php
  35. 2
    2
      apps/dav/lib/DAV/Sharing/Plugin.php
  36. 1
    1
      apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php
  37. 7
    7
      apps/dav/lib/SystemTag/SystemTagPlugin.php
  38. 4
    4
      apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
  39. 1
    1
      apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
  40. 1
    1
      apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php
  41. 1
    1
      apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
  42. 3
    3
      apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
  43. 1
    1
      apps/dav/tests/unit/Command/ListCalendarsTest.php
  44. 11
    11
      apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
  45. 1
    1
      apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
  46. 3
    3
      apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
  47. 6
    6
      apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
  48. 5
    5
      apps/encryption/lib/Crypto/Crypt.php
  49. 2
    2
      apps/encryption/lib/Crypto/Encryption.php
  50. 3
    3
      apps/encryption/lib/Session.php
  51. 1
    1
      apps/federatedfilesharing/lib/FederatedShareProvider.php
  52. 1
    1
      apps/federatedfilesharing/lib/Notifications.php
  53. 1
    1
      apps/federatedfilesharing/lib/TokenHandler.php
  54. 2
    2
      apps/federatedfilesharing/tests/TestCase.php
  55. 4
    4
      apps/federation/lib/TrustedServers.php
  56. 2
    2
      apps/files/lib/Activity/FavoriteProvider.php
  57. 1
    1
      apps/files/lib/Activity/Helper.php
  58. 1
    1
      apps/files/lib/BackgroundJob/DeleteOrphanedItems.php
  59. 1
    1
      apps/files/lib/BackgroundJob/ScanFiles.php
  60. 1
    1
      apps/files/lib/Command/DeleteOrphanedFiles.php
  61. 1
    1
      apps/files_external/lib/Command/ListCommand.php
  62. 1
    1
      apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php
  63. 8
    8
      apps/files_external/lib/Lib/Auth/AuthMechanism.php
  64. 1
    1
      apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php
  65. 1
    1
      apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php
  66. 1
    1
      apps/files_external/lib/Lib/Auth/Password/UserProvided.php
  67. 8
    8
      apps/files_external/lib/Lib/DefinitionParameter.php
  68. 1
    1
      apps/files_external/lib/Lib/Storage/OwnCloud.php
  69. 1
    1
      apps/files_external/lib/Lib/Storage/Swift.php
  70. 2
    2
      apps/files_external/lib/Lib/StorageConfig.php
  71. 5
    5
      apps/files_external/lib/Service/BackendService.php
  72. 5
    5
      apps/files_external/lib/Service/DBConfigService.php
  73. 4
    4
      apps/files_external/lib/config.php
  74. 3
    3
      apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
  75. 2
    2
      apps/files_sharing/lib/Activity/Filter.php
  76. 4
    4
      apps/files_sharing/lib/Activity/Providers/Downloads.php
  77. 5
    5
      apps/files_sharing/lib/Activity/Providers/Groups.php
  78. 6
    6
      apps/files_sharing/lib/Activity/Providers/PublicLinks.php
  79. 4
    4
      apps/files_sharing/lib/Activity/Providers/RemoteShares.php
  80. 10
    10
      apps/files_sharing/lib/Activity/Providers/Users.php
  81. 1
    1
      apps/files_sharing/lib/AppInfo/Application.php
  82. 1
    1
      apps/files_sharing/lib/External/Manager.php
  83. 1
    1
      apps/files_sharing/lib/External/MountProvider.php
  84. 7
    7
      apps/files_sharing/lib/ShareBackend/File.php
  85. 2
    2
      apps/files_sharing/tests/ApiTest.php
  86. 1
    1
      apps/files_sharing/tests/ShareTest.php
  87. 5
    5
      apps/files_sharing/tests/TestCase.php
  88. 1
    1
      apps/files_sharing/tests/UnshareChildrenTest.php
  89. 1
    1
      apps/files_sharing/tests/UpdaterTest.php
  90. 2
    2
      apps/files_trashbin/lib/Expiration.php
  91. 4
    4
      apps/files_trashbin/lib/Sabre/PropfindPlugin.php
  92. 1
    1
      apps/files_trashbin/lib/Trashbin.php
  93. 2
    2
      apps/files_trashbin/tests/ExpirationTest.php
  94. 2
    2
      apps/files_trashbin/tests/TrashbinTest.php
  95. 1
    1
      apps/files_versions/lib/AppInfo/Application.php
  96. 1
    1
      apps/files_versions/lib/BackgroundJob/ExpireVersions.php
  97. 1
    1
      apps/files_versions/lib/Expiration.php
  98. 6
    6
      apps/files_versions/lib/Storage.php
  99. 1
    1
      apps/files_versions/tests/ExpirationTest.php
  100. 0
    0
      apps/files_versions/tests/VersioningTest.php

+ 1
- 1
apps/comments/lib/AppInfo/Application.php View File

use OCP\Util; use OCP\Util;


class Application extends App { class Application extends App {
const APP_ID = 'comments';
public const APP_ID = 'comments';


public function __construct(array $urlParams = []) { public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams); parent::__construct(self::APP_ID, $urlParams);

+ 1
- 1
apps/dav/lib/AppInfo/Application.php View File

use Symfony\Component\EventDispatcher\GenericEvent; use Symfony\Component\EventDispatcher\GenericEvent;


class Application extends App { class Application extends App {
const APP_ID = 'dav';
public const APP_ID = 'dav';


/** /**
* Application constructor. * Application constructor.

+ 9
- 9
apps/dav/lib/CalDAV/Activity/Provider/Calendar.php View File

use OCP\L10N\IFactory; use OCP\L10N\IFactory;


class Calendar extends Base { class Calendar extends Base {
const SUBJECT_ADD = 'calendar_add';
const SUBJECT_UPDATE = 'calendar_update';
const SUBJECT_DELETE = 'calendar_delete';
const SUBJECT_PUBLISH = 'calendar_publish';
const SUBJECT_UNPUBLISH = 'calendar_unpublish';
const SUBJECT_SHARE_USER = 'calendar_user_share';
const SUBJECT_SHARE_GROUP = 'calendar_group_share';
const SUBJECT_UNSHARE_USER = 'calendar_user_unshare';
const SUBJECT_UNSHARE_GROUP = 'calendar_group_unshare';
public const SUBJECT_ADD = 'calendar_add';
public const SUBJECT_UPDATE = 'calendar_update';
public const SUBJECT_DELETE = 'calendar_delete';
public const SUBJECT_PUBLISH = 'calendar_publish';
public const SUBJECT_UNPUBLISH = 'calendar_unpublish';
public const SUBJECT_SHARE_USER = 'calendar_user_share';
public const SUBJECT_SHARE_GROUP = 'calendar_group_share';
public const SUBJECT_UNSHARE_USER = 'calendar_user_unshare';
public const SUBJECT_UNSHARE_GROUP = 'calendar_group_unshare';


/** @var IFactory */ /** @var IFactory */
protected $languageFactory; protected $languageFactory;

+ 3
- 3
apps/dav/lib/CalDAV/Activity/Provider/Event.php View File

use OCP\L10N\IFactory; use OCP\L10N\IFactory;


class Event extends Base { class Event extends Base {
const SUBJECT_OBJECT_ADD = 'object_add';
const SUBJECT_OBJECT_UPDATE = 'object_update';
const SUBJECT_OBJECT_DELETE = 'object_delete';
public const SUBJECT_OBJECT_ADD = 'object_add';
public const SUBJECT_OBJECT_UPDATE = 'object_update';
public const SUBJECT_OBJECT_DELETE = 'object_delete';


/** @var IFactory */ /** @var IFactory */
protected $languageFactory; protected $languageFactory;

+ 1
- 1
apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php View File

* @package OCA\DAV\CalDAV\BirthdayCalendar * @package OCA\DAV\CalDAV\BirthdayCalendar
*/ */
class EnablePlugin extends ServerPlugin { class EnablePlugin extends ServerPlugin {
const NS_Nextcloud = 'http://nextcloud.com/ns';
public const NS_Nextcloud = 'http://nextcloud.com/ns';


/** /**
* @var IConfig * @var IConfig

+ 1
- 1
apps/dav/lib/CalDAV/BirthdayService.php View File

* @package OCA\DAV\CalDAV * @package OCA\DAV\CalDAV
*/ */
class BirthdayService { class BirthdayService {
const BIRTHDAY_CALENDAR_URI = 'contact_birthdays';
public const BIRTHDAY_CALENDAR_URI = 'contact_birthdays';


/** @var GroupPrincipalBackend */ /** @var GroupPrincipalBackend */
private $principalBackend; private $principalBackend;

+ 11
- 11
apps/dav/lib/CalDAV/CalDavBackend.php View File

* @package OCA\DAV\CalDAV * @package OCA\DAV\CalDAV
*/ */
class CalDavBackend extends AbstractBackend implements SyncSupport, SubscriptionSupport, SchedulingSupport { class CalDavBackend extends AbstractBackend implements SyncSupport, SubscriptionSupport, SchedulingSupport {
const CALENDAR_TYPE_CALENDAR = 0;
const CALENDAR_TYPE_SUBSCRIPTION = 1;
public const CALENDAR_TYPE_CALENDAR = 0;
public const CALENDAR_TYPE_SUBSCRIPTION = 1;


const PERSONAL_CALENDAR_URI = 'personal';
const PERSONAL_CALENDAR_NAME = 'Personal';
public const PERSONAL_CALENDAR_URI = 'personal';
public const PERSONAL_CALENDAR_NAME = 'Personal';


const RESOURCE_BOOKING_CALENDAR_URI = 'calendar';
const RESOURCE_BOOKING_CALENDAR_NAME = 'Calendar';
public const RESOURCE_BOOKING_CALENDAR_URI = 'calendar';
public const RESOURCE_BOOKING_CALENDAR_NAME = 'Calendar';


/** /**
* We need to specify a max date, because we need to stop *somewhere* * We need to specify a max date, because we need to stop *somewhere*
* in 2038-01-19 to avoid problems when the date is converted * in 2038-01-19 to avoid problems when the date is converted
* to a unix timestamp. * to a unix timestamp.
*/ */
const MAX_DATE = '2038-01-01';
public const MAX_DATE = '2038-01-01';


const ACCESS_PUBLIC = 4;
const CLASSIFICATION_PUBLIC = 0;
const CLASSIFICATION_PRIVATE = 1;
const CLASSIFICATION_CONFIDENTIAL = 2;
public const ACCESS_PUBLIC = 4;
public const CLASSIFICATION_PUBLIC = 0;
public const CLASSIFICATION_PRIVATE = 1;
public const CLASSIFICATION_CONFIDENTIAL = 2;


/** /**
* List of CalDAV properties, and how they map to database field names * List of CalDAV properties, and how they map to database field names

+ 1
- 1
apps/dav/lib/CalDAV/Plugin.php View File

namespace OCA\DAV\CalDAV; namespace OCA\DAV\CalDAV;


class Plugin extends \Sabre\CalDAV\Plugin { class Plugin extends \Sabre\CalDAV\Plugin {
const SYSTEM_CALENDAR_ROOT = 'system-calendars';
public const SYSTEM_CALENDAR_ROOT = 'system-calendars';


/** /**
* Returns the path to a principal's calendar home. * Returns the path to a principal's calendar home.

+ 2
- 2
apps/dav/lib/CalDAV/Proxy/ProxyMapper.php View File

* @package OCA\DAV\CalDAV\Proxy * @package OCA\DAV\CalDAV\Proxy
*/ */
class ProxyMapper extends QBMapper { class ProxyMapper extends QBMapper {
const PERMISSION_READ = 1;
const PERMISSION_WRITE = 2;
public const PERMISSION_READ = 1;
public const PERMISSION_WRITE = 2;


/** /**
* ProxyMapper constructor. * ProxyMapper constructor.

+ 1
- 1
apps/dav/lib/CalDAV/Publishing/PublishPlugin.php View File

use Sabre\HTTP\ResponseInterface; use Sabre\HTTP\ResponseInterface;


class PublishPlugin extends ServerPlugin { class PublishPlugin extends ServerPlugin {
const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';
public const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';


/** /**
* Reference to SabreDAV server object. * Reference to SabreDAV server object.

+ 4
- 4
apps/dav/lib/CalDAV/Schedule/IMipPlugin.php View File

/** @var IUserManager */ /** @var IUserManager */
private $userManager; private $userManager;


const MAX_DATE = '2038-01-01';
public const MAX_DATE = '2038-01-01';


const METHOD_REQUEST = 'request';
const METHOD_REPLY = 'reply';
const METHOD_CANCEL = 'cancel';
public const METHOD_REQUEST = 'request';
public const METHOD_REPLY = 'reply';
public const METHOD_CANCEL = 'cancel';


/** /**
* @param IConfig $config * @param IConfig $config

+ 1
- 1
apps/dav/lib/CalDAV/Search/SearchPlugin.php View File

use Sabre\DAV\ServerPlugin; use Sabre\DAV\ServerPlugin;


class SearchPlugin extends ServerPlugin { class SearchPlugin extends ServerPlugin {
const NS_Nextcloud = 'http://nextcloud.com/ns';
public const NS_Nextcloud = 'http://nextcloud.com/ns';


/** /**
* Reference to SabreDAV server object. * Reference to SabreDAV server object.

+ 1
- 1
apps/dav/lib/CalDAV/WebcalCaching/Plugin.php View File

* *
* @var string[] * @var string[]
*/ */
const ENABLE_FOR_CLIENTS = [];
public const ENABLE_FOR_CLIENTS = [];


/** /**
* @var bool * @var bool

+ 2
- 2
apps/dav/lib/CardDAV/CardDavBackend.php View File

use Symfony\Component\EventDispatcher\GenericEvent; use Symfony\Component\EventDispatcher\GenericEvent;


class CardDavBackend implements BackendInterface, SyncSupport { class CardDavBackend implements BackendInterface, SyncSupport {
const PERSONAL_ADDRESSBOOK_URI = 'contacts';
const PERSONAL_ADDRESSBOOK_NAME = 'Contacts';
public const PERSONAL_ADDRESSBOOK_URI = 'contacts';
public const PERSONAL_ADDRESSBOOK_NAME = 'Contacts';


/** @var Principal */ /** @var Principal */
private $principalBackend; private $principalBackend;

+ 1
- 1
apps/dav/lib/CardDAV/Xml/Groups.php View File

use Sabre\Xml\XmlSerializable; use Sabre\Xml\XmlSerializable;


class Groups implements XmlSerializable { class Groups implements XmlSerializable {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';


/** @var string[] of TYPE:CHECKSUM */ /** @var string[] of TYPE:CHECKSUM */
private $groups; private $groups;

+ 1
- 1
apps/dav/lib/Command/MoveCalendar.php View File

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


const URI_USERS = 'principals/users/';
public const URI_USERS = 'principals/users/';


/** /**
* @param IUserManager $userManager * @param IUserManager $userManager

+ 9
- 9
apps/dav/lib/Comments/CommentNode.php View File

use Sabre\DAV\PropPatch; use Sabre\DAV\PropPatch;


class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';


const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}isUnread';
const PROPERTY_NAME_MESSAGE = '{http://owncloud.org/ns}message';
const PROPERTY_NAME_ACTOR_DISPLAYNAME = '{http://owncloud.org/ns}actorDisplayName';
const PROPERTY_NAME_MENTIONS = '{http://owncloud.org/ns}mentions';
const PROPERTY_NAME_MENTION = '{http://owncloud.org/ns}mention';
const PROPERTY_NAME_MENTION_TYPE = '{http://owncloud.org/ns}mentionType';
const PROPERTY_NAME_MENTION_ID = '{http://owncloud.org/ns}mentionId';
const PROPERTY_NAME_MENTION_DISPLAYNAME = '{http://owncloud.org/ns}mentionDisplayName';
public const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}isUnread';
public const PROPERTY_NAME_MESSAGE = '{http://owncloud.org/ns}message';
public const PROPERTY_NAME_ACTOR_DISPLAYNAME = '{http://owncloud.org/ns}actorDisplayName';
public const PROPERTY_NAME_MENTIONS = '{http://owncloud.org/ns}mentions';
public const PROPERTY_NAME_MENTION = '{http://owncloud.org/ns}mention';
public const PROPERTY_NAME_MENTION_TYPE = '{http://owncloud.org/ns}mentionType';
public const PROPERTY_NAME_MENTION_ID = '{http://owncloud.org/ns}mentionId';
public const PROPERTY_NAME_MENTION_DISPLAYNAME = '{http://owncloud.org/ns}mentionDisplayName';


/** @var IComment */ /** @var IComment */
public $comment; public $comment;

+ 5
- 5
apps/dav/lib/Comments/CommentsPlugin.php View File

*/ */
class CommentsPlugin extends ServerPlugin { class CommentsPlugin extends ServerPlugin {
// namespace // namespace
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';


const REPORT_NAME = '{http://owncloud.org/ns}filter-comments';
const REPORT_PARAM_LIMIT = '{http://owncloud.org/ns}limit';
const REPORT_PARAM_OFFSET = '{http://owncloud.org/ns}offset';
const REPORT_PARAM_TIMESTAMP = '{http://owncloud.org/ns}datetime';
public const REPORT_NAME = '{http://owncloud.org/ns}filter-comments';
public const REPORT_PARAM_LIMIT = '{http://owncloud.org/ns}limit';
public const REPORT_PARAM_OFFSET = '{http://owncloud.org/ns}offset';
public const REPORT_PARAM_TIMESTAMP = '{http://owncloud.org/ns}datetime';


/** @var ICommentsManager */ /** @var ICommentsManager */
protected $commentsManager; protected $commentsManager;

+ 1
- 1
apps/dav/lib/Comments/EntityCollection.php View File

* @package OCA\DAV\Comments * @package OCA\DAV\Comments
*/ */
class EntityCollection extends RootCollection implements IProperties { class EntityCollection extends RootCollection implements IProperties {
const PROPERTY_NAME_READ_MARKER = '{http://owncloud.org/ns}readMarker';
public const PROPERTY_NAME_READ_MARKER = '{http://owncloud.org/ns}readMarker';


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

+ 1
- 1
apps/dav/lib/Connector/Sabre/Auth.php View File

use Sabre\HTTP\ResponseInterface; use Sabre\HTTP\ResponseInterface;


class Auth extends AbstractBasic { class Auth extends AbstractBasic {
const DAV_AUTHENTICATED = 'AUTHENTICATED_TO_DAV_BACKEND';
public const DAV_AUTHENTICATED = 'AUTHENTICATED_TO_DAV_BACKEND';


/** @var ISession */ /** @var ISession */
private $session; private $session;

+ 1
- 1
apps/dav/lib/Connector/Sabre/ChecksumList.php View File

* checksum name. * checksum name.
*/ */
class ChecksumList implements XmlSerializable { class ChecksumList implements XmlSerializable {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';


/** @var string[] of TYPE:CHECKSUM */ /** @var string[] of TYPE:CHECKSUM */
private $checksums; private $checksums;

+ 3
- 3
apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php View File

use Sabre\DAV\ServerPlugin; use Sabre\DAV\ServerPlugin;


class CommentPropertiesPlugin extends ServerPlugin { class CommentPropertiesPlugin extends ServerPlugin {
const PROPERTY_NAME_HREF = '{http://owncloud.org/ns}comments-href';
const PROPERTY_NAME_COUNT = '{http://owncloud.org/ns}comments-count';
const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}comments-unread';
public const PROPERTY_NAME_HREF = '{http://owncloud.org/ns}comments-href';
public const PROPERTY_NAME_COUNT = '{http://owncloud.org/ns}comments-count';
public const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}comments-unread';


/** @var \Sabre\DAV\Server */ /** @var \Sabre\DAV\Server */
protected $server; protected $server;

+ 1
- 1
apps/dav/lib/Connector/Sabre/Exception/Forbidden.php View File

namespace OCA\DAV\Connector\Sabre\Exception; namespace OCA\DAV\Connector\Sabre\Exception;


class Forbidden extends \Sabre\DAV\Exception\Forbidden { class Forbidden extends \Sabre\DAV\Exception\Forbidden {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';


/** /**
* @var bool * @var bool

+ 1
- 1
apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php View File

use Sabre\DAV\Exception; use Sabre\DAV\Exception;


class InvalidPath extends Exception { class InvalidPath extends Exception {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';


/** /**
* @var bool * @var bool

+ 1
- 1
apps/dav/lib/Connector/Sabre/Exception/PasswordLoginForbidden.php View File

use Sabre\DAV\Server; use Sabre\DAV\Server;


class PasswordLoginForbidden extends NotAuthenticated { class PasswordLoginForbidden extends NotAuthenticated {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';


public function getHTTPCode() { public function getHTTPCode() {
return 401; return 401;

+ 22
- 22
apps/dav/lib/Connector/Sabre/FilesPlugin.php View File

class FilesPlugin extends ServerPlugin { class FilesPlugin extends ServerPlugin {


// namespace // namespace
const NS_OWNCLOUD = 'http://owncloud.org/ns';
const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id';
const INTERNAL_FILEID_PROPERTYNAME = '{http://owncloud.org/ns}fileid';
const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions';
const SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-collaboration-services.org/ns}share-permissions';
const OCM_SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-cloud-mesh.org/ns}share-permissions';
const DOWNLOADURL_PROPERTYNAME = '{http://owncloud.org/ns}downloadURL';
const SIZE_PROPERTYNAME = '{http://owncloud.org/ns}size';
const GETETAG_PROPERTYNAME = '{DAV:}getetag';
const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified';
const OWNER_ID_PROPERTYNAME = '{http://owncloud.org/ns}owner-id';
const OWNER_DISPLAY_NAME_PROPERTYNAME = '{http://owncloud.org/ns}owner-display-name';
const CHECKSUMS_PROPERTYNAME = '{http://owncloud.org/ns}checksums';
const DATA_FINGERPRINT_PROPERTYNAME = '{http://owncloud.org/ns}data-fingerprint';
const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview';
const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type';
const IS_ENCRYPTED_PROPERTYNAME = '{http://nextcloud.org/ns}is-encrypted';
const METADATA_ETAG_PROPERTYNAME = '{http://nextcloud.org/ns}metadata_etag';
const UPLOAD_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}upload_time';
const CREATION_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}creation_time';
const SHARE_NOTE = '{http://nextcloud.org/ns}note';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
public const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id';
public const INTERNAL_FILEID_PROPERTYNAME = '{http://owncloud.org/ns}fileid';
public const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions';
public const SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-collaboration-services.org/ns}share-permissions';
public const OCM_SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-cloud-mesh.org/ns}share-permissions';
public const DOWNLOADURL_PROPERTYNAME = '{http://owncloud.org/ns}downloadURL';
public const SIZE_PROPERTYNAME = '{http://owncloud.org/ns}size';
public const GETETAG_PROPERTYNAME = '{DAV:}getetag';
public const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified';
public const OWNER_ID_PROPERTYNAME = '{http://owncloud.org/ns}owner-id';
public const OWNER_DISPLAY_NAME_PROPERTYNAME = '{http://owncloud.org/ns}owner-display-name';
public const CHECKSUMS_PROPERTYNAME = '{http://owncloud.org/ns}checksums';
public const DATA_FINGERPRINT_PROPERTYNAME = '{http://owncloud.org/ns}data-fingerprint';
public const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview';
public const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type';
public const IS_ENCRYPTED_PROPERTYNAME = '{http://nextcloud.org/ns}is-encrypted';
public const METADATA_ETAG_PROPERTYNAME = '{http://nextcloud.org/ns}metadata_etag';
public const UPLOAD_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}upload_time';
public const CREATION_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}creation_time';
public const SHARE_NOTE = '{http://nextcloud.org/ns}note';


/** /**
* Reference to main server object * Reference to main server object

+ 4
- 4
apps/dav/lib/Connector/Sabre/FilesReportPlugin.php View File

class FilesReportPlugin extends ServerPlugin { class FilesReportPlugin extends ServerPlugin {


// namespace // namespace
const NS_OWNCLOUD = 'http://owncloud.org/ns';
const REPORT_NAME = '{http://owncloud.org/ns}filter-files';
const SYSTEMTAG_PROPERTYNAME = '{http://owncloud.org/ns}systemtag';
const CIRCLE_PROPERTYNAME = '{http://owncloud.org/ns}circle';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const REPORT_NAME = '{http://owncloud.org/ns}filter-files';
public const SYSTEMTAG_PROPERTYNAME = '{http://owncloud.org/ns}systemtag';
public const CIRCLE_PROPERTYNAME = '{http://owncloud.org/ns}circle';


/** /**
* Reference to main server object * Reference to main server object

+ 1
- 1
apps/dav/lib/Connector/Sabre/ShareTypeList.php View File

* This property contains multiple "share-type" elements, each containing a share type. * This property contains multiple "share-type" elements, each containing a share type.
*/ */
class ShareTypeList implements Element { class ShareTypeList implements Element {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';


/** /**
* Share types * Share types

+ 1
- 1
apps/dav/lib/Connector/Sabre/ShareeList.php View File

* This property contains multiple "sharee" elements, each containing a share sharee * This property contains multiple "sharee" elements, each containing a share sharee
*/ */
class ShareeList implements XmlSerializable { class ShareeList implements XmlSerializable {
const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
public const NS_NEXTCLOUD = 'http://nextcloud.org/ns';


/** @var IShare[] */ /** @var IShare[] */
private $shares; private $shares;

+ 4
- 4
apps/dav/lib/Connector/Sabre/SharesPlugin.php View File

* Sabre Plugin to provide share-related properties * Sabre Plugin to provide share-related properties
*/ */
class SharesPlugin extends \Sabre\DAV\ServerPlugin { class SharesPlugin extends \Sabre\DAV\ServerPlugin {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
const SHARETYPES_PROPERTYNAME = '{http://owncloud.org/ns}share-types';
const SHAREES_PROPERTYNAME = '{http://nextcloud.org/ns}sharees';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
public const SHARETYPES_PROPERTYNAME = '{http://owncloud.org/ns}share-types';
public const SHAREES_PROPERTYNAME = '{http://nextcloud.org/ns}sharees';


/** /**
* Reference to main server object * Reference to main server object

+ 1
- 1
apps/dav/lib/Connector/Sabre/TagList.php View File

* This property contains multiple "tag" elements, each containing a tag name. * This property contains multiple "tag" elements, each containing a tag name.
*/ */
class TagList implements Element { class TagList implements Element {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';


/** /**
* tags * tags

+ 4
- 4
apps/dav/lib/Connector/Sabre/TagsPlugin.php View File

class TagsPlugin extends \Sabre\DAV\ServerPlugin { class TagsPlugin extends \Sabre\DAV\ServerPlugin {


// namespace // namespace
const NS_OWNCLOUD = 'http://owncloud.org/ns';
const TAGS_PROPERTYNAME = '{http://owncloud.org/ns}tags';
const FAVORITE_PROPERTYNAME = '{http://owncloud.org/ns}favorite';
const TAG_FAVORITE = '_$!<Favorite>!$_';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const TAGS_PROPERTYNAME = '{http://owncloud.org/ns}tags';
public const FAVORITE_PROPERTYNAME = '{http://owncloud.org/ns}favorite';
public const TAG_FAVORITE = '_$!<Favorite>!$_';


/** /**
* Reference to main server object * Reference to main server object

+ 1
- 1
apps/dav/lib/DAV/GroupPrincipalBackend.php View File

use Sabre\DAVACL\PrincipalBackend\BackendInterface; use Sabre\DAVACL\PrincipalBackend\BackendInterface;


class GroupPrincipalBackend implements BackendInterface { class GroupPrincipalBackend implements BackendInterface {
const PRINCIPAL_PREFIX = 'principals/groups';
public const PRINCIPAL_PREFIX = 'principals/groups';


/** @var IGroupManager */ /** @var IGroupManager */
private $groupManager; private $groupManager;

+ 3
- 3
apps/dav/lib/DAV/Sharing/Backend.php View File

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


const ACCESS_OWNER = 1;
const ACCESS_READ_WRITE = 2;
const ACCESS_READ = 3;
public const ACCESS_OWNER = 1;
public const ACCESS_READ_WRITE = 2;
public const ACCESS_READ = 3;


/** /**
* @param IDBConnection $db * @param IDBConnection $db

+ 2
- 2
apps/dav/lib/DAV/Sharing/Plugin.php View File

use Sabre\HTTP\ResponseInterface; use Sabre\HTTP\ResponseInterface;


class Plugin extends ServerPlugin { class Plugin extends ServerPlugin {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
const NS_NEXTCLOUD = 'http://nextcloud.com/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_NEXTCLOUD = 'http://nextcloud.com/ns';


/** @var Auth */ /** @var Auth */
private $auth; private $auth;

+ 1
- 1
apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php View File

use Sabre\DAV\PropPatch; use Sabre\DAV\PropPatch;


class AppleProvisioningNode implements INode, IProperties { class AppleProvisioningNode implements INode, IProperties {
const FILENAME = 'apple-provisioning.mobileconfig';
public const FILENAME = 'apple-provisioning.mobileconfig';


protected $timeFactory; protected $timeFactory;



+ 7
- 7
apps/dav/lib/SystemTag/SystemTagPlugin.php View File

class SystemTagPlugin extends \Sabre\DAV\ServerPlugin { class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {


// namespace // namespace
const NS_OWNCLOUD = 'http://owncloud.org/ns';
const ID_PROPERTYNAME = '{http://owncloud.org/ns}id';
const DISPLAYNAME_PROPERTYNAME = '{http://owncloud.org/ns}display-name';
const USERVISIBLE_PROPERTYNAME = '{http://owncloud.org/ns}user-visible';
const USERASSIGNABLE_PROPERTYNAME = '{http://owncloud.org/ns}user-assignable';
const GROUPS_PROPERTYNAME = '{http://owncloud.org/ns}groups';
const CANASSIGN_PROPERTYNAME = '{http://owncloud.org/ns}can-assign';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const ID_PROPERTYNAME = '{http://owncloud.org/ns}id';
public const DISPLAYNAME_PROPERTYNAME = '{http://owncloud.org/ns}display-name';
public const USERVISIBLE_PROPERTYNAME = '{http://owncloud.org/ns}user-visible';
public const USERASSIGNABLE_PROPERTYNAME = '{http://owncloud.org/ns}user-assignable';
public const GROUPS_PROPERTYNAME = '{http://owncloud.org/ns}groups';
public const CANASSIGN_PROPERTYNAME = '{http://owncloud.org/ns}can-assign';


/** /**
* @var \Sabre\DAV\Server $server * @var \Sabre\DAV\Server $server

+ 4
- 4
apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php View File

/** @var ILogger */ /** @var ILogger */
private $logger; private $logger;


const UNIT_TEST_USER = 'principals/users/caldav-unit-test';
const UNIT_TEST_USER1 = 'principals/users/caldav-unit-test1';
const UNIT_TEST_GROUP = 'principals/groups/caldav-unit-test-group';
const UNIT_TEST_GROUP2 = 'principals/groups/caldav-unit-test-group2';
public const UNIT_TEST_USER = 'principals/users/caldav-unit-test';
public const UNIT_TEST_USER1 = 'principals/users/caldav-unit-test1';
public const UNIT_TEST_GROUP = 'principals/groups/caldav-unit-test-group';
public const UNIT_TEST_GROUP2 = 'principals/groups/caldav-unit-test-group2';


protected function setUp(): void { protected function setUp(): void {
parent::setUp(); parent::setUp();

+ 1
- 1
apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php View File

* @package OCA\DAV\Tests\unit\CalDAV * @package OCA\DAV\Tests\unit\CalDAV
*/ */
class PublicCalendarRootTest extends TestCase { class PublicCalendarRootTest extends TestCase {
const UNIT_TEST_USER = '';
public const UNIT_TEST_USER = '';
/** @var CalDavBackend */ /** @var CalDavBackend */
private $backend; private $backend;
/** @var PublicCalendarRoot */ /** @var PublicCalendarRoot */

+ 1
- 1
apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php View File

use Test\TestCase; use Test\TestCase;


class PublisherTest extends TestCase { class PublisherTest extends TestCase {
const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';
public const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';


public function testSerializePublished() { public function testSerializePublished() {
$publish = new Publisher('urltopublish', true); $publish = new Publisher('urltopublish', true);

+ 1
- 1
apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php View File

use Sabre\VObject\Component\VCalendar; use Sabre\VObject\Component\VCalendar;


class EmailProviderTest extends AbstractNotificationProviderTest { class EmailProviderTest extends AbstractNotificationProviderTest {
const USER_EMAIL = 'frodo@hobb.it';
public const USER_EMAIL = 'frodo@hobb.it';


/** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger; protected $logger;

+ 3
- 3
apps/dav/tests/unit/CardDAV/CardDavBackendTest.php View File

/** @var string */ /** @var string */
private $dbCardsPropertiesTable = 'cards_properties'; private $dbCardsPropertiesTable = 'cards_properties';


const UNIT_TEST_USER = 'principals/users/carddav-unit-test';
const UNIT_TEST_USER1 = 'principals/users/carddav-unit-test1';
const UNIT_TEST_GROUP = 'principals/groups/carddav-unit-test-group';
public const UNIT_TEST_USER = 'principals/users/carddav-unit-test';
public const UNIT_TEST_USER1 = 'principals/users/carddav-unit-test1';
public const UNIT_TEST_GROUP = 'principals/groups/carddav-unit-test-group';


private $vcardTest0 = 'BEGIN:VCARD'.PHP_EOL. private $vcardTest0 = 'BEGIN:VCARD'.PHP_EOL.
'VERSION:3.0'.PHP_EOL. 'VERSION:3.0'.PHP_EOL.

+ 1
- 1
apps/dav/tests/unit/Command/ListCalendarsTest.php View File

/** @var ListCalendars */ /** @var ListCalendars */
private $command; private $command;


const USERNAME = 'username';
public const USERNAME = 'username';


protected function setUp(): void { protected function setUp(): void {
parent::setUp(); parent::setUp();

+ 11
- 11
apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php View File

* See the COPYING-README file. * See the COPYING-README file.
*/ */
class FilesPluginTest extends TestCase { class FilesPluginTest extends TestCase {
const GETETAG_PROPERTYNAME = FilesPlugin::GETETAG_PROPERTYNAME;
const FILEID_PROPERTYNAME = FilesPlugin::FILEID_PROPERTYNAME;
const INTERNAL_FILEID_PROPERTYNAME = FilesPlugin::INTERNAL_FILEID_PROPERTYNAME;
const SIZE_PROPERTYNAME = FilesPlugin::SIZE_PROPERTYNAME;
const PERMISSIONS_PROPERTYNAME = FilesPlugin::PERMISSIONS_PROPERTYNAME;
const LASTMODIFIED_PROPERTYNAME = FilesPlugin::LASTMODIFIED_PROPERTYNAME;
const DOWNLOADURL_PROPERTYNAME = FilesPlugin::DOWNLOADURL_PROPERTYNAME;
const OWNER_ID_PROPERTYNAME = FilesPlugin::OWNER_ID_PROPERTYNAME;
const OWNER_DISPLAY_NAME_PROPERTYNAME = FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME;
const DATA_FINGERPRINT_PROPERTYNAME = FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME;
const HAS_PREVIEW_PROPERTYNAME = FilesPlugin::HAS_PREVIEW_PROPERTYNAME;
public const GETETAG_PROPERTYNAME = FilesPlugin::GETETAG_PROPERTYNAME;
public const FILEID_PROPERTYNAME = FilesPlugin::FILEID_PROPERTYNAME;
public const INTERNAL_FILEID_PROPERTYNAME = FilesPlugin::INTERNAL_FILEID_PROPERTYNAME;
public const SIZE_PROPERTYNAME = FilesPlugin::SIZE_PROPERTYNAME;
public const PERMISSIONS_PROPERTYNAME = FilesPlugin::PERMISSIONS_PROPERTYNAME;
public const LASTMODIFIED_PROPERTYNAME = FilesPlugin::LASTMODIFIED_PROPERTYNAME;
public const DOWNLOADURL_PROPERTYNAME = FilesPlugin::DOWNLOADURL_PROPERTYNAME;
public const OWNER_ID_PROPERTYNAME = FilesPlugin::OWNER_ID_PROPERTYNAME;
public const OWNER_DISPLAY_NAME_PROPERTYNAME = FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME;
public const DATA_FINGERPRINT_PROPERTYNAME = FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME;
public const HAS_PREVIEW_PROPERTYNAME = FilesPlugin::HAS_PREVIEW_PROPERTYNAME;


/** /**
* @var \Sabre\DAV\Server | \PHPUnit_Framework_MockObject_MockObject * @var \Sabre\DAV\Server | \PHPUnit_Framework_MockObject_MockObject

+ 1
- 1
apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php View File

use Sabre\DAV\Tree; use Sabre\DAV\Tree;


class SharesPluginTest extends \Test\TestCase { class SharesPluginTest extends \Test\TestCase {
const SHARETYPES_PROPERTYNAME = \OCA\DAV\Connector\Sabre\SharesPlugin::SHARETYPES_PROPERTYNAME;
public const SHARETYPES_PROPERTYNAME = \OCA\DAV\Connector\Sabre\SharesPlugin::SHARETYPES_PROPERTYNAME;


/** /**
* @var \Sabre\DAV\Server * @var \Sabre\DAV\Server

+ 3
- 3
apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php View File

* See the COPYING-README file. * See the COPYING-README file.
*/ */
class TagsPluginTest extends \Test\TestCase { class TagsPluginTest extends \Test\TestCase {
const TAGS_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::TAGS_PROPERTYNAME;
const FAVORITE_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::FAVORITE_PROPERTYNAME;
const TAG_FAVORITE = \OCA\DAV\Connector\Sabre\TagsPlugin::TAG_FAVORITE;
public const TAGS_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::TAGS_PROPERTYNAME;
public const FAVORITE_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::FAVORITE_PROPERTYNAME;
public const TAG_FAVORITE = \OCA\DAV\Connector\Sabre\TagsPlugin::TAG_FAVORITE;


/** /**
* @var \Sabre\DAV\Server * @var \Sabre\DAV\Server

+ 6
- 6
apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php View File

use Sabre\HTTP\ResponseInterface; use Sabre\HTTP\ResponseInterface;


class SystemTagPluginTest extends \Test\TestCase { class SystemTagPluginTest extends \Test\TestCase {
const ID_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::ID_PROPERTYNAME;
const DISPLAYNAME_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::DISPLAYNAME_PROPERTYNAME;
const USERVISIBLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERVISIBLE_PROPERTYNAME;
const USERASSIGNABLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERASSIGNABLE_PROPERTYNAME;
const CANASSIGN_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::CANASSIGN_PROPERTYNAME;
const GROUPS_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::GROUPS_PROPERTYNAME;
public const ID_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::ID_PROPERTYNAME;
public const DISPLAYNAME_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::DISPLAYNAME_PROPERTYNAME;
public const USERVISIBLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERVISIBLE_PROPERTYNAME;
public const USERASSIGNABLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERASSIGNABLE_PROPERTYNAME;
public const CANASSIGN_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::CANASSIGN_PROPERTYNAME;
public const GROUPS_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::GROUPS_PROPERTYNAME;


/** /**
* @var \Sabre\DAV\Server * @var \Sabre\DAV\Server

+ 5
- 5
apps/encryption/lib/Crypto/Crypt.php View File

* @package OCA\Encryption\Crypto * @package OCA\Encryption\Crypto
*/ */
class Crypt { class Crypt {
const DEFAULT_CIPHER = 'AES-256-CTR';
public const DEFAULT_CIPHER = 'AES-256-CTR';
// default cipher from old Nextcloud versions // default cipher from old Nextcloud versions
const LEGACY_CIPHER = 'AES-128-CFB';
public const LEGACY_CIPHER = 'AES-128-CFB';


// default key format, old Nextcloud version encrypted the private key directly // default key format, old Nextcloud version encrypted the private key directly
// with the user password // with the user password
const LEGACY_KEY_FORMAT = 'password';
public const LEGACY_KEY_FORMAT = 'password';


const HEADER_START = 'HBEGIN';
const HEADER_END = 'HEND';
public const HEADER_START = 'HBEGIN';
public const HEADER_END = 'HEND';


/** @var ILogger */ /** @var ILogger */
private $logger; private $logger;

+ 2
- 2
apps/encryption/lib/Crypto/Encryption.php View File

use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;


class Encryption implements IEncryptionModule { class Encryption implements IEncryptionModule {
const ID = 'OC_DEFAULT_MODULE';
const DISPLAY_NAME = 'Default encryption module';
public const ID = 'OC_DEFAULT_MODULE';
public const DISPLAY_NAME = 'Default encryption module';


/** /**
* @var Crypt * @var Crypt

+ 3
- 3
apps/encryption/lib/Session.php View File

/** @var ISession */ /** @var ISession */
protected $session; protected $session;


const NOT_INITIALIZED = '0';
const INIT_EXECUTED = '1';
const INIT_SUCCESSFUL = '2';
public const NOT_INITIALIZED = '0';
public const INIT_EXECUTED = '1';
public const INIT_SUCCESSFUL = '2';


/** /**
* @param ISession $session * @param ISession $session

+ 1
- 1
apps/federatedfilesharing/lib/FederatedShareProvider.php View File

* @package OCA\FederatedFileSharing * @package OCA\FederatedFileSharing
*/ */
class FederatedShareProvider implements IShareProvider { class FederatedShareProvider implements IShareProvider {
const SHARE_TYPE_REMOTE = 6;
public const SHARE_TYPE_REMOTE = 6;


/** @var IDBConnection */ /** @var IDBConnection */
private $dbConnection; private $dbConnection;

+ 1
- 1
apps/federatedfilesharing/lib/Notifications.php View File

use OCP\OCS\IDiscoveryService; use OCP\OCS\IDiscoveryService;


class Notifications { class Notifications {
const RESPONSE_FORMAT = 'json'; // default response format for ocs calls
public const RESPONSE_FORMAT = 'json'; // default response format for ocs calls


/** @var AddressHandler */ /** @var AddressHandler */
private $addressHandler; private $addressHandler;

+ 1
- 1
apps/federatedfilesharing/lib/TokenHandler.php View File

* @package OCA\FederatedFileSharing * @package OCA\FederatedFileSharing
*/ */
class TokenHandler { class TokenHandler {
const TOKEN_LENGTH = 15;
public const TOKEN_LENGTH = 15;


/** @var ISecureRandom */ /** @var ISecureRandom */
private $secureRandom; private $secureRandom;

+ 2
- 2
apps/federatedfilesharing/tests/TestCase.php View File

* Base class for sharing tests. * Base class for sharing tests.
*/ */
abstract class TestCase extends \Test\TestCase { abstract class TestCase extends \Test\TestCase {
const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
public const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
public const TEST_FILES_SHARING_API_USER2 = "test-share-user2";


public static function setUpBeforeClass(): void { public static function setUpBeforeClass(): void {
parent::setUpBeforeClass(); parent::setUpBeforeClass();

+ 4
- 4
apps/federation/lib/TrustedServers.php View File

class TrustedServers { class TrustedServers {


/** after a user list was exchanged at least once successfully */ /** after a user list was exchanged at least once successfully */
const STATUS_OK = 1;
public const STATUS_OK = 1;
/** waiting for shared secret or initial user list exchange */ /** waiting for shared secret or initial user list exchange */
const STATUS_PENDING = 2;
public const STATUS_PENDING = 2;
/** something went wrong, misconfigured server, software bug,... user interaction needed */ /** something went wrong, misconfigured server, software bug,... user interaction needed */
const STATUS_FAILURE = 3;
public const STATUS_FAILURE = 3;
/** remote server revoked access */ /** remote server revoked access */
const STATUS_ACCESS_REVOKED = 4;
public const STATUS_ACCESS_REVOKED = 4;


/** @var dbHandler */ /** @var dbHandler */
private $dbHandler; private $dbHandler;

+ 2
- 2
apps/files/lib/Activity/FavoriteProvider.php View File

use OCP\L10N\IFactory; use OCP\L10N\IFactory;


class FavoriteProvider implements IProvider { class FavoriteProvider implements IProvider {
const SUBJECT_ADDED = 'added_favorite';
const SUBJECT_REMOVED = 'removed_favorite';
public const SUBJECT_ADDED = 'added_favorite';
public const SUBJECT_REMOVED = 'removed_favorite';


/** @var IFactory */ /** @var IFactory */
protected $languageFactory; protected $languageFactory;

+ 1
- 1
apps/files/lib/Activity/Helper.php View File



class Helper { class Helper {
/** If a user has a lot of favorites the query might get too slow and long */ /** If a user has a lot of favorites the query might get too slow and long */
const FAVORITE_LIMIT = 50;
public const FAVORITE_LIMIT = 50;


/** @var ITagManager */ /** @var ITagManager */
protected $tagManager; protected $tagManager;

+ 1
- 1
apps/files/lib/BackgroundJob/DeleteOrphanedItems.php View File

* Delete all share entries that have no matching entries in the file cache table. * Delete all share entries that have no matching entries in the file cache table.
*/ */
class DeleteOrphanedItems extends TimedJob { class DeleteOrphanedItems extends TimedJob {
const CHUNK_SIZE = 200;
public const CHUNK_SIZE = 200;


/** @var \OCP\IDBConnection */ /** @var \OCP\IDBConnection */
protected $connection; protected $connection;

+ 1
- 1
apps/files/lib/BackgroundJob/ScanFiles.php View File

private $logger; private $logger;


/** Amount of users that should get scanned per execution */ /** Amount of users that should get scanned per execution */
const USERS_PER_SESSION = 500;
public const USERS_PER_SESSION = 500;


/** /**
* @param IConfig|null $config * @param IConfig|null $config

+ 1
- 1
apps/files/lib/Command/DeleteOrphanedFiles.php View File

* Delete all file entries that have no matching entries in the storage table. * Delete all file entries that have no matching entries in the storage table.
*/ */
class DeleteOrphanedFiles extends Command { class DeleteOrphanedFiles extends Command {
const CHUNK_SIZE = 200;
public const CHUNK_SIZE = 200;


/** /**
* @var IDBConnection * @var IDBConnection

+ 1
- 1
apps/files_external/lib/Command/ListCommand.php View File

*/ */
protected $userManager; protected $userManager;


const ALL = -1;
public const ALL = -1;


public function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserSession $userSession, IUserManager $userManager) { public function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserSession $userSession, IUserManager $userManager) {
parent::__construct(); parent::__construct();

+ 1
- 1
apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php View File

* Amazon S3 access key authentication * Amazon S3 access key authentication
*/ */
class AccessKey extends AuthMechanism { class AccessKey extends AuthMechanism {
const SCHEME_AMAZONS3_ACCESSKEY = 'amazons3_accesskey';
public const SCHEME_AMAZONS3_ACCESSKEY = 'amazons3_accesskey';


public function __construct(IL10N $l) { public function __construct(IL10N $l) {
$this $this

+ 8
- 8
apps/files_external/lib/Lib/Auth/AuthMechanism.php View File

*/ */
class AuthMechanism implements \JsonSerializable { class AuthMechanism implements \JsonSerializable {
/** Standard authentication schemes */ /** Standard authentication schemes */
const SCHEME_NULL = 'null';
const SCHEME_BUILTIN = 'builtin';
const SCHEME_PASSWORD = 'password';
const SCHEME_OAUTH1 = 'oauth1';
const SCHEME_OAUTH2 = 'oauth2';
const SCHEME_PUBLICKEY = 'publickey';
const SCHEME_OPENSTACK = 'openstack';
const SCHEME_SMB = 'smb';
public const SCHEME_NULL = 'null';
public const SCHEME_BUILTIN = 'builtin';
public const SCHEME_PASSWORD = 'password';
public const SCHEME_OAUTH1 = 'oauth1';
public const SCHEME_OAUTH2 = 'oauth2';
public const SCHEME_PUBLICKEY = 'publickey';
public const SCHEME_OPENSTACK = 'openstack';
public const SCHEME_SMB = 'smb';


use VisibilityTrait; use VisibilityTrait;
use FrontendDefinitionTrait; use FrontendDefinitionTrait;

+ 1
- 1
apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php View File

* Global Username and Password * Global Username and Password
*/ */
class GlobalAuth extends AuthMechanism { class GlobalAuth extends AuthMechanism {
const CREDENTIALS_IDENTIFIER = 'password::global';
public const CREDENTIALS_IDENTIFIER = 'password::global';


/** @var ICredentialsManager */ /** @var ICredentialsManager */
protected $credentialsManager; protected $credentialsManager;

+ 1
- 1
apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php View File

* Username and password from login credentials, saved in DB * Username and password from login credentials, saved in DB
*/ */
class LoginCredentials extends AuthMechanism { class LoginCredentials extends AuthMechanism {
const CREDENTIALS_IDENTIFIER = 'password::logincredentials/credentials';
public const CREDENTIALS_IDENTIFIER = 'password::logincredentials/credentials';


/** @var ISession */ /** @var ISession */
protected $session; protected $session;

+ 1
- 1
apps/files_external/lib/Lib/Auth/Password/UserProvided.php View File

* User provided Username and Password * User provided Username and Password
*/ */
class UserProvided extends AuthMechanism implements IUserProvided { class UserProvided extends AuthMechanism implements IUserProvided {
const CREDENTIALS_IDENTIFIER_PREFIX = 'password::userprovided/';
public const CREDENTIALS_IDENTIFIER_PREFIX = 'password::userprovided/';


/** @var ICredentialsManager */ /** @var ICredentialsManager */
protected $credentialsManager; protected $credentialsManager;

+ 8
- 8
apps/files_external/lib/Lib/DefinitionParameter.php View File

class DefinitionParameter implements \JsonSerializable { class DefinitionParameter implements \JsonSerializable {
// placeholder value for password fields, when the client updates a storage configuration // placeholder value for password fields, when the client updates a storage configuration
// placeholder values are ignored and the field is left unmodified // placeholder values are ignored and the field is left unmodified
const UNMODIFIED_PLACEHOLDER = '__unmodified__';
public const UNMODIFIED_PLACEHOLDER = '__unmodified__';


/** Value constants */ /** Value constants */
const VALUE_TEXT = 0;
const VALUE_BOOLEAN = 1;
const VALUE_PASSWORD = 2;
const VALUE_HIDDEN = 3;
public const VALUE_TEXT = 0;
public const VALUE_BOOLEAN = 1;
public const VALUE_PASSWORD = 2;
public const VALUE_HIDDEN = 3;


/** Flag constants */ /** Flag constants */
const FLAG_NONE = 0;
const FLAG_OPTIONAL = 1;
const FLAG_USER_PROVIDED = 2;
public const FLAG_NONE = 0;
public const FLAG_OPTIONAL = 1;
public const FLAG_USER_PROVIDED = 2;


/** @var string name of parameter */ /** @var string name of parameter */
private $name; private $name;

+ 1
- 1
apps/files_external/lib/Lib/Storage/OwnCloud.php View File

* *
*/ */
class OwnCloud extends \OC\Files\Storage\DAV implements IDisableEncryptionStorage { class OwnCloud extends \OC\Files\Storage\DAV implements IDisableEncryptionStorage {
const OC_URL_SUFFIX = 'remote.php/webdav';
public const OC_URL_SUFFIX = 'remote.php/webdav';


public function __construct($params) { public function __construct($params) {
// extract context path from host if specified // extract context path from host if specified

+ 1
- 1
apps/files_external/lib/Lib/Storage/Swift.php View File

return $path; return $path;
} }


const SUBCONTAINER_FILE = '.subcontainers';
public const SUBCONTAINER_FILE = '.subcontainers';


/** /**
* translate directory path to container name * translate directory path to container name

+ 2
- 2
apps/files_external/lib/Lib/StorageConfig.php View File

* External storage configuration * External storage configuration
*/ */
class StorageConfig implements \JsonSerializable { class StorageConfig implements \JsonSerializable {
const MOUNT_TYPE_ADMIN = 1;
const MOUNT_TYPE_PERSONAl = 2;
public const MOUNT_TYPE_ADMIN = 1;
public const MOUNT_TYPE_PERSONAl = 2;


/** /**
* Storage config id * Storage config id

+ 5
- 5
apps/files_external/lib/Service/BackendService.php View File

class BackendService { class BackendService {


/** Visibility constants for VisibilityTrait */ /** Visibility constants for VisibilityTrait */
const VISIBILITY_NONE = 0;
const VISIBILITY_PERSONAL = 1;
const VISIBILITY_ADMIN = 2;
public const VISIBILITY_NONE = 0;
public const VISIBILITY_PERSONAL = 1;
public const VISIBILITY_ADMIN = 2;
//const VISIBILITY_ALIENS = 4; //const VISIBILITY_ALIENS = 4;


const VISIBILITY_DEFAULT = 3; // PERSONAL | ADMIN
public const VISIBILITY_DEFAULT = 3; // PERSONAL | ADMIN


/** Priority constants for PriorityTrait */ /** Priority constants for PriorityTrait */
const PRIORITY_DEFAULT = 100;
public const PRIORITY_DEFAULT = 100;


/** @var IConfig */ /** @var IConfig */
protected $config; protected $config;

+ 5
- 5
apps/files_external/lib/Service/DBConfigService.php View File

* Stores the mount config in the database * Stores the mount config in the database
*/ */
class DBConfigService { class DBConfigService {
const MOUNT_TYPE_ADMIN = 1;
const MOUNT_TYPE_PERSONAl = 2;
public const MOUNT_TYPE_ADMIN = 1;
public const MOUNT_TYPE_PERSONAl = 2;


const APPLICABLE_TYPE_GLOBAL = 1;
const APPLICABLE_TYPE_GROUP = 2;
const APPLICABLE_TYPE_USER = 3;
public const APPLICABLE_TYPE_GLOBAL = 1;
public const APPLICABLE_TYPE_GROUP = 2;
public const APPLICABLE_TYPE_USER = 3;


/** /**
* @var IDBConnection * @var IDBConnection

+ 4
- 4
apps/files_external/lib/config.php View File

class OC_Mount_Config { class OC_Mount_Config {
// TODO: make this class non-static and give it a proper namespace // TODO: make this class non-static and give it a proper namespace


const MOUNT_TYPE_GLOBAL = 'global';
const MOUNT_TYPE_GROUP = 'group';
const MOUNT_TYPE_USER = 'user';
const MOUNT_TYPE_PERSONAL = 'personal';
public const MOUNT_TYPE_GLOBAL = 'global';
public const MOUNT_TYPE_GROUP = 'group';
public const MOUNT_TYPE_USER = 'user';
public const MOUNT_TYPE_PERSONAL = 'personal';


// whether to skip backend test (for unit tests, as this static class is not mockable) // whether to skip backend test (for unit tests, as this static class is not mockable)
public static $skipTest = false; public static $skipTest = false;

+ 3
- 3
apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php View File



protected $user; protected $user;


const USER_ID = 'test_user';
const GROUP_ID = 'test_group';
const GROUP_ID2 = 'test_group2';
public const USER_ID = 'test_user';
public const GROUP_ID = 'test_group';
public const GROUP_ID2 = 'test_group2';


protected function setUp(): void { protected function setUp(): void {
parent::setUp(); parent::setUp();

+ 2
- 2
apps/files_sharing/lib/Activity/Filter.php View File

use OCP\IURLGenerator; use OCP\IURLGenerator;


class Filter implements IFilter { class Filter implements IFilter {
const TYPE_REMOTE_SHARE = 'remote_share';
const TYPE_SHARED = 'shared';
public const TYPE_REMOTE_SHARE = 'remote_share';
public const TYPE_SHARED = 'shared';


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

+ 4
- 4
apps/files_sharing/lib/Activity/Providers/Downloads.php View File

use OCP\Activity\IEvent; use OCP\Activity\IEvent;


class Downloads extends Base { class Downloads extends Base {
const SUBJECT_PUBLIC_SHARED_FILE_DOWNLOADED = 'public_shared_file_downloaded';
const SUBJECT_PUBLIC_SHARED_FOLDER_DOWNLOADED = 'public_shared_folder_downloaded';
public const SUBJECT_PUBLIC_SHARED_FILE_DOWNLOADED = 'public_shared_file_downloaded';
public const SUBJECT_PUBLIC_SHARED_FOLDER_DOWNLOADED = 'public_shared_folder_downloaded';


const SUBJECT_SHARED_FILE_BY_EMAIL_DOWNLOADED = 'file_shared_with_email_downloaded';
const SUBJECT_SHARED_FOLDER_BY_EMAIL_DOWNLOADED = 'folder_shared_with_email_downloaded';
public const SUBJECT_SHARED_FILE_BY_EMAIL_DOWNLOADED = 'file_shared_with_email_downloaded';
public const SUBJECT_SHARED_FOLDER_BY_EMAIL_DOWNLOADED = 'folder_shared_with_email_downloaded';


/** /**
* @param IEvent $event * @param IEvent $event

+ 5
- 5
apps/files_sharing/lib/Activity/Providers/Groups.php View File

use OCP\L10N\IFactory; use OCP\L10N\IFactory;


class Groups extends Base { class Groups extends Base {
const SUBJECT_SHARED_GROUP_SELF = 'shared_group_self';
const SUBJECT_RESHARED_GROUP_BY = 'reshared_group_by';
public const SUBJECT_SHARED_GROUP_SELF = 'shared_group_self';
public const SUBJECT_RESHARED_GROUP_BY = 'reshared_group_by';


const SUBJECT_UNSHARED_GROUP_SELF = 'unshared_group_self';
const SUBJECT_UNSHARED_GROUP_BY = 'unshared_group_by';
public const SUBJECT_UNSHARED_GROUP_SELF = 'unshared_group_self';
public const SUBJECT_UNSHARED_GROUP_BY = 'unshared_group_by';


const SUBJECT_EXPIRED_GROUP = 'expired_group';
public const SUBJECT_EXPIRED_GROUP = 'expired_group';


/** @var IGroupManager */ /** @var IGroupManager */
protected $groupManager; protected $groupManager;

+ 6
- 6
apps/files_sharing/lib/Activity/Providers/PublicLinks.php View File

use OCP\Activity\IEvent; use OCP\Activity\IEvent;


class PublicLinks extends Base { class PublicLinks extends Base {
const SUBJECT_SHARED_LINK_SELF = 'shared_link_self';
const SUBJECT_RESHARED_LINK_BY = 'reshared_link_by';
const SUBJECT_UNSHARED_LINK_SELF = 'unshared_link_self';
const SUBJECT_UNSHARED_LINK_BY = 'unshared_link_by';
const SUBJECT_LINK_EXPIRED = 'link_expired';
const SUBJECT_LINK_BY_EXPIRED = 'link_by_expired';
public const SUBJECT_SHARED_LINK_SELF = 'shared_link_self';
public const SUBJECT_RESHARED_LINK_BY = 'reshared_link_by';
public const SUBJECT_UNSHARED_LINK_SELF = 'unshared_link_self';
public const SUBJECT_UNSHARED_LINK_BY = 'unshared_link_by';
public const SUBJECT_LINK_EXPIRED = 'link_expired';
public const SUBJECT_LINK_BY_EXPIRED = 'link_by_expired';


/** /**
* @param IEvent $event * @param IEvent $event

+ 4
- 4
apps/files_sharing/lib/Activity/Providers/RemoteShares.php View File

use OCP\L10N\IFactory; use OCP\L10N\IFactory;


class RemoteShares extends Base { class RemoteShares extends Base {
const SUBJECT_REMOTE_SHARE_ACCEPTED = 'remote_share_accepted';
const SUBJECT_REMOTE_SHARE_DECLINED = 'remote_share_declined';
const SUBJECT_REMOTE_SHARE_RECEIVED = 'remote_share_received';
const SUBJECT_REMOTE_SHARE_UNSHARED = 'remote_share_unshared';
public const SUBJECT_REMOTE_SHARE_ACCEPTED = 'remote_share_accepted';
public const SUBJECT_REMOTE_SHARE_DECLINED = 'remote_share_declined';
public const SUBJECT_REMOTE_SHARE_RECEIVED = 'remote_share_received';
public const SUBJECT_REMOTE_SHARE_UNSHARED = 'remote_share_unshared';


public function __construct(IFactory $languageFactory, public function __construct(IFactory $languageFactory,
IURLGenerator $url, IURLGenerator $url,

+ 10
- 10
apps/files_sharing/lib/Activity/Providers/Users.php View File

use OCP\Activity\IEvent; use OCP\Activity\IEvent;


class Users extends Base { class Users extends Base {
const SUBJECT_SHARED_USER_SELF = 'shared_user_self';
const SUBJECT_RESHARED_USER_BY = 'reshared_user_by';
const SUBJECT_UNSHARED_USER_SELF = 'unshared_user_self';
const SUBJECT_UNSHARED_USER_BY = 'unshared_user_by';
public const SUBJECT_SHARED_USER_SELF = 'shared_user_self';
public const SUBJECT_RESHARED_USER_BY = 'reshared_user_by';
public const SUBJECT_UNSHARED_USER_SELF = 'unshared_user_self';
public const SUBJECT_UNSHARED_USER_BY = 'unshared_user_by';


const SUBJECT_SHARED_WITH_BY = 'shared_with_by';
const SUBJECT_UNSHARED_BY = 'unshared_by';
const SUBJECT_SELF_UNSHARED = 'self_unshared';
const SUBJECT_SELF_UNSHARED_BY = 'self_unshared_by';
public const SUBJECT_SHARED_WITH_BY = 'shared_with_by';
public const SUBJECT_UNSHARED_BY = 'unshared_by';
public const SUBJECT_SELF_UNSHARED = 'self_unshared';
public const SUBJECT_SELF_UNSHARED_BY = 'self_unshared_by';


const SUBJECT_EXPIRED_USER = 'expired_user';
const SUBJECT_EXPIRED = 'expired';
public const SUBJECT_EXPIRED_USER = 'expired_user';
public const SUBJECT_EXPIRED = 'expired';


/** /**
* @param IEvent $event * @param IEvent $event

+ 1
- 1
apps/files_sharing/lib/AppInfo/Application.php View File

use Symfony\Component\EventDispatcher\GenericEvent; use Symfony\Component\EventDispatcher\GenericEvent;


class Application extends App { class Application extends App {
const APP_ID = 'files_sharing';
public const APP_ID = 'files_sharing';


public function __construct(array $urlParams = []) { public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams); parent::__construct(self::APP_ID, $urlParams);

+ 1
- 1
apps/files_sharing/lib/External/Manager.php View File

use OCP\Share\IShare; use OCP\Share\IShare;


class Manager { class Manager {
const STORAGE = '\OCA\Files_Sharing\External\Storage';
public const STORAGE = '\OCA\Files_Sharing\External\Storage';


/** /**
* @var string * @var string

+ 1
- 1
apps/files_sharing/lib/External/MountProvider.php View File

use OCP\IUser; use OCP\IUser;


class MountProvider implements IMountProvider { class MountProvider implements IMountProvider {
const STORAGE = '\OCA\Files_Sharing\External\Storage';
public const STORAGE = '\OCA\Files_Sharing\External\Storage';


/** /**
* @var \OCP\IDBConnection * @var \OCP\IDBConnection

+ 7
- 7
apps/files_sharing/lib/ShareBackend/File.php View File

use OCA\FederatedFileSharing\FederatedShareProvider; use OCA\FederatedFileSharing\FederatedShareProvider;


class File implements \OCP\Share_Backend_File_Dependent { class File implements \OCP\Share_Backend_File_Dependent {
const FORMAT_SHARED_STORAGE = 0;
const FORMAT_GET_FOLDER_CONTENTS = 1;
const FORMAT_FILE_APP_ROOT = 2;
const FORMAT_OPENDIR = 3;
const FORMAT_GET_ALL = 4;
const FORMAT_PERMISSIONS = 5;
const FORMAT_TARGET_NAMES = 6;
public const FORMAT_SHARED_STORAGE = 0;
public const FORMAT_GET_FOLDER_CONTENTS = 1;
public const FORMAT_FILE_APP_ROOT = 2;
public const FORMAT_OPENDIR = 3;
public const FORMAT_GET_ALL = 4;
public const FORMAT_PERMISSIONS = 5;
public const FORMAT_TARGET_NAMES = 6;


private $path; private $path;



+ 2
- 2
apps/files_sharing/tests/ApiTest.php View File

* TODO: convert to real intergration tests * TODO: convert to real intergration tests
*/ */
class ApiTest extends TestCase { class ApiTest extends TestCase {
const TEST_FOLDER_NAME = '/folder_share_api_test';
const APP_NAME = 'files_sharing';
public const TEST_FOLDER_NAME = '/folder_share_api_test';
public const APP_NAME = 'files_sharing';


private static $tempStorage; private static $tempStorage;



+ 1
- 1
apps/files_sharing/tests/ShareTest.php View File

* @group DB * @group DB
*/ */
class ShareTest extends TestCase { class ShareTest extends TestCase {
const TEST_FOLDER_NAME = '/folder_share_api_test';
public const TEST_FOLDER_NAME = '/folder_share_api_test';


private static $tempStorage; private static $tempStorage;



+ 5
- 5
apps/files_sharing/tests/TestCase.php View File

abstract class TestCase extends \Test\TestCase { abstract class TestCase extends \Test\TestCase {
use MountProviderTrait; use MountProviderTrait;


const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
const TEST_FILES_SHARING_API_USER3 = "test-share-user3";
const TEST_FILES_SHARING_API_USER4 = "test-share-user4";
public const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
public const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
public const TEST_FILES_SHARING_API_USER3 = "test-share-user3";
public const TEST_FILES_SHARING_API_USER4 = "test-share-user4";


const TEST_FILES_SHARING_API_GROUP1 = "test-share-group1";
public const TEST_FILES_SHARING_API_GROUP1 = "test-share-group1";


public $filename; public $filename;
public $data; public $data;

+ 1
- 1
apps/files_sharing/tests/UnshareChildrenTest.php View File

class UnshareChildrenTest extends TestCase { class UnshareChildrenTest extends TestCase {
protected $subsubfolder; protected $subsubfolder;


const TEST_FOLDER_NAME = '/folder_share_api_test';
public const TEST_FOLDER_NAME = '/folder_share_api_test';


private static $tempStorage; private static $tempStorage;



+ 1
- 1
apps/files_sharing/tests/UpdaterTest.php View File

* @group DB * @group DB
*/ */
class UpdaterTest extends TestCase { class UpdaterTest extends TestCase {
const TEST_FOLDER_NAME = '/folder_share_updater_test';
public const TEST_FOLDER_NAME = '/folder_share_updater_test';


public static function setUpBeforeClass(): void { public static function setUpBeforeClass(): void {
parent::setUpBeforeClass(); parent::setUpBeforeClass();

+ 2
- 2
apps/files_trashbin/lib/Expiration.php View File

class Expiration { class Expiration {


// how long do we keep files in the trash bin if no other value is defined in the config file (unit: days) // how long do we keep files in the trash bin if no other value is defined in the config file (unit: days)
const DEFAULT_RETENTION_OBLIGATION = 30;
const NO_OBLIGATION = -1;
public const DEFAULT_RETENTION_OBLIGATION = 30;
public const NO_OBLIGATION = -1;


/** @var ITimeFactory */ /** @var ITimeFactory */
private $timeFactory; private $timeFactory;

+ 4
- 4
apps/files_trashbin/lib/Sabre/PropfindPlugin.php View File

use Sabre\DAV\ServerPlugin; use Sabre\DAV\ServerPlugin;


class PropfindPlugin extends ServerPlugin { class PropfindPlugin extends ServerPlugin {
const TRASHBIN_FILENAME = '{http://nextcloud.org/ns}trashbin-filename';
const TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location';
const TRASHBIN_DELETION_TIME = '{http://nextcloud.org/ns}trashbin-deletion-time';
const TRASHBIN_TITLE = '{http://nextcloud.org/ns}trashbin-title';
public const TRASHBIN_FILENAME = '{http://nextcloud.org/ns}trashbin-filename';
public const TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location';
public const TRASHBIN_DELETION_TIME = '{http://nextcloud.org/ns}trashbin-deletion-time';
public const TRASHBIN_TITLE = '{http://nextcloud.org/ns}trashbin-title';


/** @var Server */ /** @var Server */
private $server; private $server;

+ 1
- 1
apps/files_trashbin/lib/Trashbin.php View File

class Trashbin { class Trashbin {


// unit: percentage; 50% of available disk space/quota // unit: percentage; 50% of available disk space/quota
const DEFAULTMAXSIZE = 50;
public const DEFAULTMAXSIZE = 50;


/** /**
* Whether versions have already be rescanned during this PHP request * Whether versions have already be rescanned during this PHP request

+ 2
- 2
apps/files_trashbin/tests/ExpirationTest.php View File

use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\MockObject\MockObject;


class ExpirationTest extends \Test\TestCase { class ExpirationTest extends \Test\TestCase {
const SECONDS_PER_DAY = 86400; //60*60*24
public const SECONDS_PER_DAY = 86400; //60*60*24


const FAKE_TIME_NOW = 1000000;
public const FAKE_TIME_NOW = 1000000;


public function expirationData() { public function expirationData() {
$today = 100*self::SECONDS_PER_DAY; $today = 100*self::SECONDS_PER_DAY;

+ 2
- 2
apps/files_trashbin/tests/TrashbinTest.php View File

* @group DB * @group DB
*/ */
class TrashbinTest extends \Test\TestCase { class TrashbinTest extends \Test\TestCase {
const TEST_TRASHBIN_USER1 = "test-trashbin-user1";
const TEST_TRASHBIN_USER2 = "test-trashbin-user2";
public const TEST_TRASHBIN_USER1 = "test-trashbin-user1";
public const TEST_TRASHBIN_USER2 = "test-trashbin-user2";


private $trashRoot1; private $trashRoot1;
private $trashRoot2; private $trashRoot2;

+ 1
- 1
apps/files_versions/lib/AppInfo/Application.php View File

use OCP\EventDispatcher\IEventDispatcher; use OCP\EventDispatcher\IEventDispatcher;


class Application extends App { class Application extends App {
const APP_ID = 'files_versions';
public const APP_ID = 'files_versions';


public function __construct(array $urlParams = []) { public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams); parent::__construct(self::APP_ID, $urlParams);

+ 1
- 1
apps/files_versions/lib/BackgroundJob/ExpireVersions.php View File

use OCP\IUserManager; use OCP\IUserManager;


class ExpireVersions extends \OC\BackgroundJob\TimedJob { class ExpireVersions extends \OC\BackgroundJob\TimedJob {
const ITEMS_PER_SESSION = 1000;
public const ITEMS_PER_SESSION = 1000;


/** /**
* @var Expiration * @var Expiration

+ 1
- 1
apps/files_versions/lib/Expiration.php View File

class Expiration { class Expiration {


// how long do we keep files a version if no other value is defined in the config file (unit: days) // how long do we keep files a version if no other value is defined in the config file (unit: days)
const NO_OBLIGATION = -1;
public const NO_OBLIGATION = -1;


/** @var ITimeFactory */ /** @var ITimeFactory */
private $timeFactory; private $timeFactory;

+ 6
- 6
apps/files_versions/lib/Storage.php View File

use OCP\User; use OCP\User;


class Storage { class Storage {
const DEFAULTENABLED=true;
const DEFAULTMAXSIZE=50; // unit: percentage; 50% of available disk space/quota
const VERSIONS_ROOT = 'files_versions/';
public const DEFAULTENABLED=true;
public const DEFAULTMAXSIZE=50; // unit: percentage; 50% of available disk space/quota
public const VERSIONS_ROOT = 'files_versions/';


const DELETE_TRIGGER_MASTER_REMOVED = 0;
const DELETE_TRIGGER_RETENTION_CONSTRAINT = 1;
const DELETE_TRIGGER_QUOTA_EXCEEDED = 2;
public const DELETE_TRIGGER_MASTER_REMOVED = 0;
public const DELETE_TRIGGER_RETENTION_CONSTRAINT = 1;
public const DELETE_TRIGGER_QUOTA_EXCEEDED = 2;


// files for which we can remove the versions after the delete operation was successful // files for which we can remove the versions after the delete operation was successful
private static $deletedFiles = []; private static $deletedFiles = [];

+ 1
- 1
apps/files_versions/tests/ExpirationTest.php View File

use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\MockObject\MockObject;


class ExpirationTest extends \Test\TestCase { class ExpirationTest extends \Test\TestCase {
const SECONDS_PER_DAY = 86400; //60*60*24
public const SECONDS_PER_DAY = 86400; //60*60*24


public function expirationData() { public function expirationData() {
$today = 100*self::SECONDS_PER_DAY; $today = 100*self::SECONDS_PER_DAY;

+ 0
- 0
apps/files_versions/tests/VersioningTest.php View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save