Commit 880bb8c30a0c31c231fec64b1259ad0598c6e66b

Authored by nbm
1 parent 91b6592c

Pass the parameters through to the query to check if the document

already exists in that location.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3221 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/documentmanagement/Document.inc
@@ -646,7 +646,7 @@ class Document extends KTEntity { @@ -646,7 +646,7 @@ class Document extends KTEntity {
646 " AND folder_id = ?" . 646 " AND folder_id = ?" .
647 " AND status_id = ?"; 647 " AND status_id = ?";
648 $aParams = array($sFileName, $iFolderID, LIVE); 648 $aParams = array($sFileName, $iFolderID, LIVE);
649 - $sql->query($sQuery); 649 + $sql->query(array($sQuery, $aParams));
650 if ($sql->next_record()) { 650 if ($sql->next_record()) {
651 return true; 651 return true;
652 } 652 }