Changeset 662


Ignore:
Timestamp:
May 31, 2014, 11:53:31 PM (10 years ago)
Author:
chronos
Message:
  • Upraveno: ICQ kontakty převedeny z tabulky uživatelů do tabulky Kontakty.
Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r661 r662  
    11<?php
    22
    3 $Revision = 661; // Subversion revision
    4 $DatabaseRevision = 661; // SQL structure revision
     3$Revision = 662; // Subversion revision
     4$DatabaseRevision = 662; // SQL structure revision
    55$ReleaseTime = strtotime('2014-05-31');
  • trunk/Common/Setup/Updates.php

    r661 r662  
    773773}
    774774
     775function UpdateTo662($Manager)
     776{
     777  $Manager->Execute('INSERT INTO `Contact` (SELECT NULL AS `Id`, 2 AS `Category`, `ICQ` AS `Value`, NULL AS `Subject`, `Id` AS `User` FROM `User`
     778WHERE (`ICQ` != "") AND (`ICQ` != 0))');
     779  $Manager->Execute('ALTER TABLE `User` DROP `ICQ`;');
     780  $Manager->Execute('INSERT INTO `ActionIcon` (`Id`, `Name`) VALUES (NULL, "Contact.png");');
     781  $IconId = $Manager->Database->insert_id;
     782  $Manager->Execute('UPDATE `Action` SET `Icon` = '.$IconId.' WHERE `Title`="Kontakty"');
     783
     784}
     785
    775786class Updates
    776787{
     
    814825      647 => array('Revision' => 657, 'Function' => 'UpdateTo657'),
    815826      657 => array('Revision' => 661, 'Function' => 'UpdateTo661'),
     827      661 => array('Revision' => 662, 'Function' => 'UpdateTo662'),
    816828    ));
    817829  }
  • trunk/Modules/Subject/Subject.php

    r661 r662  
    6666      'Filter' => '1',
    6767    ));
    68     $this->System->FormManager->RegisterFormType('TContactList', array(
     68    $this->System->FormManager->RegisterFormType('TContactListCategory', array(
    6969      'Type' => 'ManyToOne',
    7070      'Table' => 'Contact',
     
    7373      'Filter' => '1',
    7474    ));
     75    $this->System->FormManager->RegisterFormType('TContactListUser', array(
     76      'Type' => 'ManyToOne',
     77      'Table' => 'Contact',
     78      'Id' => 'Id',
     79      'Ref' => 'User',
     80      'Filter' => '1',
     81    ));
    7582    $this->System->FormManager->RegisterClass('Contact', array(
    76       'Title' => 'Kontaktu',
     83      'Title' => 'Kontakty',
    7784      'Table' => 'Contact',
    7885      'Items' => array(
     
    8895      'Items' => array(
    8996        'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
    90         'Items' => array('Type' => 'TContactList', 'Caption' => 'Kontakty'),
     97        'Items' => array('Type' => 'TContactListCategory', 'Caption' => 'Kontakty'),
    9198      ),
    9299    ));
  • trunk/Modules/User/User.php

    r650 r662  
    558558        'Email' => array('Type' => 'String', 'Caption' => 'E-mail', 'Default' => ''),
    559559        'PhoneNumber' => array('Type' => 'String', 'Caption' => 'Telefón', 'Default' => ''),
    560         'ICQ' => array('Type' => 'String', 'Caption' => 'ICQ', 'Default' => ''),
    561560      ),
    562561    ));
     
    598597        'RegistrationTime' => array('Type' => 'DateTime', 'Caption' => 'Čas registrace', 'Default' => ''),
    599598        'Locked' => array('Type' => 'Boolean', 'Caption' => 'Uzamčen', 'Default' => ''),
    600         'ICQ' => array('Type' => 'String', 'Caption' => 'ICQ', 'Default' => ''),
    601599        'PhoneNumber' => array('Type' => 'String', 'Caption' => 'Telefon', 'Default' => ''),
    602600        'UserRel' => array('Type' => 'TUserCustomerRelListUser', 'Caption' => 'Přístup k zákazníkům', 'Default' => ''),
    603601        'Permission' => array('Type' => 'TPermissionUserAssignmentListUser', 'Caption' => 'Oprávnění', 'Default' => ''),
     602        'Contatcs' => array('Type' => 'TContactListUser', 'Caption' => 'Kontakty', 'Default' => ''),
    604603      ),
    605604    ));
Note: See TracChangeset for help on using the changeset viewer.