allow menus to have special roles

This commit is contained in:
friendica 2014-01-15 12:57:12 -08:00
parent e4217dc141
commit 762a543249
3 changed files with 19 additions and 4 deletions

View File

@ -46,7 +46,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1090 );
define ( 'DB_UPDATE_VERSION', 1091 );
define ( 'EOL', '<br />' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@ -218,7 +218,12 @@ define ( 'PHOTO_PROFILE', 0x0001 );
define ( 'PHOTO_XCHAN', 0x0002 );
define ( 'PHOTO_THING', 0x0004 );
/**
* Menu types
*/
define ( 'MENU_SYSTEM', 0x0001 );
define ( 'MENU_BOOKMARK', 0x0002 );
/**
* Network and protocol family types

View File

@ -536,9 +536,11 @@ CREATE TABLE IF NOT EXISTS `menu` (
`menu_channel_id` int(10) unsigned NOT NULL DEFAULT '0',
`menu_name` char(255) NOT NULL DEFAULT '',
`menu_desc` char(255) NOT NULL DEFAULT '',
`menu_flags` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`menu_id`),
KEY `menu_channel_id` (`menu_channel_id`),
KEY `menu_name` (`menu_name`)
KEY `menu_name` (`menu_name`),
KEY `menu_flags` (`menu_flags`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `menu_item` (

View File

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1090 );
define( 'UPDATE_VERSION' , 1091 );
/**
*
@ -986,3 +986,11 @@ ADD INDEX ( `creator` ) ");
}
function update_r1090() {
$r = q("ALTER TABLE `menu` ADD `menu_flags` INT NOT NULL DEFAULT '0',
ADD INDEX ( `menu_flags` )");
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}