forked from FriendsOfREDAXO/mblock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.php
executable file
·33 lines (30 loc) · 1.13 KB
/
install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* @author mail[at]joachim-doerr[dot]com Joachim Doerr
* @package redaxo5
* @license MIT
*/
// set default template
if (!$this->hasConfig('mblock_theme')) {
$this->setConfig('mblock_theme', 'default_theme');
}
if (!$this->hasConfig('mblock_delete')) {
$this->setConfig('mblock_delete', 1);
}
if (!$this->hasConfig('mblock_scroll')) {
$this->setConfig('mblock_scroll', 1);
}
// copy data directory
rex_dir::copy($this->getPath('data'), $this->getDataPath());
// add demo table
rex_sql_table::get(rex::getTable('mblock_rexform_demo'))
->ensureColumn(new rex_sql_column('id', 'int(11)', false, null, 'auto_increment'))
->ensureColumn(new rex_sql_column('status', 'int(1)', true, '1'))
->ensureColumn(new rex_sql_column('name', 'text'))
->ensureColumn(new rex_sql_column('mblock_field', 'text'))
->ensureColumn(new rex_sql_column('createdate', 'datetime', true))
->ensureColumn(new rex_sql_column('updatedate', 'datetime', true))
->ensureColumn(new rex_sql_column('createuser', 'varchar(255)'))
->ensureColumn(new rex_sql_column('updateuser', 'varchar(255)'))
->setPrimaryKey('id')
->ensure();