From bb3a055f7b0771cb459c4c7007b208265b05e75e Mon Sep 17 00:00:00 2001 From: alxndr-w Date: Tue, 16 Jul 2024 14:31:46 +0000 Subject: [PATCH] Apply php-cs-fixer changes --- install.php | 9 ++++----- lib/neues.php | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/install.php b/install.php index 30dbb5e..930d471 100644 --- a/install.php +++ b/install.php @@ -2,6 +2,7 @@ namespace FriendsOfRedaxo\Neues; +use rex; use rex_addon; use rex_config; use rex_file; @@ -15,15 +16,13 @@ if (rex_addon::get('yform') && rex_addon::get('yform')->isAvailable()) { rex_yform_manager_table_api::importTablesets(rex_file::get(__DIR__ . '/install/tableset.json')); - // Vorhandene leere UUID-Felder aktualisieren $sql = rex_sql::factory(); - $sql->setQuery('UPDATE ' . \rex::getTable('neues_author') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""'); - $sql->setQuery('UPDATE ' . \rex::getTable('neues_category') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""'); - $sql->setQuery('UPDATE ' . \rex::getTable('neues_entry') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""'); + $sql->setQuery('UPDATE ' . rex::getTable('neues_author') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""'); + $sql->setQuery('UPDATE ' . rex::getTable('neues_category') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""'); + $sql->setQuery('UPDATE ' . rex::getTable('neues_entry') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""'); Neues::ensureDbScheme(); - } if (!rex_media::get('neues_entry_fallback_image.png')) { diff --git a/lib/neues.php b/lib/neues.php index 1892f37..b91bfd7 100644 --- a/lib/neues.php +++ b/lib/neues.php @@ -2,13 +2,13 @@ namespace FriendsOfRedaxo\Neues; +use rex; use rex_fragment; use rex_pager; use rex_sql; -use rex_sql_table; -use rex; use rex_sql_column; use rex_sql_index; +use rex_sql_table; class Neues { @@ -85,7 +85,7 @@ public static function ensureDbScheme() ->ensureIndex(new rex_sql_index('publishdate', ['publishdate'])) ->ensureIndex(new rex_sql_index('description', ['description'], rex_sql_index::FULLTEXT)) ->ensure(); - + rex_sql_table::get(rex::getTable('neues_category')) ->ensurePrimaryIdColumn() ->ensureColumn(new rex_sql_column('name', 'varchar(191)', false, '')) @@ -106,7 +106,7 @@ public static function ensureDbScheme() ->ensureColumn(new rex_sql_column('be_user_id', 'text')) ->ensureColumn(new rex_sql_column('uuid', 'varchar(36)')) ->ensure(); - + rex_sql_table::get(rex::getTable('neues_entry_category_rel')) ->ensurePrimaryIdColumn() ->ensureColumn(new rex_sql_column('entry_id', 'int(10) unsigned'))