Fix: broken features
This commit is contained in:
parent
671006316a
commit
63564f8d50
@ -35,10 +35,12 @@ print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
|||||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
||||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||||
// JQuery. Must be before other includes
|
// JQuery. Must be before other includes
|
||||||
|
$ext='.js';
|
||||||
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz';
|
||||||
print '<!-- Includes JS for JQuery -->'."\n";
|
print '<!-- Includes JS for JQuery -->'."\n";
|
||||||
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min.js"></script>'."\n";
|
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min.js"></script>'."\n";
|
||||||
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.$conf_css.'" />'."\n";
|
print '<link rel="stylesheet" type="text/css" href="'.dol_escape_htmltag($conf_css).'" />'."\n";
|
||||||
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER;
|
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER;
|
||||||
print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
||||||
</head>';
|
</head>';
|
||||||
@ -68,12 +70,15 @@ print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
|||||||
<input type="text" <?php echo $disabled; ?> id="username" name="username" class="flat" size="15" maxlength="25" value="<?php echo $login; ?>" tabindex="1" /></td>
|
<input type="text" <?php echo $disabled; ?> id="username" name="username" class="flat" size="15" maxlength="25" value="<?php echo $login; ?>" tabindex="1" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if ($select_entity) { ?>
|
<?php
|
||||||
<tr><td valign="top" nowrap="nowrap"> <b><?php echo $langs->trans('Entity'); ?></b> </td>
|
if (! empty($hookmanager->resArray['options'])) {
|
||||||
<td valign="top" nowrap="nowrap">
|
foreach ($hookmanager->resArray['options'] as $option)
|
||||||
<?php echo $select_entity; ?>
|
{
|
||||||
</td></tr>
|
echo '<!-- Option by hook -->';
|
||||||
<?php } ?>
|
echo $option;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if ($captcha) { ?>
|
<?php if ($captcha) { ?>
|
||||||
<tr><td valign="middle" nowrap="nowrap"> <b><?php echo $langs->trans('SecurityCode'); ?></b></td>
|
<tr><td valign="middle" nowrap="nowrap"> <b><?php echo $langs->trans('SecurityCode'); ?></b></td>
|
||||||
|
|||||||
@ -35,10 +35,12 @@ print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
|||||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
||||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||||
// JQuery. Must be before other includes
|
// JQuery. Must be before other includes
|
||||||
|
$ext='.js';
|
||||||
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz';
|
||||||
print '<!-- Includes JS for JQuery -->'."\n";
|
print '<!-- Includes JS for JQuery -->'."\n";
|
||||||
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min.js"></script>'."\n";
|
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min.js"></script>'."\n";
|
||||||
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.$conf_css.'" />'."\n";
|
print '<link rel="stylesheet" type="text/css" href="'.dol_escape_htmltag($conf_css).'" />'."\n";
|
||||||
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER;
|
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER;
|
||||||
print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
||||||
</head>';
|
</head>';
|
||||||
@ -59,11 +61,15 @@ print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
|||||||
<div id="parameterBox">
|
<div id="parameterBox">
|
||||||
<div id="logBox"><strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong><input type="text" <?php echo $disabled; ?> id="username" name="username" class="flat" size="15" maxlength="25" value="<?php echo $login; ?>" tabindex="1" /></div>
|
<div id="logBox"><strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong><input type="text" <?php echo $disabled; ?> id="username" name="username" class="flat" size="15" maxlength="25" value="<?php echo $login; ?>" tabindex="1" /></div>
|
||||||
|
|
||||||
<?php if ($select_entity) { ?>
|
<?php
|
||||||
<div><?php echo $langs->trans('Entity'); ?>
|
if (! empty($hookmanager->resArray['options'])) {
|
||||||
<?php echo $select_entity; ?>
|
foreach ($hookmanager->resArray['options'] as $option)
|
||||||
</div>
|
{
|
||||||
<?php } ?>
|
echo '<!-- Option by hook -->';
|
||||||
|
echo $option;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if ($captcha) { ?>
|
<?php if ($captcha) { ?>
|
||||||
<div class="captchaBox">
|
<div class="captchaBox">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2008-2011 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2008-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2008-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2008-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -27,7 +27,8 @@ define("NOLOGIN",1); // This means this output page does not require to be logge
|
|||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||||
if ($conf->ldap->enabled) require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
|
if (! empty($conf->ldap->enabled))
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
|
||||||
|
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
@ -42,7 +43,7 @@ if ($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action', 'alpha');
|
||||||
$mode=$dolibarr_main_authentication;
|
$mode=$dolibarr_main_authentication;
|
||||||
if (! $mode) $mode='http';
|
if (! $mode) $mode='http';
|
||||||
|
|
||||||
@ -50,6 +51,14 @@ $username = GETPOST('username');
|
|||||||
$passwordmd5 = GETPOST('passwordmd5');
|
$passwordmd5 = GETPOST('passwordmd5');
|
||||||
$conf->entity = (GETPOST('entity') ? GETPOST('entity') : 1);
|
$conf->entity = (GETPOST('entity') ? GETPOST('entity') : 1);
|
||||||
|
|
||||||
|
// Instantiate hooks of thirdparty module only if not already define
|
||||||
|
if (! is_object($hookmanager))
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
|
$hookmanager=new HookManager($db);
|
||||||
|
}
|
||||||
|
$hookmanager->initHooks(array('passwordforgottenpage'));
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Actions
|
* Actions
|
||||||
@ -204,31 +213,6 @@ elseif (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
|
|||||||
$urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png';
|
$urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Entity combobox
|
|
||||||
$select_entity='';
|
|
||||||
if (! empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_HIDE_LOGIN_COMBOBOX) && ! $disabled)
|
|
||||||
{
|
|
||||||
$rowspan++;
|
|
||||||
$lastuser='';
|
|
||||||
$lastentity = GETPOST('entity');
|
|
||||||
|
|
||||||
if (! empty($conf->global->MULTICOMPANY_COOKIE_ENABLED))
|
|
||||||
{
|
|
||||||
$prefix=dol_getprefix();
|
|
||||||
$entityCookieName = 'DOLENTITYID_'.$prefix;
|
|
||||||
if (isset($_COOKIE[$entityCookieName]))
|
|
||||||
{
|
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/cookie.class.php';
|
|
||||||
$lastuser = ''; $lastentity = '';
|
|
||||||
$entityCookie = new DolCookie($conf->file->cookie_cryptkey);
|
|
||||||
$cookieValue = $entityCookie->_getCookie($entityCookieName);
|
|
||||||
list($lastuser, $lastentity) = explode('|', $cookieValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$select_entity = $mc->select_entities($lastentity, 'entity', ' tabindex="2"');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Security graphical code
|
// Security graphical code
|
||||||
if (function_exists("imagecreatefrompng") && ! $disabled)
|
if (function_exists("imagecreatefrompng") && ! $disabled)
|
||||||
{
|
{
|
||||||
@ -236,6 +220,11 @@ if (function_exists("imagecreatefrompng") && ! $disabled)
|
|||||||
$captcha_refresh = img_picto($langs->trans("Refresh"),'refresh','id="captcha_refresh_img"');
|
$captcha_refresh = img_picto($langs->trans("Refresh"),'refresh','id="captcha_refresh_img"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Execute hook getPasswordForgottenPageOptions
|
||||||
|
// Should be an array with differents options in $hookmanager->resArray
|
||||||
|
$parameters=array('entity' => GETPOST('entity','int'));
|
||||||
|
$hookmanager->executeHooks('getPasswordForgottenPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
include $template_dir.'passwordforgotten.tpl.php'; // To use native PHP
|
include $template_dir.'passwordforgotten.tpl.php'; // To use native PHP
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user