<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
$success=true;

$success=update_menu_level_1();

function update_menu_level_1()
{
	$module_id=Db::instance()->selectCell("SELECT module_id FROM ?_modules WHERE module='menu_level_1'");
	if ($module_id) {
		include(LAB_PATH_DATA.'/configs/-1_'.$module_id.'.conf');
		file_put_contents(LAB_PATH_DATA.'/configs/-1_'.$module_id.'.conf', "<?\r\n".'$config[\'menu_level\']='.++$config['menu_level'].';');
		Db::instance()->query("UPDATE ?_modules SET module='menu_level' WHERE module='menu_level_1'");
	}
	return true;
}