Update for V2.0 #27

Merged
ryan merged 80 commits from 1.3 into main 2026-06-21 20:46:16 -04:00
Showing only changes of commit e14abe23fd - Show all commits
+4 -5
View File
@@ -3,7 +3,7 @@
namespace App\Controller;
use DateTime;
use Exception;
use Parsedown;
use App\Entity\Reference;
use App\Entity\Template;
@@ -16,7 +16,6 @@ use App\Entity\SharedNote;
use App\Utils\Utils;
use Doctrine\DBAL\Exception\ReadOnlyException;
use Doctrine\ORM\EntityManagerInterface;
use Exception;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -299,11 +298,11 @@ class AjaxController extends AbstractController
$newNote = false;
if (isset($data->id) && $data->id) {
/** @var Note|array $note */
$note = $emi->getRepository(Note::class)->findBy(['id' => $data->id, 'user' => $this->getUser()]);
$dbnote = $emi->getRepository(Note::class)->findBy(['id' => $data->id, 'user' => $this->getUser()]);
if (is_array($note) && count($note) > 0) {
if (is_array($dbnote) && count($dbnote) > 0) {
/** @var Note $note */
$note = $note[0];
$note = $dbnote[0];
} else {
$note = new Note();
$newNote = true;