[phpOpenTracker-User] patch to turn 0/1 into true/false for postgres compatibility

Jean-Christian Imbeault <[email protected]>
Newsgroups gmane.comp.web.phpopentracker.general
Message-ID <[email protected]>
Here's a list of changes I have made to some files in order to change 
the insertion of 0/1 booleans into true/false to allow for postgresql 
compatibility. There might be more but I have not found them yet :)

API/plugins/top.php

line: 122
-$dataConstraint = 'AND accesslog.entry_document = 1';
+$dataConstraint = 'AND accesslog.entry_document = true';

API/Plugin.php

line: 90
-" AND accesslog%s.document_id = %d AND accesslog%s.entry_document = 1",
+" AND accesslog%s.document_id = %d AND accesslog%s.entry_document = true",

LoggingEngine.php

line 223:
-VALUES (%d, %d, %d, %d)",
+VALUES (%d, %d, %d, %s)",

line: 229
-$this->container['first_request'] ? 1 : 0
+$this->container['first_request'] ? "true" : "false"

line 252:
+%d, %d, %d)",
-%d, %d, %s)",

line: 265
-$this->container['returning_visitor'] ? 1 : 0
+$this->container['returning_visitor'] ? "true" : "false"


Jean-Christian Imbeault



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.