pcanterino [Tue, 21 Dec 2004 13:40:34 +0000 (13:40 +0000)]
- While processing a file upload, check if the user wants to replace a directory
or overwrite a write-protected file
- If the user wants to copy or rename a file, check if he wants to overwrite a
write-protected file
pcanterino [Fri, 17 Dec 2004 17:05:45 +0000 (17:05 +0000)]
- Dev-Editor now uses flock(). flock() is called using a wrapper function which
checks if it is really available.
- file_save() in File::Access is now able to open a file in binary mode. Thus,
the file saving process in the file upload code in Command.pm has been
replaced by a single file_save() call.
pcanterino [Thu, 16 Dec 2004 15:45:32 +0000 (15:45 +0000)]
- Entities in some more strings are now encoded
- The Hash Reference for devedit_reload() is now optional
- Removed "use Data::Dumper;" in Command.pm. I forgot to remove it after debugging.
pcanterino [Mon, 13 Dec 2004 15:17:44 +0000 (15:17 +0000)]
- exec_chprop() should have a proper coding style, but it made the routine hard
to maintain. Thus, I changed its structure.
- Don't allow to change the properties of a file in use
- Don't allow to upload a file if a file with the same virtual name is currently
in use
pcanterino [Fri, 3 Dec 2004 14:04:28 +0000 (14:04 +0000)]
Version 1.3:
- Replaced open() by sysopen()
- Added method remove_all() to remove all files from the list (maybe we will
need it...)
- Changed my email address
pcanterino [Sat, 27 Nov 2004 09:57:23 +0000 (09:57 +0000)]
Changed my email address (patshaping@gmx.net -> patrick@patshaping.de) in all
files except the Template and the File::UseList modules (they are seperate
software).
pcanterino [Fri, 26 Nov 2004 17:35:58 +0000 (17:35 +0000)]
- Don't display the file upload link in directory listing if Dev-Editor has no
write access to this directory.
- Wrong variable "{DIRECTORY}" in error message "dir_no_create" - it should be
"{DIR}".
pcanterino [Fri, 26 Nov 2004 16:00:27 +0000 (16:00 +0000)]
- Check if we have enough permissions to write in directory at the following
points:
- Before executing a command which creates a new file
- Before uploading a file
- Before removing or moving/renaming a file or directory
- oct() does not care about leading zeros, the resulting value is always the
same.
- The name of the variable which will be replaced by a directory to go back to
in error.htm was renamed from "{DIR}" to "{BACK}". "{DIR}" caused some
problems.
- Changed the names of some error messages:
nocopy -> no_copy
noedit -> no_edit
noview -> no_view
pcanterino [Wed, 24 Nov 2004 16:35:20 +0000 (16:35 +0000)]
- Added new if blocks to the templates about.htm and chprop.htm: The blocks are
named "group_detected" and "user_detected" and show if Dev-Editor could
successfully convert a group or user ID into the corresponding name.
- Cleaned exec_beginedit() and exec_endedit()
- More proper encoding of HTML entities at some points (still needs work)
pcanterino [Sat, 13 Nov 2004 09:13:02 +0000 (09:13 +0000)]
The path the user wants to access must now BEGIN with the root directory. The
old check made it possible to access a directory structure outside the root
directory similar to the root directory.
pcanterino [Sat, 13 Nov 2004 08:56:34 +0000 (08:56 +0000)]
- The abort() routine from the Output module is now also able to display a link
at the bottom of the error message. It is a direct wrapper to the error()
routine.
Thus, the following error messages now contain a link at the bottom:
- File not found
- Accessing above the virtual root directory
- Creating an object above the virtual root directory
- Directory where Dev-Editor should create an object does not exist
- It was possible to access the directory containing the virtual root directory.
Well, it was only read-access.
pcanterino [Fri, 5 Nov 2004 12:54:06 +0000 (12:54 +0000)]
- Dev-Editor now checks if it is able to access a directory: Directories that
are not accessible are greyed in directory listing. Accessing such a directory
causes an error message.
- Dev-Editor checks if it has read access to the virtual root directory. Having
no access to this directory would cause Dev-Editor to show the contents of the
real root directory!
pcanterino [Sat, 30 Oct 2004 17:32:26 +0000 (17:32 +0000)]
Because of the ugly behaviour of $(, I'm now using the getgid() function from
the POSIX module to detect the process GID. For being consistent, I'm now using
getuid() (also from the POSIX module) to detect the process UID.
pcanterino [Sat, 23 Oct 2004 13:29:13 +0000 (13:29 +0000)]
When viewing a file, insert the contents of the file into the template AFTER
parsing the "editable" {IF}-block.
(Ever tried to view the viewfile.htm template file using Dev-Editor? Oh my god!)
pcanterino [Fri, 22 Oct 2004 09:40:22 +0000 (09:40 +0000)]
Now we already unlock the file at the begining of exec_endedit(), because if an
error occurs during saving, the file keeps locked.
This is not a perfect solution, there are still problems. I have to figure out
another one.
pcanterino [Tue, 5 Oct 2004 17:43:11 +0000 (17:43 +0000)]
exec_unlock() now checks if the file is really in use. Otherwise, we return to
directory view (maybe we change this behaviour and display an error message...).
pcanterino [Mon, 4 Oct 2004 17:50:05 +0000 (17:50 +0000)]
Improved file editing using another filename:
- If the user just entered spaces as filename (detection works for other
commands using the "newfile" CGI parameter too), we use the original filename
- Saving even works if the file has to be created first
pcanterino [Mon, 4 Oct 2004 17:50:04 +0000 (17:50 +0000)]
Improved file editing using another filename:
- If the user just entered spaces as filename (detection works for other
commands using the "newfile" CGI parameter too), we use the original filename
- Saving even works, if the file has to be created first
Something definitely went wrong when I remade the copy and the rename functions.
They printed a wrong error message if the destination already existed and if it
was a file.
Dev-Editor also didn't deny copying a directory.
pcanterino [Thu, 5 Aug 2004 10:06:49 +0000 (10:06 +0000)]
Removed the race condition in file_create() which could set a file to 0 if it
already exist.
I wanted to use O_EXCL, but `perldoc -f sysopen` doesn't say that O_EXCL is
avaiable in _every_ system. So I use O_RDONLY and O_CREAT.
Additionally, I replaced all the open() calls in this module by sysopen() calls.
pcanterino [Sun, 1 Aug 2004 11:39:56 +0000 (11:39 +0000)]
Allow to change the group of a file using the Group ID
(Let's hope nobody will define a group composed only of numbers - let's hope it
isn't allowed at all - I should install Linux at home...)
Replaced the code of mode_string() by some self-written code that I also
understand
(The previous code was grabbed from Sven Rautenberg's SELFHTML Developer
internal PHP Dev-Editor)
- Detection of SSL encrypted HTTP (HTTPS) by checking the HTTPS environment
variable
- Check if the server listens on the default port or not
- Support for query string parameters with multiple values - thanks a lot to
Andre Malo (n.d. parker)!
- Encode non-ASCII-chars and special chars in the query string
- Using virtual_host() from the CGI module (has some advantages)
In directory listing, when clicking on the buttons next to the fields for
creating new files and directories without entering a file or directory name,
the user got an error message which is a little bit strange.
Now, the user will see a form for creating new files or directories.
Well, this is not perfect, but at least, this error will be catched.
Small improvement for the JavaScript code which activates the checkbox for
saving under a different file name:
If the field for the file name is empty, the checkbox will be deactivated.
Splitted the configuration file into three parts:
- devedit.dat: The main configuration file
- errors.dat: Contains the error messages
- templates.dat: Contains the path to the templates files
pcanterino [Sun, 14 Mar 2004 09:41:57 +0000 (09:41 +0000)]
Added an "About" dialogue, which shows some (more or less useful) information about Dev-Editor.
Additionally, the $VERSION variable in devedit.pl is back again.
pcanterino [Sat, 28 Feb 2004 14:07:38 +0000 (14:07 +0000)]
- Improved file editing (especially if the file should be saved using a different name)
- After reading a file, the line separators will be converted to the system specific line separator
- Some other error messages are now found in the configuration file
pcanterino [Fri, 20 Feb 2004 11:51:30 +0000 (11:51 +0000)]
Copying and renaming of files is back again!
Additionally, there was an error which caused existing files not to be replaced
if they were not in the root directory. Now, this is fixed.
pcanterino [Fri, 13 Feb 2004 12:40:18 +0000 (12:40 +0000)]
Began to implement the possibility to control the output using template files
and the configuration file.
The source code became much cleaner and we can now easily change the output.
The template system is not completely implemented yet, but I thought it's time
to save the current state of development.
pcanterino [Sat, 17 Jan 2004 18:13:32 +0000 (18:13 +0000)]
Now, we are using an extern configuration file.
The format of the configuration file is INI-like, but it has no sections and uses the #-sign for comments.
Currently, the parser is very simple. It doesn't support quotation marks around the keys and values, for example.
pcanterino [Sun, 21 Dec 2003 14:11:38 +0000 (14:11 +0000)]
If a file or directory shall be renamed and the destination file already exists, a confirmation dialog, which asks if the file should be overwritten, will be displayed. If the destination file already exists and it is a directory, renaming is not allowed.
pcanterino [Fri, 19 Dec 2003 09:24:41 +0000 (09:24 +0000)]
- If a file shall be copied and the destination file already exists, a confirmation dialog, which asks if the file should be overwritten, will be displayed. If the destination file already exists and it is a directory, copying is not allowed.
- Some small enhancements
pcanterino [Tue, 2 Dec 2003 17:55:16 +0000 (17:55 +0000)]
- The commands are now dispatched in Command.pm. Only the method exec_command() is exported now (devedit.pl became a little bit cleaner).
- In directory listing, the link "Do other stuff" was renamed to "Work with file".
- In directory listing, there is now a link called "Work with directory" which displays a form to rename and to remove a directory.
- Added the possibility to completely remove a directory (I built a confirmation dialog!).
- Added default permission to mkdir() (sometimes, this is necessary).
pcanterino [Fri, 21 Nov 2003 17:08:28 +0000 (17:08 +0000)]
Version 1.2:
- We don't use the FILEHANDLE,MODE,FILENAME version of open() any more, because it doesn't work everywhere
- add_file() and remove_file() now return true if they succeed
- unlock() doesn't check any more if the lock file already exists