Share

ImageManager + Editor for HTMLArea

Tracker: Bugs

5 clean up - ID: 1229507
Last Update: Comment added ( provideo )

First of all, great tool! I am very impressed.

(IMHO) I would recommend adding simple clean up code
that eliminates the generated temp images. In just a
few minutes of playing with the interface I had quite a
few temp files built up. There is potential (for sure in my
case) for other scripts to be accessing these image
directories and parsing through files. Which the temp
files could get in the way of despite current naming
structure.

I added it to the getFiles function in the
ImageManger.php file. By adding an else to the
following IF statement:

if(substr($entry,0,1) != '.'){
// current code
}else{
if (is_file($fullpath.$entry)){
unlink ($fullpath.$entry);
}
}

Then, to make sure this code runs specifically when the
editor is closed, adding an onunload to the editor:

<body onunload="window.opener.location.reload(true);">

Causes the ImgManager window to refresh running the
code that does the temp clean-up.

Granted, you will probably have a much better way of
doing all that I am sure. But, I just wanted to be clear
about what I was meaning.


Tyler Boyd ( wavetyler ) - 2005-06-29 07:35

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 2 )




Date: 2005-08-15 19:07
Sender: provideo

Logged In: YES
user_id=1123870

I used the same code above except instead of putting a
BODY ONUNLOAD=... I added the below code at line 138:

<a href="javascript:;" onclick="window.opener.location.reload
(true);window.close()" >Close Window</a>


Date: 2005-06-29 08:03
Sender: wavetyler

Logged In: YES
user_id=1304587

should have put this in feature requests. Sorry.


Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.