BxDataMigrationPhotos.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. require_once('BxDataMigrationData.php');
  3. class BxDataMigrationPhotos extends BxDataMigrationData {
  4. var $aPhotoObjects;
  5. function BxDataMigrationPhotos (&$oMigrationModule, &$rOldDb, $oDolModule = '') {
  6. parent::BxDataMigrationData($oMigrationModule, $rOldDb, $oDolModule);
  7. $this->aPhotoObjects = array(
  8. 'profile_photos' => array(
  9. 'class' => 'BxDataMigrationProfilePhotos',
  10. 'file' => 'BxDataMigrationProfilePhotos.php'
  11. ),
  12. 'shared_photos' => array(
  13. 'class' => 'BxDataMigrationSharedPhotos',
  14. 'file' => 'BxDataMigrationSharedPhotos.php'
  15. )
  16. );
  17. }
  18. function getMigration () {
  19. $sResult = '';
  20. foreach ($this->aPhotoObjects as $aValue) {
  21. require_once($aValue['file']);
  22. $oClass = new $aValue['class']($this->oMigrationModule, $this->rOldDb, $this->oDolModule);
  23. $sResult = $oClass->getMigration();
  24. if($sResult != MIGRATION_SUCCESSFUL) {
  25. return $sResult;
  26. }
  27. }
  28. return $sResult;
  29. }
  30. }
  31. ?>