Changeset 1028


Ignore:
Timestamp:
Feb 6, 2006, 11:59:30 PM (18 years ago)
Author:
rub
Message:

[NBM] Step 2: Add new table user_mail_notification (update, install, constants, delete user

+ Correction delete user (table user_feed missing, table sessions must be removed)

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r1006 r1028  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    275275//     - all the links to any group
    276276//     - all the favorites linked to this user
    277 //     - all sessions linked to this user
    278277//     - calculated permissions linked to the user
     278//     - all datas about notifications for the user
    279279function delete_user($user_id)
    280280{
     
    288288  pwg_query($query);
    289289
     290  // destruction of data notification by mail for this user
     291  $query = '
     292DELETE FROM '.USER_MAIL_NOTIFICATION_TABLE.'
     293  WHERE user_id = '.$user_id.'
     294;';
     295  pwg_query($query);
     296
     297  // destruction of data RSS notification for this user
     298  $query = '
     299DELETE FROM '.USER_FEED_TABLE.'
     300  WHERE user_id = '.$user_id.'
     301;';
     302  pwg_query($query);
     303
    290304  // destruction of the group links for this user
    291305  $query = '
     
    298312  $query = '
    299313DELETE FROM '.FAVORITES_TABLE.'
    300   WHERE user_id = '.$user_id.'
    301 ;';
    302   pwg_query($query);
    303 
    304   // destruction of the sessions linked with the user
    305   $query = '
    306 DELETE FROM '.SESSIONS_TABLE.'
    307314  WHERE user_id = '.$user_id.'
    308315;';
     
    11931200  $tables =
    11941201    array(
     1202      USER_MAIL_NOTIFICATION_TABLE,
    11951203      USER_FEED_TABLE,
    11961204      USER_INFOS_TABLE,
  • trunk/include/constants.php

    r1008 r1028  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    6262define('UPGRADE_TABLE', $prefixeTable.'upgrade');
    6363define('SEARCH_TABLE', $prefixeTable.'search');
     64define('USER_MAIL_NOTIFICATION_TABLE', $prefixeTable.'user_mail_notification');
     65
    6466?>
  • trunk/install/phpwebgallery_structure.sql

    r1020 r1028  
    325325) TYPE=MyISAM;
    326326
     327--
     328-- Table structure for table `phpwebgallery_user_mail_notification`
     329--
     330
     331DROP TABLE IF EXISTS `phpwebgallery_user_mail_notification`;
     332CREATE TABLE `phpwebgallery_user_mail_notification`
     333(
     334  `user_id` smallint(5) NOT NULL default '0',
     335  `check_key` varchar(128) binary NOT NULL,
     336  `enabled` enum('true','false') NOT NULL default 'false',
     337  `last_send` datetime default NULL,
     338  PRIMARY KEY  (`user_id`),
     339  UNIQUE KEY `uidx_check_key` (`check_key`)
     340) TYPE=MyISAM;
Note: See TracChangeset for help on using the changeset viewer.