示例#1
0
文件: User.php 项目: rcrrich/cunity
 /**
  * @return array
  */
 public function getProfileImages()
 {
     if ($this->images !== null) {
         return $this->images;
     }
     $images = new GalleryImages();
     $this->images = $images->fetchAll($images->select()->where("id=?", $this->profileImage)->orWhere("id=?", $this->titleImage));
     return $this->images;
 }
示例#2
0
文件: Album.php 项目: rcrrich/cunity
 /**
  * @return int|string
  */
 private function getLastImageId()
 {
     $images = new GalleryImages();
     $res = $images->fetchRow($images->select()->where("albumid=?", $this->id)->order("time")->limit(1));
     if ($res === null) {
         return 0;
     } else {
         return $res->id;
     }
 }