| 1 |
<?php |
<?php |
| 2 |
// $Id: feedback.install,v 1.7 2008/09/30 13:35:22 sun Exp $ |
// $Id: feedback.install,v 1.8 2008/10/23 13:51:30 sun Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_schema(). |
* Implementation of hook_schema(). |
| 21 |
'description' => t('The actual feedback message.'), |
'description' => t('The actual feedback message.'), |
| 22 |
), |
), |
| 23 |
'location' => array('type' => 'text', 'not null' => TRUE, |
'location' => array('type' => 'text', 'not null' => TRUE, |
| 24 |
'description' => t('The internal Drupal path of the page feedback message was entered in.'), |
'description' => t('The internal Drupal path of the page the feedback message was submitted on.'), |
| 25 |
), |
), |
| 26 |
'location_masked' => array('type' => 'text', 'not null' => TRUE, |
'location_masked' => array('type' => 'text', 'not null' => TRUE, |
| 27 |
'description' => t('The masked Drupal path of the page feedback message was entered in.'), |
'description' => t('The masked Drupal path of the page the feedback message was submitted on.'), |
| 28 |
|
), |
| 29 |
|
'url' => array('type' => 'text', 'not null' => TRUE, |
| 30 |
|
'description' => t('The absolute URL of the page the feedback message was submitted on.'), |
| 31 |
), |
), |
| 32 |
'useragent' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, |
'useragent' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, |
| 33 |
'description' => t('The user agent of the feedback message author.'), |
'description' => t('The user agent of the feedback message author.'), |
| 70 |
return $ret; |
return $ret; |
| 71 |
} |
} |
| 72 |
|
|
| 73 |
|
/** |
| 74 |
|
* Add column for absolute URL. |
| 75 |
|
*/ |
| 76 |
|
function feedback_update_6101() { |
| 77 |
|
$ret = array(); |
| 78 |
|
db_add_field($ret, 'feedback', 'url', array('type' => 'text', 'not null' => TRUE)); |
| 79 |
|
$ret[] = update_sql("UPDATE {feedback} SET url = location"); |
| 80 |
|
return $ret; |
| 81 |
|
} |
| 82 |
|
|