| 1 |
<?php |
<?php |
| 2 |
// $Id: cron.install,v 1.2 2009/04/26 11:37:07 denraf Exp $ |
// $Id: cron.install,v 1.3 2009/04/26 11:48:02 denraf Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 60 |
'not null' => FALSE, |
'not null' => FALSE, |
| 61 |
'default' => 0, |
'default' => 0, |
| 62 |
'disp-width' => '10' |
'disp-width' => '10' |
| 63 |
|
), |
| 64 |
|
'disabled' => array( |
| 65 |
|
'type' => 'int', |
| 66 |
|
'not null' => FALSE, |
| 67 |
|
'default' => 0, |
| 68 |
|
'disp-width' => '1' |
| 69 |
|
), |
| 70 |
|
'intervals' => array( |
| 71 |
|
'type' => 'int', |
| 72 |
|
'not null' => FALSE, |
| 73 |
|
'default' => 0, |
| 74 |
|
'disp-width' => '3' |
| 75 |
|
), |
| 76 |
|
'count' => array( |
| 77 |
|
'type' => 'int', |
| 78 |
|
'not null' => FALSE, |
| 79 |
|
'default' => 0, |
| 80 |
|
'disp-width' => '3' |
| 81 |
) |
) |
| 82 |
), |
), |
| 83 |
'primary key' => array('sid'), |
'primary key' => array('sid'), |
| 114 |
} |
} |
| 115 |
|
|
| 116 |
/** |
/** |
| 117 |
|
* Implementation of hook_update_N(). |
| 118 |
|
*/ |
| 119 |
|
function cron_update_6002() { |
| 120 |
|
$ret = array(); |
| 121 |
|
if (db_table_exists('cron')) { |
| 122 |
|
if (!db_column_exists('cron', 'disabled')) { |
| 123 |
|
db_add_field($ret, 'cron', 'disabled', |
| 124 |
|
array( |
| 125 |
|
'description' => 'Disable site', |
| 126 |
|
'type' => 'int', |
| 127 |
|
'length' => '1', |
| 128 |
|
'not null' => FALSE, |
| 129 |
|
'default' => '0', |
| 130 |
|
) |
| 131 |
|
); |
| 132 |
|
} |
| 133 |
|
if (!db_column_exists('cron', 'intervals')) { |
| 134 |
|
db_add_field($ret, 'cron', 'intervals', |
| 135 |
|
array( |
| 136 |
|
'description' => 'Interval setting', |
| 137 |
|
'type' => 'int', |
| 138 |
|
'length' => '3', |
| 139 |
|
'not null' => FALSE, |
| 140 |
|
'default' => '0', |
| 141 |
|
) |
| 142 |
|
); |
| 143 |
|
} |
| 144 |
|
if (!db_column_exists('cron', 'count')) { |
| 145 |
|
db_add_field($ret, 'cron', 'count', |
| 146 |
|
array( |
| 147 |
|
'description' => 'Counter for interval', |
| 148 |
|
'type' => 'int', |
| 149 |
|
'length' => '3', |
| 150 |
|
'not null' => FALSE, |
| 151 |
|
'default' => '0', |
| 152 |
|
) |
| 153 |
|
); |
| 154 |
|
} |
| 155 |
|
} |
| 156 |
|
return $ret; |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
/** |
| 160 |
* Implementation of hook_uninstall(). |
* Implementation of hook_uninstall(). |
| 161 |
*/ |
*/ |
| 162 |
function cron_uninstall() { |
function cron_uninstall() { |