Fixed PHP warning on MailmanSPIP module

Also simplified the code and removed unused variables from it
This commit is contained in:
Marcos García 2012-10-14 23:56:28 +02:00
parent 70ae16f89e
commit 59e8964bc5

View File

@ -24,27 +24,24 @@
/**
* Return array head with list of tabs to view object informations
*
* @param Object $object Member
* @return array head
* @return array Tabs of the module
*/
function mailmanspip_admin_prepare_head($object)
function mailmanspip_admin_prepare_head()
{
global $langs, $conf, $user;
global $langs;
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT.'/adherents/admin/mailman.php';
$head[$h][1] = $langs->trans("Mailman");
$head[$h][2] = 'mailman';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/adherents/admin/spip.php';
$head[$h][1] = $langs->trans("SPIP");
$head[$h][2] = 'spip';
$h++;
return $head;
return array(
array(
DOL_URL_ROOT.'/adherents/admin/mailman.php',
$langs->trans('Mailman'),
'mailman'
),
array(
DOL_URL_ROOT.'/adherents/admin/spip.php',
$langs->trans('SPIP'),
'spip'
)
);
}
?>