diff options
author | Greg Froese <greg.froese@gmail.com> | 2009-05-20 03:56:56 +0000 |
---|---|---|
committer | Greg Froese <greg.froese@gmail.com> | 2009-05-20 03:56:56 +0000 |
commit | 63b91d8aee8e40497d865591d16ee1716e0c9c15 (patch) | |
tree | f7b942ecd204a23fe7c6a76084dfeb18eedad761 | |
parent | b328fd43ed7315fb4189f2408f6a1c10f8a9f3e7 (diff) | |
download | elgg-63b91d8aee8e40497d865591d16ee1716e0c9c15.tar.gz elgg-63b91d8aee8e40497d865591d16ee1716e0c9c15.tar.bz2 |
put watermark masks in proper place
-rw-r--r-- | actions/upload.php | 4 | ||||
-rw-r--r-- | lib/watermark.php | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/actions/upload.php b/actions/upload.php index d9129aef7..dd50d2381 100644 --- a/actions/upload.php +++ b/actions/upload.php @@ -6,8 +6,8 @@ */
global $CONFIG;
- include dirname(dirname(__FILE__)) . "/lib/resize.php";
- include dirname(dirname(__FILE__)) . "/lib/watermark.php";
+ include_once dirname(dirname(__FILE__)) . "/lib/resize.php";
+ include_once dirname(dirname(__FILE__)) . "/lib/watermark.php";
// Get common variables
$access_id = (int) get_input("access_id");
diff --git a/lib/watermark.php b/lib/watermark.php index 773aed565..813e298a7 100644 --- a/lib/watermark.php +++ b/lib/watermark.php @@ -1,6 +1,8 @@ <?php function tp_watermark($thumbs) { + include_once dirname(__FILE__) . "/tidypics.php"; + global $CONFIG; $user = get_user_entity_as_row($album->owner_guid); @@ -25,9 +27,8 @@ function tp_watermark($thumbs) { $watermark_filename = preg_replace("/[^\w-]+/", "-", $watermark_filename); $watermark_filename = trim($watermark_filename, '-'); - $user_stamp_base = strtolower(dirname(__FILE__) . "/" . $viewer->name . "_" . $watermark_filename . "_stamp"); - $user_stamp_base = preg_replace("/[^\w-]+/", "-", $user_stamp_base); - $user_stamp_base = trim($user_stamp_base, '-'); + $user_stamp_base = tp_get_img_dir(); + $user_stamp_base .= strtolower($viewer->name . "_" . $watermark_filename . "_stamp"); if( !file_exists( $user_stamp_base . $ext )) { //create the watermark if it doesn't exist $commands = array(); |