Skip to content

Commit

Permalink
Various small improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
  • Loading branch information
PhrozenByte committed Apr 13, 2020
1 parent bd38b31 commit b9981fd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@
}

$icon
.prop('title', compatReason)
.tooltip('dispose')
.attr('title', compatReason)
.tooltip();
}
});
Expand Down
2 changes: 1 addition & 1 deletion js/personal.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
.attr('data-timestamp', time)
.text(OC.Util.relativeModifiedDate(time))
.addClass('has-tooltip')
.prop('title', OC.Util.formatDate(time))
.attr('title', OC.Util.formatDate(time))
.tooltip();
});
},
Expand Down
2 changes: 1 addition & 1 deletion js/pico.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
*/
_content: function ($template, vars, replaceContent) {
var $baseElement = $($template.data('replaces') || $template.data('appendTo') || this.$element),
$content = $template.octemplate(vars || {});
$content = $template.octemplate(vars || {}) || $();

$baseElement.find('.has-tooltip').tooltip('hide');
$content.find('.has-tooltip').tooltip();
Expand Down
9 changes: 9 additions & 0 deletions lib/Files/StorageFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use OC\Files\Utils\Scanner;
use OC\ForbiddenException;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\AlreadyExistsException;
use OCP\Files\Folder as OCFolder;
use OCP\Files\InvalidPathException;
use OCP\Files\NotPermittedException;
Expand Down Expand Up @@ -134,6 +135,10 @@ public function get(string $path): NodeInterface
*/
public function newFolder(string $path): FolderInterface
{
if ($this->exists($path)) {
throw new AlreadyExistsException();
}

$basePath = $this->getBasePath($path);
return new StorageFolder($this->node->newFolder($path), $basePath);
}
Expand All @@ -143,6 +148,10 @@ public function newFolder(string $path): FolderInterface
*/
public function newFile(string $path): FileInterface
{
if ($this->exists($path)) {
throw new AlreadyExistsException();
}

$basePath = $this->getBasePath($path);
return new StorageFile($this->node->newFile($path), $basePath);
}
Expand Down
3 changes: 1 addition & 2 deletions lib/Service/PicoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ private function loadPicoPlugins(Pico $pico)
require_once($pluginFile);
};

$plugins = $this->pluginsService->getPlugins();
foreach ($plugins as $pluginData) {
foreach ($this->pluginsService->getPlugins() as $pluginData) {
if ($pluginData['compat']) {
$pluginFile = $pluginData['name'] . '/' . $pluginData['name'] . '.php';
$includeClosure($this->pluginsService->getPluginsPath() . '/' . $pluginFile);
Expand Down

0 comments on commit b9981fd

Please sign in to comment.