@@ 4124-4137 (lines=14) @@ | ||
4121 | * @return bool {array; false} - Result array with fields or false. |
|
4122 | * - Result array with fields or false. |
|
4123 | */ |
|
4124 | public function getDocument($id = 0, $fields = '*', $published = 1, $deleted = 0) |
|
4125 | { |
|
4126 | if ($id == 0) { |
|
4127 | return false; |
|
4128 | } else { |
|
4129 | $docs = $this->getDocuments(array($id), $published, $deleted, $fields, '', '', '', 1); |
|
4130 | ||
4131 | if ($docs != false) { |
|
4132 | return $docs[0]; |
|
4133 | } else { |
|
4134 | return false; |
|
4135 | } |
|
4136 | } |
|
4137 | } |
|
4138 | ||
4139 | /** |
|
4140 | * @param string $field |
|
@@ 4956-4964 (lines=9) @@ | ||
4953 | * Default: 1 |
|
4954 | * @return bool |
|
4955 | */ |
|
4956 | public function getTemplateVar($idname = "", $fields = "*", $docid = "", $published = 1) |
|
4957 | { |
|
4958 | if ($idname == "") { |
|
4959 | return false; |
|
4960 | } else { |
|
4961 | $result = $this->getTemplateVars(array($idname), $fields, $docid, $published, "", ""); //remove sorting for speed |
|
4962 | return ($result != false) ? $result[0] : false; |
|
4963 | } |
|
4964 | } |
|
4965 | ||
4966 | /** |
|
4967 | * getTemplateVars |