*
* PHP version 5
*
- * Copyright © 2014-2020 The Galette Team
+ * Copyright © 2014-2021 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2014-2020 The Galette Team
+ * @copyright 2014-2021 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 0.8.2dev 2014-11-11
$app->group('/public', function () {
//public members list
$this->get(
- '/{type:list|trombi}[/{option:page|order}/{value:\d+}]',
+ '/{type:list|trombi}[/{option:page|order}/{value:\d+|\w+}]',
[Crud\MembersController::class, 'publicList']
)->setName('publicList');
)->setName('filterPublicList');
$this->get(
- '/members[/{option:page|order}/{value:\d+}]',
- function ($request, $response) {
+ '/members[/{option:page|order}/{value:\d+|\w+}]',
+ function ($request, $response, string $option = null, string $value = null) {
$args = ['type' => 'list'];
+ if ($option !== null && $value !== null) {
+ $args['option'] = $option;
+ $args['value'] = $value;
+ }
return $response
->withStatus(301)
->withHeader('Location', $this->get('router')->pathFor('publicList', $args));
*
* PHP version 5
*
- * Copyright © 2009-2014 The Galette Team
+ * Copyright © 2009-2021 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2014 The Galette Team
+ * @copyright 2009-2021 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 Available since 0.7dev - 2009-02-28
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2014 The Galette Team
+ * @copyright 2009-2021 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
*/
public const MEMBERSHIP_ADMIN = 6;
public const MEMBERSHIP_NONE = 7;
- public const ORDERBY_NAME = 0;
- public const ORDERBY_NICKNAME = 1;
- public const ORDERBY_STATUS = 2;
- public const ORDERBY_FEE_STATUS = 3;
- public const ORDERBY_MODIFDATE = 4;
- public const ORDERBY_ID = 5;
+ public const ORDERBY_NAME = 'name';
+ public const ORDERBY_NICKNAME = 'nickname';
+ public const ORDERBY_STATUS = 'status';
+ public const ORDERBY_FEE_STATUS = 'fee_status';
+ public const ORDERBY_MODIFDATE = 'modif_date';
+ public const ORDERBY_ID = 'id';
public const NON_STAFF_MEMBERS = 30;
*
* @param Select $select Original select
* @param array $fields Fields list to ensure ORDER clause
- * references selected fields. Optionnal.
+ * references selected fields. Optional.
*
* @return Select
*/