aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--inc/poche/Poche.class.php16
-rw-r--r--tpl/view.twig2
2 files changed, 9 insertions, 9 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 5dab10df..8b24e5cd 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -249,20 +249,21 @@ class Poche
249 $content = $tidy->value; 249 $content = $tidy->value;
250 250
251 // flattr checking 251 // flattr checking
252 $flattr = new FlattrItem(); 252 $flattr = new FlattrItem();
253 $flattr->checkitem($entry['url']); 253 $flattr->checkitem($entry['url']);
254 254
255 $tpl_vars = array( 255 $tpl_vars = array(
256 'entry' => $entry, 256 'entry' => $entry,
257 'content' => $content, 257 'content' => $content,
258 'flattr' => $flattr, 258 'flattr' => $flattr
259 ); 259 );
260 }
260 } 261 }
261 else { 262 else {
262 Tools::logm('error in view call : entry is null'); 263 Tools::logm('error in view call : entry is null');
263 } 264 }
264 break; 265 break;
265 default: # home, favorites and archive views 266 default : // home, favorites and archive views
266 $entries = $this->store->getEntriesByView($view, $this->user->getId()); 267 $entries = $this->store->getEntriesByView($view, $this->user->getId());
267 $tpl_vars = array( 268 $tpl_vars = array(
268 'entries' => '', 269 'entries' => '',
@@ -577,7 +578,6 @@ class FlattrItem{
577 public function checkitem($urltoflattr){ 578 public function checkitem($urltoflattr){
578 $this->cacheflattrfile($urltoflattr); 579 $this->cacheflattrfile($urltoflattr);
579 $flattrResponse = file_get_contents("cache/flattr/".base64_encode($urltoflattr).".cache"); 580 $flattrResponse = file_get_contents("cache/flattr/".base64_encode($urltoflattr).".cache");
580 var_dump($flattrResponse);
581 if($flattrResponse != FALSE){ 581 if($flattrResponse != FALSE){
582 $result = json_decode($flattrResponse); 582 $result = json_decode($flattrResponse);
583 if (isset($result->message)){ 583 if (isset($result->message)){
@@ -588,7 +588,7 @@ class FlattrItem{
588 elseif ($result->link) { 588 elseif ($result->link) {
589 $this->status = "flattred"; 589 $this->status = "flattred";
590 $this->flattrItemURL = $result->link; 590 $this->flattrItemURL = $result->link;
591 $this->numflattrs = $result->flattrs_user_count; 591 $this->numflattrs = $result->flattrs;
592 } 592 }
593 else{ 593 else{
594 $this->status = "not flattrable"; 594 $this->status = "not flattrable";
diff --git a/tpl/view.twig b/tpl/view.twig
index 7b15c7c7..c101db0a 100644
--- a/tpl/view.twig
+++ b/tpl/view.twig
@@ -31,7 +31,7 @@
31 {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %} 31 {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %}
32 {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %} 32 {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %}
33 {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} 33 {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
34 <li>{% if flattr.status == "flattrable" %} This thing is flattrable !{% elseif flattr.status == "flattred" %} <a href="{{ flattr.flattrItemURL }}" >This thing has already been flattred by {{ flattr.numflattrs }} users and can be flattred !</a>{% else %}This article cannot be flattred{% endif %}</li> 34 <li>{% if flattr.status == "flattrable" %} This thing is flattrable !{% elseif flattr.status == "flattred" %} <a href="{{ flattr.flattrItemURL }}" >This thing has already been flattred {{ flattr.numflattrs }} times and can be flattred !</a>{% else %}This article cannot be flattred{% endif %}</li>
35 </ul> 35 </ul>
36 <p>{% trans "this article appears wrong?" %} <a href="https://github.com/inthepoche/poche/issues/new">{% trans "create an issue" %}</a> {% trans "or" %} <a href="mailto:support@inthepoche.com?subject=Wrong%20display%20in%20poche&amp;body={{ entry.url|url_encode }}">{% trans "contact us by mail" %}</a></p> 36 <p>{% trans "this article appears wrong?" %} <a href="https://github.com/inthepoche/poche/issues/new">{% trans "create an issue" %}</a> {% trans "or" %} <a href="mailto:support@inthepoche.com?subject=Wrong%20display%20in%20poche&amp;body={{ entry.url|url_encode }}">{% trans "contact us by mail" %}</a></p>
37 </div> 37 </div>