/** * Work out the URL to the image for this article * @param $pArticleId id of the article we need the image path for * @param $pBasePathOnly bool TRUE / FALSE - specify whether you want full path or just base path * @return URL on success, FALSE on failure * @access public **/ public function getArticleImageStorageUrl($pArticleId = NULL, $pBasePathOnly = FALSE, $pForceRefresh = FALSE) { global $gBitSystem; $url = STORAGE_PKG_URL . ARTICLES_PKG_NAME . '/'; if ($pBasePathOnly) { return $url; } if (!@BitBase::verifyId($pArticleId)) { if ($this->isValid()) { $pArticleId = $this->mArticleId; } else { return NULL; } } if (is_file(BitArticleTopic::getArticleImageStoragePath(NULL, TRUE) . BitArticleTopic::getArticleImageStorageName($pArticleId))) { return $url . BitArticleTopic::getArticleImageStorageName($pArticleId) . ($pForceRefresh ? "?" . $gBitSystem->getUTCTime() : ''); } else { return FALSE; } }