Project

General

Profile

« Previous | Next » 

Revision 110

Added by stefan about 19 years ago

Created new table "modules" to allow for faster lookup of which modules are installed. Allows for greater flexibility also.

View differences:

save.php
360 360
	// Search table
361 361
	$search = "DROP TABLE IF EXISTS `".TABLE_PREFIX."search`";
362 362
	$database->query($search);
363
			
364

  
365

  
363
	// Modules table
364
	$modules = "DROP TABLE IF EXISTS `".TABLE_PREFIX."modules`";
365
	$database->query($modules);
366
				
366 367
	// Try installing tables
367 368
	
368 369
	// Pages table
......
492 493
	        . ' ';
493 494
	$database->query($search);
494 495
	
496
	// Modules table
497
	$modules = 'CREATE TABLE `'.TABLE_PREFIX.'modules` ( '
498
	.'`id` INT NOT NULL auto_increment ,'
499
	.'`name` VARCHAR( 255 ) NOT NULL ,'
500
	.'`type` VARCHAR( 255 ) NOT NULL ,'
501
	.'`directory` VARCHAR( 255 ) NOT NULL ,'
502
	.' PRIMARY KEY ( `id` ) ); ';
503
	
504
	$database->query($modules);
505

  
506
	$search = 'CREATE TABLE `'.TABLE_PREFIX.'modules` ( '
507
	        . ' `name` VARCHAR( 255 ) NOT NULL ,'
508
	        . ' `type` VARCHAR( 255 ) NOT NULL ,'
509
	        . ' PRIMARY KEY ( `name` ) )'
510
	        . ' ';
511
	$database->query($search);
512

  
513

  
495 514
	// Insert default data
496 515
	
497 516
	// Admin group

Also available in: Unified diff