Fixed issue #56.
This commit is contained in:
parent
0af47672c5
commit
cec5bb7b82
@ -94,7 +94,7 @@ class PostHelper extends Rails\ActionView\Helper
|
|||||||
$ddl_class .= ($post->width > 1500 || $post->height > 1500)? " largeimg":" smallimg";
|
$ddl_class .= ($post->width > 1500 || $post->height > 1500)? " largeimg":" smallimg";
|
||||||
|
|
||||||
if (!empty($options['similarity'])) {
|
if (!empty($options['similarity'])) {
|
||||||
$icon = '<img src="'.$post->service_icon().'" alt="'.$post->service.'" class="service-icon" id="source">';
|
$icon = '<img src="'.$post->service_icon().'" alt="'.$post->service().'" class="service-icon" id="source">';
|
||||||
$ddl_class .= " similar similar-directlink";
|
$ddl_class .= " similar similar-directlink";
|
||||||
is_numeric($options['similarity']) && $options['similarity'] >= 90 && $li_class .= " similar-match";
|
is_numeric($options['similarity']) && $options['similarity'] >= 90 && $li_class .= " similar-match";
|
||||||
is_string($options['similarity']) && $options['similarity'] == 'Original' && $li_class .= " similar-original";
|
is_string($options['similarity']) && $options['similarity'] == 'Original' && $li_class .= " similar-original";
|
||||||
|
@ -223,6 +223,11 @@ class Post extends Rails\ActiveRecord\Base
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function service()
|
||||||
|
{
|
||||||
|
return CONFIG()->local_image_service;
|
||||||
|
}
|
||||||
|
|
||||||
public function service_icon()
|
public function service_icon()
|
||||||
{
|
{
|
||||||
return "/favicon.ico";
|
return "/favicon.ico";
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
class ExternalPost
|
class ExternalPost
|
||||||
{
|
{
|
||||||
# These mimic the equivalent attributes in Post directly.
|
# These mimic the equivalent attributes in Post directly.
|
||||||
public $md5, $url, $preview_url, $sample_url, $service, $width, $height, $tags, $rating, $id, $similarity, $parent_id, $has_children;
|
public $md5, $url, $preview_url, $sample_url, $width, $height, $tags, $rating, $id, $similarity, $parent_id, $has_children;
|
||||||
|
|
||||||
public $author, $created_at, $creator_id, $file_size, $file_url, $score, $source, $original_preview_url;
|
public $author, $created_at, $creator_id, $file_size, $file_url, $score, $source, $original_preview_url;
|
||||||
|
|
||||||
@ -103,4 +103,8 @@ class ExternalPost
|
|||||||
{
|
{
|
||||||
return $this->url;
|
return $this->url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function service()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user