예제 #1
0
 public function getPhotoUploadKey($albumId)
 {
     $photo = $this->photoDao->getLastPhoto($albumId);
     if ($photo && time() - $photo->addDatetime < 60 * 15 && $photo->uploadKey) {
         return $photo->uploadKey;
     }
     return md5($albumId . time());
 }
예제 #2
0
 public function getLastPhotoByAlbumId($albumId)
 {
     return $this->photoDao->getLastPhoto($albumId);
 }
예제 #3
0
 /**
  * Get album update time - time when last photo was added
  *
  * @param int $albumId
  * @return int
  */
 public function getAlbumUpdateTime($albumId)
 {
     $lastPhoto = $this->photoDao->getLastPhoto($albumId);
     return $lastPhoto ? $lastPhoto->addDatetime : null;
 }