diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php
index 42fb67c8bde..7453b84d477 100644
--- a/htdocs/comm/action/peruser.php
+++ b/htdocs/comm/action/peruser.php
@@ -729,8 +729,8 @@ foreach ($usernames as $username)
{
$var = ! $var;
echo "
";
- echo '| ';
- print $username->getNomUrl(-1,'',0,0,24,1,'');
+ echo ' | ';
+ print $username->getNomUrl(-1,'',0,0,20,1,'');
print ' | ';
$tmpday = $sav;
diff --git a/htdocs/core/class/menu.class.php b/htdocs/core/class/menu.class.php
index 58e93ec5544..d4570218ff2 100644
--- a/htdocs/core/class/menu.class.php
+++ b/htdocs/core/class/menu.class.php
@@ -51,7 +51,7 @@ class Menu
/**
* Add a menu entry into this->liste (at end)
*
- * @param string $url Url to follow on click
+ * @param string $url Url to follow on click (does not include DOL_URL_ROOT)
* @param string $titre Label of menu to add
* @param integer $level Level of menu to add
* @param int $enabled Menu active or not (0=Not active, 1=Active, 2=Active but grey)
@@ -59,11 +59,14 @@ class Menu
* @param string $mainmenu Main menu ('home', 'companies', 'products', ...)
* @param string $leftmenu Left menu ('setup', 'system', 'admintools', ...)
* @param int $position Position (not used yet)
+ * @param string $id Id
+ * @param string $idsel Id sel
+ * @param string $classname Class name
* @return void
*/
- function add($url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0)
+ function add($url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0, $id='', $idsel='', $classname='')
{
- $this->liste[]=array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu, 'position'=>$position);
+ $this->liste[]=array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu, 'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname);
}
/**
@@ -78,12 +81,15 @@ class Menu
* @param string $mainmenu Main menu ('home', 'companies', 'products', ...)
* @param string $leftmenu Left menu ('setup', 'system', 'admintools', ...)
* @param int $position Position (not used yet)
+ * @param string $id Id
+ * @param string $idsel Id sel
+ * @param string $classname Class name
* @return void
*/
- function insert($idafter, $url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0)
+ function insert($idafter, $url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0, $id='', $idsel='', $classname='')
{
$array_start = array_slice($this->liste,0,($idafter+1));
- $array_new = array(0=>array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu,'position'=>$position));
+ $array_new = array(0=>array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu,'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname));
$array_end = array_slice($this->liste,($idafter+1));
$this->liste=array_merge($array_start,$array_new,$array_end);
}
@@ -100,7 +106,7 @@ class Menu
/**
* Return number of visible entries (gray or not)
- *
+ *
* @return int Number of visible (gray or not) menu entries
*/
function getNbOfVisibleMenuEntries()
diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php
index a6770b57c37..137a5517231 100644
--- a/htdocs/core/class/menubase.class.php
+++ b/htdocs/core/class/menubase.class.php
@@ -602,7 +602,7 @@ class Menubase
//$tabMenu[$b]['langs'] = $menu['langs'];
$tabMenu[$b]['fk_mainmenu'] = $menu['fk_mainmenu'];
$tabMenu[$b]['fk_leftmenu'] = $menu['fk_leftmenu'];
- $tabMenu[$b]['position'] = $menu['position'];
+ $tabMenu[$b]['position'] = (int) $menu['position'];
$b++;
}
diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php
index d2712de201f..4ffee2caad9 100644
--- a/htdocs/core/get_menudiv.php
+++ b/htdocs/core/get_menudiv.php
@@ -194,7 +194,7 @@ if (! class_exists('MenuManager'))
}
$menumanager = new MenuManager($db, empty($user->societe_id)?0:1);
$menumanager->loadMenu('all','all');
-//var_dump($menumanager->tabMenu);exit;
+//var_dump($menumanager);exit;
$menumanager->showmenu('jmobile');
print '