From 864fbb806621c8167c49f7449486fbc3bdaca1a6 Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Thu, 1 Jun 2023 03:33:18 +0300 Subject: user update; user petitions copy; fixed docker performance issues --- public/app/controllers/Office.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'public/app/controllers/Office.php') diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php index 83135de..f57cf08 100644 --- a/public/app/controllers/Office.php +++ b/public/app/controllers/Office.php @@ -327,6 +327,26 @@ class Office { + public static function petition_copy($sign) + { + if (false) { //(Auth::in_admin_group()) { + $petition = Content_model::get_petition(['signature' => $sign]); + + } else { + $manager = new App_manager(); + $petition = Content_model::get_petition([ + 'signature' => $sign, + 'user_id' => $manager->getUserToken()->getUser()->getID() + ]); + } + if ($petition === false) Render::view('error/404'); + else { + Render::view( 'templates/create_pdf',['petition' => $petition]); + } + } + + + ## TICKET METHODS (create, remove) ## tickets eliminate CSRF attacks ## ------------------------------------------------------------------------- -- cgit v1.2.3