-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from FriendsOfREDAXO/cb-3
Installation und Deinstallation überarbeitet
- Loading branch information
Showing
8 changed files
with
311 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
/** | ||
* Job "Publish" konfigurieren. | ||
* | ||
* @var rex_sql $sql Kommt aus dem aufrufenden install.php | ||
* @var string $installUser Kommt aus dem aufrufenden install.php | ||
*/ | ||
|
||
use FriendsOfRedaxo\Neues\Cronjob\Publish; | ||
|
||
$job_intervall = [ | ||
'minutes' => 'all', | ||
'hours' => 'all', | ||
'days' => 'all', | ||
'weekdays' => 'all', | ||
'month' => 'all', | ||
]; | ||
|
||
$timestamp = rex_cronjob_manager_sql::calculateNextTime($job_intervall); | ||
|
||
$sql->setTable(rex::getTable('cronjob')); | ||
$sql->setValue('name', '[neues] Geplante Beiträge veröffentlichen'); | ||
$sql->setValue('description', 'Veröffentlicht alle Beiträge (status = 1), deren Status geplant (status = 0) ist und deren Veröffentlichungszeitpunkt erreicht wurde (publishdate < now()).'); | ||
$sql->setValue('type', Publish::class); | ||
$sql->setValue('parameters', '[]'); | ||
$sql->setValue('interval', json_encode($job_intervall)); | ||
$sql->setValue('nexttime', rex_sql::datetime($timestamp)); | ||
$sql->setValue('environment', '|frontend|backend|script|'); | ||
$sql->setValue('execution_moment', 0); | ||
$sql->setValue('execution_start', '0000-00-00 00:00:00'); | ||
$sql->setValue('status', 1); | ||
$sql->addGlobalUpdateFields($installUser); | ||
$sql->addGlobalCreateFields($installUser); | ||
$sql->insert(); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
/** | ||
* URL-Addon-Profil für Category. | ||
* | ||
* @var rex_sql $sql | ||
* @var string $installUser Kommt aus dem aufrufenden install.php | ||
*/ | ||
|
||
$sql->setTable(rex::getTable('url_generator_profile')); | ||
$sql->setValue('namespace', 'neues-category-id'); | ||
$sql->setValue('article_id', rex_article::getSiteStartArticleId()); | ||
$sql->setValue('clang_id', 1); | ||
$sql->setValue('ep_pre_save_called', 0); | ||
$sql->setValue('table_name', '1_xxx_rex_neues_category'); | ||
$sql->setValue('table_parameters', json_encode([ | ||
'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' => '', | ||
])); | ||
$sql->setValue('relation_1_table_name', ''); | ||
$sql->setValue('relation_1_table_parameters', '[]'); | ||
$sql->setValue('relation_2_table_name', ''); | ||
$sql->setValue('relation_2_table_parameters', '[]'); | ||
$sql->setValue('relation_3_table_name', ''); | ||
$sql->setValue('relation_3_table_parameters', '[]'); | ||
$sql->addGlobalCreateFields($installUser); | ||
$sql->addGlobalUpdateFields($installUser); | ||
$sql->insert(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
|
||
/** | ||
* URL-Addon-Profil für Entry. | ||
* | ||
* @var rex_sql $sql | ||
* @var string $installUser Kommt aus dem aufrufenden install.php | ||
*/ | ||
$sql->setTable(rex::getTable('url_generator_profile')); | ||
$sql->setValue('namespace', 'neues-entry-id'); | ||
$sql->setValue('article_id', rex_article::getSiteStartArticleId()); | ||
$sql->setValue('clang_id', 1); | ||
$sql->setValue('ep_pre_save_called', 0); | ||
$sql->setValue('table_name', '1_xxx_rex_neues_entry'); | ||
$sql->setValue('table_parameters', json_encode([ | ||
'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', | ||
])); | ||
$sql->setValue('relation_1_table_name', ''); | ||
$sql->setValue('relation_1_table_parameters', '[]'); | ||
$sql->setValue('relation_2_table_name', ''); | ||
$sql->setValue('relation_2_table_parameters', '[]'); | ||
$sql->setValue('relation_3_table_name', ''); | ||
$sql->setValue('relation_3_table_parameters', '[]'); | ||
$sql->addGlobalCreateFields($installUser); | ||
$sql->addGlobalUpdateFields($installUser); | ||
$sql->insert(); |
Oops, something went wrong.