Merge pull request #20391 from nextcloud/refactor/spaces-cleanup
Remove all extra whitespace PSR2 does not like
This commit is contained in:
commit
008e6d7e84
|
@ -133,7 +133,7 @@ class RequestHandlerController extends Controller {
|
||||||
$shareType === null ||
|
$shareType === null ||
|
||||||
!is_array($protocol) ||
|
!is_array($protocol) ||
|
||||||
!isset($protocol['name']) ||
|
!isset($protocol['name']) ||
|
||||||
!isset ($protocol['options']) ||
|
!isset($protocol['options']) ||
|
||||||
!is_array($protocol['options']) ||
|
!is_array($protocol['options']) ||
|
||||||
!isset($protocol['options']['sharedSecret'])
|
!isset($protocol['options']['sharedSecret'])
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ class EventHandler implements ICommentsEventHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
$eventType = $event->getEvent();
|
$eventType = $event->getEvent();
|
||||||
if( $eventType === CommentsEvent::EVENT_ADD
|
if($eventType === CommentsEvent::EVENT_ADD
|
||||||
) {
|
) {
|
||||||
$this->notificationHandler($event);
|
$this->notificationHandler($event);
|
||||||
$this->activityHandler($event);
|
$this->activityHandler($event);
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Listener {
|
||||||
$notification = $this->instantiateNotification($comment);
|
$notification = $this->instantiateNotification($comment);
|
||||||
|
|
||||||
foreach($mentions as $uid) {
|
foreach($mentions as $uid) {
|
||||||
if( ($comment->getActorType() === 'users' && $uid === $comment->getActorId())
|
if(($comment->getActorType() === 'users' && $uid === $comment->getActorId())
|
||||||
|| !$this->userManager->userExists($uid)
|
|| !$this->userManager->userExists($uid)
|
||||||
) {
|
) {
|
||||||
// do not notify unknown users or yourself
|
// do not notify unknown users or yourself
|
||||||
|
@ -73,7 +73,7 @@ class Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
$notification->setUser($uid);
|
$notification->setUser($uid);
|
||||||
if( $event->getEvent() === CommentsEvent::EVENT_DELETE
|
if($event->getEvent() === CommentsEvent::EVENT_DELETE
|
||||||
|| $event->getEvent() === CommentsEvent::EVENT_PRE_UPDATE)
|
|| $event->getEvent() === CommentsEvent::EVENT_PRE_UPDATE)
|
||||||
{
|
{
|
||||||
$this->notificationManager->markProcessed($notification);
|
$this->notificationManager->markProcessed($notification);
|
||||||
|
|
|
@ -135,7 +135,7 @@ class CachedSubscription extends \Sabre\CalDAV\Calendar {
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj['acl'] = $this->getChildACL();
|
$obj['acl'] = $this->getChildACL();
|
||||||
return new CachedSubscriptionObject ($this->caldavBackend, $this->calendarInfo, $obj);
|
return new CachedSubscriptionObject($this->caldavBackend, $this->calendarInfo, $obj);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -805,11 +805,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
||||||
foreach ($mutations as $propertyName => $propertyValue) {
|
foreach ($mutations as $propertyName => $propertyValue) {
|
||||||
|
|
||||||
switch ($propertyName) {
|
switch ($propertyName) {
|
||||||
case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' :
|
case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp':
|
||||||
$fieldName = 'transparent';
|
$fieldName = 'transparent';
|
||||||
$newValues[$fieldName] = (int) ($propertyValue->getValue() === 'transparent');
|
$newValues[$fieldName] = (int) ($propertyValue->getValue() === 'transparent');
|
||||||
break;
|
break;
|
||||||
default :
|
default:
|
||||||
$fieldName = $this->propertyMap[$propertyName];
|
$fieldName = $this->propertyMap[$propertyName];
|
||||||
$newValues[$fieldName] = $propertyValue;
|
$newValues[$fieldName] = $propertyValue;
|
||||||
break;
|
break;
|
||||||
|
@ -1812,13 +1812,13 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
||||||
foreach($changes as $uri => $operation) {
|
foreach($changes as $uri => $operation) {
|
||||||
|
|
||||||
switch($operation) {
|
switch($operation) {
|
||||||
case 1 :
|
case 1:
|
||||||
$result['added'][] = $uri;
|
$result['added'][] = $uri;
|
||||||
break;
|
break;
|
||||||
case 2 :
|
case 2:
|
||||||
$result['modified'][] = $uri;
|
$result['modified'][] = $uri;
|
||||||
break;
|
break;
|
||||||
case 3 :
|
case 3:
|
||||||
$result['deleted'][] = $uri;
|
$result['deleted'][] = $uri;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,7 +176,7 @@ class PublishPlugin extends ServerPlugin {
|
||||||
|
|
||||||
switch ($documentType) {
|
switch ($documentType) {
|
||||||
|
|
||||||
case '{'.self::NS_CALENDARSERVER.'}publish-calendar' :
|
case '{'.self::NS_CALENDARSERVER.'}publish-calendar':
|
||||||
|
|
||||||
// We can only deal with IShareableCalendar objects
|
// We can only deal with IShareableCalendar objects
|
||||||
if (!$node instanceof Calendar) {
|
if (!$node instanceof Calendar) {
|
||||||
|
@ -204,7 +204,7 @@ class PublishPlugin extends ServerPlugin {
|
||||||
// Breaking the event chain
|
// Breaking the event chain
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
case '{'.self::NS_CALENDARSERVER.'}unpublish-calendar' :
|
case '{'.self::NS_CALENDARSERVER.'}unpublish-calendar':
|
||||||
|
|
||||||
// We can only deal with IShareableCalendar objects
|
// We can only deal with IShareableCalendar objects
|
||||||
if (!$node instanceof Calendar) {
|
if (!$node instanceof Calendar) {
|
||||||
|
|
|
@ -369,10 +369,10 @@ class CardDavBackend implements BackendInterface, SyncSupport {
|
||||||
foreach($mutations as $property=>$newValue) {
|
foreach($mutations as $property=>$newValue) {
|
||||||
|
|
||||||
switch($property) {
|
switch($property) {
|
||||||
case '{DAV:}displayname' :
|
case '{DAV:}displayname':
|
||||||
$updates['displayname'] = $newValue;
|
$updates['displayname'] = $newValue;
|
||||||
break;
|
break;
|
||||||
case '{' . Plugin::NS_CARDDAV . '}addressbook-description' :
|
case '{' . Plugin::NS_CARDDAV . '}addressbook-description':
|
||||||
$updates['description'] = $newValue;
|
$updates['description'] = $newValue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -414,13 +414,13 @@ class CardDavBackend implements BackendInterface, SyncSupport {
|
||||||
foreach($properties as $property=>$newValue) {
|
foreach($properties as $property=>$newValue) {
|
||||||
|
|
||||||
switch($property) {
|
switch($property) {
|
||||||
case '{DAV:}displayname' :
|
case '{DAV:}displayname':
|
||||||
$values['displayname'] = $newValue;
|
$values['displayname'] = $newValue;
|
||||||
break;
|
break;
|
||||||
case '{' . Plugin::NS_CARDDAV . '}addressbook-description' :
|
case '{' . Plugin::NS_CARDDAV . '}addressbook-description':
|
||||||
$values['description'] = $newValue;
|
$values['description'] = $newValue;
|
||||||
break;
|
break;
|
||||||
default :
|
default:
|
||||||
throw new BadRequest('Unknown property: ' . $property);
|
throw new BadRequest('Unknown property: ' . $property);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ class ImageExportPlugin extends ServerPlugin {
|
||||||
$addressbook = $this->server->tree->getNodeForPath($addressbookpath);
|
$addressbook = $this->server->tree->getNodeForPath($addressbookpath);
|
||||||
|
|
||||||
$response->setHeader('Cache-Control', 'private, max-age=3600, must-revalidate');
|
$response->setHeader('Cache-Control', 'private, max-age=3600, must-revalidate');
|
||||||
$response->setHeader('Etag', $node->getETag() );
|
$response->setHeader('Etag', $node->getETag());
|
||||||
$response->setHeader('Pragma', 'public');
|
$response->setHeader('Pragma', 'public');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -131,7 +131,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties {
|
||||||
|
|
||||||
protected function checkWriteAccessOnComment() {
|
protected function checkWriteAccessOnComment() {
|
||||||
$user = $this->userSession->getUser();
|
$user = $this->userSession->getUser();
|
||||||
if( $this->comment->getActorType() !== 'users'
|
if($this->comment->getActorType() !== 'users'
|
||||||
|| is_null($user)
|
|| is_null($user)
|
||||||
|| $this->comment->getActorId() !== $user->getUID()
|
|| $this->comment->getActorId() !== $user->getUID()
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -512,7 +512,7 @@ class File extends Node implements IFile {
|
||||||
$bytesWritten = $chunk_handler->store($info['index'], $data);
|
$bytesWritten = $chunk_handler->store($info['index'], $data);
|
||||||
|
|
||||||
//detect aborted upload
|
//detect aborted upload
|
||||||
if (isset ($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') {
|
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') {
|
||||||
if (isset($_SERVER['CONTENT_LENGTH'])) {
|
if (isset($_SERVER['CONTENT_LENGTH'])) {
|
||||||
$expected = (int)$_SERVER['CONTENT_LENGTH'];
|
$expected = (int)$_SERVER['CONTENT_LENGTH'];
|
||||||
if ($bytesWritten !== $expected) {
|
if ($bytesWritten !== $expected) {
|
||||||
|
|
|
@ -149,7 +149,7 @@ class Plugin extends ServerPlugin {
|
||||||
|
|
||||||
// Dealing with the 'share' document, which modified invitees on a
|
// Dealing with the 'share' document, which modified invitees on a
|
||||||
// calendar.
|
// calendar.
|
||||||
case '{' . self::NS_OWNCLOUD . '}share' :
|
case '{' . self::NS_OWNCLOUD . '}share':
|
||||||
|
|
||||||
// We can only deal with IShareableCalendar objects
|
// We can only deal with IShareableCalendar objects
|
||||||
if (!$node instanceof IShareable) {
|
if (!$node instanceof IShareable) {
|
||||||
|
|
|
@ -59,7 +59,7 @@ class ShareRequest implements XmlDeserializable {
|
||||||
foreach ($elements as $elem) {
|
foreach ($elements as $elem) {
|
||||||
switch ($elem['name']) {
|
switch ($elem['name']) {
|
||||||
|
|
||||||
case '{' . Plugin::NS_OWNCLOUD . '}set' :
|
case '{' . Plugin::NS_OWNCLOUD . '}set':
|
||||||
$sharee = $elem['value'];
|
$sharee = $elem['value'];
|
||||||
|
|
||||||
$sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary';
|
$sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary';
|
||||||
|
@ -73,7 +73,7 @@ class ShareRequest implements XmlDeserializable {
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '{' . Plugin::NS_OWNCLOUD . '}remove' :
|
case '{' . Plugin::NS_OWNCLOUD . '}remove':
|
||||||
$remove[] = $elem['value']['{DAV:}href'];
|
$remove[] = $elem['value']['{DAV:}href'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ class IMipPluginTest extends TestCase {
|
||||||
->with('dav', 'invitation_link_recipients', 'yes')
|
->with('dav', 'invitation_link_recipients', 'yes')
|
||||||
->willReturn('yes');
|
->willReturn('yes');
|
||||||
|
|
||||||
$message = $this->_testMessage( $veventParams );
|
$message = $this->_testMessage($veventParams);
|
||||||
|
|
||||||
$this->_expectSend('frodo@hobb.it', $expectsMail, $expectsMail);
|
$this->_expectSend('frodo@hobb.it', $expectsMail, $expectsMail);
|
||||||
|
|
||||||
|
@ -274,8 +274,8 @@ class IMipPluginTest extends TestCase {
|
||||||
'SUMMARY' => 'Fellowship meeting',
|
'SUMMARY' => 'Fellowship meeting',
|
||||||
'DTSTART' => new \DateTime('2018-01-01 00:00:00')
|
'DTSTART' => new \DateTime('2018-01-01 00:00:00')
|
||||||
], $attrs));
|
], $attrs));
|
||||||
$message->message->VEVENT->add( 'ORGANIZER', 'mailto:gandalf@wiz.ard' );
|
$message->message->VEVENT->add('ORGANIZER', 'mailto:gandalf@wiz.ard');
|
||||||
$message->message->VEVENT->add( 'ATTENDEE', 'mailto:'.$recipient, [ 'RSVP' => 'TRUE' ] );
|
$message->message->VEVENT->add('ATTENDEE', 'mailto:'.$recipient, [ 'RSVP' => 'TRUE' ]);
|
||||||
$message->sender = 'mailto:gandalf@wiz.ard';
|
$message->sender = 'mailto:gandalf@wiz.ard';
|
||||||
$message->senderName = 'Mr. Wizard';
|
$message->senderName = 'Mr. Wizard';
|
||||||
$message->recipient = 'mailto:'.$recipient;
|
$message->recipient = 'mailto:'.$recipient;
|
||||||
|
|
|
@ -62,7 +62,7 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNode() {
|
public function getNode() {
|
||||||
return new \OCA\DAV\SystemTag\SystemTagsObjectMappingCollection (
|
return new \OCA\DAV\SystemTag\SystemTagsObjectMappingCollection(
|
||||||
111,
|
111,
|
||||||
'files',
|
'files',
|
||||||
$this->user,
|
$this->user,
|
||||||
|
|
|
@ -121,7 +121,7 @@ class RecoveryController extends Controller {
|
||||||
|
|
||||||
if (empty($newPassword)) {
|
if (empty($newPassword)) {
|
||||||
$errorMessage = (string)$this->l->t('Please provide a new recovery password');
|
$errorMessage = (string)$this->l->t('Please provide a new recovery password');
|
||||||
return new DataResponse (['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST);
|
return new DataResponse(['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($confirmPassword)) {
|
if (empty($confirmPassword)) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ class StatusController extends Controller {
|
||||||
|
|
||||||
$status = 'error';
|
$status = 'error';
|
||||||
$message = 'no valid init status';
|
$message = 'no valid init status';
|
||||||
switch( $this->session->getStatus()) {
|
switch($this->session->getStatus()) {
|
||||||
case Session::INIT_EXECUTED:
|
case Session::INIT_EXECUTED:
|
||||||
$status = 'interactionNeeded';
|
$status = 'interactionNeeded';
|
||||||
$message = (string)$this->l->t(
|
$message = (string)$this->l->t(
|
||||||
|
|
|
@ -473,11 +473,11 @@ class EncryptAll {
|
||||||
protected function createMailBody($password) {
|
protected function createMailBody($password) {
|
||||||
|
|
||||||
$html = new \OC_Template("encryption", "mail", "");
|
$html = new \OC_Template("encryption", "mail", "");
|
||||||
$html->assign ('password', $password);
|
$html->assign('password', $password);
|
||||||
$htmlMail = $html->fetchPage();
|
$htmlMail = $html->fetchPage();
|
||||||
|
|
||||||
$plainText = new \OC_Template("encryption", "altmail", "");
|
$plainText = new \OC_Template("encryption", "altmail", "");
|
||||||
$plainText->assign ('password', $password);
|
$plainText->assign('password', $password);
|
||||||
$plainTextMail = $plainText->fetchPage();
|
$plainTextMail = $plainText->fetchPage();
|
||||||
|
|
||||||
return [$htmlMail, $plainTextMail];
|
return [$htmlMail, $plainTextMail];
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/** @var array $_ */
|
/** @var array $_ */
|
||||||
|
|
||||||
print_unescaped($l->t("Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n", [$_['password']]));
|
print_unescaped($l->t("Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n", [$_['password']]));
|
||||||
if ( isset($_['expiration']) ) {
|
if (isset($_['expiration'])) {
|
||||||
print_unescaped($l->t("The share will expire on %s.", [$_['expiration']]));
|
print_unescaped($l->t("The share will expire on %s.", [$_['expiration']]));
|
||||||
print_unescaped("\n\n");
|
print_unescaped("\n\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ style('encryption', 'settings-admin');
|
||||||
<input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage"
|
<input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage"
|
||||||
value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"'); ?> />
|
value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"'); ?> />
|
||||||
<label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br>
|
<label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br>
|
||||||
<em><?php p( $l->t( "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" ) ); ?></em>
|
<em><?php p($l->t("Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted")); ?></em>
|
||||||
</p>
|
</p>
|
||||||
<br />
|
<br />
|
||||||
<?php if($_['masterKeyEnabled'] === false): ?>
|
<?php if($_['masterKeyEnabled'] === false): ?>
|
||||||
|
|
|
@ -6,49 +6,49 @@ script('encryption', 'settings-personal');
|
||||||
<form id="ocDefaultEncryptionModule" class="section">
|
<form id="ocDefaultEncryptionModule" class="section">
|
||||||
<h2 data-anchor-name="basic-encryption-module"><?php p($l->t('Basic encryption module')); ?></h2>
|
<h2 data-anchor-name="basic-encryption-module"><?php p($l->t('Basic encryption module')); ?></h2>
|
||||||
|
|
||||||
<?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?>
|
<?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED): ?>
|
||||||
|
|
||||||
<?php p($l->t("Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again.")); ?>
|
<?php p($l->t("Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again.")); ?>
|
||||||
|
|
||||||
<?php elseif ( $_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED ): ?>
|
<?php elseif ($_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED): ?>
|
||||||
<p>
|
<p>
|
||||||
<a name="changePKPasswd" />
|
<a name="changePKPasswd" />
|
||||||
<label for="changePrivateKeyPasswd">
|
<label for="changePrivateKeyPasswd">
|
||||||
<em><?php p( $l->t( "Your private key password no longer matches your log-in password." ) ); ?></em>
|
<em><?php p($l->t("Your private key password no longer matches your log-in password.")); ?></em>
|
||||||
</label>
|
</label>
|
||||||
<br />
|
<br />
|
||||||
<?php p( $l->t( "Set your old private key password to your current log-in password:" ) ); ?>
|
<?php p($l->t("Set your old private key password to your current log-in password:")); ?>
|
||||||
<?php if ( $_["recoveryEnabledForUser"] ):
|
<?php if ($_["recoveryEnabledForUser"]):
|
||||||
p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) );
|
p($l->t(" If you don't remember your old password you can ask your administrator to recover your files."));
|
||||||
endif; ?>
|
endif; ?>
|
||||||
<br />
|
<br />
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
name="changePrivateKeyPassword"
|
name="changePrivateKeyPassword"
|
||||||
id="oldPrivateKeyPassword" />
|
id="oldPrivateKeyPassword" />
|
||||||
<label for="oldPrivateKeyPassword"><?php p($l->t( "Old log-in password" )); ?></label>
|
<label for="oldPrivateKeyPassword"><?php p($l->t("Old log-in password")); ?></label>
|
||||||
<br />
|
<br />
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
name="changePrivateKeyPassword"
|
name="changePrivateKeyPassword"
|
||||||
id="newPrivateKeyPassword" />
|
id="newPrivateKeyPassword" />
|
||||||
<label for="newRecoveryPassword"><?php p($l->t( "Current log-in password" )); ?></label>
|
<label for="newRecoveryPassword"><?php p($l->t("Current log-in password")); ?></label>
|
||||||
<br />
|
<br />
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
name="submitChangePrivateKeyPassword"
|
name="submitChangePrivateKeyPassword"
|
||||||
disabled><?php p($l->t( "Update Private Key Password" )); ?>
|
disabled><?php p($l->t("Update Private Key Password")); ?>
|
||||||
</button>
|
</button>
|
||||||
<span class="msg"></span>
|
<span class="msg"></span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php elseif ( $_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL ): ?>
|
<?php elseif ($_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL): ?>
|
||||||
<br />
|
<br />
|
||||||
<p id="userEnableRecovery">
|
<p id="userEnableRecovery">
|
||||||
<label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label>
|
<label for="userEnableRecovery"><?php p($l->t("Enable password recovery:")); ?></label>
|
||||||
<span class="msg"></span>
|
<span class="msg"></span>
|
||||||
<br />
|
<br />
|
||||||
<em><?php p( $l->t( "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" ) ); ?></em>
|
<em><?php p($l->t("Enabling this option will allow you to reobtain access to your encrypted files in case of password loss")); ?></em>
|
||||||
<br />
|
<br />
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
|
@ -56,8 +56,8 @@ script('encryption', 'settings-personal');
|
||||||
id="userEnableRecoveryCheckbox"
|
id="userEnableRecoveryCheckbox"
|
||||||
name="userEnableRecovery"
|
name="userEnableRecovery"
|
||||||
value="1"
|
value="1"
|
||||||
<?php echo ( $_["recoveryEnabledForUser"] ? 'checked="checked"' : '' ); ?> />
|
<?php echo($_["recoveryEnabledForUser"] ? 'checked="checked"' : ''); ?> />
|
||||||
<label for="userEnableRecoveryCheckbox"><?php p( $l->t( "Enabled" ) ); ?></label>
|
<label for="userEnableRecoveryCheckbox"><?php p($l->t("Enabled")); ?></label>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<input
|
<input
|
||||||
|
@ -66,8 +66,8 @@ script('encryption', 'settings-personal');
|
||||||
id="userDisableRecoveryCheckbox"
|
id="userDisableRecoveryCheckbox"
|
||||||
name="userEnableRecovery"
|
name="userEnableRecovery"
|
||||||
value="0"
|
value="0"
|
||||||
<?php echo ( $_["recoveryEnabledForUser"] === false ? 'checked="checked"' : '' ); ?> />
|
<?php echo($_["recoveryEnabledForUser"] === false ? 'checked="checked"' : ''); ?> />
|
||||||
<label for="userDisableRecoveryCheckbox"><?php p( $l->t( "Disabled" ) ); ?></label>
|
<label for="userDisableRecoveryCheckbox"><?php p($l->t("Disabled")); ?></label>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -146,7 +146,7 @@ class MountPublicLinkController extends Controller {
|
||||||
$storedPassword = $share->getPassword();
|
$storedPassword = $share->getPassword();
|
||||||
$authenticated = $this->session->get('public_link_authenticated') === $share->getId() ||
|
$authenticated = $this->session->get('public_link_authenticated') === $share->getId() ||
|
||||||
$this->shareManager->checkPassword($share, $password);
|
$this->shareManager->checkPassword($share, $password);
|
||||||
if (!empty($storedPassword) && !$authenticated ) {
|
if (!empty($storedPassword) && !$authenticated) {
|
||||||
$response = new JSONResponse(
|
$response = new JSONResponse(
|
||||||
['message' => 'No permission to access the share'],
|
['message' => 'No permission to access the share'],
|
||||||
Http::STATUS_BAD_REQUEST
|
Http::STATUS_BAD_REQUEST
|
||||||
|
|
|
@ -173,7 +173,7 @@ class Scan extends Base {
|
||||||
$inputPath = $input->getOption('path');
|
$inputPath = $input->getOption('path');
|
||||||
if ($inputPath) {
|
if ($inputPath) {
|
||||||
$inputPath = '/' . trim($inputPath, '/');
|
$inputPath = '/' . trim($inputPath, '/');
|
||||||
list (, $user,) = explode('/', $inputPath, 3);
|
list(, $user,) = explode('/', $inputPath, 3);
|
||||||
$users = [$user];
|
$users = [$user];
|
||||||
} else if ($input->getOption('all')) {
|
} else if ($input->getOption('all')) {
|
||||||
$users = $this->userManager->search('');
|
$users = $this->userManager->search('');
|
||||||
|
|
|
@ -37,4 +37,3 @@ $tmpl = new OCP\Template('files', 'list', '');
|
||||||
$tmpl->assign('showgridview', $showgridview && !$isIE);
|
$tmpl->assign('showgridview', $showgridview && !$isIE);
|
||||||
$tmpl->assign('publicUploadEnabled', $publicUploadEnabled);
|
$tmpl->assign('publicUploadEnabled', $publicUploadEnabled);
|
||||||
$tmpl->printPage();
|
$tmpl->printPage();
|
||||||
|
|
||||||
|
|
|
@ -35,4 +35,3 @@ $tmpl = new OCP\Template('files', 'simplelist', '');
|
||||||
// gridview not available for ie
|
// gridview not available for ie
|
||||||
$tmpl->assign('showgridview', $showgridview && !$isIE);
|
$tmpl->assign('showgridview', $showgridview && !$isIE);
|
||||||
$tmpl->printPage();
|
$tmpl->printPage();
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<th id='headerName' class="hidden column-name">
|
<th id='headerName' class="hidden column-name">
|
||||||
<div id="headerName-container">
|
<div id="headerName-container">
|
||||||
<a class="name sort columntitle" data-sort="name">
|
<a class="name sort columntitle" data-sort="name">
|
||||||
<span><?php p($l->t( 'Name' )); ?></span>
|
<span><?php p($l->t('Name')); ?></span>
|
||||||
<span class="sort-indicator"></span>
|
<span class="sort-indicator"></span>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
<a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a>
|
<a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</th>
|
</th>
|
||||||
<th id="headerDate" class="hidden column-mtime">
|
<th id="headerDate" class="hidden column-mtime">
|
||||||
<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a>
|
<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th id='headerName' class="hidden column-name">
|
<th id='headerName' class="hidden column-name">
|
||||||
<div id="headerName-container">
|
<div id="headerName-container">
|
||||||
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a>
|
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th id="headerSize" class="hidden column-size">
|
<th id="headerSize" class="hidden column-size">
|
||||||
<a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a>
|
<a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</th>
|
</th>
|
||||||
<th id="headerDate" class="hidden column-mtime">
|
<th id="headerDate" class="hidden column-mtime">
|
||||||
<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a>
|
<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a>
|
||||||
<span class="selectedActions">
|
<span class="selectedActions">
|
||||||
<a href="" class="delete-selected">
|
<a href="" class="delete-selected">
|
||||||
<img class="svg" alt=""
|
<img class="svg" alt=""
|
||||||
|
|
|
@ -56,7 +56,7 @@ class FTP extends StreamWrapper{
|
||||||
$this->secure = false;
|
$this->secure = false;
|
||||||
}
|
}
|
||||||
$this->root=isset($params['root'])?$params['root']:'/';
|
$this->root=isset($params['root'])?$params['root']:'/';
|
||||||
if ( ! $this->root || $this->root[0]!=='/') {
|
if (! $this->root || $this->root[0]!=='/') {
|
||||||
$this->root='/'.$this->root;
|
$this->root='/'.$this->root;
|
||||||
}
|
}
|
||||||
if (substr($this->root, -1) !== '/') {
|
if (substr($this->root, -1) !== '/') {
|
||||||
|
|
|
@ -371,7 +371,7 @@ class SFTP extends \OC\Files\Storage\Common {
|
||||||
switch($mode) {
|
switch($mode) {
|
||||||
case 'r':
|
case 'r':
|
||||||
case 'rb':
|
case 'rb':
|
||||||
if ( !$this->file_exists($path)) {
|
if (!$this->file_exists($path)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SFTPReadStream::register();
|
SFTPReadStream::register();
|
||||||
|
|
|
@ -180,4 +180,3 @@ class SFTPWriteStream implements File {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th id='headerName' class="hidden column-name">
|
<th id='headerName' class="hidden column-name">
|
||||||
<div id="headerName-container">
|
<div id="headerName-container">
|
||||||
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a>
|
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th id="headerBackend" class="hidden column-backend">
|
<th id="headerBackend" class="hidden column-backend">
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
use \OCA\Files_External\Lib\Backend\Backend;
|
use \OCA\Files_External\Lib\Backend\Backend;
|
||||||
use \OCA\Files_External\Lib\Auth\AuthMechanism;
|
use \OCA\Files_External\Lib\Auth\AuthMechanism;
|
||||||
use \OCA\Files_External\Lib\DefinitionParameter;
|
use \OCA\Files_External\Lib\DefinitionParameter;
|
||||||
use \OCA\Files_External\Service\BackendService;
|
use \OCA\Files_External\Service\BackendService;
|
||||||
|
|
||||||
$canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN || $_['allowUserMounting'];
|
$canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN || $_['allowUserMounting'];
|
||||||
|
|
||||||
$l->t("Enable encryption");
|
$l->t("Enable encryption");
|
||||||
$l->t("Enable previews");
|
$l->t("Enable previews");
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
});
|
});
|
||||||
?>
|
?>
|
||||||
<?php foreach ($sortedBackends as $backend): ?>
|
<?php foreach ($sortedBackends as $backend): ?>
|
||||||
<?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends ?>
|
<?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends?>
|
||||||
<option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option>
|
<option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -45,7 +45,7 @@ class Amazons3Test extends \Test\Files\Storage\Storage {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->config = include('files_external/tests/config.amazons3.php');
|
$this->config = include('files_external/tests/config.amazons3.php');
|
||||||
if ( ! is_array($this->config) or ! $this->config['run']) {
|
if (! is_array($this->config) or ! $this->config['run']) {
|
||||||
$this->markTestSkipped('AmazonS3 backend not configured');
|
$this->markTestSkipped('AmazonS3 backend not configured');
|
||||||
}
|
}
|
||||||
$this->instance = new AmazonS3($this->config);
|
$this->instance = new AmazonS3($this->config);
|
||||||
|
|
|
@ -47,7 +47,7 @@ class FtpTest extends \Test\Files\Storage\Storage {
|
||||||
|
|
||||||
$id = $this->getUniqueID();
|
$id = $this->getUniqueID();
|
||||||
$this->config = include('files_external/tests/config.ftp.php');
|
$this->config = include('files_external/tests/config.ftp.php');
|
||||||
if ( ! is_array($this->config) or ! $this->config['run']) {
|
if (! is_array($this->config) or ! $this->config['run']) {
|
||||||
$this->markTestSkipped('FTP backend not configured');
|
$this->markTestSkipped('FTP backend not configured');
|
||||||
}
|
}
|
||||||
$this->config['root'] .= '/' . $id; //make sure we have an new empty folder to work in
|
$this->config['root'] .= '/' . $id; //make sure we have an new empty folder to work in
|
||||||
|
|
|
@ -45,7 +45,7 @@ class OwncloudTest extends \Test\Files\Storage\Storage {
|
||||||
|
|
||||||
$id = $this->getUniqueID();
|
$id = $this->getUniqueID();
|
||||||
$this->config = include('files_external/tests/config.php');
|
$this->config = include('files_external/tests/config.php');
|
||||||
if ( ! is_array($this->config) or ! isset($this->config['owncloud']) or ! $this->config['owncloud']['run']) {
|
if (! is_array($this->config) or ! isset($this->config['owncloud']) or ! $this->config['owncloud']['run']) {
|
||||||
$this->markTestSkipped('Nextcloud backend not configured');
|
$this->markTestSkipped('Nextcloud backend not configured');
|
||||||
}
|
}
|
||||||
$this->config['owncloud']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
|
$this->config['owncloud']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
|
||||||
|
|
|
@ -44,7 +44,7 @@ class SFTP_KeyTest extends \Test\Files\Storage\Storage {
|
||||||
|
|
||||||
$id = $this->getUniqueID();
|
$id = $this->getUniqueID();
|
||||||
$this->config = include('files_external/tests/config.php');
|
$this->config = include('files_external/tests/config.php');
|
||||||
if ( ! is_array($this->config) or ! isset($this->config['sftp_key']) or ! $this->config['sftp_key']['run']) {
|
if (! is_array($this->config) or ! isset($this->config['sftp_key']) or ! $this->config['sftp_key']['run']) {
|
||||||
$this->markTestSkipped('SFTP with key backend not configured');
|
$this->markTestSkipped('SFTP with key backend not configured');
|
||||||
}
|
}
|
||||||
// Make sure we have an new empty folder to work in
|
// Make sure we have an new empty folder to work in
|
||||||
|
|
|
@ -425,7 +425,7 @@ class ShareController extends AuthPublicShareController {
|
||||||
$shareTmpl['previewURL'] = $shareTmpl['downloadURL'];
|
$shareTmpl['previewURL'] = $shareTmpl['downloadURL'];
|
||||||
|
|
||||||
if ($shareTmpl['previewSupported']) {
|
if ($shareTmpl['previewSupported']) {
|
||||||
$shareTmpl['previewImage'] = $this->urlGenerator->linkToRouteAbsolute( 'files_sharing.PublicPreview.getPreview',
|
$shareTmpl['previewImage'] = $this->urlGenerator->linkToRouteAbsolute('files_sharing.PublicPreview.getPreview',
|
||||||
['x' => 200, 'y' => 200, 'file' => $shareTmpl['directory_path'], 'token' => $shareTmpl['dirToken']]);
|
['x' => 200, 'y' => 200, 'file' => $shareTmpl['directory_path'], 'token' => $shareTmpl['dirToken']]);
|
||||||
$ogPreview = $shareTmpl['previewImage'];
|
$ogPreview = $shareTmpl['previewImage'];
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ namespace OCA\Files_Sharing\Exceptions;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sharing and Resharing rights.
|
* Sharing and Resharing rights.
|
||||||
*
|
*
|
||||||
|
@ -36,4 +35,3 @@ use Exception;
|
||||||
class SharingRightsException extends Exception {
|
class SharingRightsException extends Exception {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th id='headerName' class="hidden column-name">
|
<th id='headerName' class="hidden column-name">
|
||||||
<div id="headerName-container">
|
<div id="headerName-container">
|
||||||
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a>
|
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th id="headerDate" class="hidden column-mtime">
|
<th id="headerDate" class="hidden column-mtime">
|
||||||
<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Share time' )); ?></span><span class="sort-indicator"></span></a>
|
<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Share time')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</th>
|
</th>
|
||||||
<th class="hidden column-expiration">
|
<th class="hidden column-expiration">
|
||||||
<a class="columntitle"><span><?php p($l->t( 'Expiration date' )); ?></span></a>
|
<a class="columntitle"><span><?php p($l->t('Expiration date')); ?></span></a>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -109,7 +109,7 @@ class SetPasswordColumnTest extends TestCase {
|
||||||
|
|
||||||
foreach ($allShares as $share) {
|
foreach ($allShares as $share) {
|
||||||
if ((int)$share['share_type'] === Share::SHARE_TYPE_LINK) {
|
if ((int)$share['share_type'] === Share::SHARE_TYPE_LINK) {
|
||||||
$this->assertNull( $share['share_with']);
|
$this->assertNull($share['share_with']);
|
||||||
$this->assertSame('shareWith', $share['password']);
|
$this->assertSame('shareWith', $share['password']);
|
||||||
} else {
|
} else {
|
||||||
$this->assertSame('shareWith', $share['share_with']);
|
$this->assertSame('shareWith', $share['share_with']);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</th>
|
</th>
|
||||||
<th id='headerName' class="hidden column-name">
|
<th id='headerName' class="hidden column-name">
|
||||||
<div id="headerName-container">
|
<div id="headerName-container">
|
||||||
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a>
|
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a>
|
||||||
<span id="selectedActionsList" class='selectedActions'>
|
<span id="selectedActionsList" class='selectedActions'>
|
||||||
<a href="" class="actions-selected">
|
<a href="" class="actions-selected">
|
||||||
<span class="icon icon-more"></span>
|
<span class="icon icon-more"></span>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th id="headerDate" class="hidden column-mtime">
|
<th id="headerDate" class="hidden column-mtime">
|
||||||
<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Deleted' )); ?></span><span class="sort-indicator"></span></a>
|
<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Deleted')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -22,4 +22,3 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
\OC::$server->query(\OCA\Files_Versions\AppInfo\Application::class);
|
\OC::$server->query(\OCA\Files_Versions\AppInfo\Application::class);
|
||||||
|
|
||||||
|
|
|
@ -46,4 +46,3 @@ $this->create('files_versions_ajax_getVersions', 'ajax/getVersions.php')
|
||||||
->actionInclude('files_versions/ajax/getVersions.php');
|
->actionInclude('files_versions/ajax/getVersions.php');
|
||||||
$this->create('files_versions_ajax_rollbackVersion', 'ajax/rollbackVersion.php')
|
$this->create('files_versions_ajax_rollbackVersion', 'ajax/rollbackVersion.php')
|
||||||
->actionInclude('files_versions/ajax/rollbackVersion.php');
|
->actionInclude('files_versions/ajax/rollbackVersion.php');
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ class Storage {
|
||||||
$uid = User::getUser();
|
$uid = User::getUser();
|
||||||
}
|
}
|
||||||
Filesystem::initMountPoints($uid);
|
Filesystem::initMountPoints($uid);
|
||||||
if ( $uid !== User::getUser() ) {
|
if ($uid !== User::getUser()) {
|
||||||
$info = Filesystem::getFileInfo($filename);
|
$info = Filesystem::getFileInfo($filename);
|
||||||
$ownerView = new View('/'.$uid.'/files');
|
$ownerView = new View('/'.$uid.'/files');
|
||||||
try {
|
try {
|
||||||
|
@ -735,7 +735,7 @@ class Storage {
|
||||||
|
|
||||||
$softQuota = true;
|
$softQuota = true;
|
||||||
$quota = $user->getQuota();
|
$quota = $user->getQuota();
|
||||||
if ( $quota === null || $quota === 'none' ) {
|
if ($quota === null || $quota === 'none') {
|
||||||
$quota = Filesystem::free_space('/');
|
$quota = Filesystem::free_space('/');
|
||||||
$softQuota = false;
|
$softQuota = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -99,7 +99,7 @@ class OauthApiController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
// We handle the initial and refresh tokens the same way
|
// We handle the initial and refresh tokens the same way
|
||||||
if ($grant_type === 'refresh_token' ) {
|
if ($grant_type === 'refresh_token') {
|
||||||
$code = $refresh_token;
|
$code = $refresh_token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
\OC_Util::addStyle( 'settings', "settings" );
|
\OC_Util::addStyle('settings', "settings");
|
||||||
?>
|
?>
|
||||||
<div id="app-navigation">
|
<div id="app-navigation">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
<ul class="info hidden"></ul>
|
<ul class="info hidden"></ul>
|
||||||
</div>
|
</div>
|
||||||
<p id="postsetupchecks-hint" class="hidden">
|
<p id="postsetupchecks-hint" class="hidden">
|
||||||
<?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer noopener" href="%1$s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%2$s">log</a>.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])] )); ?>
|
<?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer noopener" href="%1$s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%2$s">log</a>.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])])); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="extra-top-margin">
|
<p class="extra-top-margin">
|
||||||
|
|
|
@ -44,10 +44,10 @@
|
||||||
<label for="shareapiDefaultInternalExpireDate"><?php p($l->t('Set default expiration date for shares'));?></label><br/>
|
<label for="shareapiDefaultInternalExpireDate"><?php p($l->t('Set default expiration date for shares'));?></label><br/>
|
||||||
</p>
|
</p>
|
||||||
<p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
|
<p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
|
||||||
<?php p($l->t( 'Expire after ' )); ?>
|
<?php p($l->t('Expire after ')); ?>
|
||||||
<input type="text" name='shareapi_internal_expire_after_n_days' id="shareapiInternalExpireAfterNDays" placeholder="<?php p('7')?>"
|
<input type="text" name='shareapi_internal_expire_after_n_days' id="shareapiInternalExpireAfterNDays" placeholder="<?php p('7')?>"
|
||||||
value='<?php p($_['shareInternalExpireAfterNDays']) ?>' />
|
value='<?php p($_['shareInternalExpireAfterNDays']) ?>' />
|
||||||
<?php p($l->t( 'days' )); ?>
|
<?php p($l->t('days')); ?>
|
||||||
<input type="checkbox" name="shareapi_internal_enforce_expire_date" id="shareapiInternalEnforceExpireDate" class="checkbox"
|
<input type="checkbox" name="shareapi_internal_enforce_expire_date" id="shareapiInternalEnforceExpireDate" class="checkbox"
|
||||||
value="1" <?php if ($_['shareInternalEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
|
value="1" <?php if ($_['shareInternalEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
|
||||||
<label for="shareapiInternalEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
|
<label for="shareapiInternalEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
|
||||||
|
@ -76,10 +76,10 @@
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
|
<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
|
||||||
<?php p($l->t( 'Expire after ' )); ?>
|
<?php p($l->t('Expire after ')); ?>
|
||||||
<input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
|
<input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
|
||||||
value='<?php p($_['shareExpireAfterNDays']) ?>' />
|
value='<?php p($_['shareExpireAfterNDays']) ?>' />
|
||||||
<?php p($l->t( 'days' )); ?>
|
<?php p($l->t('days')); ?>
|
||||||
<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox"
|
<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox"
|
||||||
value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
|
value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
|
||||||
<label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
|
<label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
style('settings', 'settings');
|
style('settings', 'settings');
|
||||||
script('settings', [ 'settings', 'admin', 'log', 'certificates'] );
|
script('settings', [ 'settings', 'admin', 'log', 'certificates']);
|
||||||
script('core', 'setupchecks');
|
script('core', 'setupchecks');
|
||||||
script('files', 'jquery.fileupload');
|
script('files', 'jquery.fileupload');
|
||||||
|
|
||||||
|
|
|
@ -970,7 +970,7 @@ class CheckSetupControllerTest extends TestCase {
|
||||||
$this->checker
|
$this->checker
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getResults')
|
->method('getResults')
|
||||||
->willReturn( [ 'core' => [ 'EXTRA_FILE' => ['/testfile' => []], 'INVALID_HASH' => [ '/.idea/workspace.xml' => [ 'expected' => 'f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216', 'current' => 'ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094', ], '/lib/private/integritycheck/checker.php' => [ 'expected' => 'c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea', 'current' => '88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585', ], '/settings/controller/checksetupcontroller.php' => [ 'expected' => '3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4', 'current' => '09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a', ], ], ], 'bookmarks' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'dav' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'encryption' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'federation' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_antivirus' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_drop' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_pdfviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_sharing' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_trashbin' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_versions' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_videoviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'firstrunwizard' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'gitsmart' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'logreader' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature could not get verified.', ], ], 'password_policy' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'provisioning_api' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'sketch' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'threatblock' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'two_factor_auth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_ldap' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_shibboleth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], ]);
|
->willReturn([ 'core' => [ 'EXTRA_FILE' => ['/testfile' => []], 'INVALID_HASH' => [ '/.idea/workspace.xml' => [ 'expected' => 'f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216', 'current' => 'ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094', ], '/lib/private/integritycheck/checker.php' => [ 'expected' => 'c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea', 'current' => '88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585', ], '/settings/controller/checksetupcontroller.php' => [ 'expected' => '3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4', 'current' => '09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a', ], ], ], 'bookmarks' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'dav' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'encryption' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'federation' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_antivirus' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_drop' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_pdfviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_sharing' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_trashbin' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_versions' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_videoviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'firstrunwizard' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'gitsmart' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'logreader' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature could not get verified.', ], ], 'password_policy' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'provisioning_api' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'sketch' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'threatblock' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'two_factor_auth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_ldap' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_shibboleth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], ]);
|
||||||
|
|
||||||
$expected = new DataDisplayResponse(
|
$expected = new DataDisplayResponse(
|
||||||
'Technical information
|
'Technical information
|
||||||
|
|
|
@ -40,7 +40,6 @@ use OCP\IDBConnection;
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
use Test\TestCase;
|
use Test\TestCase;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group DB
|
* @group DB
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -69,4 +69,3 @@ $eventDispatcher->addListener(MapperEvent::EVENT_UNASSIGN, $mapperListener);
|
||||||
'name' => $l->t('Tags'),
|
'name' => $l->t('Tags'),
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th id='headerName' class="hidden column-name">
|
<th id='headerName' class="hidden column-name">
|
||||||
<div id="headerName-container">
|
<div id="headerName-container">
|
||||||
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a>
|
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th id="headerSize" class="hidden column-size">
|
<th id="headerSize" class="hidden column-size">
|
||||||
<a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a>
|
<a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</th>
|
</th>
|
||||||
<th id="headerDate" class="hidden column-mtime">
|
<th id="headerDate" class="hidden column-mtime">
|
||||||
<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a>
|
<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -22,4 +22,3 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$app = new \OCA\Testing\AppInfo\Application();
|
$app = new \OCA\Testing\AppInfo\Application();
|
||||||
|
|
||||||
|
|
|
@ -84,4 +84,3 @@ return ['routes' => [
|
||||||
'requirements' => ['image' => '.+']
|
'requirements' => ['image' => '.+']
|
||||||
],
|
],
|
||||||
]];
|
]];
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ class ThemingDefaults extends \OC_Defaults {
|
||||||
$divider = ' · ';
|
$divider = ' · ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($legalLinks !== '' ) {
|
if($legalLinks !== '') {
|
||||||
$footer .= '<br/>' . $legalLinks;
|
$footer .= '<br/>' . $legalLinks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ class ThemingDefaults extends \OC_Defaults {
|
||||||
} catch (AppPathNotFoundException $e) {}
|
} catch (AppPathNotFoundException $e) {}
|
||||||
$route = $this->urlGenerator->linkToRoute('theming.Theming.getManifest');
|
$route = $this->urlGenerator->linkToRoute('theming.Theming.getManifest');
|
||||||
}
|
}
|
||||||
if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT . '/core/img/' . $image )) {
|
if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT . '/core/img/' . $image)) {
|
||||||
$route = $this->urlGenerator->linkToRoute('theming.Icon.getThemedIcon', ['app' => $app, 'image' => $image]);
|
$route = $this->urlGenerator->linkToRoute('theming.Icon.getThemedIcon', ['app' => $app, 'image' => $image]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -620,7 +620,7 @@ class Access extends LDAPUtility {
|
||||||
// outside of core user management will still cache the user as non-existing.
|
// outside of core user management will still cache the user as non-existing.
|
||||||
$originalTTL = $this->connection->ldapCacheTTL;
|
$originalTTL = $this->connection->ldapCacheTTL;
|
||||||
$this->connection->setConfiguration(['ldapCacheTTL' => 0]);
|
$this->connection->setConfiguration(['ldapCacheTTL' => 0]);
|
||||||
if( $intName !== ''
|
if($intName !== ''
|
||||||
&& (($isUser && !$this->ncUserManager->userExists($intName))
|
&& (($isUser && !$this->ncUserManager->userExists($intName))
|
||||||
|| (!$isUser && !\OC::$server->getGroupManager()->groupExists($intName))
|
|| (!$isUser && !\OC::$server->getGroupManager()->groupExists($intName))
|
||||||
)
|
)
|
||||||
|
@ -708,7 +708,7 @@ class Access extends LDAPUtility {
|
||||||
|
|
||||||
foreach($ldapObjects as $ldapObject) {
|
foreach($ldapObjects as $ldapObject) {
|
||||||
$nameByLDAP = null;
|
$nameByLDAP = null;
|
||||||
if( isset($ldapObject[$nameAttribute])
|
if(isset($ldapObject[$nameAttribute])
|
||||||
&& is_array($ldapObject[$nameAttribute])
|
&& is_array($ldapObject[$nameAttribute])
|
||||||
&& isset($ldapObject[$nameAttribute][0])
|
&& isset($ldapObject[$nameAttribute][0])
|
||||||
) {
|
) {
|
||||||
|
@ -1777,7 +1777,7 @@ class Access extends LDAPUtility {
|
||||||
if($this->detectUuidAttribute($dn, $isUser, false, $ldapRecord)) {
|
if($this->detectUuidAttribute($dn, $isUser, false, $ldapRecord)) {
|
||||||
$attr = $this->connection->$uuidAttr;
|
$attr = $this->connection->$uuidAttr;
|
||||||
$uuid = isset($ldapRecord[$attr]) ? $ldapRecord[$attr] : $this->readAttribute($dn, $attr);
|
$uuid = isset($ldapRecord[$attr]) ? $ldapRecord[$attr] : $this->readAttribute($dn, $attr);
|
||||||
if( !is_array($uuid)
|
if(!is_array($uuid)
|
||||||
&& $uuidOverride !== ''
|
&& $uuidOverride !== ''
|
||||||
&& $this->detectUuidAttribute($dn, $isUser, true, $ldapRecord))
|
&& $this->detectUuidAttribute($dn, $isUser, true, $ldapRecord))
|
||||||
{
|
{
|
||||||
|
|
|
@ -305,7 +305,7 @@ class Helper {
|
||||||
$userBackend = new User_Proxy(
|
$userBackend = new User_Proxy(
|
||||||
$configPrefixes, $ldapWrapper, $ocConfig, $notificationManager, $userSession, $userPluginManager
|
$configPrefixes, $ldapWrapper, $ocConfig, $notificationManager, $userSession, $userPluginManager
|
||||||
);
|
);
|
||||||
$uid = $userBackend->loginName2UserName($param['uid'] );
|
$uid = $userBackend->loginName2UserName($param['uid']);
|
||||||
if($uid !== false) {
|
if($uid !== false) {
|
||||||
$param['uid'] = $uid;
|
$param['uid'] = $uid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,7 @@ class Manager {
|
||||||
return $this->usersByUid[$id];
|
return $this->usersByUid[$id];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->access->stringResemblesDN($id) ) {
|
if($this->access->stringResemblesDN($id)) {
|
||||||
$uid = $this->access->dn2username($id);
|
$uid = $this->access->dn2username($id);
|
||||||
if($uid !== false) {
|
if($uid !== false) {
|
||||||
return $this->createAndCache($id, $uid);
|
return $this->createAndCache($id, $uid);
|
||||||
|
|
|
@ -327,12 +327,12 @@ class User {
|
||||||
if ($path !== '') {
|
if ($path !== '') {
|
||||||
//if attribute's value is an absolute path take this, otherwise append it to data dir
|
//if attribute's value is an absolute path take this, otherwise append it to data dir
|
||||||
//check for / at the beginning or pattern c:\ resp. c:/
|
//check for / at the beginning or pattern c:\ resp. c:/
|
||||||
if( '/' !== $path[0]
|
if('/' !== $path[0]
|
||||||
&& !(3 < strlen($path) && ctype_alpha($path[0])
|
&& !(3 < strlen($path) && ctype_alpha($path[0])
|
||||||
&& $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2]))
|
&& $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2]))
|
||||||
) {
|
) {
|
||||||
$path = $this->config->getSystemValue('datadirectory',
|
$path = $this->config->getSystemValue('datadirectory',
|
||||||
\OC::$SERVERROOT.'/data' ) . '/' . $path;
|
\OC::$SERVERROOT.'/data') . '/' . $path;
|
||||||
}
|
}
|
||||||
//we need it to store it in the DB as well in case a user gets
|
//we need it to store it in the DB as well in case a user gets
|
||||||
//deleted so we can clean up afterwards
|
//deleted so we can clean up afterwards
|
||||||
|
@ -342,7 +342,7 @@ class User {
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !is_null($attr)
|
if(!is_null($attr)
|
||||||
&& $this->config->getAppValue('user_ldap', 'enforce_home_folder_naming_rule', true)
|
&& $this->config->getAppValue('user_ldap', 'enforce_home_folder_naming_rule', true)
|
||||||
) {
|
) {
|
||||||
// a naming rule attribute is defined, but it doesn't exist for that LDAP user
|
// a naming rule attribute is defined, but it doesn't exist for that LDAP user
|
||||||
|
|
|
@ -83,7 +83,7 @@ style('user_ldap', 'settings');
|
||||||
<p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p>
|
<p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p>
|
||||||
<p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>" /></p>
|
<p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>" /></p>
|
||||||
<p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>" title="<?php p($l->t('Only connect to the replica server.'));?>" /></p>
|
<p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>" title="<?php p($l->t('Only connect to the replica server.'));?>" /></p>
|
||||||
<p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', [$theme->getName()] ));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p>
|
<p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', [$theme->getName()]));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p>
|
||||||
<p><label for="ldap_cache_ttl"><?php p($l->t('Cache Time-To-Live'));?></label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php p($l->t('in seconds. A change empties the cache.'));?>" data-default="<?php p($_['ldap_cache_ttl_default']); ?>" /></p>
|
<p><label for="ldap_cache_ttl"><?php p($l->t('Cache Time-To-Live'));?></label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php p($l->t('in seconds. A change empties the cache.'));?>" data-default="<?php p($_['ldap_cache_ttl_default']); ?>" /></p>
|
||||||
</div>
|
</div>
|
||||||
<h3><?php p($l->t('Directory Settings'));?></h3>
|
<h3><?php p($l->t('Directory Settings'));?></h3>
|
||||||
|
|
|
@ -55,7 +55,7 @@ class CleanUpTest extends \Test\TestCase {
|
||||||
$args = $this->getMocks();
|
$args = $this->getMocks();
|
||||||
$args['helper']->expects($this->once())
|
$args['helper']->expects($this->once())
|
||||||
->method('haveDisabledConfigurations')
|
->method('haveDisabledConfigurations')
|
||||||
->willReturn(true );
|
->willReturn(true);
|
||||||
|
|
||||||
$args['ocConfig']->expects($this->never())
|
$args['ocConfig']->expects($this->never())
|
||||||
->method('getSystemValue');
|
->method('getSystemValue');
|
||||||
|
|
|
@ -504,11 +504,11 @@ trait Sharing {
|
||||||
$fd = $body->getRowsHash();
|
$fd = $body->getRowsHash();
|
||||||
|
|
||||||
foreach($fd as $field => $value) {
|
foreach($fd as $field => $value) {
|
||||||
if (substr($field, 0, 10 ) === "share_with"){
|
if (substr($field, 0, 10) === "share_with"){
|
||||||
$value = str_replace("REMOTE", substr($this->remoteBaseUrl, 0, -5), $value);
|
$value = str_replace("REMOTE", substr($this->remoteBaseUrl, 0, -5), $value);
|
||||||
$value = str_replace("LOCAL", substr($this->localBaseUrl, 0, -5), $value);
|
$value = str_replace("LOCAL", substr($this->localBaseUrl, 0, -5), $value);
|
||||||
}
|
}
|
||||||
if (substr($field, 0, 6 ) === "remote"){
|
if (substr($field, 0, 6) === "remote"){
|
||||||
$value = str_replace("REMOTE", substr($this->remoteBaseUrl, 0, -4), $value);
|
$value = str_replace("REMOTE", substr($this->remoteBaseUrl, 0, -4), $value);
|
||||||
$value = str_replace("LOCAL", substr($this->localBaseUrl, 0, -4), $value);
|
$value = str_replace("LOCAL", substr($this->localBaseUrl, 0, -4), $value);
|
||||||
}
|
}
|
||||||
|
@ -742,4 +742,3 @@ trait Sharing {
|
||||||
return $sharees;
|
return $sharees;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,4 +167,3 @@ trait Trashbin {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -234,7 +234,7 @@ With help from many libraries and frameworks including:
|
||||||
array_shift($lines);
|
array_shift($lines);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (strpos($line, '*/') !== false ) {
|
if (strpos($line, '*/') !== false) {
|
||||||
array_shift($lines);
|
array_shift($lines);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,4 +127,3 @@ if($notSignedCommits !== []) {
|
||||||
} else {
|
} else {
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ abstract class Base extends Command {
|
||||||
*/
|
*/
|
||||||
protected function execute(InputInterface $input, OutputInterface $output) {
|
protected function execute(InputInterface $input, OutputInterface $output) {
|
||||||
$mode = $this->getMode();
|
$mode = $this->getMode();
|
||||||
$this->config->setAppValue( 'core', 'backgroundjobs_mode', $mode );
|
$this->config->setAppValue('core', 'backgroundjobs_mode', $mode);
|
||||||
$output->writeln("Set mode for background jobs to '$mode'");
|
$output->writeln("Set mode for background jobs to '$mode'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ class DecryptAll extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output) {
|
protected function execute(InputInterface $input, OutputInterface $output) {
|
||||||
if ( !$input->isInteractive() ) {
|
if (!$input->isInteractive()) {
|
||||||
$output->writeln('Invalid TTY.');
|
$output->writeln('Invalid TTY.');
|
||||||
$output->writeln('If you are trying to execute the command in a Docker ');
|
$output->writeln('If you are trying to execute the command in a Docker ');
|
||||||
$output->writeln("container, do not forget to execute 'docker exec' with");
|
$output->writeln("container, do not forget to execute 'docker exec' with");
|
||||||
|
|
|
@ -106,7 +106,7 @@ class EncryptAll extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output) {
|
protected function execute(InputInterface $input, OutputInterface $output) {
|
||||||
if ( !$input->isInteractive() ) {
|
if (!$input->isInteractive()) {
|
||||||
$output->writeln('Invalid TTY.');
|
$output->writeln('Invalid TTY.');
|
||||||
$output->writeln('If you are trying to execute the command in a Docker ');
|
$output->writeln('If you are trying to execute the command in a Docker ');
|
||||||
$output->writeln("container, do not forget to execute 'docker exec' with");
|
$output->writeln("container, do not forget to execute 'docker exec' with");
|
||||||
|
|
|
@ -62,7 +62,7 @@ class State extends Base {
|
||||||
|
|
||||||
$providerStates = $this->registry->getProviderStates($user);
|
$providerStates = $this->registry->getProviderStates($user);
|
||||||
$filtered = $this->filterEnabledDisabledUnknownProviders($providerStates);
|
$filtered = $this->filterEnabledDisabledUnknownProviders($providerStates);
|
||||||
list ($enabled, $disabled) = $filtered;
|
list($enabled, $disabled) = $filtered;
|
||||||
|
|
||||||
if (!empty($enabled)) {
|
if (!empty($enabled)) {
|
||||||
$output->writeln("Two-factor authentication is enabled for user $uid");
|
$output->writeln("Two-factor authentication is enabled for user $uid");
|
||||||
|
|
|
@ -109,7 +109,7 @@ class SetupController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private function finishSetup(bool $installRecommended) {
|
private function finishSetup(bool $installRecommended) {
|
||||||
if( file_exists( $this->autoConfigFile )) {
|
if(file_exists($this->autoConfigFile)) {
|
||||||
unlink($this->autoConfigFile);
|
unlink($this->autoConfigFile);
|
||||||
}
|
}
|
||||||
\OC::$server->getIntegrityCodeChecker()->runInstanceVerification();
|
\OC::$server->getIntegrityCodeChecker()->runInstanceVerification();
|
||||||
|
@ -130,11 +130,11 @@ class SetupController {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadAutoConfig($post) {
|
public function loadAutoConfig($post) {
|
||||||
if( file_exists($this->autoConfigFile)) {
|
if(file_exists($this->autoConfigFile)) {
|
||||||
\OCP\Util::writeLog('core', 'Autoconfig file found, setting up Nextcloud…', ILogger::INFO);
|
\OCP\Util::writeLog('core', 'Autoconfig file found, setting up Nextcloud…', ILogger::INFO);
|
||||||
$AUTOCONFIG = [];
|
$AUTOCONFIG = [];
|
||||||
include $this->autoConfigFile;
|
include $this->autoConfigFile;
|
||||||
$post = array_merge ($post, $AUTOCONFIG);
|
$post = array_merge($post, $AUTOCONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbIsSet = isset($post['dbtype']);
|
$dbIsSet = isset($post['dbtype']);
|
||||||
|
|
|
@ -11,7 +11,7 @@ if(!isset($_)) {//standalone page is not supported anymore - redirect to /
|
||||||
?>
|
?>
|
||||||
<ul>
|
<ul>
|
||||||
<li class='error'>
|
<li class='error'>
|
||||||
<?php p($l->t( 'Access forbidden' )); ?><br>
|
<?php p($l->t('Access forbidden')); ?><br>
|
||||||
<p class='hint'><?php if(isset($_['message'])) p($_['message'])?></p>
|
<p class='hint'><?php if(isset($_['message'])) p($_['message'])?></p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -35,35 +35,35 @@ script('core', [
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<fieldset id="adminaccount">
|
<fieldset id="adminaccount">
|
||||||
<legend><?php print_unescaped($l->t( 'Create an <strong>admin account</strong>' )); ?></legend>
|
<legend><?php print_unescaped($l->t('Create an <strong>admin account</strong>')); ?></legend>
|
||||||
<p class="grouptop">
|
<p class="grouptop">
|
||||||
<input type="text" name="adminlogin" id="adminlogin"
|
<input type="text" name="adminlogin" id="adminlogin"
|
||||||
placeholder="<?php p($l->t( 'Username' )); ?>"
|
placeholder="<?php p($l->t('Username')); ?>"
|
||||||
value="<?php p($_['adminlogin']); ?>"
|
value="<?php p($_['adminlogin']); ?>"
|
||||||
autocomplete="off" autocapitalize="none" autocorrect="off" autofocus required>
|
autocomplete="off" autocapitalize="none" autocorrect="off" autofocus required>
|
||||||
<label for="adminlogin" class="infield"><?php p($l->t( 'Username' )); ?></label>
|
<label for="adminlogin" class="infield"><?php p($l->t('Username')); ?></label>
|
||||||
</p>
|
</p>
|
||||||
<p class="groupbottom">
|
<p class="groupbottom">
|
||||||
<input type="password" name="adminpass" data-typetoggle="#show" id="adminpass"
|
<input type="password" name="adminpass" data-typetoggle="#show" id="adminpass"
|
||||||
placeholder="<?php p($l->t( 'Password' )); ?>"
|
placeholder="<?php p($l->t('Password')); ?>"
|
||||||
value="<?php p($_['adminpass']); ?>"
|
value="<?php p($_['adminpass']); ?>"
|
||||||
autocomplete="off" autocapitalize="none" autocorrect="off" required>
|
autocomplete="off" autocapitalize="none" autocorrect="off" required>
|
||||||
<label for="adminpass" class="infield"><?php p($l->t( 'Password' )); ?></label>
|
<label for="adminpass" class="infield"><?php p($l->t('Password')); ?></label>
|
||||||
<input type="checkbox" id="show" class="hidden-visually" name="show">
|
<input type="checkbox" id="show" class="hidden-visually" name="show">
|
||||||
<label for="show" class="hidden-visually"><?php p($l->t( 'Show password')); ?></label>
|
<label for="show" class="hidden-visually"><?php p($l->t('Show password')); ?></label>
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<?php if(!$_['directoryIsSet'] or !$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
<?php if(!$_['directoryIsSet'] or !$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
||||||
<fieldset id="advancedHeader">
|
<fieldset id="advancedHeader">
|
||||||
<legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t( 'Storage & database' )); ?><img src="<?php print_unescaped(image_path('', 'actions/caret-white.svg')); ?>" /></a></legend>
|
<legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t('Storage & database')); ?><img src="<?php print_unescaped(image_path('', 'actions/caret-white.svg')); ?>" /></a></legend>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if(!$_['directoryIsSet'] or count($_['errors']) > 0): ?>
|
<?php if(!$_['directoryIsSet'] or count($_['errors']) > 0): ?>
|
||||||
<fieldset id="datadirField">
|
<fieldset id="datadirField">
|
||||||
<div id="datadirContent">
|
<div id="datadirContent">
|
||||||
<label for="directory"><?php p($l->t( 'Data folder' )); ?></label>
|
<label for="directory"><?php p($l->t('Data folder')); ?></label>
|
||||||
<input type="text" name="directory" id="directory"
|
<input type="text" name="directory" id="directory"
|
||||||
placeholder="<?php p(OC::$SERVERROOT.'/data'); ?>"
|
placeholder="<?php p(OC::$SERVERROOT.'/data'); ?>"
|
||||||
value="<?php p($_['directory']); ?>"
|
value="<?php p($_['directory']); ?>"
|
||||||
|
@ -75,16 +75,16 @@ script('core', [
|
||||||
<?php if(!$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
<?php if(!$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
||||||
<fieldset id='databaseBackend'>
|
<fieldset id='databaseBackend'>
|
||||||
<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'])
|
<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'])
|
||||||
$hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
|
$hasOtherDB = true; else $hasOtherDB =false; //other than SQLite?>
|
||||||
<legend><?php p($l->t( 'Configure the database' )); ?></legend>
|
<legend><?php p($l->t('Configure the database')); ?></legend>
|
||||||
<div id="selectDbType">
|
<div id="selectDbType">
|
||||||
<?php foreach($_['databases'] as $type => $label): ?>
|
<?php foreach($_['databases'] as $type => $label): ?>
|
||||||
<?php if(count($_['databases']) === 1): ?>
|
<?php if(count($_['databases']) === 1): ?>
|
||||||
<p class="info">
|
<p class="info">
|
||||||
<?php p($l->t( 'Only %s is available.', [$label] )); ?>
|
<?php p($l->t('Only %s is available.', [$label])); ?>
|
||||||
<?php p($l->t( 'Install and activate additional PHP modules to choose other database types.' )); ?><br>
|
<?php p($l->t('Install and activate additional PHP modules to choose other database types.')); ?><br>
|
||||||
<a href="<?php print_unescaped(link_to_docs('admin-source_install')); ?>" target="_blank" rel="noreferrer noopener">
|
<a href="<?php print_unescaped(link_to_docs('admin-source_install')); ?>" target="_blank" rel="noreferrer noopener">
|
||||||
<?php p($l->t( 'For more details check out the documentation.' )); ?> ↗</a>
|
<?php p($l->t('For more details check out the documentation.')); ?> ↗</a>
|
||||||
</p>
|
</p>
|
||||||
<input type="hidden" id="dbtype" name="dbtype" value="<?php p($type) ?>">
|
<input type="hidden" id="dbtype" name="dbtype" value="<?php p($type) ?>">
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
@ -100,25 +100,25 @@ script('core', [
|
||||||
<fieldset id='databaseField'>
|
<fieldset id='databaseField'>
|
||||||
<div id="use_other_db">
|
<div id="use_other_db">
|
||||||
<p class="grouptop">
|
<p class="grouptop">
|
||||||
<label for="dbuser" class="infield"><?php p($l->t( 'Database user' )); ?></label>
|
<label for="dbuser" class="infield"><?php p($l->t('Database user')); ?></label>
|
||||||
<input type="text" name="dbuser" id="dbuser"
|
<input type="text" name="dbuser" id="dbuser"
|
||||||
placeholder="<?php p($l->t( 'Database user' )); ?>"
|
placeholder="<?php p($l->t('Database user')); ?>"
|
||||||
value="<?php p($_['dbuser']); ?>"
|
value="<?php p($_['dbuser']); ?>"
|
||||||
autocomplete="off" autocapitalize="none" autocorrect="off">
|
autocomplete="off" autocapitalize="none" autocorrect="off">
|
||||||
</p>
|
</p>
|
||||||
<p class="groupmiddle">
|
<p class="groupmiddle">
|
||||||
<input type="password" name="dbpass" id="dbpass" data-typetoggle="#dbpassword-toggle"
|
<input type="password" name="dbpass" id="dbpass" data-typetoggle="#dbpassword-toggle"
|
||||||
placeholder="<?php p($l->t( 'Database password' )); ?>"
|
placeholder="<?php p($l->t('Database password')); ?>"
|
||||||
value="<?php p($_['dbpass']); ?>"
|
value="<?php p($_['dbpass']); ?>"
|
||||||
autocomplete="off" autocapitalize="none" autocorrect="off">
|
autocomplete="off" autocapitalize="none" autocorrect="off">
|
||||||
<label for="dbpass" class="infield"><?php p($l->t( 'Database password' )); ?></label>
|
<label for="dbpass" class="infield"><?php p($l->t('Database password')); ?></label>
|
||||||
<input type="checkbox" id="dbpassword-toggle" class="hidden-visually" name="dbpassword-toggle">
|
<input type="checkbox" id="dbpassword-toggle" class="hidden-visually" name="dbpassword-toggle">
|
||||||
<label for="dbpassword-toggle"></label>
|
<label for="dbpassword-toggle"></label>
|
||||||
</p>
|
</p>
|
||||||
<p class="groupmiddle">
|
<p class="groupmiddle">
|
||||||
<label for="dbname" class="infield"><?php p($l->t( 'Database name' )); ?></label>
|
<label for="dbname" class="infield"><?php p($l->t('Database name')); ?></label>
|
||||||
<input type="text" name="dbname" id="dbname"
|
<input type="text" name="dbname" id="dbname"
|
||||||
placeholder="<?php p($l->t( 'Database name' )); ?>"
|
placeholder="<?php p($l->t('Database name')); ?>"
|
||||||
value="<?php p($_['dbname']); ?>"
|
value="<?php p($_['dbname']); ?>"
|
||||||
autocomplete="off" autocapitalize="none" autocorrect="off"
|
autocomplete="off" autocapitalize="none" autocorrect="off"
|
||||||
pattern="[0-9a-zA-Z$_-]+">
|
pattern="[0-9a-zA-Z$_-]+">
|
||||||
|
@ -126,23 +126,23 @@ script('core', [
|
||||||
<?php if($_['hasOracle']): ?>
|
<?php if($_['hasOracle']): ?>
|
||||||
<div id="use_oracle_db">
|
<div id="use_oracle_db">
|
||||||
<p class="groupmiddle">
|
<p class="groupmiddle">
|
||||||
<label for="dbtablespace" class="infield"><?php p($l->t( 'Database tablespace' )); ?></label>
|
<label for="dbtablespace" class="infield"><?php p($l->t('Database tablespace')); ?></label>
|
||||||
<input type="text" name="dbtablespace" id="dbtablespace"
|
<input type="text" name="dbtablespace" id="dbtablespace"
|
||||||
placeholder="<?php p($l->t( 'Database tablespace' )); ?>"
|
placeholder="<?php p($l->t('Database tablespace')); ?>"
|
||||||
value="<?php p($_['dbtablespace']); ?>"
|
value="<?php p($_['dbtablespace']); ?>"
|
||||||
autocomplete="off" autocapitalize="none" autocorrect="off">
|
autocomplete="off" autocapitalize="none" autocorrect="off">
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<p class="groupbottom">
|
<p class="groupbottom">
|
||||||
<label for="dbhost" class="infield"><?php p($l->t( 'Database host' )); ?></label>
|
<label for="dbhost" class="infield"><?php p($l->t('Database host')); ?></label>
|
||||||
<input type="text" name="dbhost" id="dbhost"
|
<input type="text" name="dbhost" id="dbhost"
|
||||||
placeholder="<?php p($l->t( 'Database host' )); ?>"
|
placeholder="<?php p($l->t('Database host')); ?>"
|
||||||
value="<?php p($_['dbhost']); ?>"
|
value="<?php p($_['dbhost']); ?>"
|
||||||
autocomplete="off" autocapitalize="none" autocorrect="off">
|
autocomplete="off" autocapitalize="none" autocorrect="off">
|
||||||
</p>
|
</p>
|
||||||
<p class="info">
|
<p class="info">
|
||||||
<?php p($l->t( 'Please specify the port number along with the host name (e.g., localhost:5432).' )); ?>
|
<?php p($l->t('Please specify the port number along with the host name (e.g., localhost:5432).')); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
@ -162,15 +162,15 @@ script('core', [
|
||||||
<p class="info">
|
<p class="info">
|
||||||
<input type="checkbox" id="install-recommended-apps" name="install-recommended-apps" class="checkbox checkbox--white" checked>
|
<input type="checkbox" id="install-recommended-apps" name="install-recommended-apps" class="checkbox checkbox--white" checked>
|
||||||
<label for="install-recommended-apps">
|
<label for="install-recommended-apps">
|
||||||
<?php p($l->t( 'Install recommended apps' )); ?>
|
<?php p($l->t('Install recommended apps')); ?>
|
||||||
<span><?php p($l->t( 'Calendar, Contacts, Talk, Mail & OnlyOffice' )); ?></span>
|
<span><?php p($l->t('Calendar, Contacts, Talk, Mail & OnlyOffice')); ?></span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div class="icon-loading-dark float-spinner"> </div>
|
<div class="icon-loading-dark float-spinner"> </div>
|
||||||
|
|
||||||
<div class="buttons"><input type="submit" class="primary" value="<?php p($l->t( 'Finish setup' )); ?>" data-finishing="<?php p($l->t( 'Finishing …' )); ?>"></div>
|
<div class="buttons"><input type="submit" class="primary" value="<?php p($l->t('Finish setup')); ?>" data-finishing="<?php p($l->t('Finishing …')); ?>"></div>
|
||||||
|
|
||||||
<p class="info">
|
<p class="info">
|
||||||
<span class="icon-info-white"></span>
|
<span class="icon-info-white"></span>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<?php }?>
|
<?php }?>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="v-align">
|
<div class="v-align">
|
||||||
<?php if ($_['bodyid'] === 'body-login' ): ?>
|
<?php if ($_['bodyid'] === 'body-login'): ?>
|
||||||
<header role="banner">
|
<header role="banner">
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
<?php foreach($_['navigation'] as $entry): ?>
|
<?php foreach($_['navigation'] as $entry): ?>
|
||||||
<li data-id="<?php p($entry['id']); ?>">
|
<li data-id="<?php p($entry['id']); ?>">
|
||||||
<a href="<?php print_unescaped($entry['href']); ?>"
|
<a href="<?php print_unescaped($entry['href']); ?>"
|
||||||
<?php if( $entry['active'] ): ?> class="active"<?php endif; ?>
|
<?php if($entry['active']): ?> class="active"<?php endif; ?>
|
||||||
aria-label="<?php p($entry['name']); ?>">
|
aria-label="<?php p($entry['name']); ?>">
|
||||||
<svg width="16" height="16" viewBox="0 0 16 16" alt="">
|
<svg width="16" height="16" viewBox="0 0 16 16" alt="">
|
||||||
<defs><filter id="invertMenuMore-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
|
<defs><filter id="invertMenuMore-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
<?php foreach($_['settingsnavigation'] as $entry):?>
|
<?php foreach($_['settingsnavigation'] as $entry):?>
|
||||||
<li data-id="<?php p($entry['id']); ?>">
|
<li data-id="<?php p($entry['id']); ?>">
|
||||||
<a href="<?php print_unescaped($entry['href']); ?>"
|
<a href="<?php print_unescaped($entry['href']); ?>"
|
||||||
<?php if( $entry["active"] ): ?> class="active"<?php endif; ?>>
|
<?php if($entry["active"]): ?> class="active"<?php endif; ?>>
|
||||||
<img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
|
<img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
|
||||||
<?php p($entry['name']) ?>
|
<?php p($entry['name']) ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<p id="update-progress-message-error" class="hidden"></p>
|
<p id="update-progress-message-error" class="hidden"></p>
|
||||||
<ul id="update-progress-message-warnings" class="hidden"></ul>
|
<ul id="update-progress-message-warnings" class="hidden"></ul>
|
||||||
<p id="update-progress-message"></p>
|
<p id="update-progress-message"></p>
|
||||||
<a class="update-show-detailed"><?php p($l->t( 'Detailed logs' )); ?> <span class="icon-caret-white"></span></a>
|
<a class="update-show-detailed"><?php p($l->t('Detailed logs')); ?> <span class="icon-caret-white"></span></a>
|
||||||
<div id="update-progress-detailed" class="hidden"></div>
|
<div id="update-progress-detailed" class="hidden"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
|
|
||||||
<?php if ($_['tooBig']) { ?>
|
<?php if ($_['tooBig']) { ?>
|
||||||
<div class="warning updateAnyways">
|
<div class="warning updateAnyways">
|
||||||
<p><?php p($l->t('I know that if I continue doing the update via web UI has the risk, that the request runs into a timeout and could cause data loss, but I have a backup and know how to restore my instance in case of a failure.' )); ?></p>
|
<p><?php p($l->t('I know that if I continue doing the update via web UI has the risk, that the request runs into a timeout and could cause data loss, but I have a backup and know how to restore my instance in case of a failure.')); ?></p>
|
||||||
<a href="?IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup=IAmSuperSureToDoThis" class="button updateAnywaysButton"><?php p($l->t('Upgrade via web on my own risk' )); ?></a>
|
<a href="?IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup=IAmSuperSureToDoThis" class="button updateAnywaysButton"><?php p($l->t('Upgrade via web on my own risk')); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,7 @@ class OC {
|
||||||
$l->t('Cannot write into "config" directory!'),
|
$l->t('Cannot write into "config" directory!'),
|
||||||
$l->t('This can usually be fixed by giving the webserver write access to the config directory.') . '. '
|
$l->t('This can usually be fixed by giving the webserver write access to the config directory.') . '. '
|
||||||
. $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See %s',
|
. $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See %s',
|
||||||
[ $urlGenerator->linkToDocs('admin-config') ] ),
|
[ $urlGenerator->linkToDocs('admin-config') ]),
|
||||||
503
|
503
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -863,7 +863,7 @@ class OC {
|
||||||
|
|
||||||
private static function registerAppRestrictionsHooks() {
|
private static function registerAppRestrictionsHooks() {
|
||||||
$groupManager = self::$server->query(\OCP\IGroupManager::class);
|
$groupManager = self::$server->query(\OCP\IGroupManager::class);
|
||||||
$groupManager->listen ('\OC\Group', 'postDelete', function (\OCP\IGroup $group) {
|
$groupManager->listen('\OC\Group', 'postDelete', function (\OCP\IGroup $group) {
|
||||||
$appManager = self::$server->getAppManager();
|
$appManager = self::$server->getAppManager();
|
||||||
$apps = $appManager->getEnabledAppsForGroup($group);
|
$apps = $appManager->getEnabledAppsForGroup($group);
|
||||||
foreach ($apps as $appId) {
|
foreach ($apps as $appId) {
|
||||||
|
|
|
@ -327,8 +327,8 @@ class Request implements \ArrayAccess, \Countable, IRequest {
|
||||||
// There's a few headers that seem to end up in the top-level
|
// There's a few headers that seem to end up in the top-level
|
||||||
// server array.
|
// server array.
|
||||||
switch ($name) {
|
switch ($name) {
|
||||||
case 'CONTENT_TYPE' :
|
case 'CONTENT_TYPE':
|
||||||
case 'CONTENT_LENGTH' :
|
case 'CONTENT_LENGTH':
|
||||||
case 'REMOTE_ADDR':
|
case 'REMOTE_ADDR':
|
||||||
if (isset($this->server[$name])) {
|
if (isset($this->server[$name])) {
|
||||||
return $this->server[$name];
|
return $this->server[$name];
|
||||||
|
@ -811,7 +811,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
|
||||||
$encoding = mb_detect_encoding($pathInfo, ['UTF-8', 'ISO-8859-1']);
|
$encoding = mb_detect_encoding($pathInfo, ['UTF-8', 'ISO-8859-1']);
|
||||||
|
|
||||||
switch($encoding) {
|
switch($encoding) {
|
||||||
case 'ISO-8859-1' :
|
case 'ISO-8859-1':
|
||||||
$pathInfo = utf8_encode($pathInfo);
|
$pathInfo = utf8_encode($pathInfo);
|
||||||
}
|
}
|
||||||
// end copy
|
// end copy
|
||||||
|
|
|
@ -300,7 +300,7 @@ abstract class Avatar implements IAvatar {
|
||||||
$hash = strtolower($hash);
|
$hash = strtolower($hash);
|
||||||
|
|
||||||
// Already a md5 hash?
|
// Already a md5 hash?
|
||||||
if( preg_match('/^([0-9a-f]{4}-?){8}$/', $hash, $matches) !== 1 ) {
|
if(preg_match('/^([0-9a-f]{4}-?){8}$/', $hash, $matches) !== 1) {
|
||||||
$hash = md5($hash);
|
$hash = md5($hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ class RemotePlugin implements ISearchPlugin {
|
||||||
/**
|
/**
|
||||||
* Add local share if remote cloud id matches a local user ones
|
* Add local share if remote cloud id matches a local user ones
|
||||||
*/
|
*/
|
||||||
if ($localUser !== null && $remoteUser !== $this->userId && $cloudId === $localUser->getCloudId() ) {
|
if ($localUser !== null && $remoteUser !== $this->userId && $cloudId === $localUser->getCloudId()) {
|
||||||
$result['wide'][] = [
|
$result['wide'][] = [
|
||||||
'label' => $contact['FN'],
|
'label' => $contact['FN'],
|
||||||
'uuid' => $contact['UID'],
|
'uuid' => $contact['UID'],
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
namespace OC;
|
namespace OC;
|
||||||
|
|
||||||
class Color {
|
class Color {
|
||||||
public $r, $g, $b;
|
public $r;
|
||||||
|
public $g;
|
||||||
|
public $b;
|
||||||
public function __construct($r, $g, $b) {
|
public function __construct($r, $g, $b) {
|
||||||
$this->r = $r;
|
$this->r = $r;
|
||||||
$this->g = $g;
|
$this->g = $g;
|
||||||
|
|
|
@ -239,14 +239,14 @@ class Config {
|
||||||
$content .= var_export($this->cache, true);
|
$content .= var_export($this->cache, true);
|
||||||
$content .= ";\n";
|
$content .= ";\n";
|
||||||
|
|
||||||
touch ($this->configFilePath);
|
touch($this->configFilePath);
|
||||||
$filePointer = fopen($this->configFilePath, 'r+');
|
$filePointer = fopen($this->configFilePath, 'r+');
|
||||||
|
|
||||||
// Prevent others not to read the config
|
// Prevent others not to read the config
|
||||||
chmod($this->configFilePath, 0640);
|
chmod($this->configFilePath, 0640);
|
||||||
|
|
||||||
// File does not exist, this can happen when doing a fresh install
|
// File does not exist, this can happen when doing a fresh install
|
||||||
if(!is_resource ($filePointer)) {
|
if(!is_resource($filePointer)) {
|
||||||
throw new HintException(
|
throw new HintException(
|
||||||
"Can't write into config directory!",
|
"Can't write into config directory!",
|
||||||
'This can usually be fixed by giving the webserver write access to the config directory.');
|
'This can usually be fixed by giving the webserver write access to the config directory.');
|
||||||
|
@ -258,7 +258,7 @@ class Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the config and release the lock
|
// Write the config and release the lock
|
||||||
ftruncate ($filePointer, 0);
|
ftruncate($filePointer, 0);
|
||||||
fwrite($filePointer, $content);
|
fwrite($filePointer, $content);
|
||||||
fflush($filePointer);
|
fflush($filePointer);
|
||||||
flock($filePointer, LOCK_UN);
|
flock($filePointer, LOCK_UN);
|
||||||
|
|
|
@ -35,8 +35,8 @@ class AdapterPgSql extends Adapter {
|
||||||
|
|
||||||
const UNIX_TIMESTAMP_REPLACEMENT = 'cast(extract(epoch from current_timestamp) as integer)';
|
const UNIX_TIMESTAMP_REPLACEMENT = 'cast(extract(epoch from current_timestamp) as integer)';
|
||||||
public function fixupStatement($statement) {
|
public function fixupStatement($statement) {
|
||||||
$statement = str_replace( '`', '"', $statement );
|
$statement = str_replace('`', '"', $statement);
|
||||||
$statement = str_ireplace( 'UNIX_TIMESTAMP()', self::UNIX_TIMESTAMP_REPLACEMENT, $statement );
|
$statement = str_ireplace('UNIX_TIMESTAMP()', self::UNIX_TIMESTAMP_REPLACEMENT, $statement);
|
||||||
return $statement;
|
return $statement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,10 +43,10 @@ class AdapterSqlite extends Adapter {
|
||||||
|
|
||||||
public function fixupStatement($statement) {
|
public function fixupStatement($statement) {
|
||||||
$statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement);
|
$statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement);
|
||||||
$statement = str_replace( '`', '"', $statement );
|
$statement = str_replace('`', '"', $statement);
|
||||||
$statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement );
|
$statement = str_ireplace('NOW()', 'datetime(\'now\')', $statement);
|
||||||
$statement = str_ireplace('GREATEST(', 'MAX(', $statement);
|
$statement = str_ireplace('GREATEST(', 'MAX(', $statement);
|
||||||
$statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement );
|
$statement = str_ireplace('UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement);
|
||||||
return $statement;
|
return $statement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -395,7 +395,7 @@ class Connection extends ReconnectWrapper implements IDBConnection {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function replaceTablePrefix($statement) {
|
protected function replaceTablePrefix($statement) {
|
||||||
return str_replace( '*PREFIX*', $this->tablePrefix, $statement );
|
return str_replace('*PREFIX*', $this->tablePrefix, $statement);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -253,7 +253,7 @@ class Util {
|
||||||
public function stripPartialFileExtension($path) {
|
public function stripPartialFileExtension($path) {
|
||||||
$extension = pathinfo($path, PATHINFO_EXTENSION);
|
$extension = pathinfo($path, PATHINFO_EXTENSION);
|
||||||
|
|
||||||
if ( $extension === 'part') {
|
if ($extension === 'part') {
|
||||||
|
|
||||||
$newLength = strlen($path) - 5; // 5 = strlen(".part")
|
$newLength = strlen($path) - 5; // 5 = strlen(".part")
|
||||||
$fPath = substr($path, 0, $newLength);
|
$fPath = substr($path, 0, $newLength);
|
||||||
|
|
|
@ -34,7 +34,7 @@ class HomeObjectStoreStorage extends ObjectStoreStorage implements \OCP\Files\IH
|
||||||
* @param array $params
|
* @param array $params
|
||||||
*/
|
*/
|
||||||
public function __construct($params) {
|
public function __construct($params) {
|
||||||
if ( ! isset($params['user']) || ! $params['user'] instanceof User) {
|
if (! isset($params['user']) || ! $params['user'] instanceof User) {
|
||||||
throw new \Exception('missing user object in parameters');
|
throw new \Exception('missing user object in parameters');
|
||||||
}
|
}
|
||||||
$this->user = $params['user'];
|
$this->user = $params['user'];
|
||||||
|
|
|
@ -670,7 +670,7 @@ class View {
|
||||||
list($storage, $internalPath) = $this->resolvePath($path);
|
list($storage, $internalPath) = $this->resolvePath($path);
|
||||||
$target = $storage->fopen($internalPath, 'w');
|
$target = $storage->fopen($internalPath, 'w');
|
||||||
if ($target) {
|
if ($target) {
|
||||||
list (, $result) = \OC_Helper::streamCopy($data, $target);
|
list(, $result) = \OC_Helper::streamCopy($data, $target);
|
||||||
fclose($target);
|
fclose($target);
|
||||||
fclose($data);
|
fclose($data);
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ class Database extends ABackend
|
||||||
$this->fixDI();
|
$this->fixDI();
|
||||||
|
|
||||||
// No duplicate entries!
|
// No duplicate entries!
|
||||||
if( !$this->inGroup( $uid, $gid )) {
|
if(!$this->inGroup($uid, $gid)) {
|
||||||
$qb = $this->dbConn->getQueryBuilder();
|
$qb = $this->dbConn->getQueryBuilder();
|
||||||
$qb->insert('group_user')
|
$qb->insert('group_user')
|
||||||
->setValue('uid', $qb->createNamedParameter($uid))
|
->setValue('uid', $qb->createNamedParameter($uid))
|
||||||
|
@ -250,7 +250,7 @@ class Database extends ABackend
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$groups = [];
|
$groups = [];
|
||||||
while( $row = $cursor->fetch()) {
|
while($row = $cursor->fetch()) {
|
||||||
$groups[] = $row['gid'];
|
$groups[] = $row['gid'];
|
||||||
$this->groupCache[$row['gid']] = $row['gid'];
|
$this->groupCache[$row['gid']] = $row['gid'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -479,7 +479,7 @@ class Installer {
|
||||||
* this has to be done by the function oc_app_uninstall().
|
* this has to be done by the function oc_app_uninstall().
|
||||||
*/
|
*/
|
||||||
public function removeApp($appId) {
|
public function removeApp($appId) {
|
||||||
if($this->isDownloaded( $appId )) {
|
if($this->isDownloaded($appId)) {
|
||||||
if (\OC::$server->getAppManager()->isShipped($appId)) {
|
if (\OC::$server->getAppManager()->isShipped($appId)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -528,10 +528,10 @@ class Installer {
|
||||||
$config = \OC::$server->getConfig();
|
$config = \OC::$server->getConfig();
|
||||||
$errors = [];
|
$errors = [];
|
||||||
foreach(\OC::$APPSROOTS as $app_dir) {
|
foreach(\OC::$APPSROOTS as $app_dir) {
|
||||||
if($dir = opendir( $app_dir['path'] )) {
|
if($dir = opendir($app_dir['path'])) {
|
||||||
while( false !== ( $filename = readdir( $dir ))) {
|
while(false !== ($filename = readdir($dir))) {
|
||||||
if( $filename[0] !== '.' and is_dir($app_dir['path']."/$filename") ) {
|
if($filename[0] !== '.' and is_dir($app_dir['path']."/$filename")) {
|
||||||
if( file_exists( $app_dir['path']."/$filename/appinfo/info.xml" )) {
|
if(file_exists($app_dir['path']."/$filename/appinfo/info.xml")) {
|
||||||
if($config->getAppValue($filename, "installed_version", null) === null) {
|
if($config->getAppValue($filename, "installed_version", null) === null) {
|
||||||
$info=OC_App::getAppInfo($filename);
|
$info=OC_App::getAppInfo($filename);
|
||||||
$enabled = isset($info['default_enable']);
|
$enabled = isset($info['default_enable']);
|
||||||
|
@ -556,7 +556,7 @@ class Installer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir( $dir );
|
closedir($dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,7 +623,7 @@ class Installer {
|
||||||
* @param string $script
|
* @param string $script
|
||||||
*/
|
*/
|
||||||
private static function includeAppScript($script) {
|
private static function includeAppScript($script) {
|
||||||
if ( file_exists($script) ){
|
if (file_exists($script)){
|
||||||
include $script;
|
include $script;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -526,10 +526,10 @@ class Factory implements IFactory {
|
||||||
return $this->pluralFunctions[$string];
|
return $this->pluralFunctions[$string];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preg_match( '/^\s*nplurals\s*=\s*(\d+)\s*;\s*plural=(.*)$/u', $string, $matches)) {
|
if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s*plural=(.*)$/u', $string, $matches)) {
|
||||||
// sanitize
|
// sanitize
|
||||||
$nplurals = preg_replace( '/[^0-9]/', '', $matches[1] );
|
$nplurals = preg_replace('/[^0-9]/', '', $matches[1]);
|
||||||
$plural = preg_replace( '#[^n0-9:\(\)\?\|\&=!<>+*/\%-]#', '', $matches[2] );
|
$plural = preg_replace('#[^n0-9:\(\)\?\|\&=!<>+*/\%-]#', '', $matches[2]);
|
||||||
|
|
||||||
$body = str_replace(
|
$body = str_replace(
|
||||||
[ 'plural', 'n', '$n$plurals', ],
|
[ 'plural', 'n', '$n$plurals', ],
|
||||||
|
@ -545,7 +545,7 @@ class Factory implements IFactory {
|
||||||
$length = strlen($body);
|
$length = strlen($body);
|
||||||
for($i = 0; $i < $length; $i++) {
|
for($i = 0; $i < $length; $i++) {
|
||||||
$ch = $body[$i];
|
$ch = $body[$i];
|
||||||
switch ( $ch ) {
|
switch ($ch) {
|
||||||
case '?':
|
case '?':
|
||||||
$res .= ' ? (';
|
$res .= ' ? (';
|
||||||
$p++;
|
$p++;
|
||||||
|
@ -554,7 +554,7 @@ class Factory implements IFactory {
|
||||||
$res .= ') : (';
|
$res .= ') : (';
|
||||||
break;
|
break;
|
||||||
case ';':
|
case ';':
|
||||||
$res .= str_repeat( ')', $p ) . ';';
|
$res .= str_repeat(')', $p) . ';';
|
||||||
$p = 0;
|
$p = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -627,7 +627,7 @@ class Factory implements IFactory {
|
||||||
ksort($commonLanguages);
|
ksort($commonLanguages);
|
||||||
|
|
||||||
// sort now by displayed language not the iso-code
|
// sort now by displayed language not the iso-code
|
||||||
usort( $languages, function ($a, $b) {
|
usort($languages, function ($a, $b) {
|
||||||
if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
|
if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
|
||||||
// If a doesn't have a name, but b does, list b before a
|
// If a doesn't have a name, but b does, list b before a
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -47,7 +47,6 @@ use OCP\Mail\IMailer;
|
||||||
use OCP\Mail\IMessage;
|
use OCP\Mail\IMessage;
|
||||||
use OCP\Mail\Events\BeforeMessageSent;
|
use OCP\Mail\Events\BeforeMessageSent;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Mailer provides some basic functions to create a mail message that can be used in combination with
|
* Class Mailer provides some basic functions to create a mail message that can be used in combination with
|
||||||
* \OC\Mail\Message.
|
* \OC\Mail\Message.
|
||||||
|
|
|
@ -53,7 +53,7 @@ class Search implements ISearch {
|
||||||
$results = [];
|
$results = [];
|
||||||
foreach($this->providers as $provider) {
|
foreach($this->providers as $provider) {
|
||||||
/** @var $provider Provider */
|
/** @var $provider Provider */
|
||||||
if ( ! $provider->providesResultsFor($inApps) ) {
|
if (! $provider->providesResultsFor($inApps)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($provider instanceof PagedProvider) {
|
if ($provider instanceof PagedProvider) {
|
||||||
|
@ -109,7 +109,7 @@ class Search implements ISearch {
|
||||||
* Create instances of all the registered search providers
|
* Create instances of all the registered search providers
|
||||||
*/
|
*/
|
||||||
private function initProviders() {
|
private function initProviders() {
|
||||||
if( ! empty($this->providers) ) {
|
if(! empty($this->providers)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
foreach($this->registeredProviders as $provider) {
|
foreach($this->registeredProviders as $provider) {
|
||||||
|
|
|
@ -854,7 +854,7 @@ class Share extends Constants {
|
||||||
}
|
}
|
||||||
// Add display names to result
|
// Add display names to result
|
||||||
$row['share_with_displayname'] = $row['share_with'];
|
$row['share_with_displayname'] = $row['share_with'];
|
||||||
if ( isset($row['share_with']) && $row['share_with'] != '' &&
|
if (isset($row['share_with']) && $row['share_with'] != '' &&
|
||||||
$row['share_type'] === self::SHARE_TYPE_USER) {
|
$row['share_type'] === self::SHARE_TYPE_USER) {
|
||||||
$shareWithUser = \OC::$server->getUserManager()->get($row['share_with']);
|
$shareWithUser = \OC::$server->getUserManager()->get($row['share_with']);
|
||||||
$row['share_with_displayname'] = $shareWithUser === null ? $row['share_with'] : $shareWithUser->getDisplayName();
|
$row['share_with_displayname'] = $shareWithUser === null ? $row['share_with'] : $shareWithUser->getDisplayName();
|
||||||
|
@ -869,7 +869,7 @@ class Share extends Constants {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( isset($row['uid_owner']) && $row['uid_owner'] != '') {
|
if (isset($row['uid_owner']) && $row['uid_owner'] != '') {
|
||||||
$ownerUser = \OC::$server->getUserManager()->get($row['uid_owner']);
|
$ownerUser = \OC::$server->getUserManager()->get($row['uid_owner']);
|
||||||
$row['displayname_owner'] = $ownerUser === null ? $row['uid_owner'] : $ownerUser->getDisplayName();
|
$row['displayname_owner'] = $ownerUser === null ? $row['uid_owner'] : $ownerUser->getDisplayName();
|
||||||
}
|
}
|
||||||
|
@ -1018,7 +1018,7 @@ class Share extends Constants {
|
||||||
// for file/folder shares we need to compare file_source, otherwise we compare item_source
|
// for file/folder shares we need to compare file_source, otherwise we compare item_source
|
||||||
// only group shares if they already point to the same target, otherwise the file where shared
|
// only group shares if they already point to the same target, otherwise the file where shared
|
||||||
// before grouping of shares was added. In this case we don't group them toi avoid confusions
|
// before grouping of shares was added. In this case we don't group them toi avoid confusions
|
||||||
if (( $fileSharing && $item['file_source'] === $r['file_source'] && $item['file_target'] === $r['file_target']) ||
|
if (($fileSharing && $item['file_source'] === $r['file_source'] && $item['file_target'] === $r['file_target']) ||
|
||||||
(!$fileSharing && $item['item_source'] === $r['item_source'] && $item['item_target'] === $r['item_target'])) {
|
(!$fileSharing && $item['item_source'] === $r['item_source'] && $item['item_target'] === $r['item_target'])) {
|
||||||
// add the first item to the list of grouped shares
|
// add the first item to the list of grouped shares
|
||||||
if (!isset($result[$key]['grouped'])) {
|
if (!isset($result[$key]['grouped'])) {
|
||||||
|
|
|
@ -306,7 +306,7 @@ class Tags implements ITags {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_null($result)) {
|
if(!is_null($result)) {
|
||||||
while( $row = $result->fetchRow()) {
|
while($row = $result->fetchRow()) {
|
||||||
$id = (int)$row['objid'];
|
$id = (int)$row['objid'];
|
||||||
|
|
||||||
if ($this->includeShared) {
|
if ($this->includeShared) {
|
||||||
|
@ -452,7 +452,7 @@ class Tags implements ITags {
|
||||||
if(!$this->hasTag($name) && $name !== '') {
|
if(!$this->hasTag($name) && $name !== '') {
|
||||||
$newones[] = new Tag($this->user, $this->type, $name);
|
$newones[] = new Tag($this->user, $this->type, $name);
|
||||||
}
|
}
|
||||||
if(!is_null($id) ) {
|
if(!is_null($id)) {
|
||||||
// Insert $objectid, $categoryid pairs if not exist.
|
// Insert $objectid, $categoryid pairs if not exist.
|
||||||
self::$relations[] = ['objid' => $id, 'tag' => $name];
|
self::$relations[] = ['objid' => $id, 'tag' => $name];
|
||||||
}
|
}
|
||||||
|
@ -550,7 +550,7 @@ class Tags implements ITags {
|
||||||
try {
|
try {
|
||||||
$stmt = \OC_DB::prepare('DELETE FROM `' . self::RELATION_TABLE . '` '
|
$stmt = \OC_DB::prepare('DELETE FROM `' . self::RELATION_TABLE . '` '
|
||||||
. 'WHERE `categoryid` = ?');
|
. 'WHERE `categoryid` = ?');
|
||||||
while( $row = $result->fetchRow()) {
|
while($row = $result->fetchRow()) {
|
||||||
try {
|
try {
|
||||||
$stmt->execute([$row['id']]);
|
$stmt->execute([$row['id']]);
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Base {
|
||||||
*/
|
*/
|
||||||
protected function getAppTemplateDirs($theme, $app, $serverRoot, $app_dir) {
|
protected function getAppTemplateDirs($theme, $app, $serverRoot, $app_dir) {
|
||||||
// Check if the app is in the app folder or in the root
|
// Check if the app is in the app folder or in the root
|
||||||
if( file_exists($app_dir.'/templates/' )) {
|
if(file_exists($app_dir.'/templates/')) {
|
||||||
return [
|
return [
|
||||||
$serverRoot.'/themes/'.$theme.'/apps/'.$app.'/templates/',
|
$serverRoot.'/themes/'.$theme.'/apps/'.$app.'/templates/',
|
||||||
$app_dir.'/templates/',
|
$app_dir.'/templates/',
|
||||||
|
@ -115,7 +115,7 @@ class Base {
|
||||||
* $_[$key][$position] in the template.
|
* $_[$key][$position] in the template.
|
||||||
*/
|
*/
|
||||||
public function append($key, $value) {
|
public function append($key, $value) {
|
||||||
if( array_key_exists( $key, $this->vars )) {
|
if(array_key_exists($key, $this->vars)) {
|
||||||
$this->vars[$key][] = $value;
|
$this->vars[$key][] = $value;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -131,7 +131,7 @@ class Base {
|
||||||
*/
|
*/
|
||||||
public function printPage() {
|
public function printPage() {
|
||||||
$data = $this->fetchPage();
|
$data = $this->fetchPage();
|
||||||
if( $data === false ) {
|
if($data === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -168,7 +168,7 @@ class Base {
|
||||||
$theme = $this->theme;
|
$theme = $this->theme;
|
||||||
|
|
||||||
if(!is_null($additionalParams)) {
|
if(!is_null($additionalParams)) {
|
||||||
$_ = array_merge( $additionalParams, $this->vars );
|
$_ = array_merge($additionalParams, $this->vars);
|
||||||
foreach ($_ as $var => $value) {
|
foreach ($_ as $var => $value) {
|
||||||
${$var} = $value;
|
${$var} = $value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ class TemplateLayout extends \OC_Template {
|
||||||
|
|
||||||
// Decide which page we show
|
// Decide which page we show
|
||||||
if($renderAs === 'user') {
|
if($renderAs === 'user') {
|
||||||
parent::__construct( 'core', 'layout.user' );
|
parent::__construct('core', 'layout.user');
|
||||||
if(in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) {
|
if(in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) {
|
||||||
$this->assign('bodyid', 'body-settings');
|
$this->assign('bodyid', 'body-settings');
|
||||||
}else{
|
}else{
|
||||||
|
@ -83,22 +83,22 @@ class TemplateLayout extends \OC_Template {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add navigation entry
|
// Add navigation entry
|
||||||
$this->assign( 'application', '');
|
$this->assign('application', '');
|
||||||
$this->assign( 'appid', $appId );
|
$this->assign('appid', $appId);
|
||||||
$navigation = \OC::$server->getNavigationManager()->getAll();
|
$navigation = \OC::$server->getNavigationManager()->getAll();
|
||||||
$this->assign( 'navigation', $navigation);
|
$this->assign('navigation', $navigation);
|
||||||
$settingsNavigation = \OC::$server->getNavigationManager()->getAll('settings');
|
$settingsNavigation = \OC::$server->getNavigationManager()->getAll('settings');
|
||||||
$this->assign( 'settingsnavigation', $settingsNavigation);
|
$this->assign('settingsnavigation', $settingsNavigation);
|
||||||
foreach($navigation as $entry) {
|
foreach($navigation as $entry) {
|
||||||
if ($entry['active']) {
|
if ($entry['active']) {
|
||||||
$this->assign( 'application', $entry['name'] );
|
$this->assign('application', $entry['name']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($settingsNavigation as $entry) {
|
foreach($settingsNavigation as $entry) {
|
||||||
if ($entry['active']) {
|
if ($entry['active']) {
|
||||||
$this->assign( 'application', $entry['name'] );
|
$this->assign('application', $entry['name']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ class TemplateLayout extends \OC_Template {
|
||||||
$this->assign('user_uid', \OC_User::getUser());
|
$this->assign('user_uid', \OC_User::getUser());
|
||||||
} else if ($renderAs === 'public') {
|
} else if ($renderAs === 'public') {
|
||||||
parent::__construct('core', 'layout.public');
|
parent::__construct('core', 'layout.public');
|
||||||
$this->assign( 'appid', $appId );
|
$this->assign('appid', $appId);
|
||||||
$this->assign('bodyid', 'body-public');
|
$this->assign('bodyid', 'body-public');
|
||||||
|
|
||||||
/** @var IRegistry $subscription */
|
/** @var IRegistry $subscription */
|
||||||
|
@ -196,7 +196,7 @@ class TemplateLayout extends \OC_Template {
|
||||||
foreach($jsFiles as $info) {
|
foreach($jsFiles as $info) {
|
||||||
$web = $info[1];
|
$web = $info[1];
|
||||||
$file = $info[2];
|
$file = $info[2];
|
||||||
$this->append( 'jsfiles', $web.'/'.$file . $this->getVersionHashSuffix() );
|
$this->append('jsfiles', $web.'/'.$file . $this->getVersionHashSuffix());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -229,14 +229,14 @@ class TemplateLayout extends \OC_Template {
|
||||||
$file = $info[2];
|
$file = $info[2];
|
||||||
|
|
||||||
if (substr($file, -strlen('print.css')) === 'print.css') {
|
if (substr($file, -strlen('print.css')) === 'print.css') {
|
||||||
$this->append( 'printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix() );
|
$this->append('printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix());
|
||||||
} else {
|
} else {
|
||||||
$suffix = $this->getVersionHashSuffix($web, $file);
|
$suffix = $this->getVersionHashSuffix($web, $file);
|
||||||
|
|
||||||
if (strpos($file, '?v=') == false) {
|
if (strpos($file, '?v=') == false) {
|
||||||
$this->append( 'cssfiles', $web.'/'.$file . $suffix);
|
$this->append('cssfiles', $web.'/'.$file . $suffix);
|
||||||
} else {
|
} else {
|
||||||
$this->append( 'cssfiles', $web.'/'.$file . '-' . substr($suffix, 3));
|
$this->append('cssfiles', $web.'/'.$file . '-' . substr($suffix, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,7 @@ class URLGenerator implements IURLGenerator {
|
||||||
public function linkTo(string $app, string $file, array $args = []): string {
|
public function linkTo(string $app, string $file, array $args = []): string {
|
||||||
$frontControllerActive = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true');
|
$frontControllerActive = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true');
|
||||||
|
|
||||||
if( $app !== '' ) {
|
if($app !== '') {
|
||||||
$app_path = \OC_App::getAppPath($app);
|
$app_path = \OC_App::getAppPath($app);
|
||||||
// Check if the app is in the app folder
|
// Check if the app is in the app folder
|
||||||
if ($app_path && file_exists($app_path . '/' . $file)) {
|
if ($app_path && file_exists($app_path . '/' . $file)) {
|
||||||
|
|
|
@ -150,7 +150,7 @@ abstract class Backend implements UserInterface {
|
||||||
public function getDisplayNames($search = '', $limit = null, $offset = null) {
|
public function getDisplayNames($search = '', $limit = null, $offset = null) {
|
||||||
$displayNames = [];
|
$displayNames = [];
|
||||||
$users = $this->getUsers($search, $limit, $offset);
|
$users = $this->getUsers($search, $limit, $offset);
|
||||||
foreach ( $users as $user) {
|
foreach ($users as $user) {
|
||||||
$displayNames[$user] = $user;
|
$displayNames[$user] = $user;
|
||||||
}
|
}
|
||||||
return $displayNames;
|
return $displayNames;
|
||||||
|
|
|
@ -459,7 +459,7 @@ class Session implements IUserSession, Emitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to login with this username and password
|
// Try to login with this username and password
|
||||||
if (!$this->login($user, $password) ) {
|
if (!$this->login($user, $password)) {
|
||||||
|
|
||||||
// Failed, maybe the user used their email address
|
// Failed, maybe the user used their email address
|
||||||
$users = $this->manager->getByEmail($user);
|
$users = $this->manager->getByEmail($user);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue