| @@ 3869-3882 (lines=14) @@ | ||
| 3866 | * @return bool {array; false} - Result array with fields or false. |
|
| 3867 | * - Result array with fields or false. |
|
| 3868 | */ |
|
| 3869 | public function getDocument($id = 0, $fields = '*', $published = 1, $deleted = 0) |
|
| 3870 | { |
|
| 3871 | if ($id == 0) { |
|
| 3872 | return false; |
|
| 3873 | } else { |
|
| 3874 | $docs = $this->getDocuments(array($id), $published, $deleted, $fields, '', '', '', 1); |
|
| 3875 | ||
| 3876 | if ($docs != false) { |
|
| 3877 | return $docs[0]; |
|
| 3878 | } else { |
|
| 3879 | return false; |
|
| 3880 | } |
|
| 3881 | } |
|
| 3882 | } |
|
| 3883 | ||
| 3884 | /** |
|
| 3885 | * @param string $field |
|
| @@ 4691-4699 (lines=9) @@ | ||
| 4688 | * Default: 1 |
|
| 4689 | * @return bool |
|
| 4690 | */ |
|
| 4691 | public function getTemplateVar($idname = "", $fields = "*", $docid = "", $published = 1) |
|
| 4692 | { |
|
| 4693 | if ($idname == "") { |
|
| 4694 | return false; |
|
| 4695 | } else { |
|
| 4696 | $result = $this->getTemplateVars(array($idname), $fields, $docid, $published, "", ""); //remove sorting for speed |
|
| 4697 | return ($result != false) ? $result[0] : false; |
|
| 4698 | } |
|
| 4699 | } |
|
| 4700 | ||
| 4701 | /** |
|
| 4702 | * getTemplateVars |
|