Skip to content

Commit

Permalink
Merge pull request #110 from FriendsOfREDAXO/cb-16
Browse files Browse the repository at this point in the history
Umstellung Status "DELETED" von 2 auf -2
  • Loading branch information
alxndr-w authored Sep 10, 2024
2 parents f083861 + c139943 commit 87cf430
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
13 changes: 13 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,15 @@
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 87cf430

Please sign in to comment.