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
pcanterino [Mon, 27 Oct 2003 10:37:09 +0000 (10:37 +0000)]
- Added devedit_reload() to easily reload Dev-Editor with different arguments
- Fixed a small output error introduced with revision 1.6 of Command.pm (I'm so stupid...)
pcanterino [Wed, 22 Oct 2003 09:41:46 +0000 (09:41 +0000)]
- exec_endedit(): Any line seperator will be converted to the OS specific line seperator
- Implemented some checks if we have enough permissions to do some things if files (still needs work)
- Some error messages now include directory links
pcanterino [Fri, 17 Oct 2003 17:13:22 +0000 (17:13 +0000)]
Version 1.1.1:
- Improved constructor
- If we tried to unlock the list file and the lock file already exists, the 'lock' variable in the object properties wasn't set to 0
- Fixed a lot of typos
- Removed $VERSION variable (version number is now found in the head comment)
Version 1.1:
- The file with the list will ony be unlocked, if it was locked by ourselves
- If the path to lock file is missing, it will be created by adding ".lock" to the path of the list file
- The return value of print() in save() is now checked
- Comments translated into English
- Special chars will be encoded to HTML entities in directory listing and in other messages (very dirty at several points)
- Improved check for binary files (empty files were recognized as binary files)
- Check if someone tries to delete a directory