- Timestamp:
- 11/06/09 01:23:33 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/boonex/data_migration/classes/BxDataMigrationProfiles.php
r13145 r13154 97 97 "; 98 98 99 100 99 $iResult = (int) $this -> oMigrationModule -> _oDb -> query($sQuery); 101 100 if($iResult <= 0) { … … 107 106 $this -> oMigrationModule -> _oDb -> query("UPDATE `Profiles` SET `Password` = SHA1(CONCAT(`Password`, `Salt`)) WHERE `ID` = '{$aRow['ID']}'"); 108 107 109 $iProfileId = $this -> oMigrationModule -> _oDb -> lastId(); 110 createUserDataFile($iProfileId); 108 createUserDataFile($aRow['ID']); 111 109 112 110 // migrate profile's picture; 113 111 if($aRow['Picture'] && $this -> bAvatarInstalled) { 114 $this -> _exportAvatar($aRow['ID'], $ iProfileId, $aRow['PrimPhoto']);112 $this -> _exportAvatar($aRow['ID'], $aRow['PrimPhoto']); 115 113 } 116 114 … … 211 209 * Function export profile's avatar; 212 210 * 213 * @param : $iOldProfileId (integer); 214 * @param : $iNewProfileId (integer); 211 * @param : $iProfileId (integer); 215 212 * @param : $sAvatarName (integer) - avatar's id; 216 213 * @return : void; 217 214 */ 218 function _exportAvatar($i OldProfileId, $iNewProfileId, $iAvatarId)215 function _exportAvatar($iProfileId, $iAvatarId) 219 216 { 220 217 //define the old avatar's name; … … 224 221 //define old avatar's path; 225 222 $sOldAvatarPath = $this -> oMigrationModule -> _oDb -> getExtraParam('config_profileImage') 226 . $i OldProfileId . '/photo_' . $sOldAvatarName;223 . $iProfileId . '/photo_' . $sOldAvatarName; 227 224 228 225 require_once(BX_DIRECTORY_PATH_MODULES . 'boonex/avatar/classes/BxAvaModule.php'); 229 226 $oAvatar = BxDolModule::getInstance('BxAvaModule'); 230 $oAvatar -> _iProfileId = $i NewProfileId;227 $oAvatar -> _iProfileId = $iProfileId; 231 228 232 229 // resize image; 233 $sNewImagePath = BX_AVA_DIR_TMP . '_' . $i NewProfileId . BX_AVA_EXT;230 $sNewImagePath = BX_AVA_DIR_TMP . '_' . $iProfileId . BX_AVA_EXT; 234 231 235 232 $o =& BxDolImageResize::instance(BX_AVA_W, BX_AVA_W);
Note: See TracChangeset
for help on using the changeset viewer.