Created
October 8, 2010 17:31
-
-
Save kitsunde/617166 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Why aren't you just deleting all images before update???? | |
*/ | |
public function saveImages( $movieInfo ){ | |
if( DONT_SAVE_IMAGES ) return; | |
// $imageIds = array(); | |
if( property_exists( $movieInfo, "posters" ) ){ | |
foreach( $movieInfo->posters as $image ){ | |
// $imageIds[ count( $imageIds ) ] = $image->image->id; | |
$this->saveImage( $movieInfo->id, $image->image ); | |
} | |
} | |
if( property_exists( $movieInfo, "backdrops" ) ){ | |
foreach( $movieInfo->backdrops as $image ){ | |
// $imageIds[ count( $imageIds ) ] = $image->image->id; | |
$this->saveImage( $movieInfo->id, $image->image ); | |
} | |
} | |
/* foreach( $this->getImageIds( $movieInfo->id ) as $imageId ){ | |
if( !in_array( $imageId, $imageIds ) ) | |
$this->removeImage( $imageId ); | |
}*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment