diff options
| author | Lester Caine ext:(%22) <lester@lsces.co.uk> | 2012-04-16 23:30:21 +0100 |
|---|---|---|
| committer | Lester Caine ext:(%22) <lester@lsces.co.uk> | 2012-04-16 23:30:21 +0100 |
| commit | 6852c983283d374ca03e309bfe179808e6e158a8 (patch) | |
| tree | 956eb29cbce0e1e48024ddef857c1de82fe987d2 | |
| parent | 6e30c337f7702ba2b0d3ce8392607c3d1a539164 (diff) | |
| download | articles-6852c983283d374ca03e309bfe179808e6e158a8.tar.gz articles-6852c983283d374ca03e309bfe179808e6e158a8.tar.bz2 articles-6852c983283d374ca03e309bfe179808e6e158a8.zip | |
Modify to use file_name/source_file shanges in attachments
Still needs fully testing
| -rw-r--r-- | BitArticle.php | 8 | ||||
| -rw-r--r-- | BitArticleTopic.php | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/BitArticle.php b/BitArticle.php index dd46f86..45d241c 100644 --- a/BitArticle.php +++ b/BitArticle.php @@ -88,7 +88,7 @@ class BitArticle extends LibertyMime { $query = "SELECT a.*, lc.*, atype.*, atopic.*, lch.hits, uue.`login` AS `modifier_user`, uue.`real_name` AS `modifier_real_name`, uuc.`login` AS `creator_user`, uuc.`real_name` AS `creator_real_name` , - la.`attachment_id` AS `primary_attachment_id`, lf.storage_path AS `image_attachment_path` $selectSql + la.`attachment_id` AS `primary_attachment_id`, lf.`file_name` AS `image_attachment_path` $selectSql FROM `".BIT_DB_PREFIX."articles` a LEFT OUTER JOIN `".BIT_DB_PREFIX."article_types` atype ON( atype.`article_type_id` = a.`article_type_id` ) LEFT OUTER JOIN `".BIT_DB_PREFIX."article_topics` atopic ON( atopic.`topic_id` = a.`topic_id` ) @@ -386,10 +386,10 @@ class BitArticle extends LibertyMime { $thumbHash['mime_image'] = FALSE; if( !empty( $pParamHash['image_attachment_path'] )) { - $thumbHash['storage_path'] = $pParamHash['image_attachment_path']; + $thumbHash['source_file'] = $pParamHash['image_attachment_path']; $ret = liberty_fetch_thumbnails( $thumbHash ); } elseif( !empty( $pParamHash['has_topic_image'] ) && $pParamHash['has_topic_image'] == 'y' ) { - $thumbHash['storage_path'] = preg_replace( "#^/+#", "", BitArticleTopic::getTopicImageStorageUrl( $pParamHash['topic_id'] )); + $thumbHash['source_file'] = preg_replace( "#^/+#", "", BitArticleTopic::getTopicImageStorageUrl( $pParamHash['topic_id'] )); $ret = liberty_fetch_thumbnails( $thumbHash ); } @@ -533,7 +533,7 @@ class BitArticle extends LibertyMime { atopic.`topic_id`, atopic.`topic_name`, atopic.`has_topic_image`, atopic.`active_topic`, astatus.`status_id`, astatus.`status_name`, lch.`hits`, - atype.*, lc.*, la.`attachment_id` AS `primary_attachment_id`, lf.storage_path AS `image_attachment_path` $selectSql + atype.*, lc.*, la.`attachment_id` AS `primary_attachment_id`, lf.`file_name` AS `image_attachment_path` $selectSql FROM `".BIT_DB_PREFIX."articles` a INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON( lc.`content_id` = a.`content_id` ) INNER JOIN `".BIT_DB_PREFIX."article_status` astatus ON( astatus.`status_id` = a.`status_id` ) diff --git a/BitArticleTopic.php b/BitArticleTopic.php index 7cf6b6d..0860419 100644 --- a/BitArticleTopic.php +++ b/BitArticleTopic.php @@ -176,7 +176,7 @@ class BitArticleTopic extends BitBase { if( @BitBase::verifyId( $pTopicId )) { $ret = liberty_fetch_thumbnail_url( array( - 'storage_path' => BitArticleTopic::getTopicImageBaseUrl( $pTopicId ), + 'source_file' => BitArticleTopic::getTopicImageBaseUrl( $pTopicId ), 'default_image' => $gBitSystem->getConfig( 'articles_image_size', 'small' ) )); } |
