Commit 325507ce67f6c4e7f53388f53f82982be94119cd
1 parent
7c92772c
Changed function documentExists to take a file name instead of a document name
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@638 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
4 additions
and
4 deletions
lib/documentmanagement/Document.inc
| ... | ... | @@ -358,15 +358,15 @@ class Document { |
| 358 | 358 | * Static function. |
| 359 | 359 | * Check if a document already exists |
| 360 | 360 | * |
| 361 | - * @param $sName Name of document | |
| 362 | - * @param $sFolderID Primary key of folder to which document is assigned | |
| 361 | + * @param String File name of document | |
| 362 | + * @param int Primary key of folder to which document is assigned | |
| 363 | 363 | * |
| 364 | 364 | * @return boolean true if document exists, false otherwise and set $_SESSION["errorMessage"] |
| 365 | 365 | */ |
| 366 | - function documentExists($sName, $iFolderID) { | |
| 366 | + function documentExists($sFileName, $iFolderID) { | |
| 367 | 367 | global $default, $lang_err_doc_not_exist; |
| 368 | 368 | $sql = new Owl_DB(); |
| 369 | - $sql->query("SELECT * FROM $default->owl_documents_table WHERE name = '" . addslashes($sName) . "' AND folder_id = $iFolderID"); | |
| 369 | + $sql->query("SELECT * FROM $default->owl_documents_table WHERE name = '" . addslashes($sFileName) . "' AND folder_id = $iFolderID"); | |
| 370 | 370 | if ($sql->next_record()) { |
| 371 | 371 | return true; |
| 372 | 372 | } | ... | ... |