Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downstream 2016-06-09 #31

Merged
merged 82 commits into from
Jun 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
c6a5a43
Added tests about overwriting files and folders as recipient
SergioBertolinSG Apr 14, 2016
a626aa2
add overwriting using chunking but failing
SergioBertolinSG Apr 22, 2016
f2bf75d
userUploadsChunkFileOfWithToWithChecksum has chunking-42 hardcoded
SergioBertolinSG Apr 22, 2016
dc05f97
Added same test using old chunking
SergioBertolinSG Apr 22, 2016
a716740
Added another case about overwriting folder using old chunking
SergioBertolinSG Apr 22, 2016
118050d
Get a range from several chunks
SergioBertolinSG May 12, 2016
c913226
implement specific rename handling for SMB
blizzz Apr 7, 2016
63408fa
allow deleting "ghost files" trough the View and Node api
icewind1991 May 24, 2016
14f96f8
return success when deleting ghost files
icewind1991 Jun 3, 2016
6bc8305
Fix warnings when trying to get mtime of non existing files
icewind1991 Jun 3, 2016
3bd5073
add test for deleting ghost files over dav
icewind1991 Jun 3, 2016
1059315
.htaccess update making two rules non-capturing
mmattel Jun 3, 2016
911fd3e
Do not allow to store boolean configs, they behave unexpected on post…
nickvergessen Jun 6, 2016
eaeb5d6
Fix Decrypt message via occ
davitol Jun 6, 2016
f9b3865
Comments fixed
davitol Jun 6, 2016
371a07e
Fix checkMove() implementation for dav v2 - fixes #24776 (#24971)
DeepDiver1975 Jun 6, 2016
7a0254b
handle path not being set in shared cache (#24993)
icewind1991 Jun 6, 2016
6256bbd
Remove background from curved logo (#24980)
Jun 6, 2016
f28f6ad
[tx-robot] updated from transifex
Jun 7, 2016
8f7a4aa
do not generate device token if 2FA is enable for user
ChristophWurst Jun 6, 2016
d4ba982
Allow to decrypt user '0' files only
nickvergessen Jun 7, 2016
bf917d7
Merge pull request #24813 from owncloud/delete-ghost-files
Jun 7, 2016
67c9e59
Fixed reviews
SergioBertolinSG Jun 7, 2016
2989584
decrease initial users to load to 50
butonic Jun 7, 2016
46fe2dd
Merge pull request #23845 from owncloud/smb-rename
Jun 7, 2016
77db6d3
Improve the UX for "not found" perma links
nickvergessen Jun 7, 2016
7b1b723
dissalow symlinks in local storages that point outside the datadir
icewind1991 May 30, 2016
73547f2
Ignore forbidden files while scanning
icewind1991 Jun 1, 2016
f119769
Better handling of forbidden files in dav
icewind1991 Jun 1, 2016
6822689
don't update storage mtime if we can't get the modified date
icewind1991 Jun 7, 2016
15fffb2
Fix GDrive upload file which name might match the one of a folder
Jun 7, 2016
8526bbb
Add support to know where the storage test comes from
jvillafanez Jun 7, 2016
2cf7ad8
make sure $data['mtime'] is always a timestamp
icewind1991 Jun 7, 2016
3e3b326
Allow to cancel 2FA after login
nickvergessen Jun 7, 2016
110edd3
Rename variable
jvillafanez Jun 7, 2016
a2b0058
Fix test
jvillafanez Jun 7, 2016
fb087a0
Use temporary htaccesstest.txt for data dir security check
Jun 7, 2016
bbd61cd
[tx-robot] updated from transifex
Jun 8, 2016
4a3c67f
Bring back sharedstorage hooks
rullzer Jun 8, 2016
4bff16e
darker background image for better font contrast
ChristophWurst Jun 7, 2016
68a7aed
Adjust test to work with phpunit < 5.2
nickvergessen Jun 8, 2016
4fd55c2
Merge pull request #25007 from owncloud/gdrive-fixuploadsamenameasfolder
Jun 8, 2016
fa9c96a
Fix GDrive file size when mime type doesn't match contents
Jun 7, 2016
1ee4d4d
Merge pull request #23996 from owncloud/integrations-tests-qa-145
Jun 8, 2016
652b496
Merge pull request #25001 from owncloud/issue-24939-better-ux-on-inva…
Jun 8, 2016
87c150e
Merge pull request #25005 from owncloud/parent-storage-time-cast
Jun 8, 2016
5601684
Merge pull request #25018 from owncloud/background-contrast
Jun 8, 2016
111b4d7
Merge pull request #24999 from owncloud/initial-userloading-workaround
Jun 8, 2016
b7935dc
Merge pull request #24998 from owncloud/issue-24994-allow-decrypting-…
Jun 8, 2016
9b6125e
Merge pull request #24992 from owncloud/fix_decrypt_message
Jun 8, 2016
12683b7
Merge pull request #24991 from owncloud/2fa-do-not-generate-token
Jun 8, 2016
ed92f4c
Merge pull request #24983 from owncloud/issue-23776-do-not-allow-bool…
Jun 8, 2016
8d09489
Merge pull request #24899 from owncloud/local-storage-symlinks
Jun 8, 2016
b3592ab
Merge pull request #25019 from owncloud/fix_24937
Jun 8, 2016
7dcc47d
Merge pull request #25011 from owncloud/issue-24745-allow-to-cancel-2fa
Jun 8, 2016
e0aaa21
Fixed problem about removing trusted servers accidentally
SergioBertolinSG Jun 8, 2016
e133f7e
ownCloud 9.1.0 beta 2
Jun 8, 2016
b849362
Improve readability
SergioBertolinSG Jun 8, 2016
7d85bed
Change the default value to true instead of null
jvillafanez Jun 8, 2016
6bc7e3f
Removed old html
SergioBertolinSG Jun 8, 2016
ec929f0
When creating a session token, make sure it's the login password and …
ChristophWurst Jun 3, 2016
e70bd36
Added width of the tooltip
SergioBertolinSG Jun 8, 2016
808438e
skip scanning for a user when the user is not setup yet
icewind1991 Jun 8, 2016
46e26f6
catch sessionnotavailable exception if memory session is used
ChristophWurst Jun 8, 2016
396363c
Merge pull request #24974 from owncloud/htaccess_update
Jun 8, 2016
9997c43
use client login method on CORS routes
ChristophWurst May 25, 2016
5621551
Merge pull request #25012 from owncloud/gdrive-fixfilesizewithmimetyp…
Jun 8, 2016
e493070
Do not log token or challenge with exception stacktrace (#25026)
nickvergessen Jun 8, 2016
7c8d2a8
Merge pull request #25027 from owncloud/fix-22746-narrowtooltip
Jun 8, 2016
6de406a
Merge pull request #25023 from owncloud/fix-22127-trusted-servers
Jun 8, 2016
0a6b845
Update autotest.sh
jnweiger Jun 8, 2016
355f50b
[tx-robot] updated from transifex
Jun 9, 2016
0e3737f
Merge pull request #25028 from owncloud/scanner-user-not-setup
Jun 9, 2016
aca4ea1
Merge pull request #24826 from owncloud/cors-client-login
Jun 9, 2016
826e276
Merge pull request #24973 from owncloud/token-password-session-token
Jun 9, 2016
90c1ec1
Merge pull request #25014 from owncloud/admin-datadircheck-fix
Jun 9, 2016
f20c617
Allow login by email address via webdav as well - fixes #24791
DeepDiver1975 Jun 7, 2016
4c26abe
Fix the FIXME (#25022)
nickvergessen Jun 9, 2016
c13c561
Merge pull request #25036 from owncloud/jnweiger-patch-1
Jun 9, 2016
ac16342
Merge pull request #25008 from owncloud/externals_test_with_origin
Jun 9, 2016
6ba1893
Merge pull request #25000 from owncloud/fix-email-login-dav
Jun 9, 2016
a636e4f
Downstream 2016-06-09
blizzz Jun 9, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
RewriteRule ^remote/(.*) remote.php [QSA,L]
RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>
<IfModule mod_mime.c>
AddType image/svg+xml svg svgz
Expand Down
4 changes: 2 additions & 2 deletions apps/dav/lib/Connector/Sabre/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ protected function validateUserPass($username, $password) {
$this->session->close();
return true;
} else {
\OC_Util::setUpFS(); //login hooks may need early access to the filesystem
\OC_Util::setupFS(); //login hooks may need early access to the filesystem
if($this->userSession->logClientIn($username, $password)) {
$this->userSession->createSessionToken($this->request, $this->userSession->getUser()->getUID(), $username, $password);
\OC_Util::setUpFS($this->userSession->getUser()->getUID());
\OC_Util::setupFS($this->userSession->getUser()->getUID());
$this->session->set(self::DAV_AUTHENTICATED, $this->userSession->getUser()->getUID());
$this->session->close();
return true;
Expand Down
2 changes: 2 additions & 0 deletions apps/dav/lib/Connector/Sabre/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ public function getChild($name, $info = null) {
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
} catch (\OCP\Files\InvalidPathException $ex) {
throw new InvalidPath($ex->getMessage());
} catch (ForbiddenException $e) {
throw new \Sabre\DAV\Exception\Forbidden();
}
}

Expand Down
9 changes: 4 additions & 5 deletions apps/dav/lib/Connector/Sabre/FilesPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,19 @@ public function initialize(\Sabre\DAV\Server $server) {
*/
function checkMove($source, $destination) {
$sourceNode = $this->tree->getNodeForPath($source);
if ($sourceNode instanceof FutureFile) {
if (!$sourceNode instanceof Node) {
return;
}
list($sourceDir,) = \Sabre\HTTP\URLUtil::splitPath($source);
list($destinationDir,) = \Sabre\HTTP\URLUtil::splitPath($destination);

if ($sourceDir !== $destinationDir) {
$sourceFileInfo = $this->fileView->getFileInfo($source);

if ($sourceFileInfo === false) {
$sourceNodeFileInfo = $sourceNode->getFileInfo();
if (is_null($sourceNodeFileInfo)) {
throw new NotFound($source . ' does not exist');
}

if (!$sourceFileInfo->isDeletable()) {
if (!$sourceNodeFileInfo->isDeletable()) {
throw new Forbidden($source . " cannot be deleted");
}
}
Expand Down
4 changes: 4 additions & 0 deletions apps/dav/lib/Connector/Sabre/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,4 +347,8 @@ public function releaseLock($type) {
public function changeLock($type) {
$this->fileView->changeLock($this->path, $type);
}

public function getFileInfo() {
return $this->info;
}
}
2 changes: 2 additions & 0 deletions apps/dav/lib/Connector/Sabre/ObjectTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ public function getNodeForPath($path) {
throw new \Sabre\DAV\Exception\NotFound('Storage ' . $path . ' is invalid');
} catch (LockedException $e) {
throw new \Sabre\DAV\Exception\Locked();
} catch (ForbiddenException $e) {
throw new \Sabre\DAV\Exception\Forbidden();
}
}

Expand Down
60 changes: 38 additions & 22 deletions apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
namespace OCA\DAV\Tests\unit\Connector\Sabre;

use OCA\DAV\Connector\Sabre\FilesPlugin;
use OCP\Files\StorageNotAvailableException;
use Sabre\DAV\PropFind;
use Sabre\DAV\PropPatch;
Expand All @@ -36,16 +37,16 @@
* See the COPYING-README file.
*/
class FilesPluginTest extends TestCase {
const GETETAG_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::GETETAG_PROPERTYNAME;
const FILEID_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::FILEID_PROPERTYNAME;
const INTERNAL_FILEID_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::INTERNAL_FILEID_PROPERTYNAME;
const SIZE_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::SIZE_PROPERTYNAME;
const PERMISSIONS_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::PERMISSIONS_PROPERTYNAME;
const LASTMODIFIED_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::LASTMODIFIED_PROPERTYNAME;
const DOWNLOADURL_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::DOWNLOADURL_PROPERTYNAME;
const OWNER_ID_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::OWNER_ID_PROPERTYNAME;
const OWNER_DISPLAY_NAME_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME;
const DATA_FINGERPRINT_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME;
const GETETAG_PROPERTYNAME = FilesPlugin::GETETAG_PROPERTYNAME;
const FILEID_PROPERTYNAME = FilesPlugin::FILEID_PROPERTYNAME;
const INTERNAL_FILEID_PROPERTYNAME = FilesPlugin::INTERNAL_FILEID_PROPERTYNAME;
const SIZE_PROPERTYNAME = FilesPlugin::SIZE_PROPERTYNAME;
const PERMISSIONS_PROPERTYNAME = FilesPlugin::PERMISSIONS_PROPERTYNAME;
const LASTMODIFIED_PROPERTYNAME = FilesPlugin::LASTMODIFIED_PROPERTYNAME;
const DOWNLOADURL_PROPERTYNAME = FilesPlugin::DOWNLOADURL_PROPERTYNAME;
const OWNER_ID_PROPERTYNAME = FilesPlugin::OWNER_ID_PROPERTYNAME;
const OWNER_DISPLAY_NAME_PROPERTYNAME = FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME;
const DATA_FINGERPRINT_PROPERTYNAME = FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME;

/**
* @var \Sabre\DAV\Server | \PHPUnit_Framework_MockObject_MockObject
Expand All @@ -58,7 +59,7 @@ class FilesPluginTest extends TestCase {
private $tree;

/**
* @var \OCA\DAV\Connector\Sabre\FilesPlugin
* @var FilesPlugin
*/
private $plugin;

Expand All @@ -84,11 +85,11 @@ public function setUp() {
->disableOriginalConstructor()
->getMock();
$this->config = $this->getMock('\OCP\IConfig');
$this->config->method('getSystemValue')
$this->config->expects($this->any())->method('getSystemValue')
->with($this->equalTo('data-fingerprint'), $this->equalTo(''))
->willReturn('my_fingerprint');

$this->plugin = new \OCA\DAV\Connector\Sabre\FilesPlugin(
$this->plugin = new FilesPlugin(
$this->tree,
$this->view,
$this->config
Expand Down Expand Up @@ -263,7 +264,7 @@ public function testGetPropertiesStorageNotAvailable() {
}

public function testGetPublicPermissions() {
$this->plugin = new \OCA\DAV\Connector\Sabre\FilesPlugin(
$this->plugin = new FilesPlugin(
$this->tree,
$this->view,
$this->config,
Expand Down Expand Up @@ -331,7 +332,7 @@ public function testGetPropertiesForRootDirectory() {
$node = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\Directory')
->disableOriginalConstructor()
->getMock();
$node->method('getPath')->willReturn('/');
$node->expects($this->any())->method('getPath')->willReturn('/');

$propFind = new PropFind(
'/',
Expand Down Expand Up @@ -432,11 +433,16 @@ public function testMoveSrcNotDeletable() {
->method('isDeletable')
->willReturn(false);

$this->view->expects($this->once())
$node = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\Node')
->disableOriginalConstructor()
->getMock();
$node->expects($this->once())
->method('getFileInfo')
->with('FolderA/test.txt')
->willReturn($fileInfoFolderATestTXT);

$this->tree->expects($this->once())->method('getNodeForPath')
->willReturn($node);

$this->plugin->checkMove('FolderA/test.txt', 'test.txt');
}

Expand All @@ -448,11 +454,16 @@ public function testMoveSrcDeletable() {
->method('isDeletable')
->willReturn(true);

$this->view->expects($this->once())
$node = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\Node')
->disableOriginalConstructor()
->getMock();
$node->expects($this->once())
->method('getFileInfo')
->with('FolderA/test.txt')
->willReturn($fileInfoFolderATestTXT);

$this->tree->expects($this->once())->method('getNodeForPath')
->willReturn($node);

$this->plugin->checkMove('FolderA/test.txt', 'test.txt');
}

Expand All @@ -461,10 +472,15 @@ public function testMoveSrcDeletable() {
* @expectedExceptionMessage FolderA/test.txt does not exist
*/
public function testMoveSrcNotExist() {
$this->view->expects($this->once())
$node = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\Node')
->disableOriginalConstructor()
->getMock();
$node->expects($this->once())
->method('getFileInfo')
->with('FolderA/test.txt')
->willReturn(false);
->willReturn(null);

$this->tree->expects($this->once())->method('getNodeForPath')
->willReturn($node);

$this->plugin->checkMove('FolderA/test.txt', 'test.txt');
}
Expand Down
59 changes: 59 additions & 0 deletions apps/dav/tests/unit/Connector/Sabre/RequestTest/DeleteTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php
/**
* @author Joas Schilling <nickvergessen@owncloud.com>
* @author Robin Appelman <icewind@owncloud.com>
* @author Thomas Müller <thomas.mueller@tmit.eu>
*
* @copyright Copyright (c) 2016, ownCloud, Inc.
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/

namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest;

use OC\Connector\Sabre\Exception\FileLocked;
use OCP\AppFramework\Http;
use OCP\Lock\ILockingProvider;

/**
* Class DeleteTest
*
* @group DB
*
* @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
*/
class DeleteTest extends RequestTest {
public function testBasicUpload() {
$user = $this->getUniqueID();
$view = $this->setupUser($user, 'pass');

$view->file_put_contents('foo.txt', 'asd');
$mount = $view->getMount('foo.txt');
$internalPath = $view->getAbsolutePath();

// create a ghost file
$mount->getStorage()->unlink($mount->getInternalPath($internalPath));

// cache entry still exists
$this->assertInstanceOf('\OCP\Files\FileInfo', $view->getFileInfo('foo.txt'));

$response = $this->request($view, $user, 'pass', 'DELETE', '/foo.txt');

$this->assertEquals(Http::STATUS_NO_CONTENT, $response->getStatus());

// no longer in the cache
$this->assertFalse($view->getFileInfo('foo.txt'));
}
}
6 changes: 6 additions & 0 deletions apps/federatedfilesharing/l10n/ar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OC.L10N.register(
"federatedfilesharing",
{
"Invalid Federated Cloud ID" : "معرّف السحابة المتحدة غير صالح"
},
"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;");
4 changes: 4 additions & 0 deletions apps/federatedfilesharing/l10n/ar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{ "translations": {
"Invalid Federated Cloud ID" : "معرّف السحابة المتحدة غير صالح"
},"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"
}
1 change: 1 addition & 0 deletions apps/federatedfilesharing/l10n/pl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ OC.L10N.register(
"federatedfilesharing",
{
"Sharing %s failed, because this item is already shared with %s" : "Współdzielenie %s nie powiodło się, ponieważ element jest już współdzielony z %s",
"File is already shared with %s" : "Plik jest już współdzielony z %s",
"Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Współdzielenie %s nie powiodło się, nie można odnaleźć %s. Prawdopobnie serwer nie jest teraz osiągalny.",
"Accept" : "Akceptuj",
"Open documentation" : "Otwórz dokumentację",
Expand Down
1 change: 1 addition & 0 deletions apps/federatedfilesharing/l10n/pl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ "translations": {
"Sharing %s failed, because this item is already shared with %s" : "Współdzielenie %s nie powiodło się, ponieważ element jest już współdzielony z %s",
"File is already shared with %s" : "Plik jest już współdzielony z %s",
"Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Współdzielenie %s nie powiodło się, nie można odnaleźć %s. Prawdopobnie serwer nie jest teraz osiągalny.",
"Accept" : "Akceptuj",
"Open documentation" : "Otwórz dokumentację",
Expand Down
11 changes: 7 additions & 4 deletions apps/federation/css/settings-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
cursor: pointer;
}

#listOfTrustedServers li:hover {
cursor: pointer;
}

#listOfTrustedServers .status {
margin-right: 10px;
}

#listOfTrustedServers .icon {
cursor: pointer;
display: inline-block;
vertical-align: middle;
margin-left: 10px;
}
13 changes: 7 additions & 6 deletions apps/federation/js/settings-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ $(document).ready(function () {
$('ul#listOfTrustedServers').prepend(
$('<li>')
.attr('id', data.id)
.attr('class', 'icon-delete')
.html('<span class="status indeterminate"></span>' + data.url)
.html('<span class="status indeterminate"></span>' +
data.url +
'<span class="icon icon-delete"></span>')
);
OC.msg.finishedSuccess('#ocFederationAddServer .msg', data.message);
})
Expand All @@ -56,10 +57,10 @@ $(document).ready(function () {
}
});

// remove trusted server from list
$( "#listOfTrustedServers" ).on('click', 'li', function() {
var id = $(this).attr('id');
var $this = $(this);
// remove trusted server from list
$( "#listOfTrustedServers" ).on('click', 'li > .icon-delete', function() {
var $this = $(this).parent();
id = $this.attr('id');
$.ajax({
url: OC.generateUrl('/apps/federation/trusted-servers/' + id),
type: 'DELETE',
Expand Down
3 changes: 2 additions & 1 deletion apps/federation/templates/settings-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</p>
<ul id="listOfTrustedServers">
<?php foreach($_['trustedServers'] as $trustedServer) { ?>
<li id="<?php p($trustedServer['id']); ?>" class="icon-delete">
<li id="<?php p($trustedServer['id']); ?>">
<?php if((int)$trustedServer['status'] === TrustedServers::STATUS_OK) { ?>
<span class="status success"></span>
<?php
Expand All @@ -36,6 +36,7 @@
<span class="status error"></span>
<?php } ?>
<?php p($trustedServer['url']); ?>
<span class="icon icon-delete"></span>
</li>
<?php } ?>
</ul>
Expand Down
3 changes: 3 additions & 0 deletions apps/files/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
this.$showHiddenFiles = $('input#showhiddenfilesToggle');
var showHidden = $('#showHiddenFiles').val() === "1";
this.$showHiddenFiles.prop('checked', showHidden);
if ($('#fileNotFound').val() === "1") {
OC.Notification.showTemporary(t('files', 'File could not be found'));
}

this._filesConfig = new OC.Backbone.Model({
showhidden: showHidden
Expand Down
Loading