aboutsummaryrefslogtreecommitdiff
path: root/actions/upload.php
diff options
context:
space:
mode:
authorGreg Froese <greg.froese@gmail.com>2009-05-13 13:26:12 +0000
committerGreg Froese <greg.froese@gmail.com>2009-05-13 13:26:12 +0000
commitbc21cbc465d9cd4d86265246826ba02515541152 (patch)
tree6f8fc7b6d54ed9d3c5494ced2a44d671b2481871 /actions/upload.php
parentb32a22535f4b41187475618769d0a4d07aba6684 (diff)
downloadelgg-bc21cbc465d9cd4d86265246826ba02515541152.tar.gz
elgg-bc21cbc465d9cd4d86265246826ba02515541152.tar.bz2
fixed sorting for most viewed and watermarking files to show proper owner when watermarking images in a group album
Diffstat (limited to 'actions/upload.php')
-rw-r--r--actions/upload.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/actions/upload.php b/actions/upload.php
index b31921483..f114f50ad 100644
--- a/actions/upload.php
+++ b/actions/upload.php
@@ -187,7 +187,8 @@
$watermark_filename = preg_replace("/[^\w-]+/", "-", $watermark_filename);
$watermark_filename = trim($watermark_filename, '-');
- $user_stamp_base = dirname(__FILE__) . "/" . $username . "_" . $watermark_filename . "_stamp";
+ $viewer = get_loggedin_user();
+ $user_stamp_base = dirname(__FILE__) . "/" . $viewer->name . "_" . $watermark_filename . "_stamp";
if( !file_exists( $user_stamp_base . $ext )) { //create the watermark if it doesn't exist
$commands = array();
$commands[] = 'convert -size 300x50 xc:grey30 -pointsize 20 -gravity center -draw "fill grey70 text 0,0 \''. $watermark_text . '\'" '. $user_stamp_base . '_fgnd' . $ext;