Global: Fix CAPTCHA image missing in registration and lost password pages - refs #3839

Squashed commit of the following:

commit 48538d6c59e5adac9ec9703fe35ae498d40d4792
Author: Yannick Warnier <ywarnier@beeznest.org>
Date:   Wed Aug 11 01:02:56 2021 +0200

    Minor - Code styling

commit ebfb1db3aec7ec5b8410f3f7a260fb2dfe4209c8
Merge: 899bfcfe76 5c946a9b44
Author: Yannick Warnier <ywarnier@beeznest.org>
Date:   Wed Aug 11 00:59:03 2021 +0200

    Merge branch '3839' of https://github.com/christianbeeznest/chamilo-lms into 3839

commit 5c946a9b44
Author: Christian <christian1827@gmail.com>
Date:   Tue May 25 19:02:23 2021 -0500

    Fix captcha image is not displayed in lost password and inscription pages - refs #3839

commit b2ac9da2ad
Merge: e07a555432 615b90bd41
Author: Christian <christian1827@gmail.com>
Date:   Tue May 25 18:49:54 2021 -0500

    Merge branch '1.11.x' of https://github.com/chamilo/chamilo-lms into 1.11.x

commit e07a555432
Merge: 44251f9d10 a562622d50
Author: Christian <christian1827@gmail.com>
Date:   Fri May 21 14:51:16 2021 -0500

    Merge branch '1.11.x' of https://github.com/chamilo/chamilo-lms into 1.11.x

commit 44251f9d10
Merge: b06bdd0a50 9d41b63eb5
Author: Christian <christian1827@gmail.com>
Date:   Fri May 21 10:51:30 2021 -0500

    qMerge branch '1.11.x' of https://github.com/chamilo/chamilo-lms into 1.11.x

commit b06bdd0a50
Merge: f35edf31a4 7e3f9afbd1
Author: Christian <christian1827@gmail.com>
Date:   Fri May 21 05:50:29 2021 -0500

    Merge branch '1.11.x' of https://github.com/chamilo/chamilo-lms into 1.11.x

commit f35edf31a4
Merge: d43e3a5f2e 905a21037e
Author: Christian <christian1827@gmail.com>
Date:   Thu May 20 15:05:44 2021 -0500

    Merge branch '1.11.x' of https://github.com/chamilo/chamilo-lms into 1.11.x

commit d43e3a5f2e
Author: Christian <christian1827@gmail.com>
Date:   Wed May 19 17:34:20 2021 -0500

    Fixed Document tool : pagination broken #3748
pull/3893/head
Yannick Warnier 5 years ago
parent 899bfcfe76
commit c28eecb18d
  1. 2
      main/auth/inscription.php
  2. 2
      main/auth/lostPassword.php
  3. 11
      main/inc/lib/SortableTableFromArrayConfig.php

@ -394,7 +394,7 @@ if ($user_already_registered_show_terms === false &&
//'output' => 'gif'
],
];
$form->setLayout('inline');
$captcha_question = $form->addElement(
'CAPTCHA_Image',
'captcha_question',

@ -69,7 +69,7 @@ if ($allowCaptcha) {
//'output' => 'gif'
],
];
$form->setLayout('inline');
$captcha_question = $form->addElement(
'CAPTCHA_Image',
'captcha_question',

@ -26,6 +26,7 @@ class SortableTableFromArrayConfig extends SortableTable
private $column_order;
private $doc_filter;
private $handlePagination = true;
/**
* Constructor.
@ -53,6 +54,10 @@ class SortableTableFromArrayConfig extends SortableTable
$this->column_order = $column_order;
$this->doc_filter = $doc_filter;
// if data is empty the pagination is handled with query in database
if (empty($data)) {
$this->handlePagination = false;
}
parent::__construct(
$tableName,
null,
@ -86,7 +91,10 @@ class SortableTableFromArrayConfig extends SortableTable
$this->doc_filter
);
// return array_slice($table, $from, $this->per_page);
if ($this->handlePagination) {
return array_slice($table, $from, $this->per_page);
}
return $table;
}
@ -108,3 +116,4 @@ class SortableTableFromArrayConfig extends SortableTable
}
}
}

Loading…
Cancel
Save