Skip to content

Commit b2df706

Browse files
committed
Correctly get the name of the validation bots
1 parent 8682ef1 commit b2df706

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

controller/manage/queue/item.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ protected function validate($action)
481481

482482
$post_as_robot = $this->request->variable('post_as_robot', 1);
483483
$has_robot = !empty($this->contrib->type->forum_robot);
484+
$robot_name = $has_robot ? \users_overlord::get_user($this->contrib->type->forum_robot, 'username', true) : '';
484485

485486
$this->template->assign_vars(array(
486487
'ERROR' => implode('<br />', $error),
@@ -490,8 +491,8 @@ protected function validate($action)
490491
'S_CONFIRM_ACTION' => $this->queue->get_url($action),
491492
'S_SHOW_POST_AS_OPTION' => $has_robot,
492493
'POST_AS_ROBOT' => $post_as_robot,
494+
'ROBOT_NAME' => $robot_name,
493495
'POST_AS_LABEL' => $this->user->lang['POST_AS_' . strtoupper($action)],
494-
'ROBOT_NAME' => ucfirst($this->contrib->type->name),
495496
));
496497

497498
return false;

language/en/manage.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
'PLEASE_WAIT_FOR_TOOL' => 'Please wait for the tool to finish running.',
8787
'POST_AS_APPROVE' => 'Approve as',
8888
'POST_AS_DENY' => 'Deny as',
89-
'POST_AS_ROBOT' => '%s Robot',
9089
'POST_AS_SELF' => 'Yourself',
9190
'PUBLIC_NOTES' => 'Public release notes',
9291

styles/prosilver/template/manage/queue_validate.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h2>{{ PAGE_TITLE }}</h2>
3131
<dl>
3232
<dt style="width: auto"><label>{{ POST_AS_LABEL ~ lang('COLON') }}</label></dt>
3333
<dd style="margin: 0 0 12px 10%">
34-
<label><input type="radio" name="post_as_robot" value="1"{% if POST_AS_ROBOT %} checked="checked"{% endif %} />{{ lang('POST_AS_ROBOT', ROBOT_NAME) }}</label>
34+
<label><input type="radio" name="post_as_robot" value="1"{% if POST_AS_ROBOT %} checked="checked"{% endif %} />{{ ROBOT_NAME }}</label>
3535
<label><input type="radio" name="post_as_robot" value="0"{% if not POST_AS_ROBOT %} checked="checked"{% endif %} />{{ lang('POST_AS_SELF') }}</label>
3636
</dd>
3737
</dl>

0 commit comments

Comments
 (0)