mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-02 13:10:48 -04:00
Start of the dialog to specify the watermark placement. For convience, using the imagemagik nomicalture regarding watermark locations (east, west, center, etc.)
You can drag the watermark around but it doesn't stay in place. Need to figure out how to resize the dialog box and all of the supporting javascript
This commit is contained in:
@@ -22,13 +22,12 @@ class Watermark_Controller extends Controller {
|
||||
$form = watermark::get_watermark_form();
|
||||
if ($form->validate()) {
|
||||
$file = $_POST["file"];
|
||||
|
||||
// Format of the file is config["upload.directory"]/uploadfile-hash-filename.
|
||||
$index = strrpos($file, "-");
|
||||
$watermark_target = VARPATH . substr($file, strrpos($file, "-") + 1);
|
||||
if (rename($file, $watermark_target)) {
|
||||
module::set_var("watermark", "watermark_image_path", $watermark_target);
|
||||
|
||||
$pathinfo = pathinfo($file);
|
||||
$watermark_target = $pathinfo["basename"];
|
||||
if (copy($file, VARPATH . $watermark_target)) {
|
||||
module::set_var("watermark", "watermark_image_path", $watermark_target);
|
||||
unlink($file);
|
||||
$form->success = _("Watermark saved");
|
||||
} else {
|
||||
// @todo set and error message
|
||||
|
||||
Reference in New Issue
Block a user