diff --git a/html/index.php b/html/index.php
index 09521f8d2..3547a4cd8 100644
--- a/html/index.php
+++ b/html/index.php
@@ -150,6 +150,7 @@ echo '
+
';
@@ -235,19 +236,19 @@ if (isset($_REQUEST['reconnect'])&&isset($_REQUEST['backurl']))
Indiquer le code que vous lisez dans l'image
-
';
+
- Reload Image
+ Reload Image
-
+
diff --git a/html/js/scripts.js b/html/js/scripts.js
index 401ce3e3b..60d67fd4b 100644
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@ -27,6 +27,8 @@ var ask_reload = 0;
// tag_choose Element which contains all the selected tags
var tag_choose = '';
var aDraggableElement = new Array();
+
+// document.viewport depends of prototype.js
var viewport = document.viewport.getDimensions(); // Gets the viewport as an object literal
var width = viewport.width; // Usable window width
var height = viewport.height;
diff --git a/html/login.php b/html/login.php
index 713142081..3e4ab0b79 100644
--- a/html/login.php
+++ b/html/login.php
@@ -60,7 +60,7 @@ if ( isset ($_POST["p_user"] ) )
require_once NOALYSS_INCLUDE."/class/user.class.php";
$User=new User($rep);
$User->Check(false,'LOGIN');
- if ($g_captcha == true)
+ if (defined('NOALYSS_CAPTCHA') && NOALYSS_CAPTCHA==true)
{
include("securimage/securimage.php");
$img = new Securimage();
diff --git a/include/constant.php b/include/constant.php
index 58197aea7..c1189acf3 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -79,9 +79,12 @@ if ( ! defined('OVERRIDE_PARAM')) {
* Ini session
*/
+if (! defined('NOALYSS_CAPTCHA') )
+{
+ define ("NOALYSS_CAPTCHA",false);
+}
-global $g_captcha,$g_failed,$g_succeed;
-$g_captcha=false;
+global $g_failed,$g_succeed;
$g_failed="✖";
$g_succeed="✓";
define ('SMALLX','#xe816;');
diff --git a/include/lib/config_file.php b/include/lib/config_file.php
index b78065858..8a94e53b4 100644
--- a/include/lib/config_file.php
+++ b/include/lib/config_file.php
@@ -252,6 +252,8 @@ function display_file_config($p_array,$from_setup=1,$p_os=1)
print ("// for exporting document in PDF\r\n");
print ("// \$pdftk = /usr/bin/pdftk \r\n");
print ("// \$pdftk = /snap/bin/pdftk \r\n");
+ print ("// uncomment to activate the captcha on login page\r\n");
+ print ("// define('NOALYSS_CAPTCHA',true);\r\n");
}
/*!\brief create the config file
diff --git a/include/verif_bilan.inc.php b/include/verif_bilan.inc.php
index 0dff0148d..622eebd8d 100644
--- a/include/verif_bilan.inc.php
+++ b/include/verif_bilan.inc.php
@@ -27,7 +27,7 @@ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
require_once NOALYSS_INCLUDE.'/class/user.class.php';
require_once NOALYSS_INCLUDE.'/class/acc_bilan.class.php';
-global $g_captcha,$g_failed,$g_succeed;
+global $g_failed,$g_succeed;
$cn=Dossier::connect();
$exercice=$g_user->get_exercice();
echo '';