src/Intraface/modules/contact/ContactGateway.php 1 location
|
@@ 16-26 (lines=11) @@
|
| 13 |
|
$this->error = new Intraface_Error; |
| 14 |
|
} |
| 15 |
|
|
| 16 |
|
public function getDBQuery() |
| 17 |
|
{ |
| 18 |
|
if ($this->dbquery) { |
| 19 |
|
return $this->dbquery; |
| 20 |
|
} |
| 21 |
|
$this->dbquery = new Intraface_DBQuery($this->kernel, "contact", "contact.active = 1 AND contact.intranet_id = ".$this->kernel->intranet->get("id")); |
| 22 |
|
$this->dbquery->setJoin("LEFT", "address", "address.belong_to_id = contact.id", "address.active = 1 AND address.type = 3"); |
| 23 |
|
$this->dbquery->useErrorObject($this->error); |
| 24 |
|
|
| 25 |
|
return $this->dbquery; |
| 26 |
|
} |
| 27 |
|
|
| 28 |
|
function findById($id) |
| 29 |
|
{ |
src/Intraface/modules/contact/Contact.php 1 location
|
@@ 238-248 (lines=11) @@
|
| 235 |
|
return $this->error; |
| 236 |
|
} |
| 237 |
|
|
| 238 |
|
public function getDBQuery() |
| 239 |
|
{ |
| 240 |
|
if ($this->dbquery) { |
| 241 |
|
return $this->dbquery; |
| 242 |
|
} |
| 243 |
|
$this->dbquery = new Intraface_DBQuery($this->kernel, "contact", "contact.active = 1 AND contact.intranet_id = ".$this->kernel->intranet->get("id")); |
| 244 |
|
$this->dbquery->setJoin("LEFT", "address", "address.belong_to_id = contact.id", "address.active = 1 AND address.type = 3"); |
| 245 |
|
$this->dbquery->useErrorObject($this->error); |
| 246 |
|
|
| 247 |
|
return $this->dbquery; |
| 248 |
|
} |
| 249 |
|
|
| 250 |
|
/** |
| 251 |
|
* Constructor |