This repository has been archived by the owner on Aug 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tables.php
48 lines (44 loc) · 1.57 KB
/
tables.php
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* ShoutIt module for Zikula Application Framework
*
* @author Gabriel Freinbichler & Philippe Baudrion - UniGE/FTI
* @link http://www.cmods-dev.de
* @copyright Copyright (C) by Gabriel Freinbichler
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
* @version $Id$
*/
/**
* Populate table array for ShoutIt module
*
* This function is called internally by the core whenever the module is
* loaded. It delivers the table information to the core.
*
* @return array The table information.
*/
function shoutit_tables()
{
// Initialise table array
$tables = array();
// Build the ShoutIt message table definition
$tables['shoutit_messages'] = 'shoutit_messages';
// Set the column names.
$tables['shoutit_messages_column'] = array (
'id' => 'id',
'message' => 'message',
'gid' => 'gid', // selected group id
'bid' => 'bid' // ShoutIt block ID
);
$tables['shoutit_messages_column_def'] = array(
'id' => "I8 NOTNULL AUTO PRIMARY",
'message' => "X NOTNULL DEFAULT ''",
'gid' => "I4 NOTNULL DEFAULT '1'",
'bid' => "I4 NOTNULL DEFAULT ''"
);
ObjectUtil::addStandardFieldsToTableDefinition ($tables['shoutit_messages_column'], '');
ObjectUtil::addStandardFieldsToTableDataDefinition($tables['shoutit_messages_column_def']);
$tables['shoutit_messages_primary_key_column'] = 'id';
// Return the table information
return $tables;
}
?>