joinAddCountry(); //print_r($au); $this->selectAdd("(SELECT lval FROM i18n WHERE lkey = Office.country AND ltype = 'c' AND inlang = '{$au->lang}') AS country_name"); } function joinAddCountry() { $this->_join .= ' LEFT JOIN i18n AS join_country ON (join_country.lkey = Office.country) '; $item = DB_DataObject::Factory('I18n'); $this->selectAs($item, 'country_id_%s', 'join_country'); } function toEventString() { return $this->name; } /** * check who is trying to access this. false == access denied.. */ function checkPerm($lvl, $au) { return $au->hasPerm("Core.Offices", $lvl); } }