dbxapp 4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
Loading...
Searching...
No Matches
restructure_marketing_de.php File Reference

Go to the source code of this file.

Variables

if(PHP_SAPI !=='cli') $apply = in_array('--apply', $argv, true)
 $base = dirname(__DIR__, 4)
 $_SERVER ['REQUEST_URI'] = '/dbxapp/'
 $_SERVER ['HTTP_HOST'] = 'localhost'
 $_SERVER ['HTTPS'] = 'on'
 $_SERVER ['SCRIPT_NAME'] = '/dbxapp/index.php'
const dbxSystem 'dbxWebApp'
const dbxRunAsAdmin 1
 $contentDd = dbxContentLng::ddContent('de')
 $folderDd = dbxContentLng::ddFolder('de')
 $db = dbx()->get_system_obj('dbxDB')
if(!is_object($db)||! $db->connect_db_server('dbx|dbxContent.db3')) $trashId = 19
 $archiveIds
 $pages
 $home
 $basePage
 $folderChanges
 $result
if(! $apply) $dbFile = $base . '/dbx/modules/dbx/db/dbxContent.db3'
if(!is_file($dbFile)||(int) filesize($dbFile)<=0) $backupDir = dirname($dbFile) . '/backup'
if(!is_dir($backupDir) &&!mkdir($backupDir, 0775, true) &&!is_dir($backupDir)) $backupFile = $backupDir . '/dbxContent-before-marketing-de-' . date('Ymd-His') . '.db3'
if(!copy($dbFile, $backupFile)) $result ['backup'] = $backupFile
if($db->begin($contentDd) !==1) try
if(!is_array($trash)||(int)($trash['id'] ?? 0) !==$trashId) foreach( $folderChanges as $id=> $changes) foreach($archiveIds as $id) $homeRow = $db->select1($contentDd, 1, 'id,lng_rev', 0)
if(!is_array($homeRow)||(int)($homeRow['id'] ?? 0) !==1) $homeUpdate
if($db->update($contentDd, $homeUpdate, 1, 0) !==1) $result ['updated']
foreach($pages as $page) $documentationRows
foreach(is_array( $documentationRows) ? $documentationRows :array() as $row) foreach(array(33=> array('title'=> 'DataDic Übersicht'), 41=> array('title'=> 'Sprachen &Übersetzung — Benutzerhandbuch'), 55=> array('addmenu'=> 0),) as $id=> $changes) if( $db->commit( $contentDd) !==1) catch(Throwable $e $cacheStats ) = dbxContentPageCache::invalidateAll()
 $result ['cache'] = $cacheStats
 $activeTargets = array('home')
foreach($pages as $page) $targetRows = array()
foreach($activeTargets as $permalink) $result ['verified_targets'] = count($targetRows)
 $result ['verified_total_de'] = (int)$db->count($contentDd, '1=1')

Variable Documentation

◆ $_SERVER [1/4]

$_SERVER[ 'HTTP_HOST'] = 'localhost'

Definition at line 19 of file restructure_marketing_de.php.

◆ $_SERVER [2/4]

$_SERVER[ 'HTTPS'] = 'on'

Definition at line 20 of file restructure_marketing_de.php.

◆ $_SERVER [3/4]

$_SERVER[ 'REQUEST_URI'] = '/dbxapp/'

Definition at line 18 of file restructure_marketing_de.php.

◆ $_SERVER [4/4]

$_SERVER[ 'SCRIPT_NAME'] = '/dbxapp/index.php'

Definition at line 21 of file restructure_marketing_de.php.

◆ $activeTargets

$activeTargets = array('home')

Definition at line 698 of file restructure_marketing_de.php.

◆ $apply

if (PHP_SAPI !=='cli') $apply = in_array('--apply', $argv, true)

Definition at line 14 of file restructure_marketing_de.php.

◆ $archiveIds

$archiveIds
Initial value:
= array(
2, 4, 5, 6, 8, 45, 47, 48, 51, 53, 56, 57, 58, 59, 60, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
115, 116, 117, 118, 119, 120, 121, 122,
)

Definition at line 41 of file restructure_marketing_de.php.

◆ $backupDir

if (!is_file( $dbFile)||(int) filesize( $dbFile)<=0) $backupDir = dirname($dbFile) . '/backup'

Definition at line 563 of file restructure_marketing_de.php.

◆ $backupFile

if (!is_dir( $backupDir) &&!mkdir( $backupDir, 0775, true) &&!is_dir( $backupDir)) $backupFile = $backupDir . '/dbxContent-before-marketing-de-' . date('Ymd-His') . '.db3'

Definition at line 568 of file restructure_marketing_de.php.

◆ $base

$base = dirname(__DIR__, 4)

Definition at line 15 of file restructure_marketing_de.php.

◆ $basePage

$basePage
Initial value:
= array(
'activ' => 1,
'template' => 'c-marketing-body1-footer',
'addmenu' => 1,
'class' => '',
'target' => '',
'group_read' => '*',
'meta_robots' => 'index,follow',
'seo_image_id' => 0,
'data' => '',
'modules' => '',
'thesar' => '',
'hero_template' => 'none',
'hero_image_id' => 'none',
'hero_margin_top' => '0',
'hero_height' => 'parent',
'hero_variant' => 'parent',
'gallery_template' => '',
'gallery_visible_count' => '',
'gallery_image_size' => '',
'gallery_overflow' => '',
'gallery_click_behavior' => '',
'hero_sticky' => '0',
'hero_scroll_layer' => 'under',
'gallery_lightbox_width' => 'parent',
'lng_sync' => 'auto',
'lng_rev' => 1,
'lng_synced_rev' => 0,
)

Definition at line 500 of file restructure_marketing_de.php.

◆ $cacheStats

foreach(is_array($documentationRows) ? $documentationRows :array() as $row) foreach(array(33=> array( 'title'=> 'DataDic Übersicht'), 41=> array( 'title'=> 'Sprachen &Übersetzung — Benutzerhandbuch'), 55=> array( 'addmenu'=> 0),) as $id=> $changes) if($db->commit($contentDd) !==1) catch (Throwable $e $cacheStats) = dbxContentPageCache::invalidateAll()

Definition at line 694 of file restructure_marketing_de.php.

◆ $contentDd

$contentDd = dbxContentLng::ddContent('de')

Definition at line 32 of file restructure_marketing_de.php.

◆ $db

$db = dbx()->get_system_obj('dbxDB')

Definition at line 34 of file restructure_marketing_de.php.

◆ $dbFile

if (! $apply) $dbFile = $base . '/dbx/modules/dbx/db/dbxContent.db3'

Definition at line 558 of file restructure_marketing_de.php.

◆ $documentationRows

foreach ( $pages as $page) $documentationRows
Initial value:
= $db->select(
'folder IN (10,15)',
'id',
'id',
'ASC',
'',
0,
0,
0
)

Definition at line 649 of file restructure_marketing_de.php.

◆ $folderChanges

$folderChanges
Initial value:
= array(
2 => array('name' => 'Lösungen', 'parent_id' => 1, 'group_read' => '*', 'sorter' => '0010'),
3 => array('name' => 'Entwickler', 'parent_id' => 1, 'group_read' => '*', 'sorter' => '0030'),
11 => array('name' => 'Plattform', 'parent_id' => 1, 'group_read' => '*', 'sorter' => '0020'),
12 => array('name' => 'Archiv: Beispiele', 'parent_id' => $trashId, 'group_read' => 'admin'),
15 => array('name' => 'Dokumentation und Tutorials', 'parent_id' => 9, 'group_read' => '*'),
18 => array('name' => 'Archiv: Pakete', 'parent_id' => $trashId, 'group_read' => 'admin'),
19 => array('name' => 'trash', 'parent_id' => 0, 'group_read' => 'admin'),
)
if(!is_object($db)||! $db->connect_db_server('dbx|dbxContent.db3')) $trashId

