Commit f5b22ff0c316a7cf4e8ae62b2fdb5ed216d9544b
1 parent
abc2b80a
corrected document name escaping
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1750 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
8 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc
| @@ -18,14 +18,9 @@ function renderEditableDocumentData($oDocument, $iDocumentTypeID) { | @@ -18,14 +18,9 @@ function renderEditableDocumentData($oDocument, $iDocumentTypeID) { | ||
| 18 | global $default; | 18 | global $default; |
| 19 | $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); | 19 | $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); |
| 20 | $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); | 20 | $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); |
| 21 | - $sQuery = "SELECT D.id AS id, D.name AS name, D.document_type_id AS document_type_id " . | ||
| 22 | - "FROM $default->owl_documents_table AS D " . | ||
| 23 | - "WHERE D.id = " . $oDocument->getID(); | ||
| 24 | - | ||
| 25 | - $sql = $default->db; | ||
| 26 | - $sql->query($sQuery); | 21 | + |
| 27 | $sToRender; | 22 | $sToRender; |
| 28 | - if ($sql->next_record()) { | 23 | + if ($oDocument) { |
| 29 | $sToRender = "<table>\n"; | 24 | $sToRender = "<table>\n"; |
| 30 | $sToRender .= "<caption>Document Data</caption>\n"; | 25 | $sToRender .= "<caption>Document Data</caption>\n"; |
| 31 | $sToRender .= "<tr>\n"; | 26 | $sToRender .= "<tr>\n"; |
| @@ -33,7 +28,7 @@ function renderEditableDocumentData($oDocument, $iDocumentTypeID) { | @@ -33,7 +28,7 @@ function renderEditableDocumentData($oDocument, $iDocumentTypeID) { | ||
| 33 | $sToRender .= "<b>Document Title </b>\n"; | 28 | $sToRender .= "<b>Document Title </b>\n"; |
| 34 | $sToRender .= "</td>\n"; | 29 | $sToRender .= "</td>\n"; |
| 35 | $sToRender .= "<td>\n"; | 30 | $sToRender .= "<td>\n"; |
| 36 | - $sToRender .= "<input type=\"text\" name=\"fDocumentName\" value=\"" . $sql->f("name") . "\" />\n"; | 31 | + $sToRender .= "<input type=\"text\" name=\"fDocumentName\" value=\"" . $oDocument->getName() . "\" />\n"; |
| 37 | $sToRender .= "</td>\n"; | 32 | $sToRender .= "</td>\n"; |
| 38 | $sToRender .= "</tr>\n"; | 33 | $sToRender .= "</tr>\n"; |
| 39 | $sToRender .= "<tr>\n"; | 34 | $sToRender .= "<tr>\n"; |