Project

General

Profile

« Previous | Next » 

Revision 1822

Added by Dietmar about 12 years ago

! update installer, strict difference between table structure and data
  1. fixed wrong constant for settings table
    ! update redirct to upgrade-script in /admin/start(index.php

View differences:

save.php
350 350
		}
351 351
	}
352 352

  
353
//  core tables structure and some default values
353
//  core tables only structure
354 354
    $sSqlFileName = dirname(__FILE__).'/sql/websitebaker.sql';
355 355
    if(!$database->SqlImport($sSqlFileName,TABLE_PREFIX, false)) { set_error($database->get_error()); }
356 356

  
......
422 422
	." (62, 'system_locked', '0')";
423 423
	if(!$database->query($settings_rows)) { set_error($database->get_error()); }
424 424

  
425
	// Admin group
426
	$full_system_permissions  = 'access,addons,admintools,admintools_view,groups,groups_add,groups_delete,groups_modify,groups_view,';
427
	$full_system_permissions .= 'languages,languages_install,languages_uninstall,languages_view,media,media_create,media_delete,media_rename,media_upload,media_view,';
428
	$full_system_permissions .= 'modules,modules_advanced,modules_install,modules_uninstall,modules_view,pages,pages_add,pages_add_l0,pages_delete,pages_intro,pages_modify,pages_settings,pages_view,';
429
	$full_system_permissions .= 'preferences,preferences_view,settings,settings_advanced,settings_basic,settings_view,templates,templates_install,templates_uninstall,templates_view,users,users_add,users_delete,users_modify,users_view';
430
	$insert_admin_group = "INSERT INTO `".TABLE_PREFIX."groups` VALUES ('1', 'Administrators', '$full_system_permissions', '', '')";
431
	if(!$database->query($insert_admin_group)) { set_error($database->get_error()); }
432

  
425 433
// Admin user
426 434
    $insert_admin_user = "INSERT INTO `".TABLE_PREFIX."users` VALUES (1, 1, '1', 1, '$admin_username', '".md5($admin_password)."', '', 0, '', 0, 'Administrator', '$admin_email', 0, '', '', '$default_language', '', 0, '');";
427 435
	if(!$database->query($insert_admin_user)) { set_error($database->get_error()); }
428 436

  
429
// Search settings table structure and default values
430
    $sSqlFileName = dirname(__FILE__).'/sql/wb_search.sql';
437
// Search layout default data
438
    $sSqlFileName = dirname(__FILE__).'/sql/wb_search_data.sql';
431 439
    if(!$database->SqlImport($sSqlFileName,TABLE_PREFIX, false)) { set_error($database->get_error()); }
432 440

  
433 441
// Include WB functions file

Also available in: Unified diff