Skip to content

Commit

Permalink
Umstellung DELETED von 2 auf -2
Browse files Browse the repository at this point in the history
  • Loading branch information
christophboecker committed Sep 9, 2024
1 parent 67988d7 commit 25ef80b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
14 changes: 14 additions & 0 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use rex_media_service;
use rex_path;
use rex_sql;
use rex_version;
use rex_yform_manager_table_api;
use Url\Cache;
use Url\Profile;
Expand Down Expand Up @@ -112,3 +113,16 @@
rex_config::set('neues', 'url_profile', true);
}
}


/**
* Beim Update einer Version vor 5.1.0 wird ein Fehler bei den Status-Werten
* korrigiert. Deleted wird von 2 auf -2 geändert.
*/
if (rex_version::compare('5.1.0', $$this->getVersion(), '>')) {
$sql = rex_sql::factory();
$sql->setTable('neues_entry');
$sql->setWhere('status',2);
$sql->setValue('status',-2);
$sql->update();
}
6 changes: 5 additions & 1 deletion lib/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@
*/
class Entry extends rex_yform_manager_dataset
{
public const DELETED = 2; // FIXME: muss auf -2 geändert werden.
/** @api */
public const DELETED = -2;
/** @api */
public const DRAFT = -1;
/** @api */
public const PLANNED = 0;
/** @api */
public const ONLINE = 1;

/**
Expand Down

0 comments on commit 25ef80b

Please sign in to comment.