Skip to content

Commit 7f28144

Browse files
committed
Add switch for description if not recaptcha
1 parent d0ff245 commit 7f28144

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

controller/main.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ private function display_pb()
542542
}
543543

544544
$s_hidden_fields['mode'] = 'post';
545-
546545
// Visual Confirmation - Show images (borrowed from includes/ucp/ucp_register.php)
547546
if (!$this->auth->acl_get('u_pastebin_post_novc'))
548547
{
@@ -595,6 +594,9 @@ private function display_pb()
595594
}
596595
$highlight_select = $this->util->highlight_select($highlight);
597596

597+
$captcha_in_use = $this->config['captcha_plugin'];
598+
$is_recaptcha = strpos($captcha_in_use, 'recaptcha');
599+
598600
add_form_key('pastebinform');
599601

600602
$this->template->assign_vars(array(
@@ -608,10 +610,12 @@ private function display_pb()
608610

609611
'FILESIZE' => $this->config['max_filesize'],
610612

613+
'IS_RECAPTCHA' => $is_recaptcha,
614+
611615
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
612616
'S_ERROR' => (isset($s_error)) ? $s_error : '',
613-
'S_HIDDEN_FIELDS' => (sizeof($s_hidden_fields)) ? build_hidden_fields($s_hidden_fields) : '',
614-
'S_CONFIRM_CODE' => (!$this->auth->acl_get('u_pastebin_post_novc')) ? true : false,
617+
'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
618+
'S_CONFIRM_CODE' => !$this->auth->acl_get('u_pastebin_post_novc'),
615619
));
616620
}
617621
}

language/de/pastebin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
'PASTEBIN' => 'Pastebin',
5858
'PASTEBIN_AUTH_NO_VIEW' => 'Du hast keine Berechtigung, die Seite anzuzeigen.',
5959
'PASTEBIN_AUTH_NO_POST' => 'Du hast keine Berechtigung, einen Eintrag zu erstellen.',
60-
'PASTEBIN_CONFIRM' => 'Visuelle Bestätigung',
61-
'PASTEBIN_CONFIRM_EXPLAIN' => 'Gib den Code genau so ein, wie du ihn siehst; Groß- und Kleinschreibung wird nicht unterschieden, Null wird nicht verwendet.',
60+
'PASTEBIN_CONFIRM' => 'Anti-Spam-Bot-Maßnahmen',
61+
'PASTEBIN_CONFIRM_EXPLAIN' => 'Bitte löse die Anti-Spam-Bot-Maßnahmen, damit dein Eintrag abgesendet werden kann.',
6262
'PASTEBIN_EMPTY_FILEUPLOAD' => 'Die hochgeladene Datei ist leer.',
6363
'PASTEBIN_EXPLAIN' => 'Im Pastebin kannst du Codeabschnitte oder auch ganze Dateien ablegen, um sie zum Beispiel später in einem Supportthema zu verlinken.',
6464
'PASTEBIN_HELLO' => 'Hat dich jemand hierher geschickt?',

language/en/pastebin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
'PASTEBIN' => 'Pastebin',
5757
'PASTEBIN_AUTH_NO_VIEW' => 'You are not authorized to view this page.',
5858
'PASTEBIN_AUTH_NO_POST' => 'You are not authorized to enter a new entry.',
59-
'PASTEBIN_CONFIRM' => 'Visual confirmation',
60-
'PASTEBIN_CONFIRM_EXPLAIN' => 'Enter the code exactly as you see it; capitalization will be ignored, zero is not used.',
59+
'PASTEBIN_CONFIRM' => 'Spambot countermeasures',
60+
'PASTEBIN_CONFIRM_EXPLAIN' => 'Please solve the spambot countermeasures to submit your entry.',
6161
'PASTEBIN_EMPTY_FILEUPLOAD' => 'The uploaded file is empty.',
6262
'PASTEBIN_EXPLAIN' => 'In the pastebin, you can paste code snippets or whole files, for example to add a link to them to a support topic.',
6363
'PASTEBIN_HELLO' => 'Did someone direct you here?',

styles/prosilver/template/pastebin_post.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ <h3>{{ lang('PASTEBIN_SNIPPET_TEXT') }}</h3>
5454
</fieldset>
5555

5656
{% if PASTEBIN_CAPTCHA_TEMPLATE %}
57-
<h3>{{ lang('PASTEBIN_CONFIRM') }}</h3>
58-
<p>{{ lang('PASTEBIN_CONFIRM_EXPLAIN') }}</p>
57+
{% if not IS_RECAPTCHA %}
58+
<h3>{{ lang('PASTEBIN_CONFIRM') }}</h3>
59+
<p>{{ lang('PASTEBIN_CONFIRM_EXPLAIN') }}</p>
60+
{% endif %}
5961

60-
6162
{% DEFINE CAPTCHA_TAB_INDEX = 8 %}
6263
{% INCLUDE ''~ PASTEBIN_CAPTCHA_TEMPLATE ~'' %}
6364

0 commit comments

Comments
 (0)