summaryrefslogtreecommitdiff
path: root/admin/schema_inc.php
blob: 128a2b4666858c4e67a5d56df6917936ef31a5d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
$tables = array(
  'feed_conjugation' => "
	content_type_guid C(16) NOTNULL,
	conjugation_phrase C(255) NOTNULL,
	is_target_linked   C(1)
    CONSTRAINT ', CONSTRAINT `feed_conj_content_type_ref` FOREIGN KEY (`content_type_guid`) REFERENCES `".BIT_DB_PREFIX."liberty_content_types` ( `content_type_guid` )'
  "
);

global $gBitInstaller;

foreach( array_keys( $tables ) AS $tableName ) {
	$gBitInstaller->registerSchemaTable( FEED_PKG_NAME, $tableName, $tables[$tableName] );
}

$gBitInstaller->registerSchemaDefault( FEED_PKG_NAME, array(

	"INSERT INTO `".BIT_DB_PREFIX."feed_conjugation` (`content_type_guid`, `conjugation_phrase`, `is_target_linked`) VALUES ('bituser', 'updated their profile', 'y')",
));

$gBitInstaller->registerPackageInfo( FEED_PKG_NAME, array(
	'description' => "User feed package that makes use of Liberty action log",
	'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>',
) );

// ### Default UserPermissions
$gBitInstaller->registerUserPermissions( TAGS_PKG_NAME, array(
	array( 'p_feed_admin', 'Can admin feeds', 'admin', FEED_PKG_NAME ),
	array( 'p_feed_view', 'Can view feed', 'basic', FEED_PKG_NAME ),
) );
?>