Skip to content
Code-Schnipsel Gruppen Projekte
Commit d6517ec7 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: brick patch -> database id field considered

Übergeordneter fc4164eb
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
...@@ -6,13 +6,27 @@ ...@@ -6,13 +6,27 @@
// workaround for older patch // workaround for older patch
$Bricks = QUI\Bricks\Manager::init(); $Bricks = QUI\Bricks\Manager::init();
// database table
$columns = QUI::getDataBase()->table()->getColumns($Bricks->getUIDTable());
$columns = array_flip($columns);
if (isset($columns['id'])) {
QUI::getDataBase()->table()->deleteColumn(
$Bricks->getUIDTable(),
'id'
);
QUI::getPackage('quiqqer/bricks')->setup();
}
$result = QUI::getDataBase()->fetch(array( $result = QUI::getDataBase()->fetch(array(
'count' => 'count', 'count' => 'count',
'from' => $Bricks->getUIDTable(), 'from' => $Bricks->getUIDTable(),
)); ));
// if unique ids already exist, the pages no longer have to be passed through // if unique ids already exist, the pages no longer have to be passed through
if (false && isset($result[0]) && isset($result[0]['count']) && $result[0]['count']) { if (isset($result[0]) && isset($result[0]['count']) && $result[0]['count']) {
echo 'Already executed'.PHP_EOL; echo 'Already executed'.PHP_EOL;
return; return;
......
...@@ -219,5 +219,7 @@ public static function onPackageSetup(QUI\Package\Package $Package) ...@@ -219,5 +219,7 @@ public static function onPackageSetup(QUI\Package\Package $Package)
if ($Package->getName() !== 'quiqqer/bricks') { if ($Package->getName() !== 'quiqqer/bricks') {
return; return;
} }
shell_exec('php '.OPT_DIR.'quiqqer/bricks/patches/uniqueIds.php');
} }
} }
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren