Revision 309
Added by stefan almost 19 years ago
trunk/wb/install/save.php | ||
---|---|---|
363 | 363 |
. ' `parent` INT NOT NULL ,' |
364 | 364 |
. ' `root_parent` INT NOT NULL ,' |
365 | 365 |
. ' `level` INT NOT NULL ,' |
366 |
. ' `link` TEXT NOT NULL ,' |
|
367 |
. ' `target` VARCHAR( 7 ) NOT NULL ,' |
|
368 |
. ' `page_title` VARCHAR( 255 ) NOT NULL ,' |
|
369 |
. ' `menu_title` VARCHAR( 255 ) NOT NULL ,' |
|
370 |
. ' `description` TEXT NOT NULL ,' |
|
371 |
. ' `keywords` TEXT NOT NULL ,' |
|
372 |
. ' `page_trail` TEXT NOT NULL ,' |
|
373 |
. ' `template` VARCHAR( 255 ) NOT NULL ,' |
|
374 |
. ' `visibility` VARCHAR( 255 ) NOT NULL ,' |
|
366 |
. ' `link` TEXT NOT NULL DEFAULT \'\' ,'
|
|
367 |
. ' `target` VARCHAR( 7 ) NOT NULL DEFAULT \'\' ,'
|
|
368 |
. ' `page_title` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
369 |
. ' `menu_title` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
370 |
. ' `description` TEXT NOT NULL DEFAULT \'\' ,'
|
|
371 |
. ' `keywords` TEXT NOT NULL DEFAULT \'\' ,'
|
|
372 |
. ' `page_trail` TEXT NOT NULL DEFAULT \'\' ,'
|
|
373 |
. ' `template` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
374 |
. ' `visibility` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
375 | 375 |
. ' `position` INT NOT NULL ,' |
376 | 376 |
. ' `menu` INT NOT NULL ,' |
377 |
. ' `language` VARCHAR( 5 ) NOT NULL ,' |
|
377 |
. ' `language` VARCHAR( 5 ) NOT NULL DEFAULT \'\' ,'
|
|
378 | 378 |
. ' `searching` INT NOT NULL ,' |
379 |
. ' `admin_groups` TEXT NOT NULL ,' |
|
380 |
. ' `admin_users` TEXT NOT NULL ,' |
|
381 |
. ' `viewing_groups` TEXT NOT NULL ,' |
|
382 |
. ' `viewing_users` TEXT NOT NULL ,' |
|
379 |
. ' `admin_groups` TEXT NOT NULL DEFAULT \'\' ,'
|
|
380 |
. ' `admin_users` TEXT NOT NULL DEFAULT \'\' ,'
|
|
381 |
. ' `viewing_groups` TEXT NOT NULL DEFAULT \'\' ,'
|
|
382 |
. ' `viewing_users` TEXT NOT NULL DEFAULT \'\' ,'
|
|
383 | 383 |
. ' `modified_when` INT NOT NULL ,' |
384 | 384 |
. ' `modified_by` INT NOT NULL ,' |
385 | 385 |
. ' PRIMARY KEY ( `page_id` ) )' |
... | ... | |
390 | 390 |
$pages = 'CREATE TABLE `'.TABLE_PREFIX.'sections` ( `section_id` INT NOT NULL auto_increment,' |
391 | 391 |
. ' `page_id` INT NOT NULL ,' |
392 | 392 |
. ' `position` INT NOT NULL ,' |
393 |
. ' `module` VARCHAR( 255 ) NOT NULL ,' |
|
394 |
. ' `block` VARCHAR( 255 ) NOT NULL ,' |
|
393 |
. ' `module` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
394 |
. ' `block` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
395 | 395 |
. ' PRIMARY KEY ( `section_id` ) )' |
396 | 396 |
. ' '; |
397 | 397 |
$database->query($pages); |
... | ... | |
400 | 400 |
|
401 | 401 |
// Settings table |
402 | 402 |
$settings="CREATE TABLE `".TABLE_PREFIX."settings` ( `setting_id` INT NOT NULL auto_increment, |
403 |
`name` VARCHAR( 255 ) NOT NULL , |
|
404 |
`value` TEXT NOT NULL , |
|
403 |
`name` VARCHAR( 255 ) NOT NULL DEFAULT '' ,
|
|
404 |
`value` TEXT NOT NULL DEFAULT '' ,
|
|
405 | 405 |
PRIMARY KEY ( `setting_id` ) )"; |
406 | 406 |
$database->query($settings); |
407 |
|
|
407 | 408 |
$settings_rows= "INSERT INTO `".TABLE_PREFIX."settings` VALUES " |
408 | 409 |
." ('', 'wb_version', '".VERSION."')," |
409 | 410 |
." ('', 'website_title', '$website_title')," |
... | ... | |
451 | 452 |
$users = 'CREATE TABLE `'.TABLE_PREFIX.'users` ( `user_id` INT NOT NULL auto_increment,' |
452 | 453 |
. ' `group_id` INT NOT NULL ,' |
453 | 454 |
. ' `active` INT NOT NULL ,' |
454 |
. ' `username` VARCHAR( 255 ) NOT NULL ,' |
|
455 |
. ' `password` VARCHAR( 255 ) NOT NULL ,' |
|
456 |
. ' `remember_key` VARCHAR( 255 ) NOT NULL ,' |
|
455 |
. ' `username` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
456 |
. ' `password` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
457 |
. ' `remember_key` VARCHAR( 255 ) NOT NULL DEFAULT \'\','
|
|
457 | 458 |
. ' `last_reset` INT NOT NULL ,' |
458 |
. ' `display_name` VARCHAR( 255 ) NOT NULL ,' |
|
459 |
. ' `email` TEXT NOT NULL ,' |
|
459 |
. ' `display_name` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
460 |
. ' `email` TEXT NOT NULL DEFAULT \'\' ,'
|
|
460 | 461 |
. ' `timezone` INT NOT NULL ,' |
461 |
. ' `date_format` VARCHAR( 255 ) NOT NULL ,' |
|
462 |
. ' `time_format` VARCHAR( 255 ) NOT NULL ,' |
|
463 |
. ' `language` VARCHAR( 5 ) NOT NULL ,' |
|
464 |
. ' `home_folder` TEXT NOT NULL ,' |
|
462 |
. ' `date_format` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
463 |
. ' `time_format` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
464 |
. ' `language` VARCHAR( 5 ) NOT NULL DEFAULT \'\' ,'
|
|
465 |
. ' `home_folder` TEXT NOT NULL DEFAULT \'\' ,'
|
|
465 | 466 |
. ' `login_when` INT NOT NULL ,' |
466 |
. ' `login_ip` VARCHAR( 15 ) NOT NULL ,' |
|
467 |
. ' `login_ip` VARCHAR( 15 ) NOT NULL DEFAULT \'\' ,'
|
|
467 | 468 |
. ' PRIMARY KEY ( `user_id` ) )' |
468 | 469 |
. ' '; |
469 | 470 |
$database->query($users); |
470 | 471 |
|
471 | 472 |
// Groups table |
472 | 473 |
$groups = 'CREATE TABLE `'.TABLE_PREFIX.'groups` ( `group_id` INT NOT NULL auto_increment,' |
473 |
. ' `name` VARCHAR( 255 ) NOT NULL ,' |
|
474 |
. ' `system_permissions` TEXT NOT NULL ,' |
|
475 |
. ' `module_permissions` TEXT NOT NULL ,' |
|
476 |
. ' `template_permissions` TEXT NOT NULL ,' |
|
474 |
. ' `name` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
475 |
. ' `system_permissions` TEXT NOT NULL DEFAULT \'\' ,'
|
|
476 |
. ' `module_permissions` TEXT NOT NULL DEFAULT \'\' ,'
|
|
477 |
. ' `template_permissions` TEXT NOT NULL DEFAULT \'\' ,'
|
|
477 | 478 |
. ' PRIMARY KEY ( `group_id` ) )' |
478 | 479 |
. ' '; |
479 | 480 |
$database->query($groups); |
480 | 481 |
|
481 | 482 |
// Search settings table |
482 | 483 |
$search = 'CREATE TABLE `'.TABLE_PREFIX.'search` ( `search_id` INT NOT NULL auto_increment,' |
483 |
. ' `name` VARCHAR( 255 ) NOT NULL ,' |
|
484 |
. ' `value` TEXT NOT NULL ,' |
|
485 |
. ' `extra` TEXT NOT NULL ,' |
|
484 |
. ' `name` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
485 |
. ' `value` TEXT NOT NULL DEFAULT \'\' ,'
|
|
486 |
. ' `extra` TEXT NOT NULL DEFAULT \'\' ,'
|
|
486 | 487 |
. ' PRIMARY KEY ( `search_id` ) )' |
487 | 488 |
. ' '; |
488 | 489 |
$database->query($search); |
... | ... | |
490 | 491 |
// Addons table |
491 | 492 |
$addons = 'CREATE TABLE `'.TABLE_PREFIX.'addons` ( ' |
492 | 493 |
.'`addon_id` INT NOT NULL auto_increment ,' |
493 |
.'`type` VARCHAR( 255 ) NOT NULL ,' |
|
494 |
.'`directory` VARCHAR( 255 ) NOT NULL ,' |
|
495 |
.'`name` VARCHAR( 255 ) NOT NULL ,' |
|
496 |
.'`description` TEXT NOT NULL ,' |
|
497 |
.'`function` VARCHAR( 255 ) NOT NULL ,' |
|
498 |
.'`version` VARCHAR( 255 ) NOT NULL ,' |
|
499 |
.'`platform` VARCHAR( 255 ) NOT NULL ,' |
|
500 |
.'`author` VARCHAR( 255 ) NOT NULL ,' |
|
501 |
.'`license` VARCHAR( 255 ) NOT NULL ,' |
|
494 |
.'`type` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
495 |
.'`directory` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
496 |
.'`name` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
497 |
.'`description` TEXT NOT NULL DEFAULT \'\' ,'
|
|
498 |
.'`function` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
499 |
.'`version` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
500 |
.'`platform` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
501 |
.'`author` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
502 |
.'`license` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
502 | 503 |
.' PRIMARY KEY ( `addon_id` ) ) '; |
503 | 504 |
$database->query($addons); |
504 | 505 |
|
... | ... | |
651 | 652 |
'GROUPS_TABLE' => TABLE_PREFIX."groups", |
652 | 653 |
) |
653 | 654 |
); |
654 |
?> |
|
655 |
?> |
trunk/wb/modules/wrapper/install.php | ||
---|---|---|
30 | 30 |
$mod_wrapper = 'CREATE TABLE `'.TABLE_PREFIX.'mod_wrapper` (' |
31 | 31 |
. ' `section_id` INT NOT NULL,' |
32 | 32 |
. ' `page_id` INT NOT NULL,' |
33 |
. ' `url` TEXT NOT NULL ,' |
|
33 |
. ' `url` TEXT NOT NULL DEFAULT \'\','
|
|
34 | 34 |
. ' `height` INT NOT NULL,' |
35 | 35 |
. ' PRIMARY KEY ( `section_id` ) )' |
36 | 36 |
. ' '; |
... | ... | |
38 | 38 |
|
39 | 39 |
} |
40 | 40 |
|
41 |
?> |
|
41 |
?> |
trunk/wb/modules/wysiwyg/install.php | ||
---|---|---|
30 | 30 |
$mod_wysiwyg = 'CREATE TABLE `'.TABLE_PREFIX.'mod_wysiwyg` ( ' |
31 | 31 |
. ' `section_id` INT NOT NULL,' |
32 | 32 |
. ' `page_id` INT NOT NULL,' |
33 |
. ' `content` TEXT NOT NULL ,' |
|
34 |
. ' `text` TEXT NOT NULL ,' |
|
33 |
. ' `content` TEXT NOT NULL DEFAULT \'\','
|
|
34 |
. ' `text` TEXT NOT NULL DEFAULT \'\','
|
|
35 | 35 |
. ' PRIMARY KEY ( `section_id` ) )' |
36 | 36 |
. ' '; |
37 | 37 |
$database->query($mod_wysiwyg); |
... | ... | |
62 | 62 |
|
63 | 63 |
} |
64 | 64 |
|
65 |
?> |
|
65 |
?> |
trunk/wb/modules/form/install.php | ||
---|---|---|
36 | 36 |
. ' `section_id` INT NOT NULL ,' |
37 | 37 |
. ' `page_id` INT NOT NULL ,' |
38 | 38 |
. ' `position` INT NOT NULL ,' |
39 |
. ' `title` VARCHAR(255) NOT NULL ,' |
|
40 |
. ' `type` VARCHAR(255) NOT NULL ,' |
|
39 |
. ' `title` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
40 |
. ' `type` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
41 | 41 |
. ' `required` INT NOT NULL ,' |
42 |
. ' `value` TEXT NOT NULL ,' |
|
43 |
. ' `extra` TEXT NOT NULL ,' |
|
42 |
. ' `value` TEXT NOT NULL DEFAULT \'\' ,'
|
|
43 |
. ' `extra` TEXT NOT NULL DEFAULT \'\' ,'
|
|
44 | 44 |
. ' PRIMARY KEY ( `field_id` ) )' |
45 | 45 |
. ' '; |
46 | 46 |
$database->query($mod_form); |
... | ... | |
48 | 48 |
$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_settings` (' |
49 | 49 |
. ' `section_id` INT NOT NULL,' |
50 | 50 |
. ' `page_id` INT NOT NULL,' |
51 |
. ' `header` TEXT NOT NULL ,' |
|
52 |
. ' `field_loop` TEXT NOT NULL ,' |
|
53 |
. ' `footer` TEXT NOT NULL ,' |
|
54 |
. ' `email_to` TEXT NOT NULL ,' |
|
55 |
. ' `email_from` VARCHAR(255) NOT NULL ,' |
|
56 |
. ' `email_subject` VARCHAR(255) NOT NULL ,' |
|
57 |
. ' `success_message` TEXT NOT NULL ,' |
|
51 |
. ' `header` TEXT NOT NULL DEFAULT \'\' ,'
|
|
52 |
. ' `field_loop` TEXT NOT NULL DEFAULT \'\' ,'
|
|
53 |
. ' `footer` TEXT NOT NULL DEFAULT \'\' ,'
|
|
54 |
. ' `email_to` TEXT NOT NULL DEFAULT \'\' ,'
|
|
55 |
. ' `email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
56 |
. ' `email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
57 |
. ' `success_message` TEXT NOT NULL DEFAULT \'\' ,'
|
|
58 | 58 |
. ' `stored_submissions` INT NOT NULL,' |
59 | 59 |
. ' `max_submissions` INT NOT NULL,' |
60 | 60 |
. ' `use_captcha` INT NOT NULL,' |
... | ... | |
67 | 67 |
. ' `page_id` INT NOT NULL,' |
68 | 68 |
. ' `submitted_when` INT NOT NULL,' |
69 | 69 |
. ' `submitted_by` INT NOT NULL,' |
70 |
. ' `body` TEXT NOT NULL ,' |
|
70 |
. ' `body` TEXT NOT NULL DEFAULT \'\' ,'
|
|
71 | 71 |
. ' PRIMARY KEY ( `submission_id` ) )' |
72 | 72 |
. ' '; |
73 | 73 |
$database->query($mod_form); |
... | ... | |
101 | 101 |
|
102 | 102 |
} |
103 | 103 |
|
104 |
?> |
|
104 |
?> |
trunk/wb/modules/code/install.php | ||
---|---|---|
30 | 30 |
$mod_code = 'CREATE TABLE `'.TABLE_PREFIX.'mod_code` (' |
31 | 31 |
. ' `section_id` INT NOT NULL,' |
32 | 32 |
. ' `page_id` INT NOT NULL,' |
33 |
. ' `content` TEXT NOT NULL ,' |
|
33 |
. ' `content` TEXT NOT NULL DEFAULT \'\' ,'
|
|
34 | 34 |
. ' PRIMARY KEY ( `section_id` ) )' |
35 | 35 |
. ' '; |
36 | 36 |
$database->query($mod_code); |
... | ... | |
61 | 61 |
|
62 | 62 |
} |
63 | 63 |
|
64 |
?> |
|
64 |
?> |
trunk/wb/modules/news/install.php | ||
---|---|---|
33 | 33 |
. '`group_id` INT NOT NULL,' |
34 | 34 |
. '`active` INT NOT NULL,' |
35 | 35 |
. '`position` INT NOT NULL,' |
36 |
. '`title` VARCHAR(255) NOT NULL,' |
|
37 |
. '`link` TEXT NOT NULL,' |
|
38 |
. '`content_short` TEXT NOT NULL,' |
|
39 |
. '`content_long` TEXT NOT NULL,' |
|
40 |
. '`commenting` VARCHAR(7) NOT NULL,' |
|
36 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
|
|
37 |
. '`link` TEXT NOT NULL DEFAULT \'\','
|
|
38 |
. '`content_short` TEXT NOT NULL DEFAULT \'\','
|
|
39 |
. '`content_long` TEXT NOT NULL DEFAULT \'\','
|
|
40 |
. '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
|
|
41 | 41 |
. '`posted_when` INT NOT NULL ,' |
42 | 42 |
. '`posted_by` INT NOT NULL ,' |
43 | 43 |
. 'PRIMARY KEY (post_id)' |
... | ... | |
51 | 51 |
. '`page_id` INT NOT NULL,' |
52 | 52 |
. '`active` INT NOT NULL,' |
53 | 53 |
. '`position` INT NOT NULL,' |
54 |
. '`title` VARCHAR(255) NOT NULL,' |
|
54 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
|
|
55 | 55 |
. 'PRIMARY KEY (group_id)' |
56 | 56 |
. ' )'; |
57 | 57 |
$database->query($mod_news); |
... | ... | |
62 | 62 |
. '`section_id` INT NOT NULL,' |
63 | 63 |
. '`page_id` INT NOT NULL,' |
64 | 64 |
. '`post_id` INT NOT NULL,' |
65 |
. '`title` VARCHAR(255) NOT NULL,' |
|
66 |
. '`comment` TEXT NOT NULL,' |
|
65 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
|
|
66 |
. '`comment` TEXT NOT NULL DEFAULT \'\','
|
|
67 | 67 |
. '`commented_when` INT NOT NULL ,' |
68 | 68 |
. '`commented_by` INT NOT NULL ,' |
69 | 69 |
. 'PRIMARY KEY (comment_id)' |
... | ... | |
74 | 74 |
$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_settings` ( ' |
75 | 75 |
. '`section_id` INT NOT NULL,' |
76 | 76 |
. '`page_id` INT NOT NULL,' |
77 |
. '`header` TEXT NOT NULL,' |
|
78 |
. '`post_loop` TEXT NOT NULL,' |
|
79 |
. '`footer` TEXT NOT NULL,'
|
|
77 |
. '`header` TEXT NOT NULL DEFAULT \'\','
|
|
78 |
. '`post_loop` TEXT NOT NULL DEFAULT \'\','
|
|
79 |
. '`footer` TEXT NOT NULL DEFAULT \'\','
|
|
80 | 80 |
. '`posts_per_page` INT NOT NULL,' |
81 |
. '`post_header` TEXT NOT NULL,' |
|
82 |
. '`post_footer` TEXT NOT NULL,' |
|
83 |
. '`comments_header` TEXT NOT NULL,' |
|
84 |
. '`comments_loop` TEXT NOT NULL,' |
|
85 |
. '`comments_footer` TEXT NOT NULL,' |
|
86 |
. '`comments_page` TEXT NOT NULL,' |
|
87 |
. '`commenting` VARCHAR(7) NOT NULL,'
|
|
81 |
. '`post_header` TEXT NOT NULL DEFAULT \'\','
|
|
82 |
. '`post_footer` TEXT NOT NULL DEFAULT \'\','
|
|
83 |
. '`comments_header` TEXT NOT NULL DEFAULT \'\','
|
|
84 |
. '`comments_loop` TEXT NOT NULL DEFAULT \'\','
|
|
85 |
. '`comments_footer` TEXT NOT NULL DEFAULT \'\','
|
|
86 |
. '`comments_page` TEXT NOT NULL DEFAULT \'\','
|
|
87 |
. '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
|
|
88 | 88 |
. '`resize` INT NOT NULL,' |
89 | 89 |
. ' `use_captcha` INT NOT NULL,' |
90 | 90 |
. 'PRIMARY KEY (section_id)' |
... | ... | |
96 | 96 |
$field_info = array(); |
97 | 97 |
$field_info['page_id'] = 'page_id'; |
98 | 98 |
$field_info['title'] = 'page_title'; |
99 |
$field_info['link'] = 'link'; |
|
100 |
$field_info['description'] = 'description'; |
|
101 |
$field_info['modified_when'] = 'modified_when'; |
|
99 |
$field_info['link'] = 'link';
|
|
100 |
$field_info['description'] = 'description';
|
|
101 |
$field_info['modified_when'] = 'modified_when';
|
|
102 | 102 |
$field_info['modified_by'] = 'modified_by'; |
103 | 103 |
$field_info = serialize($field_info); |
104 | 104 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'news', '$field_info')"); |
... | ... | |
131 | 131 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id) VALUES ('0', '0')"); |
132 | 132 |
|
133 | 133 |
// Make news post access files dir |
134 |
make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/'); + make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/'); |
|
135 | 134 |
|
136 | 135 |
} |
137 | 136 |
|
138 |
?> |
|
137 |
?> |
Also available in: Unified diff
Added default value '' to all varchar and text fields