HomeHelpTrac

Ignore:
Timestamp:
11/06/09 01:23:33 (3 years ago)
Author:
Alexander Ermashev
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/boonex/data_migration/classes/BxDataMigrationProfiles.php

    r13145 r13154  
    9797                     "; 
    9898 
    99  
    10099                     $iResult = (int) $this -> oMigrationModule -> _oDb -> query($sQuery); 
    101100                     if($iResult <= 0) { 
     
    107106                     $this -> oMigrationModule -> _oDb -> query("UPDATE `Profiles` SET `Password` = SHA1(CONCAT(`Password`, `Salt`)) WHERE `ID` = '{$aRow['ID']}'"); 
    108107 
    109                      $iProfileId = $this -> oMigrationModule -> _oDb -> lastId(); 
    110                      createUserDataFile($iProfileId); 
     108                     createUserDataFile($aRow['ID']); 
    111109 
    112110                     // migrate profile's picture; 
    113111                     if($aRow['Picture'] && $this -> bAvatarInstalled) { 
    114                          $this -> _exportAvatar($aRow['ID'], $iProfileId, $aRow['PrimPhoto']); 
     112                         $this -> _exportAvatar($aRow['ID'], $aRow['PrimPhoto']); 
    115113                     } 
    116114 
     
    211209         *  Function export profile's avatar; 
    212210         *   
    213          * @param  : $iOldProfileId (integer); 
    214          * @param  : $iNewProfileId (integer);  
     211         * @param  : $iProfileId (integer); 
    215212         * @param  : $sAvatarName (integer) - avatar's id; 
    216213         * @return : void; 
    217214         */ 
    218         function _exportAvatar($iOldProfileId, $iNewProfileId, $iAvatarId) 
     215        function _exportAvatar($iProfileId, $iAvatarId) 
    219216        { 
    220217            //define the old avatar's name; 
     
    224221                //define old avatar's path; 
    225222                $sOldAvatarPath = $this -> oMigrationModule -> _oDb -> getExtraParam('config_profileImage') 
    226                             .  $iOldProfileId . '/photo_' . $sOldAvatarName; 
     223                            .  $iProfileId . '/photo_' . $sOldAvatarName; 
    227224 
    228225                require_once(BX_DIRECTORY_PATH_MODULES . 'boonex/avatar/classes/BxAvaModule.php'); 
    229226                $oAvatar = BxDolModule::getInstance('BxAvaModule'); 
    230                 $oAvatar -> _iProfileId = $iNewProfileId; 
     227                $oAvatar -> _iProfileId = $iProfileId; 
    231228  
    232229                // resize image; 
    233                 $sNewImagePath = BX_AVA_DIR_TMP . '_' . $iNewProfileId . BX_AVA_EXT; 
     230                $sNewImagePath = BX_AVA_DIR_TMP . '_' . $iProfileId . BX_AVA_EXT; 
    234231 
    235232                $o =& BxDolImageResize::instance(BX_AVA_W, BX_AVA_W); 
Note: See TracChangeset for help on using the changeset viewer.