summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorturon <spider@turon>2014-09-22 22:04:36 -0400
committerturon <spider@turon>2014-09-22 22:04:36 -0400
commitc7f6c68938905d2389f0d6fbaa5f00f136334acb (patch)
tree364a1cd5f1b26034dc1f0ca631d58f16743b69ce
parent06e0ffd140fc848a99a213e839c741aaa930b787 (diff)
downloadfisheye-c7f6c68938905d2389f0d6fbaa5f00f136334acb.tar.gz
fisheye-c7f6c68938905d2389f0d6fbaa5f00f136334acb.tar.bz2
fisheye-c7f6c68938905d2389f0d6fbaa5f00f136334acb.zip
this check
-rw-r--r--FisheyeImage.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/FisheyeImage.php b/FisheyeImage.php
index 6a66e40..1b01a9a 100644
--- a/FisheyeImage.php
+++ b/FisheyeImage.php
@@ -688,7 +688,7 @@ class FisheyeImage extends FisheyeBase {
static public function getTitleFromHash( $pHash, $pDefault=TRUE ) {
$ret = trim( parent::getTitleFromHash( $pHash, $pDefault ) );
if( empty( $ret ) && $pDefault ) {
- $storage = (!empty( $this->mStorage ) ? current( $this->mStorage ) : NULL);
+ $storage = (!empty( $this ) && !empty( $this->mStorage ) ? current( $this->mStorage ) : NULL);
if( !empty( $storage['file_name'] ) ) {
$ret = $storage['file_name'];
} else {
@@ -702,6 +702,14 @@ class FisheyeImage extends FisheyeBase {
return $ret;
}
+ public function getTitle() {
+ $ret = NULL;
+ if( $this->isValid() ) {
+ $ret = self::getTitleFromHash( $this->mInfo );
+ }
+ return $ret;
+ }
+
function getThumbnailContentId() {
return( $this->mContentId );