aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/watermark.php10
-rw-r--r--views/default/forms/photos/admin/settings.php4
-rw-r--r--views/default/forms/photos/admin/settings/main.php8
3 files changed, 13 insertions, 9 deletions
diff --git a/lib/watermark.php b/lib/watermark.php
index a2aebffd9..f7c228af1 100644
--- a/lib/watermark.php
+++ b/lib/watermark.php
@@ -54,11 +54,11 @@ function tp_gd_watermark($image) {
}
// plugins can do their own watermark and return false to prevent this function from running
- if (trigger_plugin_hook('tp_watermark', 'gd', $image, true) === false) {
+ if (elgg_trigger_plugin_hook('tp_watermark', 'gd', $image, true) === false) {
return;
}
- $owner = elgg_get_logged_in_user_guid();
+ $owner = elgg_get_logged_in_user_entity();
$watermark_text = tp_process_watermark_text($watermark_text, $owner);
@@ -101,7 +101,7 @@ function tp_imagick_watermark($filename) {
return true;
}
- $owner = get_loggedin_user();
+ $owner = elgg_get_logged_in_user_entity();
$watermark_text = tp_process_watermark_text($watermark_text, $owner);
@@ -144,7 +144,7 @@ function tp_im_cmdline_watermark($filename) {
}
// plugins can do their own watermark and return false to prevent this function from running
- if (trigger_plugin_hook('tp_watermark', 'imagemagick', $filename, true) === false) {
+ if (elgg_trigger_plugin_hook('tp_watermark', 'imagemagick', $filename, true) === false) {
return;
}
@@ -159,7 +159,7 @@ function tp_im_cmdline_watermark($filename) {
}
- $owner = get_loggedin_user();
+ $owner = elgg_get_logged_in_user_entity();
$watermark_text = tp_process_watermark_text($watermark_text, $owner);
diff --git a/views/default/forms/photos/admin/settings.php b/views/default/forms/photos/admin/settings.php
index 2b6399a67..7e9c17ac2 100644
--- a/views/default/forms/photos/admin/settings.php
+++ b/views/default/forms/photos/admin/settings.php
@@ -28,10 +28,6 @@ echo elgg_view('input/submit', array('value' => elgg_echo("save")));
return true;
-// Watermark Text
-$form_body .= "<p>" . elgg_echo('tidypics:settings:watermark') . "<br />";
-$form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "</p>";
-
// Quota Size
$quota = $plugin->quota;
if (!$quota) {
diff --git a/views/default/forms/photos/admin/settings/main.php b/views/default/forms/photos/admin/settings/main.php
index 349c951f9..352a9c5a1 100644
--- a/views/default/forms/photos/admin/settings/main.php
+++ b/views/default/forms/photos/admin/settings/main.php
@@ -26,3 +26,11 @@ echo elgg_view('input/text', array(
'value' => $plugin->maxfilesize,
));
echo '</div>';
+
+// Watermark Text
+echo '<div>' . elgg_echo('tidypics:settings:watermark');
+echo elgg_view("input/text", array(
+ 'name' => 'params[watermark_text]',
+ 'value' => $plugin->watermark_text,
+));
+echo '</div>';