mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Removed deprecated option. Use the conf->module->enabled instead.
This commit is contained in:
@@ -15,17 +15,14 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/admin/droitpret.php
|
||||
\ingroup pret
|
||||
\brief Page d'administration/configuration du module DroitPret
|
||||
\version $Revision$
|
||||
*/
|
||||
* \file htdocs/admin/droitpret.php
|
||||
* \ingroup pret
|
||||
* \brief Page d'administration/configuration du module DroitPret
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
||||
@@ -71,7 +68,7 @@ print_fiche_titre($langs->trans("PretSetup"),$linkback,'setup');
|
||||
print "<br>";
|
||||
|
||||
|
||||
print_fiche_titre($langs->trans("MemberMainOptions"));
|
||||
print_fiche_titre($langs->trans("MemberMainOptions"),'','');
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
|
||||
@@ -293,8 +293,8 @@ print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
// Old canvas feature
|
||||
if ($conf->global->PRODUCT_CANVAS_ABILITY)
|
||||
// Add droitpret feature
|
||||
if ($conf->droitpret->enabled)
|
||||
{
|
||||
// Propose utilisation de canvas.
|
||||
// Ces derniers ne sont geres que par le menu default
|
||||
@@ -308,50 +308,47 @@ if ($conf->global->PRODUCT_CANVAS_ABILITY)
|
||||
require_once(DOL_DOCUMENT_ROOT . "/product.class.php");
|
||||
$dir = DOL_DOCUMENT_ROOT . "/product/templates/";
|
||||
|
||||
if ($conf->global->PRODUCT_CANVAS_ABILITY)
|
||||
if (is_dir($dir) )
|
||||
{
|
||||
if(is_dir($dir) )
|
||||
{
|
||||
$handle=opendir($dir);
|
||||
$handle=opendir($dir);
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (substr($file, strlen($file) -10) == '.class.php' && substr($file,0,8) == 'product.')
|
||||
{
|
||||
if (substr($file, strlen($file) -10) == '.class.php' && substr($file,0,8) == 'product.')
|
||||
$parts = explode('.',$file);
|
||||
$classname = 'Product'.ucfirst($parts[1]);
|
||||
require_once($dir.$file);
|
||||
$module = new $classname();
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
print $module->description;
|
||||
|
||||
print '</td><td align="right">';
|
||||
|
||||
$const = "PRODUIT_SPECIAL_".strtoupper($parts[1]);
|
||||
if ($conf->global->$const)
|
||||
{
|
||||
$parts = explode('.',$file);
|
||||
$classname = 'Product'.ucfirst($parts[1]);
|
||||
require_once($dir.$file);
|
||||
$module = new $classname();
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
print $module->description;
|
||||
|
||||
print img_tick();
|
||||
print '</td><td align="right">';
|
||||
|
||||
$const = "PRODUIT_SPECIAL_".strtoupper($parts[1]);
|
||||
if ($conf->global->$const)
|
||||
{
|
||||
print img_tick();
|
||||
print '</td><td align="right">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&spe='.$parts[1].'&value=0">'.$langs->trans("Disable").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' </td><td align="right">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&spe='.$parts[1].'&value=1">'.$langs->trans("Activate").'</a>';
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&spe='.$parts[1].'&value=0">'.$langs->trans("Disable").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' </td><td align="right">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&spe='.$parts[1].'&value=1">'.$langs->trans("Activate").'</a>';
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr><td><b>ERROR</b>: $dir is not a directory !</td></tr>\n";
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr><td><b>ERROR</b>: $dir is not a directory !</td></tr>\n";
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user