From f1c984e1dda59ecb2a4b6105cd1d3f4bb50d771d Mon Sep 17 00:00:00 2001 From: megan_w Date: Thu, 7 Feb 2008 10:19:06 +0000 Subject: [PATCH] KTS-2359 "Automatically fill document title from filename" Fixed. Added a check on whether the filename has an extension. --- plugins/ktcore/folder/addDocument.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/ktcore/folder/addDocument.php b/plugins/ktcore/folder/addDocument.php index f566450..248dd77 100644 --- a/plugins/ktcore/folder/addDocument.php +++ b/plugins/ktcore/folder/addDocument.php @@ -101,7 +101,9 @@ class KTFolderAddDocumentAction extends KTFolderAction { } var name=arrPath[arrPath.length-1]; var name=name.split('.'); - name.pop(); + if(name.length > 1){ + name.pop(); + } var title=name.join('.'); document.getElementById('document_name').value=title;"; -- libgit2 0.21.4