From cfd6efc6ec32bdc81d5a1f4c59f41e896378d2fc Mon Sep 17 00:00:00 2001 From: Howard Yeend Date: Fri, 21 Jan 2022 11:15:12 +0000 Subject: [PATCH 1/2] prompt to create a new page once an image is uploaded --- index.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 2bb2258..3365d90 100644 --- a/index.php +++ b/index.php @@ -259,10 +259,10 @@ function file_put_contents($n, $d) if ( $action == "edit" ) $html .= "\n"; else - $html .= "

Title:

\n"; + $html .= "

Title:

\n"; if ( $action == "new" ) - $text = ""; + $text = $_REQUEST['newText']; $html .= "

\n"; $html .= "

"; @@ -309,7 +309,10 @@ function file_put_contents($n, $d) if ( move_uploaded_file($_FILES['userfile']['tmp_name'], BASE_PATH . "/images/$dstName") === true ) { - $html = "

File '$dstName' uploaded

\n"; + $html = "

File '$dstName' uploaded
"; + $uploadedName = pathinfo($dstName); + $filename = $uploadedName['filename']; + $html .= "Create a new page with this image in it

"; } else { From 47af03c55dd8f0aee5569219e2519e7210d0ea82 Mon Sep 17 00:00:00 2001 From: Howard Yeend Date: Fri, 21 Jan 2022 11:20:30 +0000 Subject: [PATCH 2/2] rm un-needed quotes --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 3365d90..dfb23eb 100644 --- a/index.php +++ b/index.php @@ -312,7 +312,7 @@ function file_put_contents($n, $d) $html = "

File '$dstName' uploaded
"; $uploadedName = pathinfo($dstName); $filename = $uploadedName['filename']; - $html .= "Create a new page with this image in it

"; + $html .= "Create a new page with this image in it

"; } else {