@@ 3726-3739 (lines=14) @@ | ||
3723 | * @return bool {array; false} - Result array with fields or false. |
|
3724 | * - Result array with fields or false. |
|
3725 | */ |
|
3726 | public function getDocument($id = 0, $fields = '*', $published = 1, $deleted = 0) |
|
3727 | { |
|
3728 | if ($id == 0) { |
|
3729 | return false; |
|
3730 | } else { |
|
3731 | $docs = $this->getDocuments(array($id), $published, $deleted, $fields, '', '', '', 1); |
|
3732 | ||
3733 | if ($docs != false) { |
|
3734 | return $docs[0]; |
|
3735 | } else { |
|
3736 | return false; |
|
3737 | } |
|
3738 | } |
|
3739 | } |
|
3740 | ||
3741 | /** |
|
3742 | * @param string $field |
|
@@ 4430-4438 (lines=9) @@ | ||
4427 | * Default: 1 |
|
4428 | * @return bool |
|
4429 | */ |
|
4430 | public function getTemplateVar($idname = "", $fields = "*", $docid = "", $published = 1) |
|
4431 | { |
|
4432 | if ($idname == "") { |
|
4433 | return false; |
|
4434 | } else { |
|
4435 | $result = $this->getTemplateVars(array($idname), $fields, $docid, $published, "", ""); //remove sorting for speed |
|
4436 | return ($result != false) ? $result[0] : false; |
|
4437 | } |
|
4438 | } |
|
4439 | ||
4440 | /** |
|
4441 | * getTemplateVars |