Skip to content
Snippets Groups Projects
Commit d4e8e58e authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Code fixes

parent c5101ae5
Branches
Tags
No related merge requests found
<?php <?php
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -158,7 +158,7 @@ if ($conf->use_javascript_ajax) ...@@ -158,7 +158,7 @@ if ($conf->use_javascript_ajax)
} }
else else
{ {
if($conf->global->AGENDA_DISABLE_EXT == 0) if (empty($conf->global->AGENDA_DISABLE_EXT))
{ {
print '<a href="'.$_SERVER['PHP_SELF'].'?save=1&AGENDA_DISABLE_EXT=1">'.img_picto($langs->trans("Enabled"),'on').'</a>'; print '<a href="'.$_SERVER['PHP_SELF'].'?save=1&AGENDA_DISABLE_EXT=1">'.img_picto($langs->trans("Enabled"),'on').'</a>';
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2015 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
...@@ -121,11 +121,11 @@ print '<td align="center" width="20">'; ...@@ -121,11 +121,11 @@ print '<td align="center" width="20">';
print '</td>'; print '</td>';
print '<td align="center" width="100">'; print '<td align="center" width="100">';
if($conf->global->MAIN_SUBMODULE_EXPEDITION == 0) if (empty($conf->global->MAIN_SUBMODULE_EXPEDITION))
{ {
print '<a href="confexped.php?action=activate_sending">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>'; print '<a href="confexped.php?action=activate_sending">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
} }
else if($conf->global->MAIN_SUBMODULE_EXPEDITION == 1) else
{ {
print '<a href="confexped.php?action=disable_sending">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>'; print '<a href="confexped.php?action=disable_sending">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
} }
...@@ -141,11 +141,11 @@ print '<td align="center" width="20">'; ...@@ -141,11 +141,11 @@ print '<td align="center" width="20">';
print '</td>'; print '</td>';
print '<td align="center" width="100">'; print '<td align="center" width="100">';
if($conf->global->MAIN_SUBMODULE_LIVRAISON == 0) if (empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
{ {
print '<a href="confexped.php?action=activate_delivery">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>'; print '<a href="confexped.php?action=activate_delivery">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
} }
else if($conf->global->MAIN_SUBMODULE_LIVRAISON == 1) else
{ {
print '<a href="confexped.php?action=disable_delivery">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>'; print '<a href="confexped.php?action=disable_delivery">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
} }
......
<?php <?php
/* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> /* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 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
...@@ -95,11 +96,11 @@ if ($conf->use_javascript_ajax) ...@@ -95,11 +96,11 @@ if ($conf->use_javascript_ajax)
} }
else else
{ {
if($conf->global->ECM_AUTO_TREE_ENABLED == 0) if (empty($conf->global->ECM_AUTO_TREE_ENABLED))
{ {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_ECM_AUTO_TREE_ENABLED">'.img_picto($langs->trans("Disabled"),'off').'</a>'; print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_ECM_AUTO_TREE_ENABLED">'.img_picto($langs->trans("Disabled"),'off').'</a>';
} }
else if($conf->global->USER_MAIL_REQUIRED == 1) else if(! empty($conf->global->USER_MAIL_REQUIRED))
{ {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_ECM_AUTO_TREE_ENABLED">'.img_picto($langs->trans("Enabled"),'on').'</a>'; print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_ECM_AUTO_TREE_ENABLED">'.img_picto($langs->trans("Enabled"),'on').'</a>';
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012-2103 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2012-2105 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
...@@ -408,11 +408,11 @@ else // Show ...@@ -408,11 +408,11 @@ else // Show
} }
print '</td>'; print '</td>';
print '<td align="center" width="140">'; print '<td align="center" width="140">';
if ($conf->global->PDF_SECURITY_ENCRYPTION == 0) if (empty($conf->global->PDF_SECURITY_ENCRYPTION))
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=activate_pdfsecurity">'.$langs->trans("Activate").'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=activate_pdfsecurity">'.$langs->trans("Activate").'</a>';
} }
if($conf->global->PDF_SECURITY_ENCRYPTION == 1) else
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_pdfsecurity">'.$langs->trans("Disable").'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_pdfsecurity">'.$langs->trans("Disable").'</a>';
} }
......
<?php <?php
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2007 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013-2015 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
...@@ -470,18 +470,18 @@ $var=!$var; ...@@ -470,18 +470,18 @@ $var=!$var;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print '<td colspan="3">'.$langs->trans("DisableForgetPasswordLinkOnLogonPage").'</td>'; print '<td colspan="3">'.$langs->trans("DisableForgetPasswordLinkOnLogonPage").'</td>';
print '<td align="center" width="60">'; print '<td align="center" width="60">';
if($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK == 1) if(! empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK))
{ {
print img_picto($langs->trans("Active"),'tick'); print img_picto($langs->trans("Active"),'tick');
} }
print '</td>'; print '</td>';
if ($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK == 0) if (empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK))
{ {
print '<td align="center" width="100">'; print '<td align="center" width="100">';
print '<a href="security.php?action=activate_MAIN_SECURITY_DISABLEFORGETPASSLINK">'.$langs->trans("Activate").'</a>'; print '<a href="security.php?action=activate_MAIN_SECURITY_DISABLEFORGETPASSLINK">'.$langs->trans("Activate").'</a>';
print "</td>"; print "</td>";
} }
if($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK == 1) if (!empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK))
{ {
print '<td align="center" width="100">'; print '<td align="center" width="100">';
print '<a href="security.php?action=disable_MAIN_SECURITY_DISABLEFORGETPASSLINK">'.$langs->trans("Disable").'</a>'; print '<a href="security.php?action=disable_MAIN_SECURITY_DISABLEFORGETPASSLINK">'.$langs->trans("Disable").'</a>';
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 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
...@@ -124,11 +125,11 @@ if ($conf->use_javascript_ajax) ...@@ -124,11 +125,11 @@ if ($conf->use_javascript_ajax)
} }
else else
{ {
if($conf->global->USER_MAIL_REQUIRED == 0) if (empty($conf->global->USER_MAIL_REQUIRED))
{ {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_USER_MAIL_REQUIRED">'.img_picto($langs->trans("Disabled"),'off').'</a>'; print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_USER_MAIL_REQUIRED">'.img_picto($langs->trans("Disabled"),'off').'</a>';
} }
else if($conf->global->USER_MAIL_REQUIRED == 1) else
{ {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_USER_MAIL_REQUIRED">'.img_picto($langs->trans("Enabled"),'on').'</a>'; print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_USER_MAIL_REQUIRED">'.img_picto($langs->trans("Enabled"),'on').'</a>';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment