Explorar o código

add HashCash plugin

Ralf S. Engelschall %!s(int64=17) %!d(string=hai) anos
pai
achega
b54ab7670a
Modificáronse 2 ficheiros con 28 adicións e 4 borrados
  1. 16 3
      wordpress/wordpress.patch
  2. 12 1
      wordpress/wordpress.spec

+ 16 - 3
wordpress/wordpress.patch

@@ -1,6 +1,6 @@
 Index: wordpress/wp-includes/canonical.php
 --- wordpress/wp-includes/canonical.php.orig	2008-02-24 03:09:24 +0100
-+++ wordpress/wp-includes/canonical.php	2008-03-29 22:17:27 +0100
++++ wordpress/wp-includes/canonical.php	2008-04-05 17:21:55 +0200
 @@ -139,6 +139,12 @@
  	$user_home = @parse_url(get_option('home'));
  	$redirect['host'] = $user_home['host'];
@@ -16,7 +16,7 @@ Index: wordpress/wp-includes/canonical.php
  		$redirect['port'] = $user_home['port'];
 Index: wordpress/wp-login.php
 --- wordpress/wp-login.php.orig	2008-03-26 08:43:52 +0100
-+++ wordpress/wp-login.php	2008-03-29 22:18:53 +0100
++++ wordpress/wp-login.php	2008-04-05 17:21:55 +0200
 @@ -99,7 +99,7 @@
  		$wpdb->query("UPDATE $wpdb->users SET user_activation_key = '$key' WHERE user_login = '$user_login'");
  	}
@@ -37,7 +37,7 @@ Index: wordpress/wp-login.php
  		die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
 Index: wordpress/wp-mail.php
 --- wordpress/wp-mail.php.orig	2007-12-29 20:38:33 +0100
-+++ wordpress/wp-mail.php	2008-03-29 22:20:39 +0100
++++ wordpress/wp-mail.php	2008-04-05 17:21:55 +0200
 @@ -133,6 +133,7 @@
  		// Author not found in DB, set status to pending.  Author already set to admin.
  		$post_status = 'pending';
@@ -46,3 +46,16 @@ Index: wordpress/wp-mail.php
  
  	$subject = trim($subject);
  
+Index: wp-hashcash/wp-hashcash.php
+--- wp-hashcash/wp-hashcash.php.orig	2008-03-29 20:07:10 +0100
++++ wp-hashcash/wp-hashcash.php	2008-04-05 17:23:06 +0200
+@@ -448,8 +448,7 @@
+ 	}
+ 	
+ 	echo '<input type="hidden" id="wphc_value" name="wphc_value" value=""/>';
+-	echo '<p>' . __('Powered by', 'wp-hashcash') . ' <a href="http://wordpress-plugins.feifei.us/hashcash/">WP Hashcash</a></p>';
+-	echo '<noscript><small>Wordpress Hashcash needs javascript to work, but your browser has javascript disabled. Your comment will be '.$verb.'!</small></noscript>';
++	echo '<noscript><small>Wordpress Hashcash needs JavaScript to work, but your browser has JavaScript disabled. Your comment will be '.$verb.'!</small></noscript>';
+ }
+ 
+ add_action('comment_form', 'wphc_addform');

+ 12 - 1
wordpress/wordpress.spec

@@ -33,6 +33,7 @@
 %define       V_plugin_ela           0.10
 %define       V_plugin_stats         1.2
 %define       V_plugin_peterantispam 3.0.3
+%define       V_plugin_hashcash      4.1
 
 #   package information
 Name:         wordpress
@@ -63,6 +64,7 @@ Source16:     http://lesterchan.net/others/downloads/wp-ban%{V_plugin_ban}.zip
 Source17:     http://www.sonsofskadi.net/wp-content/upload/af-extended-live-archive-%{V_plugin_ela}.zip
 Source18:     http://downloads.wordpress.org/plugin/stats.%{V_plugin_stats}.zip
 Source19:     http://www.theblog.ca/wp-content/uploads/2008/04/peterantispam%{V_plugin_peterantispam}.zip
+Source20:     http://downloads.wordpress.org/plugin/wp-hashcash.%{V_plugin_hashcash}.zip
 Patch0:       wordpress.patch
 Patch1:       wordpress.patch.ela
 
@@ -148,6 +150,11 @@ AutoReqProv:  no
         url       = http://www.theblog.ca/anti-spam
         regex     = peterantispam(__VER__)\.zip
     }
+    prog wordpress:plugin-hashcash = {
+        version   = %{V_plugin_hashcash}
+        url       = http://wordpress-plugins.feifei.us/hashcash/
+        regex     = wp-hashcash\.(__VER__)\.zip
+    }
 
 %prep
     %setup -q -c
@@ -161,6 +168,7 @@ AutoReqProv:  no
     %{l_prefix}/bin/unzip -q -o -x %{SOURCE17}
     %{l_prefix}/bin/unzip -q -o -x %{SOURCE18}
     %{l_prefix}/bin/unzip -q -o -x %{SOURCE19}
+    %{l_prefix}/bin/unzip -q -o -x %{SOURCE20}
     %patch -p0
     %patch -p0 -d af-extended-live-archive -P 1
     rm -f af-extended-live-archive/*.orig
@@ -203,7 +211,8 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/libexec/wordpress/wp-content/plugins/ban \
         $RPM_BUILD_ROOT%{l_prefix}/libexec/wordpress/wp-content/plugins/af-extended-live-archive \
         $RPM_BUILD_ROOT%{l_prefix}/libexec/wordpress/wp-content/plugins/stats \
-        $RPM_BUILD_ROOT%{l_prefix}/libexec/wordpress/wp-content/plugins/custom-anti-spam
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/wordpress/wp-content/plugins/custom-anti-spam \
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/wordpress/wp-content/plugins/hashcash
     cp -rp dbmanager/* \
         $RPM_BUILD_ROOT%{l_prefix}/libexec/wordpress/wp-content/plugins/dbmanager/
     cp -rp pagenavi/pagenavi* \
@@ -224,6 +233,8 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/libexec/wordpress/wp-content/plugins/stats/
     cp -rp custom-anti-spam/* \
         $RPM_BUILD_ROOT%{l_prefix}/libexec/wordpress/wp-content/plugins/custom-anti-spam/
+    cp -rp wp-hashcash/* \
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/wordpress/wp-content/plugins/hashcash/
 
     #   create additional uploads directory
     %{l_shtool} mkdir -f -p -m 755 \