/[drupal]/contributions/modules/trash/trash.install
ViewVC logotype

Contents of /contributions/modules/trash/trash.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Thu Feb 21 17:42:15 2008 UTC (21 months ago) by roetzi
Branch: MAIN
CVS Tags: DRUPAL-6--1-1, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.1: +0 -0 lines
File MIME type: text/x-php
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