[geeklog-cvs] geeklog-1.3/system lib-database.php,1.31,1.32 lib-plugins.php,1.33,1.34

tony at iowaoutdoors.org tony at iowaoutdoors.org
Fri Sep 3 15:59:58 EDT 2004


Update of /var/cvs/geeklog-1.3/system
In directory www:/tmp/cvs-serv3542/system

Modified Files:
	lib-database.php lib-plugins.php 
Log Message:
Spamx is officially part of Geeklog.  All should work fine minus the upgrade file...I'm still missing some key data that I will add yet this weekend


Index: lib-database.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-database.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** lib-database.php	9 Aug 2004 07:56:22 -0000	1.31
--- lib-database.php	3 Sep 2004 19:59:56 -0000	1.32
***************
*** 90,93 ****
--- 90,96 ----
  $_TABLES['staticpage']          = $_DB_table_prefix . 'staticpage';
  
+ // ditto for spamx
+ $_TABLES['spamx']				= $_DB_table_prefix . 'spamx';
+ 
  // these tables aren't used by Geeklog any more, but the table names are needed
  // when upgrading from old versions

Index: lib-plugins.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-plugins.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** lib-plugins.php	29 Aug 2004 04:23:05 -0000	1.33
--- lib-plugins.php	3 Sep 2004 19:59:56 -0000	1.34
***************
*** 231,234 ****
--- 231,267 ----
  }
  
+ /**
+ * Allows plugins a chance to handle a comment before GL does.  
+ 
+ * This is a first-come-first-serve affair so if a plugin returns an error, other
+ * plugins wishing to handle comment preprocessing won't get called
+ *
+ * @author Tony Bibbs <tony at geeklog.net>
+ * @access public
+ * @param integer $uid User ID
+ * @param string $title Comment title
+ * @param string $sid Story ID (not always a story, remember!)
+ * @param integer $pid Parent comment ID
+ * @param string $type Type of comment
+ * @param string $postmode HTML or text
+ * @return an error otherwise false if no errors were encountered
+ *
+ */
+ function PLG_commentPreSave($uid, $title, $comment, $sid, $pid, $type, $postmode)
+ {
+ 	global $_PLUGINS;
+ 
+     foreach ($_PLUGINS as $pi_name) {
+         $function = 'plugin_commentPreSave_' . $pi_name;
+         if (function_exists($function)) {
+             $someError = $function($uid, $title, $comment, $sid, $pid, $type, $postmode);
+             if ($someError) {
+             	// Plugin doesn't want to save the comment
+             	return $someError;
+             }
+         }
+     }
+     return false;
+ }
  
  /**




More information about the geeklog-cvs mailing list