Commit f1c984e1dda59ecb2a4b6105cd1d3f4bb50d771d
1 parent
9639518b
KTS-2359
"Automatically fill document title from filename" Fixed. Added a check on whether the filename has an extension. Committed by: Megan Watson Reviewed by: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@8015 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
1 deletions
plugins/ktcore/folder/addDocument.php
| ... | ... | @@ -101,7 +101,9 @@ class KTFolderAddDocumentAction extends KTFolderAction { |
| 101 | 101 | } |
| 102 | 102 | var name=arrPath[arrPath.length-1]; |
| 103 | 103 | var name=name.split('.'); |
| 104 | - name.pop(); | |
| 104 | + if(name.length > 1){ | |
| 105 | + name.pop(); | |
| 106 | + } | |
| 105 | 107 | var title=name.join('.'); |
| 106 | 108 | document.getElementById('document_name').value=title;"; |
| 107 | 109 | ... | ... |