diff --git a/apps/maarch_entreprise/index.php b/apps/maarch_entreprise/index.php index 469c1a6dfbfdfa9ca19b6b8034e0acbac640deeb..4619814a3caa154d35536b3d8fb75ec51e57fcc8 100755 --- a/apps/maarch_entreprise/index.php +++ b/apps/maarch_entreprise/index.php @@ -1,22 +1,10 @@ <?php -/* -* Copyright 2008-2015 Maarch -* -* This file is part of Maarch Framework. -* -* Maarch Framework is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Maarch Framework is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Copyright Maarch since 2008 under licence GPLv3. + * See LICENCE.txt file at the root folder for more details. + * This file is part of Maarch software. + * + */ /****************************************************************************/ /* */ @@ -30,11 +18,7 @@ * @brief Maarch index page : every php page is loaded with this page * * @file -* @author Claire Figueras <dev@maarch.org> -* @author Laurent Giovannoni <dev@maarch.org> -* @author Loic Vinet <dev@maarch.org> -* @date $date$ -* @version $Revision$ +* @author <dev@maarch.org> * @ingroup apps */ include_once '../../core/class/class_functions.php'; @@ -371,4 +355,11 @@ if (file_exists($path)) { </div> </div> </body> + <?php + if ($_SESSION['user']['UserId'] == 'superadmin' && !empty($_REQUEST['administration'])) { + ?> + <script>triggerAngular(true, '#/administration')</script> + <?php + } + ?> </html> diff --git a/apps/maarch_entreprise/log.php b/apps/maarch_entreprise/log.php index c777fe8e010447d9a6f7ebfe320f3c1f587dac19..fafa2d9bd0e16341c05187683309b249a85ffe6d 100755 --- a/apps/maarch_entreprise/log.php +++ b/apps/maarch_entreprise/log.php @@ -312,6 +312,9 @@ if (! empty($_SESSION['error'])) { $res['url'] = 'index.php?display=true&page=login'; } } + if ($_SESSION['user']['UserId'] == 'superadmin') { + $res['url'] .= '?administration=true'; + } header( 'location: ' . $_SESSION['config']['businessappurl'] . $res['url'] ); diff --git a/src/app/contact/controllers/ContactController.php b/src/app/contact/controllers/ContactController.php index 30155b33020a84fee6fe23c8f45b5c70ee3a6b5e..abe58c6e7cc8f705323b7afbd9ce83af10c0f573 100644 --- a/src/app/contact/controllers/ContactController.php +++ b/src/app/contact/controllers/ContactController.php @@ -72,7 +72,8 @@ class ContactController return $response->withJson(['contactId' => $contactId, 'addressId' => $addressId]); } - public function getCheckCommunication(Request $request, Response $response, $aArgs) { + public function getCheckCommunication(Request $request, Response $response, $aArgs) + { $data = $request->getParams(); if (isset($data['contactId'])) { @@ -86,11 +87,7 @@ class ContactController ->withJson(['errors' => _ID . ' ' . _IS_EMPTY]); } - $data = [ - $obj, - ]; - - return $response->withJson($data); + return $response->withJson([$obj]); } diff --git a/src/app/contact/models/ContactModelAbstract.php b/src/app/contact/models/ContactModelAbstract.php index 29d77be0b455c06fc4abcdb1d64a2966dd555c52..903efd17b9063e3e7b9240e82cb85adde6c87617 100644 --- a/src/app/contact/models/ContactModelAbstract.php +++ b/src/app/contact/models/ContactModelAbstract.php @@ -222,6 +222,4 @@ class ContactModelAbstract return $aReturn[0]; } - - }