From 8cb6e685f1f79d72d32a9c67f2568d91aa2435c9 Mon Sep 17 00:00:00 2001
From: godog <godog@incal.net>
Date: Wed, 29 Dec 2010 22:19:49 +0100
Subject: [PATCH] Import flattr 0.9.19

---
 wp-content/plugins/flattr/flattr.php  | 2 +-
 wp-content/plugins/flattr/flattr5.php | 9 ++++++---
 wp-content/plugins/flattr/readme.txt  | 3 +++
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/wp-content/plugins/flattr/flattr.php b/wp-content/plugins/flattr/flattr.php
index 575d47359..8d60a9772 100644
--- a/wp-content/plugins/flattr/flattr.php
+++ b/wp-content/plugins/flattr/flattr.php
@@ -3,7 +3,7 @@
 Plugin Name: Flattr
 Plugin URI: http://wordpress.org/extend/plugins/flattr/
 Description: Give your readers the opportunity to Flattr your effort
-Version: 0.9.18
+Version: 0.9.19
 Author: Flattr.com
 Author URI: http://flattr.com/
 License: This code is (un)licensed under the kopimi (copyme) non-license; http://www.kopimi.com. In other words you are free to copy it, taunt it, share it, fork it or whatever. :)
diff --git a/wp-content/plugins/flattr/flattr5.php b/wp-content/plugins/flattr/flattr5.php
index 15600a10b..5c5dedf2a 100644
--- a/wp-content/plugins/flattr/flattr5.php
+++ b/wp-content/plugins/flattr/flattr5.php
@@ -2,7 +2,7 @@
 
 class Flattr
 {
-	const VERSION = '0.9.18';
+	const VERSION = '0.9.19';
 	const WP_MIN_VER = '2.9';
 	const API_SCRIPT  = 'api.flattr.com/js/0.6/load.js?mode=auto';
 
@@ -307,8 +307,11 @@ class Flattr
 		else {
 			$result = $content . $button;
 		}
-
-		return $result;
+		if ( ! post_password_required($post->ID) )
+		{
+			return $result;
+		}
+		return $content;
 	}	
 }
 
diff --git a/wp-content/plugins/flattr/readme.txt b/wp-content/plugins/flattr/readme.txt
index 1b59ead1e..5f9aff6ae 100644
--- a/wp-content/plugins/flattr/readme.txt
+++ b/wp-content/plugins/flattr/readme.txt
@@ -35,6 +35,9 @@ Note that we only support PHP 5 and WordPress 2.9 or above.
 
 == Changelog ==
 
+= 0.9.19 =
+Dont show Flattr button on password protected posts until the password has been accepted.
+
 = 0.9.18 =
 Will now use version 0.6 of the JS API.
 Will load the JS API using https only if the blog itself is using https. This should make the button load a bit faster for most of you.
-- 
GitLab