From 432cbc70862e1bf6ed058dfe75be03160ceea09f Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Mon, 24 May 2010 10:08:17 +0000 Subject: [PATCH] Added a checkbox for editing a file after creating it --- devedit.pl | 2 +- modules/Command.pm | 12 ++++++++++-- templates/dirlist.htm | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/devedit.pl b/devedit.pl index 87afee4..d74a1bc 100644 --- a/devedit.pl +++ b/devedit.pl @@ -30,7 +30,7 @@ use Command; use Output; use Tool; -$VERSION = '3.1'; +$VERSION = '3.2-dev'; # Path to configuration file # Change if necessary! diff --git a/modules/Command.pm b/modules/Command.pm index 8fcf6d6..431eb4d 100644 --- a/modules/Command.pm +++ b/modules/Command.pm @@ -6,7 +6,7 @@ package Command; # Execute Dev-Editor's commands # # Author: Patrick Canterino -# Last modified: 2009-12-29 +# Last modified: 2010-05-24 # # Copyright (C) 1999-2000 Roland Bluethgen, Frank Schoenmann # Copyright (C) 2003-2009 Patrick Canterino @@ -493,7 +493,15 @@ sub exec_mkfile($$) return error($config->{'errors'}->{'file_exists'},$dir,{FILE => $new_virtual}) if(-e $new_physical); file_create($new_physical) or return error($config->{'errors'}->{'mkfile_failed'},$dir,{FILE => $new_virtual}); - return devedit_reload({command => 'show', file => $dir}); + + if($data->{'cgi'}->param('edit')) + { + return devedit_reload({command => 'beginedit', file => $new_virtual}); + } + else + { + return devedit_reload({command => 'show', file => $dir}); + } } else { diff --git a/templates/dirlist.htm b/templates/dirlist.htm index 10ade36..4777d41 100644 --- a/templates/dirlist.htm +++ b/templates/dirlist.htm @@ -44,7 +44,7 @@
-{DIR} +{DIR}
{IF dir_writeable} -- 2.34.1