/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
- function applyFilters($q, $au)
+ function applyFilters($q, $au, $roo)
{
$tn = $this->tableName();
{
$db = $this->getDatabaseConnection();
$sesPrefix = $db->dsn['database'];
- @session_start();
+ if (empty($_SERVER['PHP_AUTH_USER'])) {
+ @session_start();
+ }
if (!empty($_SESSION[__CLASS__][$sesPrefix .'-auth'])) {
// in session...
$a = unserialize($_SESSION[__CLASS__][$sesPrefix .'-auth']);
}
static function lookupOwner()
{
+ static $cache = false;
+ if ($cache !== false) {
+ return clone($cache); // no updating this object..
+ }
+
$enum = DB_DataObject::Factory('core_enum')->lookup('COMPTYPE', 'OWNER' );
$companies = DB_DataObject::factory('core_company');
$companies->comptype_id = $enum;
if ($companies->find(true)) {
+ $cache = clone($companies);
return $companies;
}
return false;