Skip to content

Commit

Permalink
URL-Profil-Installation speichern, um bei Updates nicht erneut zu ins…
Browse files Browse the repository at this point in the history
…tallieren, wenn diese gelöscht wurden.
  • Loading branch information
alxndr-w committed Dec 17, 2023
1 parent c58381d commit 60ab7cb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
23 changes: 14 additions & 9 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@
}

/* URL-Profile installieren */
$rex_neues_category = array_filter(rex_sql::factory()->getArray("SELECT * FROM rex_url_generator_profile WHERE `table_name` = '1_xxx_rex_neues_category'"));
if (!$rex_neues_category) {
$query = rex_file::get(rex_path::addon('neues', 'install/rex_url_profile_neues_category.sql'));
rex_sql::factory()->setQuery($query);
}
$rex_neues_entry = array_filter(rex_sql::factory()->getArray("SELECT * FROM rex_url_generator_profile WHERE `table_name` = '1_xxx_rex_neues_entry'"));
if (!$rex_neues_entry) {
$query = rex_file::get(rex_path::addon('neues', 'install/rex_url_profile_neues_entry.sql'));
rex_sql::factory()->setQuery($query);
if (rex_config::get('neues', 'url_profile', false) === false) {

$rex_neues_category = array_filter(rex_sql::factory()->getArray("SELECT * FROM rex_url_generator_profile WHERE `table_name` = '1_xxx_rex_neues_category'"));
if (!$rex_neues_category) {
$query = rex_file::get(rex_path::addon('neues', 'install/rex_url_profile_neues_category.sql'));
rex_sql::factory()->setQuery($query);
}
$rex_neues_entry = array_filter(rex_sql::factory()->getArray("SELECT * FROM rex_url_generator_profile WHERE `table_name` = '1_xxx_rex_neues_entry'"));
if (!$rex_neues_entry) {
$query = rex_file::get(rex_path::addon('neues', 'install/rex_url_profile_neues_entry.sql'));
rex_sql::factory()->setQuery($query);
}
/* URL-Profile wurden bereits einmal installiert, daher nicht nochmals installieren und Entwickler-Einstellungen respektieren */
rex_config::set('neues', 'url_profile', true);
}
1 change: 1 addition & 0 deletions package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ default_config:
default_thumbnail: "neues_entry_fallback_iamge.png"
external_url_label: "Zur Website"
editor: 'class="form-control redactor-editor--default"'
url_profile: false

0 comments on commit 60ab7cb

Please sign in to comment.