aboutsummaryrefslogtreecommitdiff
path: root/lib/watermark.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-07-12 00:28:20 +0000
committerCash Costello <cash.costello@gmail.com>2009-07-12 00:28:20 +0000
commitf2d64ceba49e6eef714b5b9432d946e3532efca5 (patch)
tree09a272f6ef6e9d084ec0742d4b2e45df5d040a5b /lib/watermark.php
parentb2bd7496baa3d2261233451627e0331fcb4d3fc3 (diff)
downloadelgg-f2d64ceba49e6eef714b5b9432d946e3532efca5.tar.gz
elgg-f2d64ceba49e6eef714b5b9432d946e3532efca5.tar.bz2
not leaving behind temp image from watermark and shortened watermark image name
Diffstat (limited to 'lib/watermark.php')
-rw-r--r--lib/watermark.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/watermark.php b/lib/watermark.php
index 095b10eac..25eb52d48 100644
--- a/lib/watermark.php
+++ b/lib/watermark.php
@@ -28,7 +28,6 @@ function tp_watermark($thumbs) {
$user_stamp_base = tp_get_img_dir();
$user_stamp_base .= strtolower($viewer->name . "_" . $watermark_filename . "_stamp");
- $user_stamp_base .= preg_replace("/[^\w-]+/", "-", $user_stamp_base);
if( !file_exists( $user_stamp_base . $ext )) { //create the watermark if it doesn't exist
$commands = array();
@@ -37,7 +36,7 @@ function tp_watermark($thumbs) {
$commands[] = $im_path . 'composite -compose CopyOpacity "' . $user_stamp_base . "_mask" . $ext . '" "' . $user_stamp_base . '_fgnd' . $ext . '" "' . $user_stamp_base . $ext . '"';
$commands[] = $im_path . 'mogrify -trim +repage "' . $user_stamp_base . $ext . '"';
$commands[] = 'rm "' . $user_stamp_base . '_mask' . $ext . '"';
- $commands[] = 'rm "' . $user_stamp_fgnd . '_mask' . $ext . '"';
+ $commands[] = 'rm "' . $user_stamp_base . '_fgnd' . $ext . '"';
foreach( $commands as $command ) {
exec( $command );