svg
This commit is contained in:
@ -91,6 +91,15 @@ class CropController extends AbstractController
|
||||
$thumb_image_location = "uploads/$type/thumb_".$file;
|
||||
$cropped = $this->resizeThumbnailImage($thumb_image_location, $large_image_location,$data["ws"],$data["hs"],$data["xs"],$data["ys"],$scale);
|
||||
|
||||
if($type=="illustration") {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$illustration=$em->getRepository("App:Illustration")->findOneBy(["illustration"=>$file]);
|
||||
if($illustration) {
|
||||
$illustration->setUpdatetime(new \DateTime());
|
||||
$em->flush();
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('Crop/crop03.html.twig', [
|
||||
'useheader' => false,
|
||||
'usesidebar' => false,
|
||||
|
@ -13,20 +13,6 @@ class HomeController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
if($this->getUser()) {
|
||||
// Entete
|
||||
$headers = ['Accept' => 'application/json', 'key' => $this->getParameter("appNinegatesecret")];
|
||||
$query = [];
|
||||
$url=$this->getParameter("appNinegateurl");
|
||||
// Paramétrage unirest
|
||||
|
||||
\Unirest\Request::verifyPeer(false);
|
||||
\Unirest\Request::verifyHost(false);
|
||||
\Unirest\Request::timeout(5);
|
||||
//dd($url.'/rest/user/'.$this->getUser()->getUsername());
|
||||
$response = \Unirest\Request::get($url.'/rest/user/'.$this->getUser()->getUsername(),$headers,["only"=>"user,groups"]);
|
||||
}
|
||||
|
||||
$users = $em->getRepository("App:User")->findBy([],["pseudo"=>"ASC"]);
|
||||
$illustrations = $em->getRepository("App:Illustration")->findBy([],["submittime"=>"DESC"]);
|
||||
$links = $em->getRepository("App:Link")->findBy(["user"=>null]);
|
||||
|
@ -81,6 +81,7 @@ class IllustrationController extends AbstractController
|
||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||
$data = $form->getData();
|
||||
$data->setSubmittime(new \DateTime());
|
||||
$data->setUpdatetime(new \DateTime());
|
||||
$em->persist($data);
|
||||
$em->flush();
|
||||
|
||||
|
@ -34,6 +34,11 @@ class Illustration
|
||||
*/
|
||||
private $submittime;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updatetime;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
@ -95,6 +100,18 @@ class Illustration
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUpdatetime(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->updatetime;
|
||||
}
|
||||
|
||||
public function setUpdatetime(\DateTimeInterface $updatetime): self
|
||||
{
|
||||
$this->updatetime = $updatetime;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWidth(): ?int
|
||||
{
|
||||
return $this->width;
|
||||
|
Reference in New Issue
Block a user