I get the same error even when I edit it. Here are the contents of ClauseCombiner.inc:
<?
if (!isset ($ClauseCombiner_File))
{
$ClauseCombiner_File = sprintf ("%s", __FILE__);
// ==================================================
// class ClauseCombiner
//
// Base class provided to combine clauses with the appropriate
// conjunction. A clause is added to the field '$clauses', using the
// 'addClause' method.
//
// All clauses can be retrieved FIFO as a single string, each seperated
// by field '$conjunction', using the 'combine' method.
//
// Author : MAS.
// First Created : Wednesday Mar 10 1999.
// Modification History : Tuesday Aug 3 1999.
// addClause method can now take an array
// argument.
//
// ==================================================
class ClauseCombiner
{
var $conjunction = " ";
var $clauses = array ();
var $classname = 'ClauseCombiner';
function ClauseCombiner ($conj = " ")
{
$this->setConjunction ($conj);
}
/*
* function ClauseCombiner::setConjunction
*
* Sets the conjunction for the object.
*
*/
function setConjunction ($conj = " ") { $this->conjunction = $conj; }
/*
* function ClauseCombiner::getNumClauses
*
* Returns the number of clauses to be combined.
*
*/
function getNumClauses () { return sizeof ($this->clauses); }
/*
* function ClauseCombiner::combine
*
* Returns the clauses held in the field '$clauses', seperated by the
* appropriate conjunction.
*
*/
function combine ()
{
$str = "";
$size = sizeof ($this->clauses);
if ($size > 0)
$str = implode ($this->clauses, $this->conjunction);
return $str;
}
/*
* function ClauseCombiner::addClause
*
* Adds a clause to the field '$clauses'. Note that the clause is
* not added if it is an empty string. Note that the clauses parameter
* may be an array.
*
*/
function addClause ($clause)
{
$clauses = (array) $clause;
while (list ($k, $v) = each ($clauses))
{
if ('' != $v)
$this->clauses [] = $v;
}
}
/*
* function getClauses
*
* Returns a copy of the field '$this->clauses'.
*
*/
function getClauses () { return $this->clauses; }
} // class::ClauseCombiner
// ==================================================
// class::UniqueClauseCombiner extends ClauseCombiner
//
// Only unique clauses are pushed onto the queue, no repeats are allowed.
// This is achieved by calculating the md5 hash of the clause, and using
// this as the key. When it is desired to add a new clause to the queue,
// the md5 hash of the clause is calculated, and compared against those
// keys already present in the class variable '$clauses'.
//
// Author : MAS.
// First Created : Wednesday Mar 10 1999.
// Modification History : Tuesday Aug 3 1999.
// addClause method can now take an array
// argument.
//
// ==================================================
class UniqueClauseCombiner extends ClauseCombiner
{
var $classname = 'UniqueClauseCombiner';
function UniqueClauseCombiner ($conjunction = " ")
{
$this->conjunction = $conjunction;
}
/*
* function UniqueClauseCombiner::addClause
*
* Adds a clause to the field '$clauses', if not already seen.
* Returns true if the clause is added, and false if it is not.
* Clauses consisting only of empty strings are not added to the
* queue. This is the same behaviour as the method in the overridden
* (ClauseCombiner) class.
*
* Note that the parameter '$clause' can now be an array of clauses,
* in which case the return value is the success, or otherwise of
* the last attempted addition.
*
*/
function addClause ($clause)
{
$retVal = false;
$clauses = (array) $clause;
while (list ($k, $v) = each ($clauses))
{
if ('' == $v) continue;
$hash = md5 ($v);
if (!isset ($this->clauses[$hash]))
{
$this->clauses [$hash] = $v;
$retVal = true;
}
}
return $retVal;
} // function::addClause
} // class::UniqueClauseCombiner
// ==================================================
// class SetCombiner
//
// Extends UniqueClauseCombiner.
//
// Invoking the SetCombiner::combine method produces a depiction of a set
// (all members distinct) using the standard mathematical representation:
//
// '(x1, x2, x3)'
//
// where x1, x2, x3 are members of the set. If there are no members of
// the set, then an empty/null string is returned.
//
// ==================================================
class SetCombiner extends UniqueClauseCombiner
{
var $classname = 'SetCombiner';
function SetCombiner () { $this->conjunction = ', '; }
function combine ()
{
$retVal = '';
$size = sizeof ($this->clauses);
if ($size > 0)
$retVal = sprintf ("(%s)",
implode ($this->clauses, $this->conjunction));
return $retVal;
}
} // class::SetCombiner
// ==================================================
// class BoolClauseCombiner
//
// Extends ClauseCombiner
//
// Author : MAS.
// First Created : Wednesday Mar 10 1999.
// Modification History : none.
//
// Overrides the combine method of class ClauseCombiner, in that each
// clause is correctly bracketed to ensure precedence. This is useful for
// mathematical or SQL statements.
//
// ==================================================
class BoolClauseCombiner extends ClauseCombiner
{
function BoolClauseCombiner ($conjunction = '')
{
$this->conjunction = $conjunction;
}
function combine ()
{
$str = "";
$size = sizeof ($this->clauses);
$str = implode ($this->clauses, " $this->conjunction ");
if ($size > 1)
$str = sprintf ("(%s)", $str);
return $str;
} // function::combine
} // class::BoolClauseCombiner
// ==================================================
// class AndClauses extends BoolClauseCombiner
//
// Extends BoolClauseCombiner - conjunction is set equal to 'AND'.
//
// Author : MAS.
// First Created : Wednesday Mar 10 1999.
// Modification History : none.
//
// ==================================================
class AndClauses extends BoolClauseCombiner
{
var $conjunction = "AND";
function AndClauses () { ; }
} // class::AndClauses
// ==================================================
// class OrClauses extends BoolClauseCombiner
//
// Extends BoolClauseCombiner - conjunction is set equal to 'OR'.
//
// Author : MAS.
// First Created : Wednesday Mar 10 1999.
// Modification History : <none>
//
// ==================================================
class OrClauses extends BoolClauseCombiner
{
var $conjunction = "OR";
function OrClauses { ; }
} // class::OrClauses
}