-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
438 additions
and
831 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,22 @@ | ||
<?php | ||
|
||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ | ||
|
||
/** | ||
* Configuration file for ObjectsLend plugin | ||
* | ||
* PHP version 5 | ||
* | ||
* Copyright © 2013-2016 Mélissa Djebel | ||
* Copyright © 2017 The Galette Team | ||
* Copyright © 2003-2024 The Galette Team | ||
* | ||
* This file is part of Galette (http://galette.tuxfamily.org). | ||
* This file is part of Galette (https://galette.eu). | ||
* | ||
* ObjectsLend is free software: you can redistribute it and/or modify | ||
* Galette 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. | ||
* | ||
* ObjectsLend is distributed in the hope that it will be useful, | ||
* Galette 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 Galette. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @category Plugins | ||
* @package ObjectsLend | ||
* | ||
* @author Mélissa Djebel <[email protected]> | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @copyright 2013-2016 Mélissa Djebel | ||
* Copyright © 2017 The Galette Team | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @version 0.7 | ||
* @link http://galette.tuxfamily.org | ||
* @since Available since 0.7 | ||
*/ | ||
|
||
define('LEND_PREFIX', 'lend_'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,30 @@ | ||
<?php | ||
|
||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ | ||
|
||
/** | ||
* Configuration file for ObjectsLend plugin | ||
* | ||
* PHP version 5 | ||
* | ||
* Copyright © 2013-2016 Mélissa Djebel | ||
* Copyright © 2017-2023 The Galette Team | ||
* Copyright © 2003-2024 The Galette Team | ||
* | ||
* This file is part of Galette (https://galette.eu). | ||
* | ||
* ObjectsLend is free software: you can redistribute it and/or modify | ||
* Galette 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. | ||
* | ||
* ObjectsLend is distributed in the hope that it will be useful, | ||
* Galette 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 Galette. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @category Plugins | ||
* @package ObjectsLend | ||
* | ||
* @author Mélissa Djebel <[email protected]> | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @copyright 2013-2016 Mélissa Djebel | ||
* @copyright 2017-2023 The Galette Team | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @link https://galette.eu | ||
*/ | ||
|
||
$this->register( | ||
'Galette Objects Lend', //Name | ||
'Manage rent/lend of object', //Short description | ||
'Mélissa Djebel, Johan Cwiklinski', //Author | ||
'2.0.0', //Version | ||
'1.0.0', //Galette version compatibility | ||
'1.1.0', //Galette version compatibility | ||
'objectslend', //routing name and translation domain | ||
'2023-12-07', //Date | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
<?php | ||
|
||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ | ||
|
||
/** | ||
* ObjectsLend routes | ||
* | ||
* PHP version 5 | ||
* | ||
* Copyright © 2017-2023 The Galette Team | ||
* Copyright © 2003-2024 The Galette Team | ||
* | ||
* This file is part of Galette (http://galette.tuxfamily.org). | ||
* This file is part of Galette (https://galette.eu). | ||
* | ||
* Galette is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -23,16 +17,6 @@ | |
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Galette. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @category Plugins | ||
* @package GaletteObjectsLend | ||
* | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @copyright 2017-2023 The Galette Team | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @version SVN: $Id$ | ||
* @link http://galette.tuxfamily.org | ||
* @since 2017-11-19 | ||
*/ | ||
|
||
use Analog\Analog; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
<?php | ||
|
||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ | ||
|
||
/** | ||
* Categories controller | ||
* | ||
* PHP version 5 | ||
* Copyright © 2003-2024 The Galette Team | ||
* | ||
* Copyright © 2021-2023 The Galette Team | ||
* | ||
* This file is part of Galette (http://galette.tuxfamily.org). | ||
* This file is part of Galette (https://galette.eu). | ||
* | ||
* Galette is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -23,15 +17,6 @@ | |
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Galette. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @category Controllers | ||
* @package GaletteObjectsLend | ||
* | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @copyright 2021-2023 The Galette Team | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @link http://galette.tuxfamily.org | ||
* @since 2021-05-09 | ||
*/ | ||
|
||
namespace GaletteObjectsLend\Controllers\Crud; | ||
|
@@ -49,23 +34,16 @@ | |
/** | ||
* Categories controller | ||
* | ||
* @category Controllers | ||
* @name CategoriesController | ||
* @package GaletteObjectsLend | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @copyright 2021-2023 The Galette Team | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @link http://galette.tuxfamily.org | ||
* @since 2021-05-09 | ||
* @author Johan Cwiklinski <[email protected]> | ||
*/ | ||
|
||
class CategoriesController extends AbstractPluginController | ||
{ | ||
/** | ||
* @var array | ||
* @var array<string, mixed> | ||
*/ | ||
#[Inject("Plugin Galette Objects Lend")] | ||
protected $module_info; | ||
protected array $module_info; | ||
|
||
// CRUD - Create | ||
|
||
|
@@ -101,14 +79,14 @@ public function doAdd(Request $request, Response $response): Response | |
/** | ||
* List page | ||
* | ||
* @param Request $request PSR Request | ||
* @param Response $response PSR Response | ||
* @param string $option One of 'page' or 'order' | ||
* @param string|integer $value Value of the option | ||
* @param Request $request PSR Request | ||
* @param Response $response PSR Response | ||
* @param string|null $option One of 'page' or 'order' | ||
* @param integer|string|null $value Value of the option | ||
* | ||
* @return Response | ||
*/ | ||
public function list(Request $request, Response $response, $option = null, $value = null): Response | ||
public function list(Request $request, Response $response, string $option = null, int|string $value = null): Response | ||
{ | ||
if (isset($this->session->objectslend_filter_categories)) { | ||
$filters = $this->session->objectslend_filter_categories; | ||
|
@@ -212,7 +190,7 @@ public function filter(Request $request, Response $response): Response | |
* | ||
* @return Response | ||
*/ | ||
public function edit(Request $request, Response $response, int $id = null, $action = 'edit'): Response | ||
public function edit(Request $request, Response $response, int $id = null, string $action = 'edit'): Response | ||
{ | ||
if ($this->session->objectslend_category !== null) { | ||
Check failure on line 195 in lib/GaletteObjectsLend/Controllers/Crud/CategoriesController.php GitHub Actions / PHP 8.1 on ubuntu-latest
|
||
$category = $this->session->objectslend_category; | ||
|
@@ -255,7 +233,7 @@ public function edit(Request $request, Response $response, int $id = null, $acti | |
* | ||
* @return Response | ||
*/ | ||
public function doEdit(Request $request, Response $response, int $id = null, $action = 'edit'): Response | ||
public function doEdit(Request $request, Response $response, int $id = null, string $action = 'edit'): Response | ||
{ | ||
$post = $request->getParsedBody(); | ||
$category = new LendCategory($this->zdb, $this->plugins, $id); | ||
|
@@ -337,7 +315,7 @@ public function doEdit(Request $request, Response $response, int $id = null, $ac | |
/** | ||
* Get redirection URI | ||
* | ||
* @param array $args Route arguments | ||
* @param array<string,mixed> $args Route arguments | ||
* | ||
* @return string | ||
*/ | ||
|
@@ -349,7 +327,7 @@ public function redirectUri(array $args): string | |
/** | ||
* Get form URI | ||
* | ||
* @param array $args Route arguments | ||
* @param array<string,mixed> $args Route arguments | ||
* | ||
* @return string | ||
*/ | ||
|
@@ -364,7 +342,7 @@ public function formUri(array $args): string | |
/** | ||
* Get confirmation removal page title | ||
* | ||
* @param array $args Route arguments | ||
* @param array<string,mixed> $args Route arguments | ||
* | ||
* @return string | ||
*/ | ||
|
@@ -380,8 +358,8 @@ public function confirmRemoveTitle(array $args): string | |
/** | ||
* Remove object | ||
* | ||
* @param array $args Route arguments | ||
* @param array $post POST values | ||
* @param array<string,mixed> $args Route arguments | ||
* @param array<string,mixed> $post POST values | ||
* | ||
* @return boolean | ||
*/ | ||
|
Oops, something went wrong.