18 fwrite(STDERR,
"FAIL: {$message}\n");
24if (strpos(
$source,
"PHP_SAPI !== 'cli'") ===
false
25 || strpos(
$source,
"in_array('--apply'") ===
false
26 || strpos(
$source,
'$db->begin($contentDd)') ===
false
27 || strpos(
$source,
'$db->rollback($contentDd)') ===
false
28 || strpos(
$source,
'/backup') ===
false) {
29 marketingDeFail(
'Trockenlauf, Backup oder dbxDB-Transaktion fehlen.', 1);
31if (preg_match(
'/new\s+(?:PDO|SQLite3)\b|(?:PDO|SQLite3)::|->delete\s*\(/',
$source)) {
32 marketingDeFail(
'Migration enthaelt direkten Datenbankzugriff oder eine Loeschoperation.', 2);
37 echo
"OK: Statischer Marketing-Migrationsvertrag; lokale Inhaltsdaten sind nicht Teil des öffentlichen Checkouts.\n";
47 'id,permalink,title,description,content,template,folder,activ,addmenu,group_read,meta_robots',
55if (!is_array(
$rows)) {
56 marketingDeFail(
'Deutsche Inhalte konnten nicht ueber dbxDB gelesen werden.', 3);
61foreach (
$rows as $row) {
62 $byId[(int)($row[
'id'] ?? 0)] = $row;
67 'home',
'loesungen',
'cms-website',
'shop-multichannel',
68 'individuelle-anwendungen',
'intranet-portale',
'dbxki',
'plattform',
69 'pakete',
'referenzen',
'demo',
'entwickler',
'dokumentation',
'kontakt',
73 $allowedTemplates = $permalink ===
'home'
74 ? array(
'c-marketing-body1-footer',
'c-title-hero_header-body1-footer')
75 : array(
'c-marketing-body1-footer');
76 if ((
int)($row[
'id'] ?? 0) <= 0
77 || (
int)($row[
'activ'] ?? 0) !== 1
78 || !in_array((
string)($row[
'template'] ??
''), $allowedTemplates,
true)
79 || (
string)($row[
'meta_robots'] ??
'') !==
'index,follow') {
80 marketingDeFail(
"Aktive deutsche Zielseite fehlt oder ist ungueltig: {$permalink}", 4);
82 $text = (string)($row[
'title'] ??
'') .
' '
83 . (string)($row[
'description'] ??
'') .
' '
84 . strip_tags((
string)($row[
'content'] ??
''));
85 if (preg_match(
'/dbXapp|dbXApp|DBXapp/', $text)
86 || preg_match(
'/\b(?:fuer|ueber|aender|oeffent|geschaeft|moeglich|koennen|muessen|waehlen|loeschen)\b/iu', $text)) {
87 marketingDeFail(
"Schreibweise oder Umlaute sind auf {$permalink} inkonsistent.", 5);
92 2, 4, 5, 6, 8, 45, 47, 48, 51, 53, 56, 57, 58, 59, 60, 62,
93 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
94 115, 116, 117, 118, 119, 120, 121, 122,
97 $row =
$byId[$id] ?? array();
98 if ((
int)($row[
'folder'] ?? 0) !== 19
99 || (
int)($row[
'activ'] ?? 1) !== 0
100 || (
int)($row[
'addmenu'] ?? 1) !== 0
101 || (
string)($row[
'group_read'] ??
'') !==
'admin'
102 || (
string)($row[
'meta_robots'] ??
'') !==
'noindex,nofollow') {
103 marketingDeFail(
"Archivseite wurde nicht vollstaendig nach /trash verschoben: {$id}", 6);
109 || (
string)(
$trash[
'name'] ??
'') !==
'trash'
110 || (
string)(
$trash[
'group_read'] ??
'') !==
'admin') {
111 marketingDeFail(
'Der deutsche /trash-Ordner ist nicht admin-geschuetzt.', 7);
static ddFolder(string $lng='')
static ddContent(string $lng='')
if(!is_file($exportFile)) $contentDatabase
foreach($targets as $permalink) $archiveIds
foreach($rows as $row) $targets
foreach($archiveIds as $id) $trash
if(!is_array($rows)) $byId
marketingDeFail(string $message, int $code)