| 1 |
<?php
|
| 2 |
/* This file is part of "WebDav for Drupal Module".
|
| 3 |
* Copyright 2009, arNuméral
|
| 4 |
* Author : Yoran Brault
|
| 5 |
* eMail : yoran.brault@bad_arnumeral.fr (remove bad_ before sending an email)
|
| 6 |
* Site : http://www.arnumeral.fr/node/2
|
| 7 |
*
|
| 8 |
* "WebDav for Drupal Module" is free software; you can redistribute it and/or
|
| 9 |
* modify it under the terms of the GNU General Public License as
|
| 10 |
* published by the Free Software Foundation; either version 2.1 of
|
| 11 |
* the License, or (at your option) any later version.
|
| 12 |
*
|
| 13 |
* "WebDav for Drupal Module" is distributed in the hope that it will be useful,
|
| 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 16 |
* General Public License for more details.
|
| 17 |
*
|
| 18 |
* You should have received a copy of the GNU General Public
|
| 19 |
* License along with "Broken Anchor for Node comments Module"; if not, write to the Free
|
| 20 |
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
| 21 |
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
| 22 |
*/
|
| 23 |
|
| 24 |
/**
|
| 25 |
* Implementation of hook_schema().
|
| 26 |
*/
|
| 27 |
function webdav_schema() {
|
| 28 |
$schema['webdav_locks'] = array(
|
| 29 |
// Liste des champs
|
| 30 |
'fields' => array(
|
| 31 |
'token' => array('type' => 'varchar','length' => 255,'not null' => TRUE,'default' => ''),
|
| 32 |
'path' => array('type' => 'varchar','length' => 200,'not null' => TRUE,'default' => ''),
|
| 33 |
'expires' => array('type' => 'int','not null' => TRUE,'default' => 0),
|
| 34 |
'owner' => array('type' => 'varchar','length' => 200,'not null' => TRUE),
|
| 35 |
'recursive' => array('type' => 'int','default' => 0),
|
| 36 |
'writelock' => array('type' => 'int','default' => 0),
|
| 37 |
'exclusivelock' => array('type' => 'int','not null' => TRUE,'default' => 0),
|
| 38 |
),
|
| 39 |
|
| 40 |
// Clef primaire
|
| 41 |
'primary key' => array('token')
|
| 42 |
);
|
| 43 |
return $schema;
|
| 44 |
}
|
| 45 |
|
| 46 |
/**
|
| 47 |
* Implementation of hook_install().
|
| 48 |
*/
|
| 49 |
function webdav_install() {
|
| 50 |
$result=drupal_install_schema('webdav');
|
| 51 |
return $result;
|
| 52 |
}
|
| 53 |
|
| 54 |
/**
|
| 55 |
* Implementation of hook_uninstall().
|
| 56 |
*/
|
| 57 |
function webdav_uninstall() {
|
| 58 |
$result=drupal_uninstall_schema('webdav');
|
| 59 |
return $result;
|
| 60 |
}
|
| 61 |
|