Parent Directory
|
Revision Log
|
Revision Graph
Drupal 6 port
| 1 | <?php |
| 2 | // $Id$ |
| 3 | |
| 4 | /** |
| 5 | * @file |
| 6 | * Installation file for the trash module. |
| 7 | */ |
| 8 | |
| 9 | /** |
| 10 | * Status value used for database field {node}.status |
| 11 | */ |
| 12 | define('STATUS_TRASH', -1); |
| 13 | |
| 14 | /** |
| 15 | * Implementation of hook_uninstall(). |
| 16 | */ |
| 17 | function trash_uninstall() { |
| 18 | // Empty trash on uninstallation |
| 19 | $result = db_query("SELECT n.nid FROM {node} n WHERE n.status = %d", STATUS_TRASH); |
| 20 | while ($node = db_fetch_object($result)) { |
| 21 | node_delete($node->nid); |
| 22 | } |
| 23 | } |
| ViewVC Help | |
| Powered by ViewVC 1.1.2 |