Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
34c5343103
@ -2,6 +2,15 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
***** ChangeLog for 3.4 compared to 3.3 *****
|
||||||
|
For users:
|
||||||
|
- New: Some performance enhancements
|
||||||
|
|
||||||
|
For developers:
|
||||||
|
|
||||||
|
For translators:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.3 compared to 3.2.3 *****
|
***** ChangeLog for 3.3 compared to 3.2.3 *****
|
||||||
For users:
|
For users:
|
||||||
|
|||||||
@ -357,7 +357,6 @@ foreach ($dirmodels as $reldir)
|
|||||||
// Info
|
// Info
|
||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
$facture->type=0;
|
|
||||||
$nextval=$module->getNextValue($mysoc,$commande);
|
$nextval=$module->getNextValue($mysoc,$commande);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||||
{
|
{
|
||||||
|
|||||||
@ -89,7 +89,7 @@ print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTheme").'</td><
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentMenuHandler").'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentMenuHandler").'</td><td colspan="2">';
|
||||||
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone)) print $conf->smart_menu;
|
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone)) print $conf->smart_menu;
|
||||||
else print $conf->top_menu;
|
else print $conf->standard_menu;
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class Conf
|
|||||||
public $theme; // Contains current theme ("eldy", "auguria", ...)
|
public $theme; // Contains current theme ("eldy", "auguria", ...)
|
||||||
public $css; // Contains full path of css page ("/theme/eldy/style.css.php", ...)
|
public $css; // Contains full path of css page ("/theme/eldy/style.css.php", ...)
|
||||||
//! Used to store current menu handlers
|
//! Used to store current menu handlers
|
||||||
public $top_menu;
|
public $standard_menu;
|
||||||
public $smart_menu;
|
public $smart_menu;
|
||||||
|
|
||||||
public $modules = array(); // List of activated modules
|
public $modules = array(); // List of activated modules
|
||||||
|
|||||||
@ -822,7 +822,6 @@ class FormOther
|
|||||||
$arrayboxtoactivatelabel=array();
|
$arrayboxtoactivatelabel=array();
|
||||||
if (! empty($user->conf->$confuserzone))
|
if (! empty($user->conf->$confuserzone))
|
||||||
{
|
{
|
||||||
$langs->load("boxes");
|
|
||||||
foreach($boxactivated as $box)
|
foreach($boxactivated as $box)
|
||||||
{
|
{
|
||||||
if (! empty($boxidactivatedforuser[$box->id])) continue; // Already visible for user
|
if (! empty($boxidactivatedforuser[$box->id])) continue; // Already visible for user
|
||||||
@ -862,6 +861,8 @@ class FormOther
|
|||||||
|
|
||||||
if ($nbboxactivated)
|
if ($nbboxactivated)
|
||||||
{
|
{
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$emptybox=new ModeleBoxes($db);
|
$emptybox=new ModeleBoxes($db);
|
||||||
|
|
||||||
print '<table width="100%" class="notopnoleftnoright">';
|
print '<table width="100%" class="notopnoleftnoright">';
|
||||||
|
|||||||
@ -378,7 +378,7 @@ class Menubase
|
|||||||
*
|
*
|
||||||
* @param string $mymainmenu Value for mainmenu to filter menu to load (always '')
|
* @param string $mymainmenu Value for mainmenu to filter menu to load (always '')
|
||||||
* @param string $myleftmenu Value for leftmenu to filter menu to load (always '')
|
* @param string $myleftmenu Value for leftmenu to filter menu to load (always '')
|
||||||
* @param int $type_user Filter on type of user (0=Internal,1=External,2=All)
|
* @param int $type_user 0=Menu for backoffice, 1=Menu for front office
|
||||||
* @param string $menu_handler Filter on name of menu_handler used (auguria, eldy...)
|
* @param string $menu_handler Filter on name of menu_handler used (auguria, eldy...)
|
||||||
* @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
|
* @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
|
||||||
* @return array Return array with menu entries for top menu
|
* @return array Return array with menu entries for top menu
|
||||||
@ -415,7 +415,7 @@ class Menubase
|
|||||||
* @param array $newmenu Menu array to complete (in most cases, it's empty, may be already initialized with some menu manager like eldy)
|
* @param array $newmenu Menu array to complete (in most cases, it's empty, may be already initialized with some menu manager like eldy)
|
||||||
* @param string $mymainmenu Value for mainmenu to filter menu to load (often $_SESSION["mainmenu"])
|
* @param string $mymainmenu Value for mainmenu to filter menu to load (often $_SESSION["mainmenu"])
|
||||||
* @param string $myleftmenu Value for leftmenu to filter menu to load (always '')
|
* @param string $myleftmenu Value for leftmenu to filter menu to load (always '')
|
||||||
* @param int $type_user Filter on type of user (0=Internal,1=External,2=All)
|
* @param int $type_user 0=Menu for backoffice, 1=Menu for front office
|
||||||
* @param string $menu_handler Filter on name of menu_handler used (auguria, eldy...)
|
* @param string $menu_handler Filter on name of menu_handler used (auguria, eldy...)
|
||||||
* @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
|
* @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
|
||||||
* @return array Menu array for particular mainmenu value or full tabArray
|
* @return array Menu array for particular mainmenu value or full tabArray
|
||||||
@ -425,12 +425,12 @@ class Menubase
|
|||||||
global $langs, $user, $conf; // To export to dol_eval function
|
global $langs, $user, $conf; // To export to dol_eval function
|
||||||
global $mainmenu,$leftmenu; // To export to dol_eval function
|
global $mainmenu,$leftmenu; // To export to dol_eval function
|
||||||
|
|
||||||
$mainmenu=$mymainmenu; // To export to dol_eval function
|
|
||||||
$leftmenu=$myleftmenu; // To export to dol_eval function
|
|
||||||
|
|
||||||
// We initialize newmenu with first already found menu entries
|
// We initialize newmenu with first already found menu entries
|
||||||
$this->newmenu = $newmenu;
|
$this->newmenu = $newmenu;
|
||||||
|
|
||||||
|
$mainmenu=$mymainmenu; // To export to dol_eval function
|
||||||
|
$leftmenu=$myleftmenu; // To export to dol_eval function
|
||||||
|
|
||||||
// Load datas from database into $tabMenu, later we will complete this->newmenu with values into $tabMenu
|
// Load datas from database into $tabMenu, later we will complete this->newmenu with values into $tabMenu
|
||||||
if (count($tabMenu) == 0) // To avoid to read into database a second time
|
if (count($tabMenu) == 0) // To avoid to read into database a second time
|
||||||
{
|
{
|
||||||
@ -510,7 +510,7 @@ class Menubase
|
|||||||
*
|
*
|
||||||
* @param string $mymainmenu Value for left that defined mainmenu
|
* @param string $mymainmenu Value for left that defined mainmenu
|
||||||
* @param string $myleftmenu Value for left that defined leftmenu
|
* @param string $myleftmenu Value for left that defined leftmenu
|
||||||
* @param int $type_user 0=Internal,1=External,2=All
|
* @param int $type_user Looks for menu entry for 0=Internal users, 1=External users
|
||||||
* @param string $menu_handler Name of menu_handler used ('auguria', 'eldy'...)
|
* @param string $menu_handler Name of menu_handler used ('auguria', 'eldy'...)
|
||||||
* @param array &$tabMenu Array to store new entries found (in most cases, it's empty, but may be alreay filled)
|
* @param array &$tabMenu Array to store new entries found (in most cases, it's empty, but may be alreay filled)
|
||||||
* @return int >0 if OK, <0 if KO
|
* @return int >0 if OK, <0 if KO
|
||||||
@ -530,9 +530,10 @@ class Menubase
|
|||||||
$sql.= " AND m.menu_handler IN ('".$menu_handler."','all')";
|
$sql.= " AND m.menu_handler IN ('".$menu_handler."','all')";
|
||||||
if ($type_user == 0) $sql.= " AND m.usertype IN (0,2)";
|
if ($type_user == 0) $sql.= " AND m.usertype IN (0,2)";
|
||||||
if ($type_user == 1) $sql.= " AND m.usertype IN (1,2)";
|
if ($type_user == 1) $sql.= " AND m.usertype IN (1,2)";
|
||||||
// If type_user == 2, no test required
|
|
||||||
$sql.= " ORDER BY m.position, m.rowid";
|
$sql.= " ORDER BY m.position, m.rowid";
|
||||||
|
|
||||||
|
//$tmp1=dol_microtime_float();
|
||||||
|
//print '>>> 1 0<br>';
|
||||||
dol_syslog(get_class($this)."::menuLoad mymainmenu=".$mymainmenu." myleftmenu=".$myleftmenu." type_user=".$type_user." menu_handler=".$menu_handler." tabMenu size=".count($tabMenu)." sql=".$sql);
|
dol_syslog(get_class($this)."::menuLoad mymainmenu=".$mymainmenu." myleftmenu=".$myleftmenu." type_user=".$type_user." menu_handler=".$menu_handler." tabMenu size=".count($tabMenu)." sql=".$sql);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -567,11 +568,14 @@ class Menubase
|
|||||||
// Define $title
|
// Define $title
|
||||||
if ($enabled)
|
if ($enabled)
|
||||||
{
|
{
|
||||||
$title = $langs->trans($menu['titre']);
|
//$tmp3=dol_microtime_float();
|
||||||
|
//print '>>> 2 '.($tmp3 - $tmp1).'<br>';
|
||||||
|
$title = $langs->trans($menu['titre']);
|
||||||
if ($title == $menu['titre']) // Translation not found
|
if ($title == $menu['titre']) // Translation not found
|
||||||
{
|
{
|
||||||
if (! empty($menu['langs'])) // If there is a dedicated translation file
|
if (! empty($menu['langs'])) // If there is a dedicated translation file
|
||||||
{
|
{
|
||||||
|
//print 'Load file '.$menu['langs'].'<br>';
|
||||||
$langs->load($menu['langs']);
|
$langs->load($menu['langs']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -580,7 +584,7 @@ class Menubase
|
|||||||
$tab_titre = explode("/",$menu['titre']);
|
$tab_titre = explode("/",$menu['titre']);
|
||||||
$title = $langs->trans($tab_titre[0])."/".$langs->trans($tab_titre[1]);
|
$title = $langs->trans($tab_titre[0])."/".$langs->trans($tab_titre[1]);
|
||||||
}
|
}
|
||||||
else if (preg_match('/\|\|/',$menu['titre'])) // To manage different translation
|
else if (preg_match('/\|\|/',$menu['titre'])) // To manage different translation (Title||AltTitle@ConditionForAltTitle)
|
||||||
{
|
{
|
||||||
$tab_title = explode("||",$menu['titre']);
|
$tab_title = explode("||",$menu['titre']);
|
||||||
$alt_title = explode("@",$tab_title[1]);
|
$alt_title = explode("@",$tab_title[1]);
|
||||||
@ -592,6 +596,8 @@ class Menubase
|
|||||||
$title = $langs->trans($menu['titre']);
|
$title = $langs->trans($menu['titre']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//$tmp4=dol_microtime_float();
|
||||||
|
//print '>>> 3 '.($tmp4 - $tmp3).'<br>';
|
||||||
|
|
||||||
// We complete tabMenu
|
// We complete tabMenu
|
||||||
$tabMenu[$b]['rowid'] = $menu['rowid'];
|
$tabMenu[$b]['rowid'] = $menu['rowid'];
|
||||||
|
|||||||
@ -169,7 +169,7 @@ class Translate
|
|||||||
}
|
}
|
||||||
if ($this->defaultlang == 'none_NONE') return 0; // Special language code to not translate keys
|
if ($this->defaultlang == 'none_NONE') return 0; // Special language code to not translate keys
|
||||||
|
|
||||||
dol_syslog("Translate::Load Start domain=".$domain." alt=".$alt." forcelangdir=".$forcelangdir." this->defaultlang=".$this->defaultlang);
|
//dol_syslog("Translate::Load Start domain=".$domain." alt=".$alt." forcelangdir=".$forcelangdir." this->defaultlang=".$this->defaultlang);
|
||||||
|
|
||||||
$newdomain = $domain;
|
$newdomain = $domain;
|
||||||
$modulename = '';
|
$modulename = '';
|
||||||
|
|||||||
@ -2105,7 +2105,7 @@ function dol_print_error($db='',$error='')
|
|||||||
$out.="<br>\n";
|
$out.="<br>\n";
|
||||||
$out.="<b>".$langs->trans("RequestedUrl").":</b> ".$_SERVER["REQUEST_URI"]."<br>\n";;
|
$out.="<b>".$langs->trans("RequestedUrl").":</b> ".$_SERVER["REQUEST_URI"]."<br>\n";;
|
||||||
$out.="<b>".$langs->trans("Referer").":</b> ".(isset($_SERVER["HTTP_REFERER"])?$_SERVER["HTTP_REFERER"]:'')."<br>\n";;
|
$out.="<b>".$langs->trans("Referer").":</b> ".(isset($_SERVER["HTTP_REFERER"])?$_SERVER["HTTP_REFERER"]:'')."<br>\n";;
|
||||||
$out.="<b>".$langs->trans("MenuManager").":</b> ".$conf->top_menu."<br>\n";
|
$out.="<b>".$langs->trans("MenuManager").":</b> ".$conf->standard_menu."<br>\n";
|
||||||
$out.="<br>\n";
|
$out.="<br>\n";
|
||||||
$syslog.="url=".$_SERVER["REQUEST_URI"];
|
$syslog.="url=".$_SERVER["REQUEST_URI"];
|
||||||
$syslog.=", query_string=".$_SERVER["QUERY_STRING"];
|
$syslog.=", query_string=".$_SERVER["QUERY_STRING"];
|
||||||
|
|||||||
@ -46,14 +46,10 @@ class MenuManager
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param array &$menu_array Table of menu entries to show before entries of menu handler
|
|
||||||
* @param array &$menu_array_after Table of menu entries to show after entries of menu handler
|
|
||||||
*/
|
*/
|
||||||
function __construct($db, &$menu_array, &$menu_array_after)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
$this->menu_array=$menu_array;
|
|
||||||
$this->menu_array_after=$menu_array_after;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,6 @@ class MenuManager
|
|||||||
var $type_user=1; // Put 0 for internal users, 1 for external users
|
var $type_user=1; // Put 0 for internal users, 1 for external users
|
||||||
var $atarget=""; // Valeur du target a utiliser dans les liens
|
var $atarget=""; // Valeur du target a utiliser dans les liens
|
||||||
|
|
||||||
|
|
||||||
var $menu_array;
|
var $menu_array;
|
||||||
var $menu_array_after;
|
var $menu_array_after;
|
||||||
|
|
||||||
@ -47,14 +46,10 @@ class MenuManager
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param array &$menu_array Table of menu entries to show before entries of menu handler
|
|
||||||
* @param array &$menu_array_after Table of menu entries to show after entries of menu handler
|
|
||||||
*/
|
*/
|
||||||
function __construct($db, &$menu_array, &$menu_array_after)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
$this->menu_array=$menu_array;
|
|
||||||
$this->menu_array_after=$menu_array_after;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1474,7 +1474,6 @@ function dol_eldy_showmenu($type_user, &$menuentry, &$listofmodulesforexternal)
|
|||||||
{
|
{
|
||||||
//print 'type_user='.$type_user.' module='.$menuentry['module'].' enabled='.$menuentry['enabled'].' perms='.$menuentry['perms'];
|
//print 'type_user='.$type_user.' module='.$menuentry['module'].' enabled='.$menuentry['enabled'].' perms='.$menuentry['perms'];
|
||||||
//print 'ok='.in_array($menuentry['module'], $listofmodulesforexternal);
|
//print 'ok='.in_array($menuentry['module'], $listofmodulesforexternal);
|
||||||
|
|
||||||
if (empty($menuentry['enabled'])) return 0; // Entry disabled by condition
|
if (empty($menuentry['enabled'])) return 0; // Entry disabled by condition
|
||||||
if ($type_user && $menuentry['module'])
|
if ($type_user && $menuentry['module'])
|
||||||
{
|
{
|
||||||
|
|||||||
@ -45,14 +45,10 @@ class MenuManager
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param array &$menu_array Table of menu entries to show before entries of menu handler
|
|
||||||
* @param array &$menu_array_after Table of menu entries to show after entries of menu handler
|
|
||||||
*/
|
*/
|
||||||
function __construct($db, &$menu_array, &$menu_array_after)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
$this->menu_array=$menu_array;
|
|
||||||
$this->menu_array_after=$menu_array_after;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -45,14 +45,10 @@ class MenuManager
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param array &$menu_array Table of menu entries to show before entries of menu handler
|
|
||||||
* @param array &$menu_array_after Table of menu entries to show after entries of menu handler
|
|
||||||
*/
|
*/
|
||||||
function __construct($db,&$menu_array,&$menu_array_after)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
$this->menu_array=$menu_array;
|
|
||||||
$this->menu_array_after=$menu_array_after;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -60,7 +56,7 @@ class MenuManager
|
|||||||
* Show menu
|
* Show menu
|
||||||
*
|
*
|
||||||
* @param string $mode 'top' or 'left'
|
* @param string $mode 'top' or 'left'
|
||||||
* @return int Number of menu entries shown
|
* @return int Number of menu entries shown
|
||||||
*/
|
*/
|
||||||
function showmenu($mode)
|
function showmenu($mode)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -38,14 +38,10 @@ class MenuManager
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param array &$menu_array Table of menu entries to show before entries of menu handler
|
|
||||||
* @param array &$menu_array_after Table of menu entries to show after entries of menu handler
|
|
||||||
*/
|
*/
|
||||||
function __construct($db, &$menu_array, &$menu_array_after)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
$this->menu_array=$menu_array;
|
|
||||||
$this->menu_array_after=$menu_array_after;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -773,6 +773,45 @@ if (! empty($conf->multicompany->enabled) && GETPOST('action') == 'switchentity'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//print 'eee'.$conf->standard_menu;
|
||||||
|
|
||||||
|
// Init menu manager
|
||||||
|
if (empty($user->societe_id)) // If internal user or not defined
|
||||||
|
{
|
||||||
|
$conf->standard_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED);
|
||||||
|
$conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED);
|
||||||
|
}
|
||||||
|
else // If external user
|
||||||
|
{
|
||||||
|
$conf->standard_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?$conf->global->MAIN_MENUFRONT_STANDARD:$conf->global->MAIN_MENUFRONT_STANDARD_FORCED);
|
||||||
|
$conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$conf->global->MAIN_MENUFRONT_SMARTPHONE:$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
|
||||||
|
}
|
||||||
|
// For backward compatibility
|
||||||
|
if (empty($conf->standard_menu)) $conf->standard_menu ='eldy_backoffice.php';
|
||||||
|
elseif ($conf->standard_menu == 'eldy.php') $conf->standard_menu='eldy_backoffice.php';
|
||||||
|
|
||||||
|
// Load the menu manager (only if not already done)
|
||||||
|
$file_menu=empty($conf->browser->phone)?$conf->standard_menu:$conf->smart_menu;
|
||||||
|
if (GETPOST('menu')) $file_menu=GETPOST('menu'); // menu=eldy_backoffice.php
|
||||||
|
if (! class_exists('MenuManager'))
|
||||||
|
{
|
||||||
|
$menufound=0;
|
||||||
|
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
|
||||||
|
foreach($dirmenus as $dirmenu)
|
||||||
|
{
|
||||||
|
$menufound=dol_include_once($dirmenu."standard/".$file_menu);
|
||||||
|
if ($menufound) break;
|
||||||
|
}
|
||||||
|
if (! $menufound) // If failed to include, we try with standard
|
||||||
|
{
|
||||||
|
$file_menu='eldy_backoffice.php';
|
||||||
|
include_once DOL_DOCUMENT_ROOT."/core/menus/standard/".$file_menu;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$menumanager = new MenuManager($db);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
|
|
||||||
@ -798,7 +837,10 @@ if (! function_exists("llxHeader"))
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
|
// html header
|
||||||
|
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
||||||
|
|
||||||
|
// top menu and left menu area
|
||||||
if (empty($conf->global->MAIN_HIDE_TOP_MENU))
|
if (empty($conf->global->MAIN_HIDE_TOP_MENU))
|
||||||
{
|
{
|
||||||
top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring);
|
top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring);
|
||||||
@ -807,6 +849,8 @@ if (! function_exists("llxHeader"))
|
|||||||
{
|
{
|
||||||
left_menu('', $help_url, '', '', 1, $title);
|
left_menu('', $help_url, '', '', 1, $title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// main area
|
||||||
main_area($title);
|
main_area($title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1150,7 +1194,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
{
|
{
|
||||||
global $user, $conf, $langs, $db;
|
global $user, $conf, $langs, $db;
|
||||||
global $dolibarr_main_authentication;
|
global $dolibarr_main_authentication;
|
||||||
global $hookmanager;
|
global $hookmanager,$menumanager;
|
||||||
|
|
||||||
// Instantiate hooks of thirdparty module only if not already define
|
// Instantiate hooks of thirdparty module only if not already define
|
||||||
if (! is_object($hookmanager))
|
if (! is_object($hookmanager))
|
||||||
@ -1162,22 +1206,6 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
|
|
||||||
$toprightmenu='';
|
$toprightmenu='';
|
||||||
|
|
||||||
// Define menu manager in setup
|
|
||||||
if (empty($user->societe_id)) // If internal user or not defined
|
|
||||||
{
|
|
||||||
$conf->top_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED);
|
|
||||||
$conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED);
|
|
||||||
}
|
|
||||||
else // If external user
|
|
||||||
{
|
|
||||||
$conf->top_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?$conf->global->MAIN_MENUFRONT_STANDARD:$conf->global->MAIN_MENUFRONT_STANDARD_FORCED);
|
|
||||||
$conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$conf->global->MAIN_MENUFRONT_SMARTPHONE:$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
|
|
||||||
}
|
|
||||||
// For backward compatibility
|
|
||||||
if ($conf->top_menu == 'eldy.php') $conf->top_menu='eldy_backoffice.php';
|
|
||||||
elseif ($conf->top_menu == 'rodolphe.php') $conf->top_menu='eldy_backoffice.php';
|
|
||||||
if (! $conf->top_menu) $conf->top_menu ='eldy_backoffice.php';
|
|
||||||
|
|
||||||
// For backward compatibility with old modules
|
// For backward compatibility with old modules
|
||||||
if (empty($conf->headerdone)) top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
if (empty($conf->headerdone)) top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
||||||
|
|
||||||
@ -1267,27 +1295,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
/*
|
/*
|
||||||
* Top menu
|
* Top menu
|
||||||
*/
|
*/
|
||||||
$top_menu=empty($conf->browser->phone)?$conf->top_menu:$conf->smart_menu;
|
print "\n".'<!-- Start top horizontal -->'."\n";
|
||||||
if (GETPOST('menu')) $top_menu=GETPOST('menu'); // menu=eldy_backoffice.php
|
|
||||||
|
|
||||||
// Load the top menu manager (only if not already done)
|
|
||||||
if (! class_exists('MenuManager'))
|
|
||||||
{
|
|
||||||
$menufound=0;
|
|
||||||
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
|
|
||||||
foreach($dirmenus as $dirmenu)
|
|
||||||
{
|
|
||||||
$menufound=dol_include_once($dirmenu."standard/".$top_menu);
|
|
||||||
if ($menufound) break;
|
|
||||||
}
|
|
||||||
if (! $menufound) // If failed to include, we try with standard
|
|
||||||
{
|
|
||||||
$top_menu='eldy_backoffice.php';
|
|
||||||
include_once DOL_DOCUMENT_ROOT."/core/menus/standard/".$top_menu;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print "\n".'<!-- Start top horizontal menu '.$top_menu.' -->'."\n";
|
|
||||||
|
|
||||||
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n";
|
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n";
|
||||||
|
|
||||||
@ -1296,10 +1304,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
print '<div id="tmenu_tooltip" class="tmenu">'."\n";
|
print '<div id="tmenu_tooltip" class="tmenu">'."\n";
|
||||||
|
|
||||||
// Show menu
|
// Show menu
|
||||||
$dummy1=array();$dummy2=array();
|
$menumanager->atarget=$target;
|
||||||
$menutop = new MenuManager($db,$dummy1,$dummy2);
|
$menumanager->showmenu('top'); // This contains a \n
|
||||||
$menutop->atarget=$target;
|
|
||||||
$menutop->showmenu('top'); // This contains a \n
|
|
||||||
|
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
@ -1313,7 +1319,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
$company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')';
|
$company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')';
|
||||||
}
|
}
|
||||||
$logintext='<div class="login"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$user->id.'"';
|
$logintext='<div class="login"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$user->id.'"';
|
||||||
$logintext.=$menutop->atarget?(' target="'.$menutop->atarget.'"'):'';
|
$logintext.=$target?(' target="'.$target.'"'):'';
|
||||||
$logintext.='>'.$user->login.'</a>';
|
$logintext.='>'.$user->login.'</a>';
|
||||||
if ($user->societe_id) $logintext.=$companylink;
|
if ($user->societe_id) $logintext.=$companylink;
|
||||||
$logintext.='</div>';
|
$logintext.='</div>';
|
||||||
@ -1349,7 +1355,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
&& $_SESSION["dol_authmode"] != 'http')
|
&& $_SESSION["dol_authmode"] != 'http')
|
||||||
{
|
{
|
||||||
$logouttext .='<a href="'.DOL_URL_ROOT.'/user/logout.php"';
|
$logouttext .='<a href="'.DOL_URL_ROOT.'/user/logout.php"';
|
||||||
$logouttext .=$menutop->atarget?(' target="'.$menutop->atarget.'"'):'';
|
$logouttext .=$atarget?(' target="'.$atarget.'"'):'';
|
||||||
$logouttext .='>';
|
$logouttext .='>';
|
||||||
$logouttext .= img_picto($langs->trans('Logout'), 'logout.png', 'class="login"');
|
$logouttext .= img_picto($langs->trans('Logout'), 'logout.png', 'class="login"');
|
||||||
$logouttext .='</a>';
|
$logouttext .='</a>';
|
||||||
@ -1415,7 +1421,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
function left_menu($menu_array_before, $helppagename='', $moresearchform='', $menu_array_after='', $leftmenuwithoutmainarea=0, $title='')
|
function left_menu($menu_array_before, $helppagename='', $moresearchform='', $menu_array_after='', $leftmenuwithoutmainarea=0, $title='')
|
||||||
{
|
{
|
||||||
global $user, $conf, $langs, $db;
|
global $user, $conf, $langs, $db;
|
||||||
global $hookmanager;
|
global $hookmanager, $menumanager;
|
||||||
|
|
||||||
$searchform='';
|
$searchform='';
|
||||||
$bookmarks='';
|
$bookmarks='';
|
||||||
@ -1481,33 +1487,14 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
$bookmarks=printBookmarksList($db, $langs);
|
$bookmarks=printBookmarksList($db, $langs);
|
||||||
}
|
}
|
||||||
|
|
||||||
$left_menu=empty($conf->browser->phone)?$conf->top_menu:$conf->smart_menu;
|
|
||||||
if (GETPOST('menu')) $left_menu=GETPOST('menu'); // menu=eldy_backoffice.php
|
|
||||||
|
|
||||||
// Load the menu manager (only if not already done)
|
|
||||||
if (! class_exists('MenuManager'))
|
|
||||||
{
|
|
||||||
$menufound=0;
|
|
||||||
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
|
|
||||||
foreach($dirmenus as $dirmenu)
|
|
||||||
{
|
|
||||||
$menufound=dol_include_once($dirmenu."standard/".$left_menu);
|
|
||||||
if ($menufound) break;
|
|
||||||
}
|
|
||||||
if (! $menufound) // If failed to include, we try with standard
|
|
||||||
{
|
|
||||||
$top_menu='eldy_backoffice.php';
|
|
||||||
include_once DOL_DOCUMENT_ROOT."/core/menus/standard/".$top_menu;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Left column
|
// Left column
|
||||||
print '<!-- Begin left menu - menu '.$left_menu.' -->'."\n";
|
print '<!-- Begin left menu -->'."\n";
|
||||||
|
|
||||||
print '<div class="vmenu">'."\n";
|
print '<div class="vmenu">'."\n";
|
||||||
|
|
||||||
$menuleft=new MenuManager($db,$menu_array_before,$menu_array_after);
|
$menumanager->menu_array = $menu_array_before;
|
||||||
$menuleft->showmenu('left'); // output menu_array and menu found in database
|
$menumanager->menu_array_after = $menu_array_after;
|
||||||
|
$menumanager->showmenu('left'); // output menu_array and menu found in database
|
||||||
|
|
||||||
|
|
||||||
// Show other forms
|
// Show other forms
|
||||||
|
|||||||
@ -226,7 +226,7 @@ $server->register(
|
|||||||
// Entry values
|
// Entry values
|
||||||
array('authentication'=>'tns:authentication','actioncomm'=>'tns:actioncomm'),
|
array('authentication'=>'tns:authentication','actioncomm'=>'tns:actioncomm'),
|
||||||
// Exit values
|
// Exit values
|
||||||
array('result'=>'tns:result'),
|
array('result'=>'tns:result','id'=>'xsd:string'),
|
||||||
$ns,
|
$ns,
|
||||||
$ns.'#updateActionComm',
|
$ns.'#updateActionComm',
|
||||||
$styledoc,
|
$styledoc,
|
||||||
@ -563,7 +563,10 @@ function updateActionComm($authentication,$actioncomm)
|
|||||||
if ((! $error) && ($objectfound))
|
if ((! $error) && ($objectfound))
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
$objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''));
|
$objectresp=array(
|
||||||
|
'result'=>array('result_code'=>'OK', 'result_label'=>''),
|
||||||
|
'id'=>$object->id
|
||||||
|
);
|
||||||
}
|
}
|
||||||
elseif ($objectfound)
|
elseif ($objectfound)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -233,7 +233,7 @@ $server->register(
|
|||||||
// Entry values
|
// Entry values
|
||||||
array('authentication'=>'tns:authentication','thirdparty'=>'tns:thirdparty'),
|
array('authentication'=>'tns:authentication','thirdparty'=>'tns:thirdparty'),
|
||||||
// Exit values
|
// Exit values
|
||||||
array('result'=>'tns:result'),
|
array('result'=>'tns:result','id'=>'xsd:string'),
|
||||||
$ns,
|
$ns,
|
||||||
$ns.'#updateThirdParty',
|
$ns.'#updateThirdParty',
|
||||||
$styledoc,
|
$styledoc,
|
||||||
@ -571,7 +571,7 @@ function updateThirdParty($authentication,$thirdparty)
|
|||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$result=$object->update($fuser);
|
$result=$object->update($thirdparty['id'],$fuser);
|
||||||
if ($result <= 0) {
|
if ($result <= 0) {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -580,7 +580,10 @@ function updateThirdParty($authentication,$thirdparty)
|
|||||||
if ((! $error) && ($objectfound))
|
if ((! $error) && ($objectfound))
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
$objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''));
|
$objectresp=array(
|
||||||
|
'result'=>array('result_code'=>'OK', 'result_label'=>''),
|
||||||
|
'id'=>$object->id
|
||||||
|
);
|
||||||
}
|
}
|
||||||
elseif ($objectfound)
|
elseif ($objectfound)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user