@@ -281,6 +281,8 @@ function apbct_get_fields_any($arr, $message=array(), $email = null, $nickname =
281
281
'CSRFToken ' ,
282
282
'page ' ,
283
283
'id ' ,
284
+ 'skin ' ,
285
+ 'sec_code '
284
286
);
285
287
286
288
// Reset $message if we have a sign-up data
@@ -316,9 +318,10 @@ function apbct_get_fields_any($arr, $message=array(), $email = null, $nickname =
316
318
$ not_reg = true ;
317
319
}else {
318
320
foreach ($ registration as $ needle ){
319
- if (stripos ($ key , $ needle ) !== false ||
320
- ( $ key == 'page ' && $ value == 'register ' ) || //OsClass
321
- ( $ key == 'task ' && $ value == 'registration.register ' ) // Joomla!
321
+ if (stripos ($ key , $ needle ) !== false ||
322
+ ( $ key == 'page ' && $ value == 'register ' ) || //OsClass
323
+ ( $ key == 'task ' && $ value == 'registration.register ' ) || // Joomla!
324
+ ( $ key == 'do ' && $ value == 'register ' ) // DLE!
322
325
){
323
326
$ reg = true ;
324
327
continue (2 );
@@ -511,6 +514,19 @@ function apbct_die($comment, $registration = false, $additional_text = null){
511
514
die (json_encode (array ('status ' =>'ok ' , 'data ' => array ('errors ' => $ comment ))));
512
515
}
513
516
517
+ // DLE integration
518
+ if ( $ detected_cms === 'DLE ' ) {
519
+ if ( ! headers_sent () ) {
520
+ header ('Content-Type:application/json ' );
521
+ }
522
+
523
+ if (isset ($ _REQUEST ['mod ' ]) && $ _REQUEST ['mod ' ] === 'addcomments ' ) {
524
+ die (json_encode (array ("error " => true , "content " => "<script> \nvar form = document.getElementById('dle-comments-form'); \n\n DLEalert(' " . $ comment . "', 'Добавление комментария'); \n var timeval = new Date().getTime(); \n\n\n\t\t\n\tif ( dle_captcha_type == \"1 \" ) { \n\t\tif ( typeof grecaptcha != \"undefined \" ) { \n\t\t grecaptcha.reset(); \n\t\t} \n } else if (dle_captcha_type == \"2 \") { \n\t\tif ( typeof grecaptcha != \"undefined \" ) { \n\t\t\tvar recaptcha_public_key = $('#g-recaptcha-response').data('key'); \n\t\t\tgrecaptcha.execute(recaptcha_public_key, {action: 'comments'}).then(function(token) { \n\t\t\t$('#g-recaptcha-response').val(token); \n\t\t\t}); \n\t\t} \n\t} \n\n\tif ( form.question_answer ) { \n\n\t form.question_answer.value =''; \n jQuery('#dle-question').text(''); \n } \n\n\tif ( document.getElementById('dle-captcha') ) { \n\t\tform.sec_code.value = ''; \n\t\tdocument.getElementById('dle-captcha').innerHTML = '<img src= \"' + dle_root + 'engine/modules/antibot/antibot.php?rand=' + timeval + ' \" width= \"160 \" height= \"80 \" alt= \"\">'; \n\t} \n\t\t\n </script> " ), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ));
525
+ }
526
+
527
+ die (json_encode (array ('status ' =>'ok ' , 'text ' => $ comment )));
528
+ }
529
+
514
530
die (json_encode (array ('apbct ' => array ('blocked ' => true , 'comment ' => $ comment ,))));
515
531
516
532
// File exists?
0 commit comments