r1pexpb / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

use a define for $cache_dir #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To make the code cleaner and less complex it's possible to
define $cache_dir which is static (no parameter-dependent) with, eg, 
define('TIMTHUMB_CACHE_DIR', './cache');
Then it's no more needed to pass it as an argument to every function.
Same can be done with the temp/ directory.

Original issue reported on code.google.com by gibbo...@gmail.com on 25 Mar 2010 at 1:26

GoogleCodeExporter commented 9 years ago
Very simple patch, applies well, makes the code less complex.

Original comment by gibbo...@gmail.com on 26 Mar 2010 at 10:46

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, I'm having a range of issues with timthumb mostly related to cache problems 
I think..

I'd like to try your patch to see if it helps anything but I'm not sure how to 
add the patch to the timthumb.php 
file! Could you post your complete patched version so I can give it a try?
Many Thanks
Matt

Original comment by voodoo...@gmail.com on 31 Mar 2010 at 3:47

GoogleCodeExporter commented 9 years ago
I don't know what your issues are, you should probably test the svn trunk/ 
version of
TimThumb and, if you can reproduce, precise the #issue number if it has already 
been
reported.
This patch will probably not solve any bug as it's only aimed to simplify the
codebase what I needed for another patch (#78)
Anyway if you really want to use it you should use the "patch" command : go in 
the
directory your TimThumb php file is into (the last trunk version, that's 
important),
then use the following command :
patch --dry-run -p0 < /directory/of/thumb.php.cache_define.patch
if it worked, remove the --dry-run option and you're done.

Original comment by gibbo...@gmail.com on 1 Apr 2010 at 6:53

GoogleCodeExporter commented 9 years ago
Thanks for the suggestion, I've applied the fixes to the trunk version and it's
working great

Original comment by BinaryMoon on 26 Apr 2010 at 8:41