upd: ajaxcontroller
fix couple typos
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
use Exception;
|
||||||
use Parsedown;
|
use Parsedown;
|
||||||
use App\Entity\Reference;
|
use App\Entity\Reference;
|
||||||
use App\Entity\Template;
|
use App\Entity\Template;
|
||||||
@@ -16,7 +16,6 @@ use App\Entity\SharedNote;
|
|||||||
use App\Utils\Utils;
|
use App\Utils\Utils;
|
||||||
use Doctrine\DBAL\Exception\ReadOnlyException;
|
use Doctrine\DBAL\Exception\ReadOnlyException;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Exception;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
@@ -299,11 +298,11 @@ class AjaxController extends AbstractController
|
|||||||
$newNote = false;
|
$newNote = false;
|
||||||
if (isset($data->id) && $data->id) {
|
if (isset($data->id) && $data->id) {
|
||||||
/** @var Note|array $note */
|
/** @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 */
|
/** @var Note $note */
|
||||||
$note = $note[0];
|
$note = $dbnote[0];
|
||||||
} else {
|
} else {
|
||||||
$note = new Note();
|
$note = new Note();
|
||||||
$newNote = true;
|
$newNote = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user