[geeklog-cvs] geeklog-1.3/system lib-plugins.php,1.16,1.17

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Fri May 2 00:05:37 EDT 2003


Update of /usr/cvs/geeklog/geeklog-1.3/system
In directory internal.geeklog.net:/tmp/cvs-serv17689

Modified Files:
	lib-plugins.php 
Log Message:
Added some logic for supporting expanded searches.

Index: lib-plugins.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-plugins.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** lib-plugins.php	23 Feb 2003 20:45:09 -0000	1.16
--- lib-plugins.php	2 May 2003 04:05:35 -0000	1.17
***************
*** 307,310 ****
--- 307,333 ----
  
  /**
+ * Determines if s specific plugin supports Geeklog's
+ * expanded search results feature
+ *
+ * @author Tony Bibbs <tony AT geeklog DOT net>
+ * @access public
+ * @param string $type Plugin name
+ * @return boolean True if it is supported, otherwise false
+ *
+ */
+ function PLG_supportsExpandedSearch($type)
+ {
+     $retval = '';
+     $function = 'plugin_supportsexpandedsearch_' . $type;
+     if (function_exists($function)) {
+         $retval = $function();
+     }
+     if (empty($retval) OR !is_bool($retval)) {
+         $retval = false;
+     }
+     return $retval;
+ }
+ 
+ /**
  * This function gives each plugin the opportunity to do their search
  * and return their results.  Results comeback in an array of HTML 
***************
*** 327,331 ****
      require_once($_CONF['path_system'] . 'classes/plugin.class.php');
      $cur_plugin = new Plugin();
- 
  	$result = DB_query("SELECT pi_name FROM {$_TABLES['plugins']} WHERE pi_enabled = 1");
  	$nrows = DB_numRows($result);
--- 350,353 ----
***************
*** 334,337 ****
--- 356,360 ----
  	for ($i = 1; $i <= $nrows; $i++) {
  		$A = DB_fetchArray($result);
+ 		$cur_plugin->setExpandedSearchSupport(PLG_supportsExpandedSearch($A['pi_name']));
  		$function = 'plugin_dopluginsearch_' . $A['pi_name'];
  		if (function_exists($function)) {





More information about the geeklog-cvs mailing list