Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabellen-Prefix automatisch setzen (yform.php) #163

Merged
merged 2 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## xx-xx-2024 2.3.2

- Bugfix
- Tabellennamen auch in der package.yml i.V.m pages/yform.php Prefix-neutral (#163)

## 25-07-2024 2.3.1

- BugFix
Expand Down
6 changes: 3 additions & 3 deletions package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ page:

yform:
geolocation/mapset:
table_name: rex_geolocation_mapset
table_name: geolocation_mapset
geolocation/layer:
table_name: rex_geolocation_layer
table_name: geolocation_layer
geolocation/service:
table_name: rex_geolocation_service
table_name: geolocation_service

conflicts:
packages:
Expand Down
10 changes: 8 additions & 2 deletions pages/yform.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* yform:
* «addon»/mytable1:
* table_name: rex_mytable_a mandatory
* table_name: mytable_a mandatory; ohne Prefix «rex_»!!!
* show_title: FALSE/true optional; default ist false!
* wrapper_class: myclass optional
*
Expand All @@ -26,7 +26,13 @@
$yform = $this->getProperty('yform', []);
$yform = $yform[\rex_be_controller::getCurrentPage()] ?? [];

$table_name = rex_request('table_name', 'string', $yform['table_name'] ?? '');
if( isset($yform['table_name']) ) {
$table_name = rex::getTable($yform['table_name']);
} else {
$table_name = '';
}

$table_name = rex_request('table_name', 'string', $table_name);
$show_title = true === ($yform['show_title'] ?? false);
$wrapper_class = $yform['wrapper_class'] ?? '';

Expand Down