mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
@@ -77,6 +77,7 @@ class modMyModule extends DolibarrModules
|
||||
// 'login' => 0, // Set this to 1 if module has its own login method directory (core/login)
|
||||
// 'substitutions' => 0, // Set this to 1 if module has its own substitution function file (core/substitutions)
|
||||
// 'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus)
|
||||
// 'theme' => 0, // Set this to 1 if module has its own theme directory (core/theme)
|
||||
// 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl)
|
||||
// 'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode)
|
||||
// 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
|
||||
|
||||
@@ -85,7 +85,7 @@ if (GETPOST('action','alpha')=='install')
|
||||
}
|
||||
else
|
||||
{
|
||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupIsReadyForUse")."</font>";
|
||||
$mesg = '<div class="ok">'.$langs->trans("SetupIsReadyForUse").'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,10 +96,9 @@ if (GETPOST('action','alpha')=='install')
|
||||
*/
|
||||
|
||||
$dirins=DOL_DOCUMENT_ROOT_ALT;
|
||||
$vale=(is_dir($dirins));
|
||||
$system=PHP_OS;
|
||||
$dirins_ok=(is_dir($dirins));
|
||||
|
||||
$wikihelp='EN:Installation_-_Upgrade|FR:Installation_-_Mise_à_jour|ES:Instalaci&omodulon_-_Actualizaci&omodulon';
|
||||
$wikihelp='EN:Installation_-_Upgrade|FR:Installation_-_Mise_à_jour|ES:Instalación_-_Actualización';
|
||||
llxHeader('',$langs->trans("Upgrade"),$wikihelp);
|
||||
|
||||
print_fiche_titre($langs->trans("Upgrade"),'','setup');
|
||||
@@ -142,7 +141,7 @@ print '<b>'.$langs->trans("StepNb",3).'</b>: ';
|
||||
print $langs->trans("UnpackPackageInDolibarrRoot",$dolibarrroot).'<br>';
|
||||
if (! empty($conf->global->MAIN_ONLINE_INSTALL_MODULE))
|
||||
{
|
||||
if ($vale == 1 && $dirins != 'DOL_DOCUMENT_ROOT_ALT')
|
||||
if ($dirins_ok && $dirins != 'DOL_DOCUMENT_ROOT_ALT')
|
||||
{
|
||||
print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
|
||||
print '<input type="hidden" name="action" value="install">';
|
||||
|
||||
@@ -52,7 +52,7 @@ class Conf
|
||||
public $smart_menu;
|
||||
|
||||
public $modules = array(); // List of activated modules
|
||||
public $modules_parts = array('triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array()); // List of modules parts
|
||||
public $modules_parts = array('triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'theme'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array()); // List of modules parts
|
||||
|
||||
// TODO Remove all thoose tabs with one generic
|
||||
public $triggers_modules = array();
|
||||
@@ -188,7 +188,7 @@ class Conf
|
||||
if (! isset($this->modules_parts[$partname]) || ! is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); }
|
||||
$arrValue = json_decode($value,true);
|
||||
if (is_array($arrValue) && ! empty($arrValue)) $value = $arrValue;
|
||||
else if (in_array($partname,array('login','menus','substitutions','triggers','tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/';
|
||||
else if (in_array($partname,array('login','menus','substitutions','triggers','tpl','theme'))) $value = '/'.$modulename.'/core/'.$partname.'/';
|
||||
else if (in_array($partname,array('models'))) $value = '/'.$modulename.'/';
|
||||
else if ($value == 1) $value = '/'.$modulename.'/core/modules/'.$partname.'/';
|
||||
$this->$varname = array_merge($this->$varname, array($modulename => $value)); // TODO deprecated
|
||||
|
||||
@@ -159,9 +159,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
{
|
||||
global $conf,$langs,$bc;
|
||||
|
||||
|
||||
$dirtheme=dol_buildpath($conf->global->MAIN_FORCETHEMEDIR.'/theme',0);
|
||||
$urltheme=dol_buildpath($conf->global->MAIN_FORCETHEMEDIR.'/theme',1);
|
||||
$dirthemes=array_merge(array($conf->global->MAIN_FORCETHEMEDIR.'/theme'),(array) $conf->modules_parts['themes']);
|
||||
|
||||
$selected_theme=$conf->global->MAIN_THEME;
|
||||
if (! empty($fuser)) $selected_theme=$fuser->conf->MAIN_THEME;
|
||||
@@ -216,8 +214,19 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">';
|
||||
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
$handle=opendir($dirtheme);
|
||||
|
||||
$i=0;
|
||||
|
||||
foreach($dirthemes as $dir)
|
||||
{
|
||||
$dirtheme=dol_buildpath($dir,0);
|
||||
$urltheme=dol_buildpath($dir,1);
|
||||
|
||||
if (is_dir($dirtheme))
|
||||
{
|
||||
$handle=opendir($dirtheme);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($subdir = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.'
|
||||
@@ -257,6 +266,10 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
if ($i % $thumbsbyrow == 0) print '</tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($i % $thumbsbyrow != 0)
|
||||
{
|
||||
while ($i % $thumbsbyrow != 0)
|
||||
|
||||
Reference in New Issue
Block a user