packages: wpmu-plugin-global-search/wpmu-plugin-global-search.spec, wpmu-pl...
glen
glen at pld-linux.org
Wed May 19 16:16:33 CEST 2010
Author: glen Date: Wed May 19 14:16:33 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- add post cutoff patch
---- Files affected:
packages/wpmu-plugin-global-search:
wpmu-plugin-global-search.spec (1.5 -> 1.6) , limit_post_len.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.5 packages/wpmu-plugin-global-search/wpmu-plugin-global-search.spec:1.6
--- packages/wpmu-plugin-global-search/wpmu-plugin-global-search.spec:1.5 Wed May 19 14:59:38 2010
+++ packages/wpmu-plugin-global-search/wpmu-plugin-global-search.spec Wed May 19 16:16:27 2010
@@ -3,13 +3,14 @@
Summary: WordPressMU Global Search
Name: wpmu-plugin-%{plugin}
Version: 1.1
-Release: 0.5
+Release: 0.6
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
+Patch2: limit_post_len.patch
URL: http://wordpress.org/extend/plugins/wpmu-global-search/
BuildRequires: rpmbuild(macros) >= 1.553
BuildRequires: sed >= 4.0
@@ -34,6 +35,7 @@
%undos readme.txt
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%install
rm -rf $RPM_BUILD_ROOT
@@ -58,6 +60,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.6 2010/05/19 14:16:27 glen
+- add post cutoff patch
+
Revision 1.5 2010/05/19 12:59:38 glen
- add results limit patch
================================================================
Index: packages/wpmu-plugin-global-search/limit_post_len.patch
diff -u /dev/null packages/wpmu-plugin-global-search/limit_post_len.patch:1.1
--- /dev/null Wed May 19 16:16:33 2010
+++ packages/wpmu-plugin-global-search/limit_post_len.patch Wed May 19 16:16:27 2010
@@ -0,0 +1,34 @@
+--- wpmu-global-search/includes/functions.php~ 2010-05-19 15:57:49.000000000 +0300
++++ wpmu-global-search/includes/functions.php 2010-05-19 17:11:33.980063897 +0300
+@@ -28,8 +28,11 @@
+ return apply_filters( 'get_search_query', stripslashes( get_query_var( 'uws' ) ) );
+ }
+
+-function wpmu_globalsearch_get_the_content($s) {
++function wpmu_globalsearch_get_the_content($s, $cutoff = 0) {
+ $content = $s->post_content;
++ if ($cutoff) {
++ $content = mb_substr($content, 0, $cutoff). '...';
++ }
+ apply_filters('the_content', $content);
+
+ $output = '';
+--- wpmu-global-search/wpmu-global-search.php~ 2010-05-19 15:57:49.000000000 +0300
++++ wpmu-global-search/wpmu-global-search.php 2010-05-19 17:13:30.866699686 +0300
+@@ -142,6 +142,7 @@
+
+ $options = get_option('widget_wp_wpmu_globalsearch');
+ $results_limit = empty($options['results_limit']) ? 2 : $options['results_limit'];
++ $cutoff = empty($options['results_cutoff']) ? 500 : $options['results_cutoff'];
+
+ if(!empty($wp_query->query_vars['uws'])) {
+ $term = $wp_query->query_vars['uws'];
+@@ -174,7 +175,7 @@
+ </div>
+
+ <div class="entry">
+- <?php echo wpmu_globalsearch_get_the_content($s); ?>
++ <?php echo wpmu_globalsearch_get_the_content($s, $cutoff); ?>
+ </div>
+
+ <div class="postmetadatasearch">
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/wpmu-plugin-global-search/wpmu-plugin-global-search.spec?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list