Definition at line 530 of file restructure_marketing_de.php.

◆ $folderDd

$folderDd = dbxContentLng::ddFolder('de')

Definition at line 33 of file restructure_marketing_de.php.

◆ $home

$home

Definition at line 459 of file restructure_marketing_de.php.

Referenced by dbxWebApp\check_perma().

◆ $homeRow

if(!is_array( $trash)||(int)( $trash[ 'id'] ?? 0) !==$trashId) foreach($folderChanges as $id=> $changes) foreach ( $archiveIds as $id) $homeRow = $db->select1($contentDd, 1, 'id,lng_rev', 0)

Definition at line 610 of file restructure_marketing_de.php.

◆ $homeUpdate

if (!is_array( $homeRow)||(int)( $homeRow[ 'id'] ?? 0) !==1) $homeUpdate
Initial value:
= array_merge($basePage, $home, array(
'folder' => 11,
'permalink' => 'home',
'sorter' => '0000',
'addmenu' => 0,
'lng_rev' => max(1, (int)($homeRow['lng_rev'] ?? 1)) + 1,
))
if(!is_array($trash)||(int)($trash['id'] ?? 0) !==$trashId) foreach( $folderChanges as $id=> $changes) foreach($archiveIds as $id) $homeRow

Definition at line 614 of file restructure_marketing_de.php.

◆ $pages

$pages

Definition at line 47 of file restructure_marketing_de.php.

◆ $result [1/6]

if (!copy( $dbFile, $backupFile)) $result[ 'backup'] = $backupFile

Definition at line 573 of file restructure_marketing_de.php.

◆ $result [2/6]

$result[ 'cache'] = $cacheStats

Definition at line 696 of file restructure_marketing_de.php.

◆ $result [3/6]

if ( $db->update( $contentDd, $homeUpdate, 1, 0) !==1) $result[ 'updated']

Definition at line 625 of file restructure_marketing_de.php.

◆ $result [4/6]

foreach ( $activeTargets as $permalink) $result[ 'verified_targets'] = count($targetRows)

Definition at line 717 of file restructure_marketing_de.php.

◆ $result [5/6]

$result[ 'verified_total_de'] = (int)$db->count($contentDd, '1=1')

Definition at line 718 of file restructure_marketing_de.php.

◆ $result [6/6]

Initial value:
= array(
'mode' => $apply ? 'apply' : 'dry-run',
'language' => 'de',
'backup' => '',
'folders_planned' => count($folderChanges),
'archive_pages_planned' => count($archiveIds),
'target_pages_planned' => count($pages) + 1,
'created' => 0,
'updated' => 0,
'archived' => 0,
'documentation_noindex' => 0,
)
foreach($targets as $permalink) $archiveIds
if(PHP_SAPI !=='cli') $apply

Definition at line 540 of file restructure_marketing_de.php.

◆ $targetRows

foreach ( $pages as $page) $targetRows = array()

Definition at line 702 of file restructure_marketing_de.php.

Referenced by dbxDD\build_schema_mapping().

◆ $trashId

if (!is_object( $db)||! $db->connect_db_server( 'dbx|dbxContent.db3')) $trashId = 19

Definition at line 40 of file restructure_marketing_de.php.

◆ dbxRunAsAdmin

const dbxRunAsAdmin 1

Definition at line 24 of file restructure_marketing_de.php.

◆ dbxSystem

const dbxSystem 'dbxWebApp'

Definition at line 23 of file restructure_marketing_de.php.

◆ try

if ( $db->begin( $contentDd) !==1) try
Initial value:
{
$trash = $db->select1($folderDd, $trashId, 'id,name', 0)
foreach($archiveIds as $id) $trash

Definition at line 580 of file restructure_marketing_de.php.