Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
2b2c465311
@ -5,6 +5,10 @@ English Dolibarr ChangeLog
|
|||||||
|
|
||||||
***** ChangeLog for 7.0.0 compared to 6.0.* *****
|
***** ChangeLog for 7.0.0 compared to 6.0.* *****
|
||||||
|
|
||||||
|
For developers:
|
||||||
|
NEW: Add hook addAdminLdapOptions and doAction in ldap admin page
|
||||||
|
NEW: complete_head_from_modules() in ldap_prepare_head()
|
||||||
|
|
||||||
WARNING:
|
WARNING:
|
||||||
|
|
||||||
Following changes may create regression for some external modules, but were necessary to make Dolibarr better:
|
Following changes may create regression for some external modules, but were necessary to make Dolibarr better:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
@ -38,10 +38,19 @@ if (!$user->admin)
|
|||||||
|
|
||||||
$action = GETPOST('action','aZ09');
|
$action = GETPOST('action','aZ09');
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
$hookmanager->initHooks(array('adminldap','globaladmin'));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$parameters=array();
|
||||||
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
if (empty($reshook))
|
||||||
|
{
|
||||||
if ($action == 'setvalue' && $user->admin)
|
if ($action == 'setvalue' && $user->admin)
|
||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
@ -71,8 +80,7 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -149,6 +157,11 @@ if (! empty($conf->adherent->enabled))
|
|||||||
print '</td><td>'.$langs->trans("LDAPDnMemberActiveExample").'</td></tr>';
|
print '</td><td>'.$langs->trans("LDAPDnMemberActiveExample").'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fields from hook
|
||||||
|
$parameters=array();
|
||||||
|
$reshook=$hookmanager->executeHooks('addAdminLdapOptions',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td>'.$langs->trans("Value").'</td>';
|
print '<td>'.$langs->trans("Value").'</td>';
|
||||||
|
|||||||
@ -51,9 +51,9 @@ $search_version=GETPOST('search_version','alpha');
|
|||||||
// For dolistore search
|
// For dolistore search
|
||||||
$options = array();
|
$options = array();
|
||||||
$options['per_page'] = 20;
|
$options['per_page'] = 20;
|
||||||
$options['categorie'] = GETPOST('categorie', 'int') + 0;
|
$options['categorie'] = ((GETPOST('categorie', 'int')?GETPOST('categorie', 'int'):0) + 0);
|
||||||
$options['start'] = GETPOST('start', 'int') + 0;
|
$options['start'] = ((GETPOST('start', 'int')?GETPOST('start', 'int'):0) + 0);
|
||||||
$options['end'] = GETPOST('end', 'int') + 0;
|
$options['end'] = ((GETPOST('end', 'int')?GETPOST('end', 'int'):0) + 0);
|
||||||
$options['search'] = GETPOST('search_keyword', 'alpha');
|
$options['search'] = GETPOST('search_keyword', 'alpha');
|
||||||
$dolistore = new Dolistore($options);
|
$dolistore = new Dolistore($options);
|
||||||
|
|
||||||
|
|||||||
@ -221,8 +221,8 @@ function show_array_actions_to_do($max=5)
|
|||||||
$sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent,";
|
$sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent,";
|
||||||
$sql.= " c.code, c.libelle as type_label,";
|
$sql.= " c.code, c.libelle as type_label,";
|
||||||
$sql.= " s.nom as sname, s.rowid, s.client";
|
$sql.= " s.nom as sname, s.rowid, s.client";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c LEFT JOIN ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a ON c.id = a.fk_action";
|
$sql.= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE a.entity = ".$conf->entity;
|
$sql.= " WHERE a.entity = ".$conf->entity;
|
||||||
@ -318,8 +318,8 @@ function show_array_last_actions_done($max=5)
|
|||||||
$sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label,";
|
$sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label,";
|
||||||
$sql.= " c.code, c.libelle,";
|
$sql.= " c.code, c.libelle,";
|
||||||
$sql.= " s.rowid, s.nom as sname, s.client";
|
$sql.= " s.rowid, s.nom as sname, s.client";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c LEFT JOIN ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a ON c.id = a.fk_action ";
|
$sql.= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action ";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE a.entity = ".$conf->entity;
|
$sql.= " WHERE a.entity = ".$conf->entity;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2006-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
|
||||||
@ -30,6 +31,7 @@
|
|||||||
function ldap_prepare_head()
|
function ldap_prepare_head()
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user;
|
||||||
|
|
||||||
$langs->load("ldap");
|
$langs->load("ldap");
|
||||||
|
|
||||||
// Onglets
|
// Onglets
|
||||||
@ -73,6 +75,12 @@ function ldap_prepare_head()
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,'',$head,$h,'ldap');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user