mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-01 09:19:09 -04:00
Resolve Trac Ticket #32
This commit is contained in:
@@ -80,10 +80,18 @@ class Comments_Controller extends REST_Controller {
|
||||
$form->add_comment->email->value,
|
||||
$form->add_comment->url->value);
|
||||
|
||||
$form->add_comment->inputs["name"]->value("");
|
||||
$active = user::active();
|
||||
if ($active->guest) {
|
||||
$form->add_comment->inputs["name"]->value("");
|
||||
$form->add_comment->email->value("");
|
||||
$form->add_comment->url->value("");
|
||||
} else {
|
||||
$form->add_comment->inputs["name"]->value($active->full_name);
|
||||
$form->add_comment->email->value($active->email);
|
||||
$form->add_comment->url->value($active->url);
|
||||
}
|
||||
|
||||
$form->add_comment->text->value("");
|
||||
$form->add_comment->email->value("");
|
||||
$form->add_comment->url->value("");
|
||||
print json_encode(
|
||||
array("result" => "success",
|
||||
"resource" => ($comment->state == "published"
|
||||
|
||||
Reference in New Issue
Block a user