mirror of
https://github.com/pikami/palm-paste.git
synced 2024-11-27 14:15:43 +00:00
Paste title defaults to 'Untitled'
This commit is contained in:
parent
7d3230f1d5
commit
9a979592e1
@ -20,7 +20,7 @@
|
|||||||
<label for="text">New paste:</label>
|
<label for="text">New paste:</label>
|
||||||
<?php
|
<?php
|
||||||
if($edit_mode == true){
|
if($edit_mode == true){
|
||||||
printf('<textarea class="form-control" rows="5" id="text" name="text">'.$row['text'].'</textarea>');
|
echo '<textarea class="form-control" rows="5" id="text" name="text">'.$row['text'].'</textarea>';
|
||||||
} else printf('<textarea class="form-control" rows="5" id="text" name="text"></textarea>');
|
} else printf('<textarea class="form-control" rows="5" id="text" name="text"></textarea>');
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
2
post.php
2
post.php
@ -33,7 +33,7 @@ if(isset($_POST["type"])){
|
|||||||
$title = "Untitled";
|
$title = "Untitled";
|
||||||
$text = $_POST["text"];
|
$text = $_POST["text"];
|
||||||
$exposure = 0;
|
$exposure = 0;
|
||||||
if(isset($_POST["title"]))
|
if(isset($_POST["title"]) && $_POST["title"]!="")
|
||||||
$title = $_POST["title"];
|
$title = $_POST["title"];
|
||||||
if(isset($_POST["exposure"]) && is_numeric($_POST["exposure"]))
|
if(isset($_POST["exposure"]) && is_numeric($_POST["exposure"]))
|
||||||
$exposure = $_POST["exposure"];
|
$exposure = $_POST["exposure"];
|
||||||
|
Loading…
Reference in New Issue
Block a user