| @@ 3834-3847 (lines=14) @@ | ||
| 3831 | * @return bool {array; false} - Result array with fields or false. |
|
| 3832 | * - Result array with fields or false. |
|
| 3833 | */ |
|
| 3834 | public function getDocument($id = 0, $fields = '*', $published = 1, $deleted = 0) |
|
| 3835 | { |
|
| 3836 | if ($id == 0) { |
|
| 3837 | return false; |
|
| 3838 | } else { |
|
| 3839 | $docs = $this->getDocuments(array($id), $published, $deleted, $fields, '', '', '', 1); |
|
| 3840 | ||
| 3841 | if ($docs != false) { |
|
| 3842 | return $docs[0]; |
|
| 3843 | } else { |
|
| 3844 | return false; |
|
| 3845 | } |
|
| 3846 | } |
|
| 3847 | } |
|
| 3848 | ||
| 3849 | /** |
|
| 3850 | * @param string $field |
|
| @@ 4657-4665 (lines=9) @@ | ||
| 4654 | * Default: 1 |
|
| 4655 | * @return bool |
|
| 4656 | */ |
|
| 4657 | public function getTemplateVar($idname = "", $fields = "*", $docid = "", $published = 1) |
|
| 4658 | { |
|
| 4659 | if ($idname == "") { |
|
| 4660 | return false; |
|
| 4661 | } else { |
|
| 4662 | $result = $this->getTemplateVars(array($idname), $fields, $docid, $published, "", ""); //remove sorting for speed |
|
| 4663 | return ($result != false) ? $result[0] : false; |
|
| 4664 | } |
|
| 4665 | } |
|
| 4666 | ||
| 4667 | /** |
|
| 4668 | * getTemplateVars |
|