| @@ 3992-4005 (lines=14) @@ | ||
| 3989 | * @return bool {array; false} - Result array with fields or false. |
|
| 3990 | * - Result array with fields or false. |
|
| 3991 | */ |
|
| 3992 | public function getDocument($id = 0, $fields = '*', $published = 1, $deleted = 0) |
|
| 3993 | { |
|
| 3994 | if ($id == 0) { |
|
| 3995 | return false; |
|
| 3996 | } else { |
|
| 3997 | $docs = $this->getDocuments(array($id), $published, $deleted, $fields, '', '', '', 1); |
|
| 3998 | ||
| 3999 | if ($docs != false) { |
|
| 4000 | return $docs[0]; |
|
| 4001 | } else { |
|
| 4002 | return false; |
|
| 4003 | } |
|
| 4004 | } |
|
| 4005 | } |
|
| 4006 | ||
| 4007 | /** |
|
| 4008 | * @param string $field |
|
| @@ 4850-4858 (lines=9) @@ | ||
| 4847 | * Default: 1 |
|
| 4848 | * @return bool |
|
| 4849 | */ |
|
| 4850 | public function getTemplateVar($idname = "", $fields = "*", $docid = "", $published = 1) |
|
| 4851 | { |
|
| 4852 | if ($idname == "") { |
|
| 4853 | return false; |
|
| 4854 | } else { |
|
| 4855 | $result = $this->getTemplateVars(array($idname), $fields, $docid, $published, "", |
|
| 4856 | ""); //remove sorting for speed |
|
| 4857 | ||
| 4858 | return ($result != false) ? $result[0] : false; |
|
| 4859 | } |
|
| 4860 | } |
|
| 4861 | ||