Skip to content

Commit

Permalink
install url_profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w committed Aug 18, 2024
1 parent fd77183 commit 6c9a5a0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@
rex_yform_manager_table::deleteCache();
}

/* URL-Profile installieren */
if (rex_addon::get('url') && rex_addon::get('url')->isAvailable()) {
if (false === rex_config::get('blaupause', 'url_profile', false)) {
$rex_blaupause_category = array_filter(rex_sql::factory()->getArray("SELECT * FROM rex_url_generator_profile WHERE `table_name` = '1_xxx_rex_blaupause_category'"));
if (!$rex_blaupause_category) {
$query = str_replace('999999', rex_article::getSiteStartArticleId(), rex_file::get(__DIR__ . '/install/rex_url_profile_blaupause_category.sql'));
rex_sql::factory()->setQuery($query);
}
$rex_blaupause_entry = array_filter(rex_sql::factory()->getArray("SELECT * FROM rex_url_generator_profile WHERE `table_name` = '1_xxx_rex_blaupause_entry'"));
if (!$rex_blaupause_entry) {
$query = str_replace('999999', rex_article::getSiteStartArticleId(), rex_file::get(__DIR__ . '/install/rex_url_profile_blaupause_entry.sql'));
rex_sql::factory()->setQuery($query);
}
/* URL-Profile wurden bereits einmal installiert, daher nicht nochmals installieren und Entwickler-Einstellungen respektieren */
rex_config::set('blaupause', 'url_profile', true);
}
}


/* Todo: Wildcard aktualisieren */

/*
Expand Down
4 changes: 4 additions & 0 deletions install/rex_url_profile_blaupause_category.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SET NAMES utf8mb4;

INSERT INTO `rex_url_generator_profile` (`namespace`, `article_id`, `clang_id`, `ep_pre_save_called`, `table_name`, `table_parameters`, `relation_1_table_name`, `relation_1_table_parameters`, `relation_2_table_name`, `relation_2_table_parameters`, `relation_3_table_name`, `relation_3_table_parameters`, `createdate`, `createuser`, `updatedate`, `updateuser`) VALUES
('blaupause-category-id', 999999, 1, 0, '1_xxx_rex_blaupause_category', '{\"column_id\":\"id\",\"column_clang_id\":\"\",\"restriction_1_column\":\"status\",\"restriction_1_comparison_operator\":\">\",\"restriction_1_value\":\"0\",\"restriction_2_logical_operator\":\"\",\"restriction_2_column\":\"\",\"restriction_2_comparison_operator\":\"=\",\"restriction_2_value\":\"\",\"restriction_3_logical_operator\":\"\",\"restriction_3_column\":\"\",\"restriction_3_comparison_operator\":\"=\",\"restriction_3_value\":\"\",\"column_segment_part_1\":\"name\",\"column_segment_part_2_separator\":\"\\/\",\"column_segment_part_2\":\"\",\"column_segment_part_3_separator\":\"\\/\",\"column_segment_part_3\":\"\",\"relation_1_column\":\"\",\"relation_1_position\":\"BEFORE\",\"relation_2_column\":\"\",\"relation_2_position\":\"BEFORE\",\"relation_3_column\":\"\",\"relation_3_position\":\"BEFORE\",\"append_user_paths\":\"\",\"append_structure_categories\":\"0\",\"column_seo_title\":\"name\",\"column_seo_description\":\"\",\"column_seo_image\":\"\",\"sitemap_add\":\"1\",\"sitemap_frequency\":\"weekly\",\"sitemap_priority\":\"0.5\",\"column_sitemap_lastmod\":\"\"}', '', '[]', '', '[]', '', '[]', NOW(), 'blaupause', NOW(), 'blaupause');
4 changes: 4 additions & 0 deletions install/rex_url_profile_blaupause_entry.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SET NAMES utf8mb4;

INSERT INTO `rex_url_generator_profile` (`namespace`, `article_id`, `clang_id`, `ep_pre_save_called`, `table_name`, `table_parameters`, `relation_1_table_name`, `relation_1_table_parameters`, `relation_2_table_name`, `relation_2_table_parameters`, `relation_3_table_name`, `relation_3_table_parameters`, `createdate`, `createuser`, `updatedate`, `updateuser`) VALUES
('blaupause-entry-id', 999999, 1, 0, '1_xxx_rex_blaupause_entry', '{\"column_id\":\"id\",\"column_clang_id\":\"\",\"restriction_1_column\":\"status\",\"restriction_1_comparison_operator\":\">\",\"restriction_1_value\":\"0\",\"restriction_2_logical_operator\":\"\",\"restriction_2_column\":\"\",\"restriction_2_comparison_operator\":\"=\",\"restriction_2_value\":\"\",\"restriction_3_logical_operator\":\"\",\"restriction_3_column\":\"\",\"restriction_3_comparison_operator\":\"=\",\"restriction_3_value\":\"\",\"column_segment_part_1\":\"name\",\"column_segment_part_2_separator\":\"\\/\",\"column_segment_part_2\":\"\",\"column_segment_part_3_separator\":\"\\/\",\"column_segment_part_3\":\"\",\"relation_1_column\":\"\",\"relation_1_position\":\"BEFORE\",\"relation_2_column\":\"\",\"relation_2_position\":\"BEFORE\",\"relation_3_column\":\"\",\"relation_3_position\":\"BEFORE\",\"append_user_paths\":\"\",\"append_structure_categories\":\"0\",\"column_seo_title\":\"name\",\"column_seo_description\":\"teaser\",\"column_seo_image\":\"image\",\"sitemap_add\":\"1\",\"sitemap_frequency\":\"daily\",\"sitemap_priority\":\"0.7\",\"column_sitemap_lastmod\":\"updatedate\"}', '', '[]', '', '[]', '', '[]', NOW(), 'blaupause', NOW(), 'blaupause')

0 comments on commit 6c9a5a0

Please sign in to comment.