Commit 2724c944414a8bdbdbaace44cb4ebb2a734feecb
1 parent
6c15fa34
Remove unused methods getDocumentTypes and isFieldLinkedToType
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4874 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
0 additions
and
42 deletions
lib/documentmanagement/DocumentField.inc
| @@ -137,48 +137,6 @@ class DocumentField extends KTEntity { | @@ -137,48 +137,6 @@ class DocumentField extends KTEntity { | ||
| 137 | return KTEntityUtil::get('DocumentField', $iId); | 137 | return KTEntityUtil::get('DocumentField', $iId); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | - /** | ||
| 141 | - * Returns the DocumentTypes mapped to this document field | ||
| 142 | - */ | ||
| 143 | - function getDocumentTypes() { | ||
| 144 | - global $default; | ||
| 145 | - $aDocumentTypes = array(); | ||
| 146 | - $sql = $default->db; | ||
| 147 | - $sQuery = "SELECT document_type_id FROM " . $default->document_type_fields_table . " WHERE field_id = ?";/*ok*/ | ||
| 148 | - $aParams = array($this->iId); | ||
| 149 | - if ($sql->query(array($sQuery, $aParams))) { | ||
| 150 | - while ($sql->next_record()) { | ||
| 151 | - $aDocumentTypes[] = & DocumentType::get($sql->f("document_type_id")); | ||
| 152 | - } | ||
| 153 | - return $aDocumentTypes; | ||
| 154 | - } else{ | ||
| 155 | - return false; | ||
| 156 | - } | ||
| 157 | - } | ||
| 158 | - | ||
| 159 | - /** | ||
| 160 | - * Given a documenttype...will find all fields belonging to it | ||
| 161 | - * | ||
| 162 | - * @return DocumentFieldLink populated DocumentFieldLink object on success, false otherwise and set $_SESSION["errorMessage"] | ||
| 163 | - */ | ||
| 164 | - function isFieldLinkedToType() { | ||
| 165 | - global $default; | ||
| 166 | - $sql = $default->db; | ||
| 167 | - $sQuery = "SELECT document_type_id FROM " . $default->document_type_fields_table . " WHERE field_id = ?";/*ok*/ | ||
| 168 | - $aParams = array($this->iId); | ||
| 169 | - if ($sql->query(array($sQuery, $aParams))) { | ||
| 170 | - $rows = $sql->num_rows($sql); | ||
| 171 | - if ($rows > 0) { | ||
| 172 | - // instantiate the document types and return | ||
| 173 | - return true; | ||
| 174 | - } else{ | ||
| 175 | - return false; | ||
| 176 | - } | ||
| 177 | - } else { | ||
| 178 | - return false; | ||
| 179 | - } | ||
| 180 | - } | ||
| 181 | - | ||
| 182 | // FIXME: add a data type class! | 140 | // FIXME: add a data type class! |
| 183 | /* Static function. Given a documenttype...will find all fields belongin to it | 141 | /* Static function. Given a documenttype...will find all fields belongin to it |
| 184 | * | 142 | * |