packages: wpmu-plugin-global-search/wpmu-plugin-global-search.spec, wpmu-pl...
glen
glen at pld-linux.org
Wed May 19 14:59:43 CEST 2010
Author: glen Date: Wed May 19 12:59:43 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- add results limit patch
---- Files affected:
packages/wpmu-plugin-global-search:
wpmu-plugin-global-search.spec (1.4 -> 1.5) , results_limit.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/wpmu-plugin-global-search/wpmu-plugin-global-search.spec
diff -u packages/wpmu-plugin-global-search/wpmu-plugin-global-search.spec:1.4 packages/wpmu-plugin-global-search/wpmu-plugin-global-search.spec:1.5
--- packages/wpmu-plugin-global-search/wpmu-plugin-global-search.spec:1.4 Wed May 19 14:32:05 2010
+++ packages/wpmu-plugin-global-search/wpmu-plugin-global-search.spec Wed May 19 14:59:38 2010
@@ -3,12 +3,13 @@
Summary: WordPressMU Global Search
Name: wpmu-plugin-%{plugin}
Version: 1.1
-Release: 0.3
+Release: 0.5
License: GPL v2+
Group: Applications/Publishing
Source0: http://downloads.wordpress.org/plugin/wpmu-global-search.zip
# Source0-md5: 6132d081987834cc72412a7c92ba6853
Patch0: localize.patch
+Patch1: results_limit.patch
URL: http://wordpress.org/extend/plugins/wpmu-global-search/
BuildRequires: rpmbuild(macros) >= 1.553
BuildRequires: sed >= 4.0
@@ -32,6 +33,7 @@
%setup -qn wpmu-%{plugin}
%undos readme.txt
%patch0 -p1
+%patch1 -p1
%install
rm -rf $RPM_BUILD_ROOT
@@ -56,6 +58,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.5 2010/05/19 12:59:38 glen
+- add results limit patch
+
Revision 1.4 2010/05/19 12:32:05 glen
- use translation not hardcode spanish
================================================================
Index: packages/wpmu-plugin-global-search/results_limit.patch
diff -u /dev/null packages/wpmu-plugin-global-search/results_limit.patch:1.1
--- /dev/null Wed May 19 14:59:43 2010
+++ packages/wpmu-plugin-global-search/results_limit.patch Wed May 19 14:59:38 2010
@@ -0,0 +1,33 @@
+--- wpmu-global-search/wpmu-global-search.php~ 2010-05-19 15:27:07.000000000 +0300
++++ wpmu-global-search/wpmu-global-search.php 2010-05-19 15:46:00.683911267 +0300
+@@ -140,6 +140,9 @@
+ function wpmu_globalsearch_page() {
+ global $wp_query, $wpdb;
+
++ $options = get_option('widget_wp_wpmu_globalsearch');
++ $results_limit = empty($options['results_limit']) ? 2 : $options['results_limit'];
++
+ if(!empty($wp_query->query_vars['uws'])) {
+ $term = $wp_query->query_vars['uws'];
+ $request = "SELECT {$wpdb->base_prefix}v_posts.* from {$wpdb->base_prefix}v_posts left join {$wpdb->base_prefix}users on {$wpdb->base_prefix}users.ID={$wpdb->base_prefix}v_posts.post_author ".
+@@ -157,9 +160,10 @@
+ $author = get_userdata($s->post_author);
+ if($blogid != $s->blog_id) {
+ $blogid = $s->blog_id;
++ $count = 0;
+ echo "<h2 class='searchblog'>". get_blog_option($blogid, 'blogname') ."</h2>";
+ }?>
+-
++ <?php if ($count < $results_limit) { ?>
+ <div <?php post_class() ?>>
+ <h2 id="post-<?php echo $s->ID.$s->blog_id; ?>" class="searchtitle"><a href="<?php echo get_blog_permalink( $s->blog_id, $s->ID ); ?>" rel="bookmark" title="Permanent Link to <?php echo $s->post_title ?>"><?php echo $s->post_title ?></a></h2>
+ <small class="date"><?php echo date('j/m/y, G:i' ,strtotime($s->post_date)); ?></small>
+@@ -180,6 +184,8 @@
+ </div>
+ </div>
+ <?php
++ $count++;
++ }
+ }
+ }
+ } else {
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/wpmu-plugin-global-search/wpmu-plugin-global-search.spec?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list