[geeklog-cvs] geeklog-1.3/plugins/staticpages functions.inc,1.34,1.35

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Sun Jul 11 14:18:08 EDT 2004


Update of /var/cvs/geeklog-1.3/plugins/staticpages
In directory www:/tmp/cvs-serv20735/plugins/staticpages

Modified Files:
	functions.inc 
Log Message:
Fixed the plugin search (Hi Vinny) and added $keyType as an additional parameter to the plugins search function.


Index: functions.inc
===================================================================
RCS file: /var/cvs/geeklog-1.3/plugins/staticpages/functions.inc,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** functions.inc	22 Feb 2004 17:23:20 -0000	1.34
--- functions.inc	11 Jul 2004 18:18:06 -0000	1.35
***************
*** 95,99 ****
  * 'site statistics box' otherwise we show the detailed stats
  *
! * @showsitestate        int         Flag to let us know which stats to get
  */
  function plugin_showstats_staticpages($showsitestats) 
--- 95,99 ----
  * 'site statistics box' otherwise we show the detailed stats
  *
! * @param    int     showsitestate   Flag to let us know which stats to get
  */
  function plugin_showstats_staticpages($showsitestats) 
***************
*** 163,178 ****
  * printed 
  *
! * @query            string          Keywords user is looking for
! * @datestart        date/time       Start date to get results for
! * @dateend          date/time       End date to get results for
! * @topic            string          The topic they were searching in
! * @type             string          Type of items they are searching
! * @author           string          Get all results by this author
  *
  * Oct 05/2002: Blaine Lang, Corrected bug with SQL Search string. 
  */
! function plugin_dopluginsearch_staticpages($query, $datestart, $dateend, $topic, $type, $author) 
  {
!     global $_CONF, $_TABLES, $LANG_STATIC, $HTTP_GET_VARS, $HTTP_POST_VARS;
  
      if (empty($type)) {
--- 163,179 ----
  * printed 
  *
! * @param    string  $query      Keywords user is looking for
! * @param    date    $datestart  Start date to get results for
! * @param    date    $dateend    End date to get results for
! * @param    string  $topic      The topic they were searching in
! * @param    string  $type       Type of items they are searching, or 'all'
! * @param    int     $author     Get all results by this author
! * @param    string  $keyType    search key type: 'all', 'phrase', 'any'
  *
  * Oct 05/2002: Blaine Lang, Corrected bug with SQL Search string. 
  */
! function plugin_dopluginsearch_staticpages($query, $datestart, $dateend, $topic, $type, $author, $keyType) 
  {
!     global $_CONF, $_TABLES, $LANG_STATIC;
  
      if (empty($type)) {
***************
*** 180,190 ****
      }
  
-     $keyType = '';
-     if (isset ($HTTP_POST_VARS['keyType'])) {
-         $keyType = COM_applyFilter ($HTTP_POST_VARS['keyType']);
-     } else if (isset ($HTTP_GET_VARS['keyType'])) {
-         $keyType = COM_applyFilter ($HTTP_GET_VARS['keyType']);
-     }
- 
      // Bail if we aren't supppose to do our search
      if ($type <> 'all' AND $type <> 'staticpages') {
--- 181,184 ----
***************
*** 195,201 ****
      }
  
!     // Build search SQL - Modified to exclude static PHP pages from search.
!     $query = addslashes ($query);
!     $sql = "SELECT *,UNIX_TIMESTAMP(sp_date) as day FROM " . $_TABLES['staticpage'] . " WHERE (sp_php != '1')";
  
      if (!empty ($query)) {
--- 189,194 ----
      }
  
!     // Build search SQL - exclude static PHP pages from search.
!     $sql = "SELECT *,UNIX_TIMESTAMP(sp_date) AS day FROM " . $_TABLES['staticpage'] . " WHERE (sp_php != 1)";
  
      if (!empty ($query)) {
***************
*** 255,259 ****
  
      // OK, now return coma delmited string of table header labels
-     require_once($_CONF['path_system'] . 'classes/plugin.class.php');
      $plugin_results = new Plugin();
      $plugin_results->plugin_name = 'staticpages';
--- 248,251 ----
***************
*** 341,349 ****
  * This will work with the standard GL tables
  *
! * @table	str	Table name (used in joins)
! * @access	int	Access if blank read access  2 = read 3 = read/edit
! * @u_id int     User ID if blank current user
! *
! * @return string	Where clause of sql statement
  *
  */
--- 333,340 ----
  * This will work with the standard GL tables
  *
! * @param    string  $table  Table name (used in joins)
! * @param    int     $access Access if blank read access  2 = read 3 = read/edit
! * @param    int     $u_id   User ID if blank current user
! * @return   string          Where clause of sql statement
  *
  */
***************
*** 410,414 ****
      // So, if asked to display pages for the top of the page, check if we
      // have pages to be displayed after the featured story and if there is
!     // no features story, display those pages as well.
      if ($where == 1) {
          if (DB_count ($_TABLES['stories'], 'featured', 1) == 0) {
--- 401,405 ----
      // So, if asked to display pages for the top of the page, check if we
      // have pages to be displayed after the featured story and if there is
!     // no featured story, display those pages as well.
      if ($where == 1) {
          if (DB_count ($_TABLES['stories'], 'featured', 1) == 0) {
***************
*** 533,537 ****
          $rootgroup = DB_getItem ($_TABLES['groups'], 'grp_id',
                                   "grp_name = 'Root'");
!         $result = DB_query ("SELECT DISTINCT ug_uid FROM {$_TABLES['group_assignments']} WHERE ug_main_grp_id = $rootgroup ORDER BY ug_uid");
          $A = DB_fetchArray ($result);
          $rootuser = $A['ug_uid'];
--- 524,528 ----
          $rootgroup = DB_getItem ($_TABLES['groups'], 'grp_id',
                                   "grp_name = 'Root'");
!         $result = DB_query ("SELECT DISTINCT ug_uid FROM {$_TABLES['group_assignments']} WHERE ug_main_grp_id = $rootgroup ORDER BY ug_uid LIMIT 1");
          $A = DB_fetchArray ($result);
          $rootuser = $A['ug_uid'];




More information about the geeklog-cvs mailing list