Ignore:
Timestamp:
Sep 14, 2014, 8:26:20 PM (10 years ago)
Author:
chronos
Message:
  • Modified: PhoneNumber converted from User table columnt to generic Contacts table.
  • Fixed: Removed ICQ and PhoneNumber fields from user registration.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Setup/Updates.php

    r689 r693  
    899899}
    900900
     901function UpdateTo692($Manager)
     902{
     903  // Convert user emails to contacts
     904  $DbResult = $Manager->Execute('SELECT `Id` FROM `ContactCategory` WHERE `Name` = "Telefón"');
     905  $DbRow = $DbResult->fetch_assoc();
     906  $ContactCategoryId = $DbRow['Id'];
     907
     908  $Manager->Execute('INSERT INTO `Contact` (SELECT NULL AS `Id`, '.$ContactCategoryId.' AS `Category`, '.
     909  '`PhoneNumber` AS `Value`, NULL AS `Subject`, `Id` AS `User`, "" AS `Descriptions`, 1 AS `Receive` FROM `User`
     910WHERE (`PhoneNumber` != "") AND (`PhoneNumber` != 0))');
     911  $Manager->Execute('ALTER TABLE `User` DROP `PhoneNumber`;');
     912}
     913
    901914class Updates
    902915{
     
    948961      678 => array('Revision' => 679, 'Function' => 'UpdateTo679'),
    949962      679 => array('Revision' => 688, 'Function' => 'UpdateTo688'),
     963      688 => array('Revision' => 692, 'Function' => 'UpdateTo692'),
    950964    ));
    951965  }
Note: See TracChangeset for help on using the changeset viewer.