Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Commit

Permalink
Update README.md, add thumbnail, fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamy committed Feb 14, 2018
1 parent 5f5d9eb commit 190e206
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Files Share Link Renamer
###A simple and fast share link renamer add-in for Files app in ownCloud >=9 and NextCloud >=9
### A simple and fast share link renamer add-in for Files app in ownCloud >=9 and NextCloud >=9


This is an add-in to the Files app, which allows you to customize your share tokens, so your links can be https://cloud.ex/s/bachelorparty instead of https://cloud.ex/s/qPv1SwbU5M2YEoJZ. Just share a file or folder (or click an already shared one) and a new button will appear below the share link URL in the sidebar of the Files app.

The translations are from the Files app too, so this app is translated to every language the Files app is translated to.

![Overview of app](https://apps.owncloud.com/CONTENT/content-pre2/174742-2.png)
![Overview of app](https://raw.githubusercontent.com/dreamy-sk/sharerenamer/master/img/thumbnail.png)
Binary file added img/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 18 additions & 18 deletions service/sharerenamerservice.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@

class ShareRenamerService {

private $mapper;

public function __construct(ShareRenamerMapper $mapper){
$this->mapper = $mapper;
}

private function handleException ($e) {
if ($e instanceof DoesNotExistException ||
$e instanceof MultipleObjectsReturnedException) {
throw new NotFoundException($e->getMessage());
} else {
throw $e;
}
}

public function rename($oldtoken, $newtoken) {
return $this->mapper->trytokeninsert($oldtoken, $newtoken);
}
private $mapper;

public function __construct(ShareRenamerMapper $mapper){
$this->mapper = $mapper;
}

private function handleException ($e) {
if ($e instanceof DoesNotExistException ||
$e instanceof MultipleObjectsReturnedException) {
throw new NotFoundException($e->getMessage());
} else {
throw $e;
}
}

public function rename($oldtoken, $newtoken) {
return $this->mapper->trytokeninsert($oldtoken, $newtoken);
}

}

0 comments on commit 190e206

Please sign in to comment.