Skip to content

Commit 0cdd05a

Browse files
RELEASE: 5.0.53
1 parent e1d7d04 commit 0cdd05a

130 files changed

Lines changed: 4024 additions & 1158 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Releases
88

9+
### 5.0.53
10+
11+
#### Added
12+
- [Add PRINT_BUTTON_* shortcode (#2085)](https://github.com/eventespresso/cafe/pull/2085)
13+
14+
#### Fixed
15+
- [Fix Question Group Identifier On Save (#2046)](https://github.com/eventespresso/cafe/pull/2046)
16+
- [Ensure Global Taxes are Displayed on Invoice (#2082)](https://github.com/eventespresso/cafe/pull/2082)
17+
18+
#### Changed
19+
- [Append the ticket name to the attendee in SPCO (#2080)](https://github.com/eventespresso/cafe/pull/2080)
20+
- [Upgrade wp-graphql to version v1-32-1 (#2057)](https://github.com/eventespresso/cafe/pull/2057)
21+
- [Block Incompatible Add-ons From Reactivating (#1983)](https://github.com/eventespresso/cafe/pull/1983)
22+
23+
24+
25+
26+
27+
928
### 5.0.52
1029

1130
#### Fixed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.52
1+
5.0.53

admin_pages/registration_form/Registration_Form_Admin_Page.core.php

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,11 @@ protected function _set_column_values_for(EEM_Base $model): array
360360
$column_values = [];
361361
// some initial checks for proper values.
362362
$QST_ID = $this->request->getRequestParam('QST_ID', 0, DataType::INT);
363-
// if QST_admin_only, then no matter what QST_required is we disable.
363+
$QSG_ID = $this->request->getRequestParam('QSG_ID', 0, DataType::INT);
364+
if ($QSG_ID) {
365+
$column_values['QSG_ID'] = $QSG_ID;
366+
}
367+
// if QST_admin_only, then no matter what QST_required is, we disable.
364368
$QST_admin_only = $this->request->getRequestParam('QST_admin_only', false, DataType::BOOL);
365369
if ($QST_admin_only) {
366370
$this->request->setRequestParam('QST_required', false);
@@ -380,13 +384,35 @@ protected function _set_column_values_for(EEM_Base $model): array
380384
$this->request->unSetRequestParam('QST_max', true);
381385
}
382386
foreach ($model->field_settings() as $fieldName => $settings) {
387+
if (! $settings instanceof EE_Model_Field_Base) {
388+
continue;
389+
}
383390
switch($fieldName) {
384391
case 'QSG_identifier':
385-
// basically if QSG_identifier is empty or not set
386-
if (! $this->request->getRequestParam('QSG_identifier', '', DataType::STRING)) {
387-
$QSG_name = $this->request->getRequestParam('QSG_name', '', DataType::STRING);
388-
$column_values[ $fieldName ] = sanitize_title($QSG_name) . '-' . uniqid('', true);
392+
$QSG_identifier = $this->request->getRequestParam('QSG_identifier', '', DataType::STRING);
393+
// use QSG_name if QSG_identifier is empty or not set
394+
if (empty($QSG_identifier)) {
395+
$QSG_identifier = $this->request->getRequestParam(
396+
'QSG_name',
397+
'',
398+
DataType::STRING
399+
);
400+
}
401+
if (empty($QSG_identifier)) {
402+
$column_values[ $fieldName ] = null;
403+
break;
389404
}
405+
$QSG_identifier = sanitize_title($QSG_identifier);
406+
$where = ['QSG_identifier' => $QSG_identifier];
407+
if ($QSG_ID) {
408+
$where['QSG_ID'] = ['!=', $QSG_ID];
409+
}
410+
// check if identifier is already used
411+
if ($model->count([$where])) {
412+
// append hash to prevent collisions
413+
$QSG_identifier = "$QSG_identifier-" . uniqid();
414+
}
415+
$column_values[ $fieldName ] = $QSG_identifier;
390416
break;
391417

392418
case 'QST_display_text':
@@ -789,6 +815,7 @@ public function get_questions(int $per_page = 10, int $current_page = 1, bool $c
789815
* @param bool $count
790816
* @return EE_Soft_Delete_Base_Class[]|int
791817
* @throws EE_Error
818+
* @throws ReflectionException
792819
*/
793820
public function get_trashed_questions(int $per_page, int $current_page = 1, bool $count = false)
794821
{

admin_pages/registration_form/templates/questions_main_meta_box.template.php

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -646,13 +646,28 @@ class=""
646646

647647
</td>
648648
</tr>
649-
<?php
650-
do_action('AHEE__questions_main_meta_box__template__after_table_form_table', $question);
651-
?>
649+
650+
<?php do_action('AHEE__questions_main_meta_box__template__after_table_form_table', $question); ?>
651+
652+
<tr>
653+
<th></th>
654+
<td>
655+
<span class="important-notice">
656+
<?php
657+
printf(
658+
esc_html__(
659+
'all fields marked with an asterisk (%1$s) are required',
660+
'event_espresso'
661+
),
662+
'<span class="asterisk ee-required-text">*</span>'
663+
)
664+
?>
665+
</span>
666+
</td>
667+
</tr>
668+
652669
</tbody>
653670
</table>
654-
655-
<div class="clear"></div>
656671
</div>
657672

658673
<?php

0 commit comments

Comments
 (0)