|
@@ -1,5 +1,6 @@
|
|
<?php
|
|
<?php
|
|
-/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
|
|
|
|
+/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
|
|
+ * Copyright (C) 2017 Regis Houssin <regis.houssin@capnetworks.com>
|
|
*
|
|
*
|
|
* 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
|
|
@@ -68,7 +69,7 @@ llxHeader('',$langs->trans("Setup"),$help_url);
|
|
print '<!-- Force style container -->'."\n".'<style>
|
|
print '<!-- Force style container -->'."\n".'<style>
|
|
.id-container {
|
|
.id-container {
|
|
width: 100%;
|
|
width: 100%;
|
|
-}
|
|
|
|
|
|
+}
|
|
</style>';
|
|
</style>';
|
|
|
|
|
|
$arrayofnatures=array('core'=>$langs->transnoentitiesnoconv("Core"), 'external'=>$langs->transnoentitiesnoconv("External").' - '.$langs->trans("AllPublishers"));
|
|
$arrayofnatures=array('core'=>$langs->transnoentitiesnoconv("Core"), 'external'=>$langs->transnoentitiesnoconv("External").' - '.$langs->trans("AllPublishers"));
|
|
@@ -165,6 +166,7 @@ foreach ($modulesdir as $dir)
|
|
|
|
|
|
// Gives the possibility to the module, to provide his own family info and position of this family
|
|
// Gives the possibility to the module, to provide his own family info and position of this family
|
|
if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) {
|
|
if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) {
|
|
|
|
+ if (!is_array($familyinfo)) $familyinfo=array();
|
|
$familyinfo = array_merge($familyinfo, $objMod->familyinfo);
|
|
$familyinfo = array_merge($familyinfo, $objMod->familyinfo);
|
|
$familykey = key($objMod->familyinfo);
|
|
$familykey = key($objMod->familyinfo);
|
|
} else {
|
|
} else {
|
|
@@ -305,13 +307,13 @@ if ($objMod->isCoreOrExternalModule() == 'external')
|
|
|
|
|
|
// Define text of description of module
|
|
// Define text of description of module
|
|
$text='';
|
|
$text='';
|
|
-
|
|
|
|
|
|
+
|
|
if ($mode == 'desc')
|
|
if ($mode == 'desc')
|
|
{
|
|
{
|
|
if ($moduledesc) $text.=$moduledesc.'<br><br>';
|
|
if ($moduledesc) $text.=$moduledesc.'<br><br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<strong>'.$langs->trans("Version").':</strong> '.$version;
|
|
$text.='<strong>'.$langs->trans("Version").':</strong> '.$version;
|
|
-
|
|
|
|
|
|
+
|
|
$textexternal='';
|
|
$textexternal='';
|
|
if ($objMod->isCoreOrExternalModule() == 'external')
|
|
if ($objMod->isCoreOrExternalModule() == 'external')
|
|
{
|
|
{
|
|
@@ -346,8 +348,8 @@ if ($mode == 'desc')
|
|
$text.='<strong>'.$langs->trans("LastActivationIP").':</strong> ';
|
|
$text.='<strong>'.$langs->trans("LastActivationIP").':</strong> ';
|
|
$text.= $ip;
|
|
$text.= $ip;
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
$moduledesclong=$objMod->getDescLong();
|
|
$moduledesclong=$objMod->getDescLong();
|
|
if ($moduledesclong) $text.='<br><hr><div class="moduledesclong">'.$moduledesclong.'<div>';
|
|
if ($moduledesclong) $text.='<br><hr><div class="moduledesclong">'.$moduledesclong.'<div>';
|
|
}
|
|
}
|
|
@@ -360,9 +362,9 @@ if ($mode == 'feature')
|
|
$text.='<br><strong>'.$langs->trans("RequiredBy").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("RequiredBy").':</strong> ';
|
|
if (count($objMod->requiredby)) $text.=join(',', $objMod->requiredby);
|
|
if (count($objMod->requiredby)) $text.=join(',', $objMod->requiredby);
|
|
else $text.=$langs->trans("None");
|
|
else $text.=$langs->trans("None");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><br><br>';
|
|
$text.='<br><br><br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<strong>'.$langs->trans("AddRemoveTabs").':</strong> ';
|
|
$text.='<strong>'.$langs->trans("AddRemoveTabs").':</strong> ';
|
|
if (isset($objMod->tabs) && is_array($objMod->tabs) && count($objMod->tabs))
|
|
if (isset($objMod->tabs) && is_array($objMod->tabs) && count($objMod->tabs))
|
|
{
|
|
{
|
|
@@ -375,9 +377,9 @@ if ($mode == 'feature')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddDictionaries").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddDictionaries").':</strong> ';
|
|
if (isset($objMod->dictionaries) && isset($objMod->dictionaries['tablib']) && is_array($objMod->dictionaries['tablib']) && count($objMod->dictionaries['tablib']))
|
|
if (isset($objMod->dictionaries) && isset($objMod->dictionaries['tablib']) && is_array($objMod->dictionaries['tablib']) && count($objMod->dictionaries['tablib']))
|
|
{
|
|
{
|
|
@@ -389,9 +391,9 @@ if ($mode == 'feature')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddBoxes").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddBoxes").':</strong> ';
|
|
if (isset($objMod->boxes) && is_array($objMod->boxes) && count($objMod->boxes))
|
|
if (isset($objMod->boxes) && is_array($objMod->boxes) && count($objMod->boxes))
|
|
{
|
|
{
|
|
@@ -403,27 +405,27 @@ if ($mode == 'feature')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddModels").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddModels").':</strong> ';
|
|
if (isset($objMod->module_parts) && isset($objMod->module_parts['models']) && $objMod->module_parts['models'])
|
|
if (isset($objMod->module_parts) && isset($objMod->module_parts['models']) && $objMod->module_parts['models'])
|
|
{
|
|
{
|
|
$text.=$langs->trans("Yes");
|
|
$text.=$langs->trans("Yes");
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddSubstitutions").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddSubstitutions").':</strong> ';
|
|
if (isset($objMod->module_parts) && isset($objMod->module_parts['substitutions']) && $objMod->module_parts['substitutions'])
|
|
if (isset($objMod->module_parts) && isset($objMod->module_parts['substitutions']) && $objMod->module_parts['substitutions'])
|
|
{
|
|
{
|
|
$text.=$langs->trans("Yes");
|
|
$text.=$langs->trans("Yes");
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddSheduledJobs").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddSheduledJobs").':</strong> ';
|
|
if (isset($objMod->cronjobs) && is_array($objMod->cronjobs) && count($objMod->cronjobs))
|
|
if (isset($objMod->cronjobs) && is_array($objMod->cronjobs) && count($objMod->cronjobs))
|
|
{
|
|
{
|
|
@@ -435,55 +437,72 @@ if ($mode == 'feature')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddTriggers").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddTriggers").':</strong> ';
|
|
if (isset($objMod->module_parts) && isset($objMod->module_parts['triggers']) && $objMod->module_parts['triggers'])
|
|
if (isset($objMod->module_parts) && isset($objMod->module_parts['triggers']) && $objMod->module_parts['triggers'])
|
|
{
|
|
{
|
|
$text.=$langs->trans("Yes");
|
|
$text.=$langs->trans("Yes");
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddHooks").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddHooks").':</strong> ';
|
|
if (isset($objMod->module_parts) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks']))
|
|
if (isset($objMod->module_parts) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks']))
|
|
{
|
|
{
|
|
- $i=0;
|
|
|
|
- foreach($objMod->module_parts['hooks'] as $val)
|
|
|
|
|
|
+ $i=0;
|
|
|
|
+ foreach($objMod->module_parts['hooks'] as $key => $val)
|
|
{
|
|
{
|
|
- $text.=($i?', ':'').($val);
|
|
|
|
- $i++;
|
|
|
|
|
|
+ if ($key == 'entity') continue;
|
|
|
|
+
|
|
|
|
+ // For special values
|
|
|
|
+ if ($key == 'data')
|
|
|
|
+ {
|
|
|
|
+ if (is_array($val))
|
|
|
|
+ {
|
|
|
|
+ foreach($val as $value)
|
|
|
|
+ {
|
|
|
|
+ $text.=($i?', ':'').($value);
|
|
|
|
+ $i++;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $text.=($i?', ':'').($val);
|
|
|
|
+ $i++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddPermissions").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddPermissions").':</strong> ';
|
|
if (isset($objMod->rights) && is_array($objMod->rights) && count($objMod->rights))
|
|
if (isset($objMod->rights) && is_array($objMod->rights) && count($objMod->rights))
|
|
{
|
|
{
|
|
$i=0;
|
|
$i=0;
|
|
foreach($objMod->rights as $val)
|
|
foreach($objMod->rights as $val)
|
|
{
|
|
{
|
|
- $text.=($i?', ':'').($val[1]);
|
|
|
|
- $i++;
|
|
|
|
|
|
+ $text.=($i?', ':'').($val[1]);
|
|
|
|
+ $i++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddMenus").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddMenus").':</strong> ';
|
|
if (isset($objMod->menu) && ! empty($objMod->menu)) // objMod can be an array or just an int 1
|
|
if (isset($objMod->menu) && ! empty($objMod->menu)) // objMod can be an array or just an int 1
|
|
{
|
|
{
|
|
$text.=$langs->trans("Yes");
|
|
$text.=$langs->trans("Yes");
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddExportProfiles").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddExportProfiles").':</strong> ';
|
|
if (isset($objMod->export_label) && is_array($objMod->export_label) && count($objMod->export_label))
|
|
if (isset($objMod->export_label) && is_array($objMod->export_label) && count($objMod->export_label))
|
|
{
|
|
{
|
|
@@ -495,9 +514,9 @@ if ($mode == 'feature')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddImportProfiles").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddImportProfiles").':</strong> ';
|
|
if (isset($objMod->import_label) && is_array($objMod->import_label) && count($objMod->import_label))
|
|
if (isset($objMod->import_label) && is_array($objMod->import_label) && count($objMod->import_label))
|
|
{
|
|
{
|
|
@@ -509,9 +528,9 @@ if ($mode == 'feature')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else $text.=$langs->trans("No");
|
|
else $text.=$langs->trans("No");
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br>';
|
|
$text.='<br>';
|
|
-
|
|
|
|
|
|
+
|
|
$text.='<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
|
|
$text.='<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
|
|
$text.=$langs->trans("DetectionNotPossible");
|
|
$text.=$langs->trans("DetectionNotPossible");
|
|
}
|
|
}
|