@@ 4123-4136 (lines=14) @@ | ||
4120 | * @return bool {array; false} - Result array with fields or false. |
|
4121 | * - Result array with fields or false. |
|
4122 | */ |
|
4123 | public function getDocument($id = 0, $fields = '*', $published = 1, $deleted = 0) |
|
4124 | { |
|
4125 | if ($id == 0) { |
|
4126 | return false; |
|
4127 | } else { |
|
4128 | $docs = $this->getDocuments(array($id), $published, $deleted, $fields, '', '', '', 1); |
|
4129 | ||
4130 | if ($docs != false) { |
|
4131 | return $docs[0]; |
|
4132 | } else { |
|
4133 | return false; |
|
4134 | } |
|
4135 | } |
|
4136 | } |
|
4137 | ||
4138 | /** |
|
4139 | * @param string $field |
|
@@ 4945-4953 (lines=9) @@ | ||
4942 | * Default: 1 |
|
4943 | * @return bool |
|
4944 | */ |
|
4945 | public function getTemplateVar($idname = "", $fields = "*", $docid = "", $published = 1) |
|
4946 | { |
|
4947 | if ($idname == "") { |
|
4948 | return false; |
|
4949 | } else { |
|
4950 | $result = $this->getTemplateVars(array($idname), $fields, $docid, $published, "", ""); //remove sorting for speed |
|
4951 | return ($result != false) ? $result[0] : false; |
|
4952 | } |
|
4953 | } |
|
4954 | ||
4955 | /** |
|
4956 | * getTemplateVars |