public function thumb_url($full_uri = false) { if (!module::get_var("aws_s3", "enabled") || Router::$controller == "rest" || !$this->s3_thumb_uploaded) { return parent::thumb_url($full_uri); } if ($this->is_photo()) { return aws_s3::generate_url("th/" . $this->relative_path(), $this->view_1 == 1 ? false : true, $this->updated); } else { if ($this->is_album() && $this->id > 1) { return aws_s3::generate_url("th/" . $this->relative_path() . "/.album.jpg", $this->view_1 == 1 ? false : true, $this->updated); } else { if ($this->is_movie()) { return aws_s3::generate_url("th/" . preg_replace("/...\$/", "jpg", $this->relative_path()), $this->view_1 == 1 ? false : true, $this->updated); } } } }
public function thumb_url($full_uri = false) { if (!module::get_var("aws_s3", "enabled")) { return parent::thumb_url($full_uri); } if ($this->is_photo()) { return aws_s3::generate_url("th/" . $this->relative_path(), $this->view_1 == 1 ? false : true, $this->updated); } else { if ($this->is_album() && $this->id > 1) { return aws_s3::generate_url("th/" . $this->relative_path() . "/.album.jpg", $this->view_1 == 1 ? false : true, $this->updated); } else { if ($this->is_movie()) { $relative_path = preg_replace("/...\$/", "jpg", $this->relative_path()); return aws_s3::generate_url("th/" . $relative_path, $this->view_1 == 1 ? false : true, $this->updated); } } } }