| 1 |
<?php
|
| 2 |
// $Id: accessible.install,v 1.1 2009/02/04 23:33:58 johnbarclay Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* accessible module installation and upgrade code.
|
| 7 |
*/
|
| 8 |
|
| 9 |
//////////////////////////////////////////////////////////////////////////////
|
| 10 |
// Core API hooks
|
| 11 |
|
| 12 |
/**
|
| 13 |
* Implementation of hook_install().
|
| 14 |
* adds "offscreen" column to blocks table
|
| 15 |
*/
|
| 16 |
function accessible_install() {
|
| 17 |
// We're adding to an existing table, not creating a new one.
|
| 18 |
$ret = array();
|
| 19 |
|
| 20 |
if (! db_column_exists('blocks', 'offscreen')) {
|
| 21 |
db_add_field($ret, 'blocks', 'offscreen', array(
|
| 22 |
'type' => 'int',
|
| 23 |
'size' => 'tiny',
|
| 24 |
'not null' => TRUE,
|
| 25 |
'default' => '0',
|
| 26 |
));
|
| 27 |
}
|
| 28 |
|
| 29 |
variable_set('accessible_roles_granted_accts', FALSE);
|
| 30 |
return $ret;
|
| 31 |
}
|
| 32 |
|
| 33 |
/**
|
| 34 |
* Implementation of hook_uninstall().
|
| 35 |
* removes "offscreen" column from blocks table
|
| 36 |
*/
|
| 37 |
function accessible_uninstall() {
|
| 38 |
$ret = array();
|
| 39 |
if (db_column_exists('blocks', 'offscreen')) {
|
| 40 |
db_drop_field($ret, 'blocks', 'offscreen');
|
| 41 |
}
|
| 42 |
variable_del('accessible_groups_wo_ldapauth_sid');
|
| 43 |
return $ret;
|
| 44 |
}
|
| 45 |
|
| 46 |
|
| 47 |
|