mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
Fix some regresions
This commit is contained in:
@@ -94,7 +94,7 @@ class SettingsController extends Controller {
|
|||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case SettingsService::COLOR_FOR_NEW_NOTES_KEY:
|
case SettingsService::COLOR_FOR_NEW_NOTES_KEY:
|
||||||
$value = $this->settingsService->getColorForNewNotes($this->userId);
|
$value = $this->settingsService->getColorForNewNotes();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$status = self::STATE_FALSE;
|
$status = self::STATE_FALSE;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ use OCP\IRequest;
|
|||||||
use OCA\QuickNotes\Db\NoteShare;
|
use OCA\QuickNotes\Db\NoteShare;
|
||||||
use OCA\QuickNotes\Db\NoteShareMapper;
|
use OCA\QuickNotes\Db\NoteShareMapper;
|
||||||
|
|
||||||
|
use OCP\AppFramework\Db\DoesNotExistException;
|
||||||
|
|
||||||
class ShareController extends Controller {
|
class ShareController extends Controller {
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use OCP\AppFramework\Db\Entity;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @method void setColor(string $color)
|
* @method void setColor(string $color)
|
||||||
* @method strinf getColor()
|
* @method string getColor()
|
||||||
*/
|
*/
|
||||||
class Color extends Entity implements JsonSerializable {
|
class Color extends Entity implements JsonSerializable {
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class ColorMapper extends QBMapper {
|
|||||||
$qb->select('*')
|
$qb->select('*')
|
||||||
->from($this->tableName)
|
->from($this->tableName)
|
||||||
->where(
|
->where(
|
||||||
$qb->expr()->eq('color', $qb->createNamedParameter($color, IQueryBuilder::PARAM_STRING))
|
$qb->expr()->eq('color', $qb->createNamedParameter($color, IQueryBuilder::PARAM_STR))
|
||||||
);
|
);
|
||||||
return $this->findEntity($qb);
|
return $this->findEntity($qb);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ use OCA\QuickNotes\Db\TagMapper;
|
|||||||
use OCA\QuickNotes\Service\FileService;
|
use OCA\QuickNotes\Service\FileService;
|
||||||
use OCA\QuickNotes\Service\SettingsService;
|
use OCA\QuickNotes\Service\SettingsService;
|
||||||
|
|
||||||
|
use OCP\AppFramework\Db\DoesNotExistException;
|
||||||
|
|
||||||
class NoteService {
|
class NoteService {
|
||||||
|
|
||||||
@@ -408,7 +409,7 @@ class NoteService {
|
|||||||
// Get Note and Color
|
// Get Note and Color
|
||||||
try {
|
try {
|
||||||
$note = $this->notemapper->find($id, $userId);
|
$note = $this->notemapper->find($id, $userId);
|
||||||
} catch(Exception $e) {
|
} catch(DoesNotExistException $e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$oldcolorid = $note->getColorId();
|
$oldcolorid = $note->getColorId();
|
||||||
|
|||||||
Reference in New Issue
Block a user