mirror of
				https://github.com/slawkens/myaac.git
				synced 2025-11-04 01:36:23 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			472 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			472 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
/**
 | 
						|
 * @var OTS_DB_MySQL $db
 | 
						|
 */
 | 
						|
 | 
						|
use MyAAC\Plugins;
 | 
						|
 | 
						|
$up = function () use ($db) {
 | 
						|
	if (!$db->hasTable(TABLE_PREFIX . 'menu')) {
 | 
						|
		$db->exec(file_get_contents(__DIR__ . '/17-menu.sql'));
 | 
						|
	}
 | 
						|
 | 
						|
	$themes = ['kathrine', 'tibiacom',];
 | 
						|
	foreach ($themes as $theme) {
 | 
						|
		$file = TEMPLATES . $theme . '/menus.php';
 | 
						|
		if (is_file($file)) {
 | 
						|
			Plugins::installMenus($theme, require $file);
 | 
						|
		}
 | 
						|
	}
 | 
						|
};
 | 
						|
 | 
						|
$down = function () use ($db) {
 | 
						|
	$db->dropTable(TABLE_PREFIX . 'menu');
 | 
						|
};
 | 
						|
 |