Helper

class OC\Share\Helper
Source:lib/private/Share/Helper.php#29
Parent:OC\Share\Constants

Methods

public static OC\Share\Helper::getDefaultExpireSetting()
get default expire settings defined by the admin
Source:lib/private/Share/Helper.php#35
Returns:array contains ‘defaultExpireDateSet’, ‘enforceExpireDate’, ‘expireAfterDays’
public static OC\Share\Helper::calcExpireDate()
Source:lib/private/Share/Helper.php#52
public static OC\Share\Helper::calculateExpireDate($defaultExpireSettings, $creationTime, $userExpireDate=null)
calculate expire date
Source:

lib/private/Share/Helper.php#70

Parameters:
  • $defaultExpireSettings (array) contains ‘defaultExpireDateSet’, ‘enforceExpireDate’, ‘expireAfterDays’
  • $creationTime (int) timestamp when the share was created
  • $userExpireDate (int) expire timestamp set by the user
Returns:

mixed integer timestamp or False

protected static OC\Share\Helper::fixRemoteURL($remote)
Strips away a potential file names and trailing slashes:
all return: http://localhost
Source:

lib/private/Share/Helper.php#106

Parameters:
  • $remote (string)
Returns:

string

public static OC\Share\Helper::isSameUserOnSameServer($user1, $server1, $user2, $server2)
check if two federated cloud IDs refer to the same user
Source:

lib/private/Share/Helper.php#125

Parameters:
  • $user1 (string)
  • $server1 (string)
  • $user2 (string)
  • $server2 (string)
Returns:

bool true if both users and servers are the same