[Hastymail-cvs] SF.net SVN: hastymail:[707] trunk/hastymail2/plugins
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2009-01-12 14:54:32
|
Revision: 707 http://hastymail.svn.sourceforge.net/hastymail/?rev=707&view=rev Author: sailfrog Date: 2009-01-12 14:54:27 +0000 (Mon, 12 Jan 2009) Log Message: ----------- made the logging plugin work with mysql/postgres. Corrected the name of the postgres calendar table definition file Modified Paths: -------------- trunk/hastymail2/plugins/logger/settings.php trunk/hastymail2/plugins/logger/work.php Added Paths: ----------- trunk/hastymail2/plugins/calendar/calendar.pgsql.sql trunk/hastymail2/plugins/logger/log.mysql.sql trunk/hastymail2/plugins/logger/log.pgsql.sql Removed Paths: ------------- trunk/hastymail2/plugins/calendar/calendar.psql.sql trunk/hastymail2/plugins/logger/table.sql Copied: trunk/hastymail2/plugins/calendar/calendar.pgsql.sql (from rev 706, trunk/hastymail2/plugins/calendar/calendar.psql.sql) =================================================================== --- trunk/hastymail2/plugins/calendar/calendar.pgsql.sql (rev 0) +++ trunk/hastymail2/plugins/calendar/calendar.pgsql.sql 2009-01-12 14:54:27 UTC (rev 707) @@ -0,0 +1,10 @@ +DROP TABLE calendar; +CREATE TABLE calendar ( + id serial, + username varchar(250), + datetime timestamp, + duration float, + title varchar(250), + description text, + repeat_val int +) Deleted: trunk/hastymail2/plugins/calendar/calendar.psql.sql =================================================================== --- trunk/hastymail2/plugins/calendar/calendar.psql.sql 2009-01-12 05:35:24 UTC (rev 706) +++ trunk/hastymail2/plugins/calendar/calendar.psql.sql 2009-01-12 14:54:27 UTC (rev 707) @@ -1,10 +0,0 @@ -DROP TABLE calendar; -CREATE TABLE calendar ( - id serial, - username varchar(250), - datetime timestamp, - duration float, - title varchar(250), - description text, - repeat_val int -) Added: trunk/hastymail2/plugins/logger/log.mysql.sql =================================================================== --- trunk/hastymail2/plugins/logger/log.mysql.sql (rev 0) +++ trunk/hastymail2/plugins/logger/log.mysql.sql 2009-01-12 14:54:27 UTC (rev 707) @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS event_log; +CREATE TABLE event_log ( + id int(11) NOT NULL auto_increment, + ts date NOT NULL, + username varchar(250) default NULL, + server_name varchar(250) default NULL, + server_port varchar(250) default NULL, + remote_address varchar(250) default NULL, + remote_port varchar(250) default NULL, + query_string varchar(250) default NULL, + php_self varchar(250) default NULL, + referer varchar(250) default NULL, + user_agent varchar(250) default NULL, + PRIMARY KEY (`id`), + KEY ts (ts) +) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; Property changes on: trunk/hastymail2/plugins/logger/log.mysql.sql ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/hastymail2/plugins/logger/log.pgsql.sql =================================================================== --- trunk/hastymail2/plugins/logger/log.pgsql.sql (rev 0) +++ trunk/hastymail2/plugins/logger/log.pgsql.sql 2009-01-12 14:54:27 UTC (rev 707) @@ -0,0 +1,13 @@ +CREATE TABLE event_log ( + id serial, + ts date NOT NULL, + username varchar(250) default NULL, + server_name varchar(250) default NULL, + server_port varchar(250) default NULL, + remote_address varchar(250) default NULL, + remote_port varchar(250) default NULL, + query_string varchar(250) default NULL, + php_self varchar(250) default NULL, + referer varchar(250) default NULL, + user_agent varchar(250) default NULL +) Property changes on: trunk/hastymail2/plugins/logger/log.pgsql.sql ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: trunk/hastymail2/plugins/logger/settings.php =================================================================== --- trunk/hastymail2/plugins/logger/settings.php 2009-01-12 05:35:24 UTC (rev 706) +++ trunk/hastymail2/plugins/logger/settings.php 2009-01-12 14:54:27 UTC (rev 707) @@ -57,7 +57,7 @@ db log to the configured hastymail db */ -$log_type = 'php'; +$log_type = 'db'; /* required delimiter for the file, syslog and php log types ---------------------------------------------------*/ Deleted: trunk/hastymail2/plugins/logger/table.sql =================================================================== --- trunk/hastymail2/plugins/logger/table.sql 2009-01-12 05:35:24 UTC (rev 706) +++ trunk/hastymail2/plugins/logger/table.sql 2009-01-12 14:54:27 UTC (rev 707) @@ -1,16 +0,0 @@ -DROP TABLE IF EXISTS `hastymail_log`; -CREATE TABLE `hastymail_log` ( - `id` int(11) NOT NULL auto_increment, - `ts` date NOT NULL, - `username` varchar(250) default NULL, - `server_name` varchar(250) default NULL, - `server_port` varchar(250) default NULL, - `remote_address` varchar(250) default NULL, - `remote_port` varchar(250) default NULL, - `query_string` varchar(250) default NULL, - `php_self` varchar(250) default NULL, - `referer` varchar(250) default NULL, - `user_agent` varchar(250) default NULL, - PRIMARY KEY (`id`), - KEY ts (ts) -) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; Modified: trunk/hastymail2/plugins/logger/work.php =================================================================== --- trunk/hastymail2/plugins/logger/work.php 2009-01-12 05:35:24 UTC (rev 706) +++ trunk/hastymail2/plugins/logger/work.php 2009-01-12 14:54:27 UTC (rev 707) @@ -240,8 +240,10 @@ break; case 'db': if ($tools->get_db()) { - $res = $tools->db_insert('insert into hastymail_log values( - \'\', + $res = $tools->db_insert('insert into event_log + (ts, username, server_name, server_port, remote_address, + remote_port, query_string, php_self, referer, user_agent) + values( '.$tools->db_quote($flds['date']).', '.$tools->db_quote($flds['username']).', '.$tools->db_quote($flds['server_name']).', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |