develop_dict

Conflicts:
	htdocs/core/lib/functions.lib.php
This commit is contained in:
Regis Houssin 2017-06-11 06:27:49 +02:00
commit 3445c9d329
187 changed files with 1201 additions and 918 deletions

View File

@ -224,13 +224,13 @@ source_file = htdocs/langs/en_US/members.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.members] [dolibarr.modulebuilder]
file_filter = htdocs/langs/<lang>/modulebuilder.lang file_filter = htdocs/langs/<lang>/modulebuilder.lang
source_file = htdocs/langs/en_US/modulebuilder.lang source_file = htdocs/langs/en_US/modulebuilder.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.members] [dolibarr.multicurrency]
file_filter = htdocs/langs/<lang>/multicurrency.lang file_filter = htdocs/langs/<lang>/multicurrency.lang
source_file = htdocs/langs/en_US/multicurrency.lang source_file = htdocs/langs/en_US/multicurrency.lang
source_lang = en_US source_lang = en_US

View File

@ -6,8 +6,8 @@ English Dolibarr ChangeLog
For developers: For developers:
NEW: Add a lot of API REST: dictionaryevents, memberstypes, ... NEW: Add a lot of API REST: dictionaryevents, memberstypes, ...
NEW: Big refactorization of multicompany transverse mode NEW: Big refactorization of multicompany transverse mode.
NEW: getEntity function use true $shared value by default NEW: getEntity function use true $shared value by default.
WARNING: WARNING:
@ -17,7 +17,9 @@ Following changes may create regression for some external modules, but were nece
* The page societe/soc.php was renamed into societe/card.php to match page naming conventions. * The page societe/soc.php was renamed into societe/card.php to match page naming conventions.
* The page compta/facture.php was renamed into compta/facture/card.php to match page naming conventions. * The page compta/facture.php was renamed into compta/facture/card.php to match page naming conventions.
* The signature of method ->delete() of class Product and PriceExpression was changed from * The signature of method ->delete() of class Product and PriceExpression was changed from
->delete($id, notrigger) to ->delete(User, notrigger) to match standard dev rules. ->delete(id, notrigger) to ->delete(User, notrigger) to match standard dev rules.
* The signature of method ->delete() of class Adherent was changed from
->delete(id) to ->delete(id, User, notrigger) to match standard dev rules.
* Removed CommonObject::displayMarginInfos (was deprecated in 3.8). Use same method into * Removed CommonObject::displayMarginInfos (was deprecated in 3.8). Use same method into
html.formmargin.class.php html.formmargin.class.php
* Removed Societe::set_commnucation_level (was deprecated in 4.0). Was not used. * Removed Societe::set_commnucation_level (was deprecated in 4.0). Was not used.

View File

@ -85,9 +85,9 @@ else
} }
} }
print "Release : ".$release."\n"; print "Release : ".$release."\n";
print "Include custom : ".$includecustom."\n"; print "Include custom in signature : ".$includecustom."\n";
print "Include constants: "; print "Include constants in signature : ";
foreach ($includeconstants as $countrycode => $tmp) foreach ($includeconstants as $countrycode => $tmp)
{ {
foreach($tmp as $constname => $constvalue) foreach($tmp as $constname => $constvalue)

View File

@ -591,7 +591,7 @@ if ($nboftargetok) {
print "Remove subdir of custom dir\n"; print "Remove subdir of custom dir\n";
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n"; print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to keep dir $ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs but not files
} }
# Build package for each target # Build package for each target
@ -972,13 +972,12 @@ if ($nboftargetok) {
$ret=`$cmd`; $ret=`$cmd`;
$ret=`chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`; $ret=`chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/modMyModule.class.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_api_class.class.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject_api_class.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_card.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/core/modules/modMyModule.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_class.class.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_list.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`;
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_script.php`; $ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/myobject.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_webservice_server.php`;
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; "; $cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; ";
$ret=`$cmd`; $ret=`$cmd`;
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; "; $cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";

View File

@ -194,6 +194,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/loan %_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -209,6 +210,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites %_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/*.ico %_datadir/dolibarr/htdocs/*.ico

View File

@ -274,6 +274,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/loan %_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -289,6 +290,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites %_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/*.ico %_datadir/dolibarr/htdocs/*.ico

View File

@ -190,6 +190,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/loan %_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -205,6 +206,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites %_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/*.ico %_datadir/dolibarr/htdocs/*.ico

View File

@ -202,6 +202,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/loan %_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -217,6 +218,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites %_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/*.ico %_datadir/dolibarr/htdocs/*.ico

View File

@ -80,7 +80,7 @@ if ($user->societe_id > 0) accessforbidden();
if (! $user->rights->accounting->chartofaccount) accessforbidden(); if (! $user->rights->accounting->chartofaccount) accessforbidden();
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('admin')); $hookmanager->initHooks(array('admin'));
// This page is a generic page to edit dictionaries // This page is a generic page to edit dictionaries

View File

@ -80,7 +80,7 @@ $pagenext = $page + 1;
$search_country_id = GETPOST('search_country_id','int'); $search_country_id = GETPOST('search_country_id','int');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('admin')); $hookmanager->initHooks(array('admin'));
// This page is a generic page to edit dictionaries // This page is a generic page to edit dictionaries

View File

@ -66,7 +66,7 @@ if (empty($sortorder)) $sortorder='ASC';
$error = 0; $error = 0;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('admin')); $hookmanager->initHooks(array('admin'));
// This page is a generic page to edit dictionaries // This page is a generic page to edit dictionaries

View File

@ -115,16 +115,11 @@ if ($conf->use_javascript_ajax)
{ {
if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'0\') if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'0\')
{ {
jQuery("#tramount").hide(); jQuery("#trforcetype, #tramount, #tredit, #trpayment, #tremail").hide();
jQuery("#tredit").hide();
jQuery("#trpayment").hide();
jQuery("#tremail").hide();
} }
if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'1\') if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'1\')
{ {
jQuery("#tramount").show(); jQuery("#trforcetype, #tramount, #tredit, #trpayment").show();
jQuery("#tredit").show();
jQuery("#trpayment").show();
if (jQuery("#MEMBER_NEWFORM_PAYONLINE").val()==\'-1\') jQuery("#tremail").hide(); if (jQuery("#MEMBER_NEWFORM_PAYONLINE").val()==\'-1\') jQuery("#tremail").hide();
else jQuery("#tremail").show(); else jQuery("#tremail").show();
} }
@ -156,9 +151,9 @@ print "</td></tr>\n";
// Force Type // Force Type
$adht = new AdherentType($db); $adht = new AdherentType($db);
print '<tr class="oddeven drag"><td>'; print '<tr class="oddeven drag" id="trforcetype"><td>';
print $langs->trans("ForceMemberType"); print $langs->trans("ForceMemberType");
print '</td><td width="60" align="center">'; print '</td><td width="60" align="right">';
$listofval = array(-1 => $langs->trans("Undefined")); $listofval = array(-1 => $langs->trans("Undefined"));
$listofval += $adht->liste_array(); $listofval += $adht->liste_array();
$forcetype = $conf->global->MEMBER_NEWFORM_FORCETYPE ?: -1; $forcetype = $conf->global->MEMBER_NEWFORM_FORCETYPE ?: -1;

View File

@ -182,7 +182,7 @@ abstract class ActionsAdherentCardCommon
$this->object->old_name = $_POST["old_name"]; $this->object->old_name = $_POST["old_name"];
$this->object->old_firstname = $_POST["old_firstname"]; $this->object->old_firstname = $_POST["old_firstname"];
$result = $this->object->delete(); $result = $this->object->delete(0, $user, 0);
if ($result > 0) if ($result > 0)
{ {
header("Location: list.php"); header("Location: list.php");

View File

@ -112,7 +112,7 @@ if ($id)
$caneditfieldmember=$user->rights->adherent->creer; $caneditfieldmember=$user->rights->adherent->creer;
} }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('membercard','globalcard')); $hookmanager->initHooks(array('membercard','globalcard'));
@ -585,7 +585,7 @@ if (empty($reshook))
if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confirm == 'yes') if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confirm == 'yes')
{ {
$result=$object->delete($id); $result=$object->delete($id, $user);
if ($result > 0) if ($result > 0)
{ {
if (! empty($backtopage)) if (! empty($backtopage))

View File

@ -705,11 +705,13 @@ class Adherent extends CommonObject
* Fonction qui supprime l'adherent et les donnees associees * Fonction qui supprime l'adherent et les donnees associees
* *
* @param int $rowid Id of member to delete * @param int $rowid Id of member to delete
* @param User $user User object
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, 0=nothing to do, >0 if OK * @return int <0 if KO, 0=nothing to do, >0 if OK
*/ */
function delete($rowid) function delete($rowid, $user, $notrigger=0)
{ {
global $conf, $langs, $user; global $conf, $langs;
$result = 0; $result = 0;
$error=0; $error=0;
@ -720,6 +722,14 @@ class Adherent extends CommonObject
$this->db->begin(); $this->db->begin();
if (! $error && ! $notrigger)
{
// Call trigger
$result=$this->call_trigger('MEMBER_DELETE',$user);
if ($result < 0) $error++;
// End call triggers
}
// Remove category // Remove category
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_member WHERE fk_member = ".$rowid; $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_member WHERE fk_member = ".$rowid;
dol_syslog(get_class($this)."::delete", LOG_DEBUG); dol_syslog(get_class($this)."::delete", LOG_DEBUG);
@ -787,16 +797,6 @@ class Adherent extends CommonObject
} }
} }
if (! $error)
{
// Call trigger
$result=$this->call_trigger('MEMBER_DELETE',$user);
if ($result < 0) { $error++; }
// End call triggers
}
if (! $error) if (! $error)
{ {
$this->db->commit(); $this->db->commit();
@ -1097,7 +1097,7 @@ class Adherent extends CommonObject
$sql.= " WHERE d.fk_adherent_type = t.rowid"; $sql.= " WHERE d.fk_adherent_type = t.rowid";
if ($rowid) $sql.= " AND d.rowid=".$rowid; if ($rowid) $sql.= " AND d.rowid=".$rowid;
elseif ($ref || $fk_soc) { elseif ($ref || $fk_soc) {
$sql.= " AND d.entity IN (".getEntity().")"; $sql.= " AND d.entity IN (".getEntity('adherent').")";
if ($ref) $sql.= " AND d.rowid='".$this->db->escape($ref)."'"; if ($ref) $sql.= " AND d.rowid='".$this->db->escape($ref)."'";
elseif ($fk_soc > 0) $sql.= " AND d.fk_soc=".$fk_soc; elseif ($fk_soc > 0) $sql.= " AND d.fk_soc=".$fk_soc;
} }

View File

@ -250,11 +250,7 @@ class Members extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
} }
// The Adherent::delete() method uses the global variable $user. if (! $member->delete($member->id, DolibarrApiAccess::$user)) {
global $user;
$user = DolibarrApiAccess::$user;
if (! $member->delete($member->id)) {
throw new RestException(401,'error when deleting member'); throw new RestException(401,'error when deleting member');
} }

View File

@ -64,8 +64,8 @@ $sql.= " d.statut, count(d.rowid) as somme";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d";
$sql.= " ON t.rowid = d.fk_adherent_type"; $sql.= " ON t.rowid = d.fk_adherent_type";
$sql.= " AND d.entity IN (".getEntity().")"; $sql.= " AND d.entity IN (".getEntity('adherent').")";
$sql.= " WHERE t.entity IN (".getEntity().")"; $sql.= " WHERE t.entity IN (".getEntity('adherent').")";
$sql.= " GROUP BY t.rowid, t.libelle, t.subscription, d.statut"; $sql.= " GROUP BY t.rowid, t.libelle, t.subscription, d.statut";
dol_syslog("index.php::select nb of members by type", LOG_DEBUG); dol_syslog("index.php::select nb of members by type", LOG_DEBUG);
@ -100,7 +100,7 @@ $now=dol_now();
// old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future) // old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future)
$sql = "SELECT count(*) as somme , d.fk_adherent_type"; $sql = "SELECT count(*) as somme , d.fk_adherent_type";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
$sql.= " WHERE d.entity IN (".getEntity().")"; $sql.= " WHERE d.entity IN (".getEntity('adherent').")";
//$sql.= " AND d.statut = 1 AND ((t.subscription = 0 AND d.datefin IS NULL) OR d.datefin >= '".$db->idate($now)."')"; //$sql.= " AND d.statut = 1 AND ((t.subscription = 0 AND d.datefin IS NULL) OR d.datefin >= '".$db->idate($now)."')";
$sql.= " AND d.statut = 1 AND d.datefin >= '".$db->idate($now)."'"; $sql.= " AND d.statut = 1 AND d.datefin >= '".$db->idate($now)."'";
$sql.= " AND t.rowid = d.fk_adherent_type"; $sql.= " AND t.rowid = d.fk_adherent_type";
@ -211,7 +211,7 @@ $numb=0;
$sql = "SELECT c.subscription, c.dateadh as dateh"; $sql = "SELECT c.subscription, c.dateadh as dateh";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c";
$sql.= " WHERE d.entity IN (".getEntity().")"; $sql.= " WHERE d.entity IN (".getEntity('adherent').")";
$sql.= " AND d.rowid = c.fk_adherent"; $sql.= " AND d.rowid = c.fk_adherent";
if(isset($date_select) && $date_select != '') if(isset($date_select) && $date_select != '')
{ {
@ -275,7 +275,7 @@ $sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company,
$sql.= " a.tms as datem, datefin as date_end_subscription,"; $sql.= " a.tms as datem, datefin as date_end_subscription,";
$sql.= " ta.rowid as typeid, ta.libelle, ta.subscription"; $sql.= " ta.rowid as typeid, ta.libelle, ta.subscription";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
$sql.= " WHERE a.entity IN (".getEntity().")"; $sql.= " WHERE a.entity IN (".getEntity('adherent').")";
$sql.= " AND a.fk_adherent_type = ta.rowid"; $sql.= " AND a.fk_adherent_type = ta.rowid";
$sql.= $db->order("a.tms","DESC"); $sql.= $db->order("a.tms","DESC");
$sql.= $db->plimit($max, 0); $sql.= $db->plimit($max, 0);
@ -336,7 +336,7 @@ $sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company,
$sql.= " datefin as date_end_subscription,"; $sql.= " datefin as date_end_subscription,";
$sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.subscription"; $sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.subscription";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."subscription as c"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."subscription as c";
$sql.= " WHERE a.entity IN (".getEntity().")"; $sql.= " WHERE a.entity IN (".getEntity('adherent').")";
$sql.= " AND c.fk_adherent = a.rowid"; $sql.= " AND c.fk_adherent = a.rowid";
$sql.= $db->order("c.tms","DESC"); $sql.= $db->order("c.tms","DESC");
$sql.= $db->plimit($max, 0); $sql.= $db->plimit($max, 0);

View File

@ -31,13 +31,17 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
$langs->load("members"); $langs->loadLangs(array("members","companies"));
$langs->load("companies");
$action=GETPOST('action','aZ09');
$massaction=GETPOST('massaction','alpha');
$show_files=GETPOST('show_files','int');
$confirm=GETPOST('confirm','alpha');
$toselect = GETPOST('toselect', 'array');
// Security check // Security check
$result=restrictedArea($user,'adherent'); $result=restrictedArea($user,'adherent');
$action=GETPOST('action','aZ09');
$filter=GETPOST("filter"); $filter=GETPOST("filter");
$statut=GETPOST("statut"); $statut=GETPOST("statut");
$search=GETPOST("search"); $search=GETPOST("search");
@ -53,7 +57,7 @@ $search_country=GETPOST("search_country");
$search_phone=GETPOST("search_phone"); $search_phone=GETPOST("search_phone");
$search_phone_perso=GETPOST("search_phone_perso"); $search_phone_perso=GETPOST("search_phone_perso");
$search_phone_mobile=GETPOST("search_phone_mobile"); $search_phone_mobile=GETPOST("search_phone_mobile");
$type=GETPOST("type"); $search_type=GETPOST("search_type");
$search_email=GETPOST("search_email"); $search_email=GETPOST("search_email");
$search_categ = GETPOST("search_categ",'int'); $search_categ = GETPOST("search_categ",'int');
$catid = GETPOST("catid",'int'); $catid = GETPOST("catid",'int');
@ -73,7 +77,7 @@ $pagenext = $page + 1;
if (! $sortorder) { $sortorder=($filter=='outofdate'?"DESC":"ASC"); } if (! $sortorder) { $sortorder=($filter=='outofdate'?"DESC":"ASC"); }
if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); } if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('memberlist')); $hookmanager->initHooks(array('memberlist'));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
@ -155,7 +159,7 @@ if (empty($reshook))
$search_firstname=""; $search_firstname="";
$search_login=""; $search_login="";
$search_company=""; $search_company="";
$type=""; $search_type="";
$search_email=""; $search_email="";
$search_address=""; $search_address="";
$search_zip=""; $search_zip="";
@ -173,6 +177,14 @@ if (empty($reshook))
$toselect=''; $toselect='';
$search_array_options=array(); $search_array_options=array();
} }
// Mass actions
$objectclass='Adherent';
$objectlabel='Members';
$permtoread = $user->rights->adherent->lire;
$permtodelete = $user->rights->adherent->supprimer;
$uploaddir = $conf->adherent->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }
@ -193,8 +205,8 @@ $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.skype, d.birth, d.pu
$sql.= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,"; $sql.= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
$sql.= " t.libelle as type, t.subscription,"; $sql.= " t.libelle as type, t.subscription,";
$sql.= " state.code_departement as state_code, state.nom as state_name"; $sql.= " state.code_departement as state_code, state.nom as state_name";
// Add fields for extrafields // Add fields from extrafields
foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
// Add fields from hooks // Add fields from hooks
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
@ -212,7 +224,7 @@ if ($search_categ > 0) $sql.= " AND cm.fk_categorie = ".$db->escape($search_ca
if ($search_categ == -2) $sql.= " AND cm.fk_categorie IS NULL"; if ($search_categ == -2) $sql.= " AND cm.fk_categorie IS NULL";
$sql.= " AND d.entity IN (".getEntity('adherent').")"; $sql.= " AND d.entity IN (".getEntity('adherent').")";
if ($sall) $sql.=natural_search(array_keys($fieldstosearchall), $sall); if ($sall) $sql.=natural_search(array_keys($fieldstosearchall), $sall);
if ($type > 0) $sql.=" AND t.rowid=".$db->escape($type); if ($search_type > 0) $sql.=" AND t.rowid=".$db->escape($search_type);
if ($statut != '') $sql.=" AND d.statut in (".$db->escape($statut).")"; // Peut valoir un nombre ou liste de nombre separes par virgules if ($statut != '') $sql.=" AND d.statut in (".$db->escape($statut).")"; // Peut valoir un nombre ou liste de nombre separes par virgules
if ($search_ref) if ($search_ref)
{ {
@ -298,10 +310,10 @@ elseif ($action == 'search')
$titre=$langs->trans("MembersListQualified"); $titre=$langs->trans("MembersListQualified");
} }
if ($type > 0) if ($search_type > 0)
{ {
$membertype=new AdherentType($db); $membertype=new AdherentType($db);
$result=$membertype->fetch(GETPOST("type")); $result=$membertype->fetch(GETPOST("type",'int'));
$titre.=" (".$membertype->libelle.")"; $titre.=" (".$membertype->libelle.")";
} }
@ -326,7 +338,7 @@ if ($search_phone != '') $param.= "&search_phone=".urlencode($search_phone);
if ($search_phone_perso != '') $param.= "&search_phone_perso=".urlencode($search_phone_perso); if ($search_phone_perso != '') $param.= "&search_phone_perso=".urlencode($search_phone_perso);
if ($search_phone_mobile != '') $param.= "&search_phone_mobile=".urlencode($search_phone_mobile); if ($search_phone_mobile != '') $param.= "&search_phone_mobile=".urlencode($search_phone_mobile);
if ($filter) $param.="&filter=".urlencode($filter); if ($filter) $param.="&filter=".urlencode($filter);
if ($type > 0) $param.="&type=".urlencode($type); if ($search_type > 0) $param.="&search_type=".urlencode($search_type);
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
// Add $param from extra fields // Add $param from extra fields
foreach ($search_array_options as $key => $val) foreach ($search_array_options as $key => $val)
@ -346,7 +358,7 @@ if ($user->rights->adherent->supprimer) $arrayofmassactions['delete']=$langs->tr
//if ($massaction == 'presend' || $massaction == 'createbills') $arrayofmassactions=array(); //if ($massaction == 'presend' || $massaction == 'createbills') $arrayofmassactions=array();
$massactionbutton=$form->selectMassAction('', $arrayofmassactions); $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
@ -444,7 +456,7 @@ if (! empty($arrayfields['t.libelle']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
$listetype=$membertypestatic->liste_array(); $listetype=$membertypestatic->liste_array();
print $form->selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 32); print $form->selectarray("search_type", $listetype, $type, 1, 0, 0, '', 0, 32);
print '</td>'; print '</td>';
} }
@ -832,21 +844,14 @@ while ($i < min($num, $limit))
} }
// Action column // Action column
print '<td align="center">'; print '<td align="center">';
if ($user->rights->adherent->creer) if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
{ {
print "<a href=\"card.php?rowid=".$obj->rowid."&action=edit&backtopage=1\">".img_edit()."</a>"; $selected=0;
} if (in_array($obj->rowid, $arrayofselected)) $selected=1;
print '&nbsp;'; print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected?' checked="checked"':'').'>';
if ($user->rights->adherent->supprimer && $obj->statut == -1) }
{ print '</td>';
print "<a href=\"card.php?rowid=".$obj->rowid."&action=delete&backtopage=1\">".img_picto($langs->trans("Delete"),'disable.png')."</a>"; if (! $i) $totalarray['nbfield']++;
}
if ($user->rights->adherent->supprimer && $obj->statut == 1)
{
print "<a href=\"card.php?rowid=".$obj->rowid."&action=resign&backtopage=1\">".img_picto($langs->trans("Resiliate"),'disable.png')."</a>";
}
print "</td>";
if (! $i) $totalarray['nbfield']++;
print "</tr>\n"; print "</tr>\n";
$i++; $i++;

View File

@ -67,7 +67,7 @@ $tab='byproperties';
$data = array(); $data = array();
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, d.morphy as code"; $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, d.morphy as code";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d"; $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d";
$sql.=" WHERE d.entity IN (".getEntity().")"; $sql.=" WHERE d.entity IN (".getEntity('adherent').")";
$sql.=" AND d.statut = 1"; $sql.=" AND d.statut = 1";
$sql.=" GROUP BY d.morphy"; $sql.=" GROUP BY d.morphy";

View File

@ -79,7 +79,7 @@ if ($mode)
$data = array(); $data = array();
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.label"; $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.label";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_country as c on d.country = c.rowid"; $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_country as c on d.country = c.rowid";
$sql.=" WHERE d.entity IN (".getEntity().")"; $sql.=" WHERE d.entity IN (".getEntity('adherent').")";
$sql.=" AND d.statut = 1"; $sql.=" AND d.statut = 1";
$sql.=" GROUP BY c.label, c.code"; $sql.=" GROUP BY c.label, c.code";
//print $sql; //print $sql;
@ -96,7 +96,7 @@ if ($mode)
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.state_id = c.rowid"; $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.state_id = c.rowid";
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region"; $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region";
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_country as co on d.country = co.rowid"; $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_country as co on d.country = co.rowid";
$sql.=" WHERE d.entity IN (".getEntity().")"; $sql.=" WHERE d.entity IN (".getEntity('adherent').")";
$sql.=" AND d.statut = 1"; $sql.=" AND d.statut = 1";
$sql.=" GROUP BY co.label, co.code, c.nom"; $sql.=" GROUP BY co.label, co.code, c.nom";
//print $sql; //print $sql;
@ -112,7 +112,7 @@ if ($mode)
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.state_id = c.rowid"; $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.state_id = c.rowid";
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region"; $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region";
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_country as co on d.country = co.rowid"; $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_country as co on d.country = co.rowid";
$sql.=" WHERE d.entity IN (".getEntity().")"; $sql.=" WHERE d.entity IN (".getEntity('adherent').")";
$sql.=" AND d.statut = 1"; $sql.=" AND d.statut = 1";
$sql.=" GROUP BY co.label, co.code, r.nom"; //+ $sql.=" GROUP BY co.label, co.code, r.nom"; //+
//print $sql; //print $sql;
@ -127,7 +127,7 @@ if ($mode)
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.label, d.town as label2"; $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.label, d.town as label2";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d"; $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d";
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_country as c on d.country = c.rowid"; $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_country as c on d.country = c.rowid";
$sql.=" WHERE d.entity IN (".getEntity().")"; $sql.=" WHERE d.entity IN (".getEntity('adherent').")";
$sql.=" AND d.statut = 1"; $sql.=" AND d.statut = 1";
$sql.=" GROUP BY c.label, c.code, d.town"; $sql.=" GROUP BY c.label, c.code, d.town";
//print $sql; //print $sql;

View File

@ -89,7 +89,7 @@ if ($rowid)
$caneditfieldmember=$user->rights->adherent->creer; $caneditfieldmember=$user->rights->adherent->creer;
} }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('subscription')); $hookmanager->initHooks(array('subscription'));
// PDF // PDF

View File

@ -53,7 +53,7 @@ $pagenext = $page + 1;
if (! $sortorder) { $sortorder="DESC"; } if (! $sortorder) { $sortorder="DESC"; }
if (! $sortfield) { $sortfield="c.dateadh"; } if (! $sortfield) { $sortfield="c.dateadh"; }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('subscriptionlist')); $hookmanager->initHooks(array('subscriptionlist'));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -79,7 +79,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter_x") || GETP
} }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('membertypecard','globalcard')); $hookmanager->initHooks(array('membertypecard','globalcard'));
@ -173,7 +173,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
$sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.vote"; $sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.vote";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
$sql.= " WHERE d.entity IN (".getEntity().")"; $sql.= " WHERE d.entity IN (".getEntity('adherent').")";
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
@ -380,7 +380,7 @@ if ($rowid > 0)
$sql.= " t.libelle as type, t.subscription"; $sql.= " t.libelle as type, t.subscription";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
$sql.= " WHERE d.fk_adherent_type = t.rowid "; $sql.= " WHERE d.fk_adherent_type = t.rowid ";
$sql.= " AND d.entity IN (".getEntity().")"; $sql.= " AND d.entity IN (".getEntity('adherent').")";
$sql.= " AND t.rowid = ".$object->id; $sql.= " AND t.rowid = ".$object->id;
if ($sall) if ($sall)
{ {

View File

@ -182,29 +182,29 @@ $formadmin = new FormAdmin($db);
$wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración'; $wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración';
llxHeader('',$langs->trans("Setup"),$wikihelp); llxHeader('',$langs->trans("Setup"),$wikihelp);
print load_fiche_titre($langs->trans("DefaultValues"),'','title_setup'); $param='&mode='.$mode;
print $langs->trans("DefaultValuesDesc")."<br>\n"; $enabledisablehtml.= $langs->trans("EnableDefaultValues").' ';
print "<br>\n";
print $langs->trans("EnableDefaultValues").' ';
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES))
{ {
// Button off, click to enable // Button off, click to enable
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&amp;value=1">'; $enabledisablehtml.= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&value=1'.$param.'">';
print img_picto($langs->trans("Disabled"),'switch_off'); $enabledisablehtml.= img_picto($langs->trans("Disabled"),'switch_off');
print '</a>'; $enabledisablehtml.= '</a>';
} }
else else
{ {
// Button on, click to disable // Button on, click to disable
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&amp;value=0">'; $enabledisablehtml.= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&value=0'.$param.'">';
print img_picto($langs->trans("Activated"),'switch_on'); $enabledisablehtml.= img_picto($langs->trans("Activated"),'switch_on');
print '</a>'; $enabledisablehtml.= '</a>';
} }
print "<br><br>\n";
$param='&mode='.$mode; print load_fiche_titre($langs->trans("DefaultValues"), $enabledisablehtml, 'title_setup');
print $langs->trans("DefaultValuesDesc")."<br>\n";
print "<br>\n";
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($optioncss != '') $param.='&optioncss='.$optioncss; if ($optioncss != '') $param.='&optioncss='.$optioncss;

View File

@ -81,7 +81,7 @@ $pagenext = $page + 1;
$search_country_id = GETPOST('search_country_id','int'); $search_country_id = GETPOST('search_country_id','int');
$search_code = GETPOST('search_code','alpha'); $search_code = GETPOST('search_code','alpha');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('admin')); $hookmanager->initHooks(array('admin'));
// This page is a generic page to edit dictionaries // This page is a generic page to edit dictionaries

View File

@ -29,7 +29,7 @@ $langs->load("companies");
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('homesetup')); $hookmanager->initHooks(array('homesetup'));

View File

@ -100,7 +100,7 @@ $form=new Form($db);
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">'; print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
dol_fiche_head($head, 'ldap', $langs->trans("LDAPSetup")); dol_fiche_head($head, 'ldap', $langs->trans("LDAPSetup"), -1);
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';

View File

@ -107,7 +107,7 @@ if (! function_exists("ldap_connect"))
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
} }
dol_fiche_head($head, 'contacts', $langs->trans("LDAPSetup")); dol_fiche_head($head, 'contacts', $langs->trans("LDAPSetup"), -1);
print $langs->trans("LDAPDescContact").'<br>'; print $langs->trans("LDAPDescContact").'<br>';

View File

@ -96,7 +96,7 @@ if (! function_exists("ldap_connect"))
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
} }
dol_fiche_head($head, 'groups', $langs->trans("LDAPSetup")); dol_fiche_head($head, 'groups', $langs->trans("LDAPSetup"), -1);
print $langs->trans("LDAPDescGroups").'<br>'; print $langs->trans("LDAPDescGroups").'<br>';

View File

@ -126,7 +126,7 @@ if (! function_exists("ldap_connect"))
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">'; print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
dol_fiche_head($head, 'members', $langs->trans("LDAPSetup")); dol_fiche_head($head, 'members', $langs->trans("LDAPSetup"), -1);
print $langs->trans("LDAPDescMembers").'<br>'; print $langs->trans("LDAPDescMembers").'<br>';

View File

@ -113,7 +113,7 @@ print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
dol_fiche_head($head, 'users', $langs->trans("LDAPSetup")); dol_fiche_head($head, 'users', $langs->trans("LDAPSetup"), -1);
print $langs->trans("LDAPDescUsers").'<br>'; print $langs->trans("LDAPDescUsers").'<br>';
print '<br>'; print '<br>';

View File

@ -71,7 +71,7 @@ $offset = $listlimit * $page ;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('emailtemplates')); $hookmanager->initHooks(array('emailtemplates'));
// Name of SQL tables of dictionaries // Name of SQL tables of dictionaries

View File

@ -829,7 +829,7 @@ if ($mode == 'deploy')
{ {
if (! in_array('/custom',explode(',',$dolibarr_main_url_root_alt))) if (! in_array('/custom',explode(',',$dolibarr_main_url_root_alt)))
{ {
$message=info_admin($langs->trans("ConfFileMuseContainCustom", DOL_DOCUMENT_ROOT.'/custom', DOL_DOCUMENT_ROOT)); $message=info_admin($langs->trans("ConfFileMustContainCustom", DOL_DOCUMENT_ROOT.'/custom', DOL_DOCUMENT_ROOT));
$allowfromweb=-1; $allowfromweb=-1;
} }
else else

View File

@ -164,7 +164,25 @@ $formadmin = new FormAdmin($db);
$wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración'; $wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración';
llxHeader('',$langs->trans("Setup"),$wikihelp); llxHeader('',$langs->trans("Setup"),$wikihelp);
print load_fiche_titre($langs->trans("Translation"),'','title_setup'); $param='&mode='.$mode;
$enabledisablehtml = $langs->trans("EnableOverwriteTranslation").' ';
if (empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
{
// Button off, click to enable
$enabledisablehtml.='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&value=1'.$param.'">';
$enabledisablehtml.=img_picto($langs->trans("Disabled"),'switch_off');
$enabledisablehtml.='</a>';
}
else
{
// Button on, click to disable
$enabledisablehtml.='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&value=0'.$param.'">';
$enabledisablehtml.=img_picto($langs->trans("Activated"),'switch_on');
$enabledisablehtml.='</a>';
}
print load_fiche_titre($langs->trans("Translation"), $enabledisablehtml, 'title_setup');
print $langs->trans("TranslationDesc")."<br>\n"; print $langs->trans("TranslationDesc")."<br>\n";
print "<br>\n"; print "<br>\n";
@ -175,25 +193,6 @@ print $langs->trans("CurrentUserLanguage").': <strong>'.$s.' '.$current_language
print '<br>'; print '<br>';
print $langs->trans("EnableOverwriteTranslation").' ';
if (empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
{
// Button off, click to enable
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&amp;value=1">';
print img_picto($langs->trans("Disabled"),'switch_off');
print '</a>';
}
else
{
// Button on, click to disable
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&amp;value=0">';
print img_picto($langs->trans("Activated"),'switch_on');
print '</a>';
}
print '<br><br>';
$param='&mode='.$mode;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($optioncss != '') $param.='&optioncss='.$optioncss; if ($optioncss != '') $param.='&optioncss='.$optioncss;

View File

@ -59,7 +59,7 @@ $offset = $listlimit * $page ;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('admin')); $hookmanager->initHooks(array('admin'));
// This page is a generic page to edit dictionaries // This page is a generic page to edit dictionaries

View File

@ -95,7 +95,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
//var_dump($_POST); //var_dump($_POST);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('actioncard','globalcard')); $hookmanager->initHooks(array('actioncard','globalcard'));

View File

@ -118,7 +118,7 @@ $langs->load("agenda");
$langs->load("other"); $langs->load("other");
$langs->load("commercial"); $langs->load("commercial");
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('agenda')); $hookmanager->initHooks(array('agenda'));

View File

@ -109,7 +109,7 @@ if (! $user->rights->agenda->allactions->read || $filter=='mine') // If no permi
$filtert=$user->id; $filtert=$user->id;
} }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('agendalist')); $hookmanager->initHooks(array('agendalist'));
@ -405,8 +405,6 @@ if ($resql)
continue; continue;
} }
$actionstatic->id=$obj->id; $actionstatic->id=$obj->id;
$actionstatic->ref=$obj->id; $actionstatic->ref=$obj->id;
$actionstatic->type_code=$obj->type_code; $actionstatic->type_code=$obj->type_code;

View File

@ -140,7 +140,7 @@ $langs->load("agenda");
$langs->load("other"); $langs->load("other");
$langs->load("commercial"); $langs->load("commercial");
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('agenda')); $hookmanager->initHooks(array('agenda'));

View File

@ -139,7 +139,7 @@ $langs->load("agenda");
$langs->load("other"); $langs->load("other");
$langs->load("commercial"); $langs->load("commercial");
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('agenda')); $hookmanager->initHooks(array('agenda'));

View File

@ -26,6 +26,7 @@
require '../../../main.inc.php'; require '../../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/modules/action/rapport.pdf.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/action/rapport.pdf.php';
@ -71,6 +72,8 @@ if ($action == 'builddoc')
* View * View
*/ */
$formfile=new FormFile($db);
llxHeader(); llxHeader();
$sql = "SELECT count(*) as cc,"; $sql = "SELECT count(*) as cc,";
@ -122,13 +125,14 @@ if ($resql)
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n"; print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Date").'</td>'; print '<td>'.$langs->trans("Period").'</td>';
print '<td align="center">'.$langs->trans("EventsNb").'</td>'; print '<td align="center">'.$langs->trans("EventsNb").'</td>';
print '<td align="center">'.$langs->trans("Action").'</td>'; print '<td align="center">'.$langs->trans("Action").'</td>';
print '<td align="center">'.$langs->trans("PDF").'</td>'; print '<td>'.$langs->trans("PDF").'</td>';
print '<td align="center">'.$langs->trans("Date").'</td>'; print '<td align="center">'.$langs->trans("Date").'</td>';
print '<td align="center">'.$langs->trans("Size").'</td>'; print '<td align="center">'.$langs->trans("Size").'</td>';
print "</tr>\n"; print "</tr>\n";
$var=true; $var=true;
while ($i < min($num,$limit)) while ($i < min($num,$limit))
{ {
@ -139,20 +143,44 @@ if ($resql)
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Date
print "<td>".$obj->df."</td>\n"; print "<td>".$obj->df."</td>\n";
// Nb of events
print '<td align="center">'.$obj->cc.'</td>'; print '<td align="center">'.$obj->cc.'</td>';
// Button to build doc
print '<td align="center">'; print '<td align="center">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=builddoc&amp;page='.$page.'&amp;month='.$obj->month.'&amp;year='.$obj->year.'">'.img_picto($langs->trans('GenerateReport'),'filenew').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=builddoc&amp;page='.$page.'&amp;month='.$obj->month.'&amp;year='.$obj->year.'">'.img_picto($langs->trans('BuildDoc'),'filenew').'</a>';
print '</td>'; print '</td>';
$name = "actions-".$obj->month."-".$obj->year.".pdf"; $name = "actions-".$obj->month."-".$obj->year.".pdf";
$relativepath= $name; $relativepath= $name;
$file = $conf->agenda->dir_temp."/".$name; $file = $conf->agenda->dir_temp."/".$name;
$modulepart = 'actionsreport';
$documenturl= DOL_URL_ROOT.'/document.php';
if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) $documenturl=$conf->global->DOL_URL_ROOT_DOCUMENT_PHP; // To use another wrapper
if (file_exists($file)) if (file_exists($file))
{ {
print '<td align="center"><a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?page='.$page.'&amp;file='.urlencode($relativepath).'&amp;modulepart=actionsreport">'.img_pdf().'</a></td>'; print '<td class="tdoverflowmax300">';
//print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?page='.$page.'&amp;file='.urlencode($relativepath).'&amp;modulepart=actionsreport">'.img_pdf().'</a>';
$filearray=array('name'=>basename($file),'fullname'=>$file,'type'=>'file');
$out='';
// Show file name with link to download
$tmp = $formfile->showPreview($filearray,$modulepart,$relativepath,0,$param);
$out.= ($tmp?$tmp.' ':'');
$out.= '<a href="'.$documenturl.'?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).($param?'&'.$param:'').'"';
$mime=dol_mimetype($relativepath,'',0);
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
$out.= ' target="_blank">';
$out.= img_mime($filearray["name"],$langs->trans("File").': '.$filearray["name"]).' '.$filearray["name"];
$out.= '</a>'."\n";
print $out;
print '</td>';
print '<td align="center">'.dol_print_date(dol_filemtime($file),'dayhour').'</td>'; print '<td align="center">'.dol_print_date(dol_filemtime($file),'dayhour').'</td>';
print '<td align="center">'.dol_print_size(dol_filesize($file)).'</td>'; print '<td align="center">'.dol_print_size(dol_filesize($file)).'</td>';
} }

View File

@ -80,7 +80,7 @@ $extrafields = new ExtraFields($db);
// fetch optionals attributes and labels // fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('commcard','globalcard')); $hookmanager->initHooks(array('commcard','globalcard'));
@ -175,6 +175,21 @@ if (empty($reshook))
$result=$object->update($object->id, $user); $result=$object->update($object->id, $user);
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
} }
if ($action == 'update_extras') {
$object->fetch($id);
// Fill array 'array_options' with data from update form
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
if ($ret < 0) $error++;
if (! $error)
{
$result = $object->insertExtraFields();
if ($result < 0) $error++;
}
if ($error) $action = 'edit_extras';
}
} }

View File

@ -768,7 +768,7 @@ if ($object->fetch($id) >= 0) {
$std_soc = new Societe($db); $std_soc = new Societe($db);
$action_search = 'query'; $action_search = 'query';
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
include_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php';
$hookmanager = new HookManager($db); $hookmanager = new HookManager($db);
$hookmanager->initHooks(array ('thirdpartycard')); $hookmanager->initHooks(array ('thirdpartycard'));

View File

@ -52,7 +52,7 @@ $extrafields = new ExtraFields($db);
// fetch optionals attributes and labels // fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('mailingcard','globalcard')); $hookmanager->initHooks(array('mailingcard','globalcard'));
// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions) // Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)

View File

@ -45,7 +45,7 @@ $sall=GETPOST('sall', 'alphanohtml');
$sref=GETPOST("sref", "alpha"); $sref=GETPOST("sref", "alpha");
$filteremail=GETPOST('filteremail','alpha'); $filteremail=GETPOST('filteremail','alpha');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('mailinglist')); $hookmanager->initHooks(array('mailinglist'));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -107,7 +107,7 @@ if ($id > 0 || ! empty($ref)) {
dol_print_error('', $object->error); dol_print_error('', $object->error);
} }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('propalcard','globalcard')); $hookmanager->initHooks(array('propalcard','globalcard'));
$permissionnote = $user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php $permissionnote = $user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php

View File

@ -95,7 +95,7 @@ $pagenext = $page + 1;
if (! $sortfield) $sortfield='p.ref'; if (! $sortfield) $sortfield='p.ref';
if (! $sortorder) $sortorder='DESC'; if (! $sortorder) $sortorder='DESC';
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$contextpage='proposallist'; $contextpage='proposallist';
// Security check // Security check
@ -113,7 +113,7 @@ $result = restrictedArea($user, $module, $objectid, $dbtable);
$diroutputmassaction=$conf->propal->dir_output . '/temp/massgeneration/'.$user->id; $diroutputmassaction=$conf->propal->dir_output . '/temp/massgeneration/'.$user->id;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('propallist')); $hookmanager->initHooks(array('propallist'));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -98,7 +98,7 @@ $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
// Load object // Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('ordercard','globalcard')); $hookmanager->initHooks(array('ordercard','globalcard'));
$permissionnote = $user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php $permissionnote = $user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php

View File

@ -45,7 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$langs->loadLangs(array("orders",'sendings','deliveries','companies','compta','bills')); $langs->loadLangs(array("orders",'sendings','deliveries','companies','compta','bills'));
$action=GETPOST('action','alpha'); $action=GETPOST('action','aZ09');
$massaction=GETPOST('massaction','alpha'); $massaction=GETPOST('massaction','alpha');
$show_files=GETPOST('show_files','int'); $show_files=GETPOST('show_files','int');
$confirm=GETPOST('confirm','alpha'); $confirm=GETPOST('confirm','alpha');
@ -96,7 +96,7 @@ if (! $sortorder) $sortorder='DESC';
// Initialize technical object to manage context to save list fields // Initialize technical object to manage context to save list fields
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'orderlist'; $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'orderlist';
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array($contextpage)); $hookmanager->initHooks(array($contextpage));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -89,7 +89,7 @@ if ($action == 'create')
} }
} }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($db); $hookmanager=new HookManager($db);
$hookmanager->initHooks(array('orderstoinvoice')); $hookmanager->initHooks(array('orderstoinvoice'));

View File

@ -131,7 +131,7 @@ if ($id > 0 || ! empty($ref))
$contextpage='banktransactionlist'.(empty($object->ref)?'':'-'.$object->id); $contextpage='banktransactionlist'.(empty($object->ref)?'':'-'.$object->id);
//var_dump($contextpage); //var_dump($contextpage);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('banktransactionlist', $contextpage)); $hookmanager->initHooks(array('banktransactionlist', $contextpage));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -69,7 +69,7 @@ if (! $sortorder) $sortorder='ASC';
// Initialize technical object to manage context to save list fields // Initialize technical object to manage context to save list fields
$contextpage='bankaccountlist'; $contextpage='bankaccountlist';
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array($contextpage)); $hookmanager->initHooks(array($contextpage));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -52,7 +52,7 @@ $result = restrictedArea($user, 'banque', '', '', '');
$object = new PaymentVarious($db); $object = new PaymentVarious($db);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('variouscard','globalcard')); $hookmanager->initHooks(array('variouscard','globalcard'));

View File

@ -46,7 +46,7 @@ $confirm = GETPOST('confirm','alpha');
$object = new Deplacement($db); $object = new Deplacement($db);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('tripsandexpensescard','globalcard')); $hookmanager->initHooks(array('tripsandexpensescard','globalcard'));
$permissionnote=$user->rights->deplacement->creer; // Used by the include of actions_setnotes.inc.php $permissionnote=$user->rights->deplacement->creer; // Used by the include of actions_setnotes.inc.php

View File

@ -114,7 +114,7 @@ if ($id > 0 || ! empty($ref)) {
$ret = $object->fetch($id, $ref, '', '', $conf->global->INVOICE_USE_SITUATION); $ret = $object->fetch($id, $ref, '', '', $conf->global->INVOICE_USE_SITUATION);
} }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('invoicecard','globalcard')); $hookmanager->initHooks(array('invoicecard','globalcard'));
$permissionnote = $user->rights->facture->creer; // Used by the include of actions_setnotes.inc.php $permissionnote = $user->rights->facture->creer; // Used by the include of actions_setnotes.inc.php

View File

@ -93,7 +93,7 @@ if (($id > 0 || $ref) && $action != 'create' && $action != 'add')
} }
} }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('invoicereccard','globalcard')); $hookmanager->initHooks(array('invoicereccard','globalcard'));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -110,7 +110,7 @@ if (! $sortfield) $sortfield='f.datef';
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$contextpage='invoicelist'; $contextpage='invoicelist';
// Security check // Security check
@ -124,7 +124,7 @@ $object=new Facture($db);
$now=dol_now(); $now=dol_now();
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('invoicelist')); $hookmanager->initHooks(array('invoicelist'));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -44,7 +44,7 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
$localtax = new Localtax($db); $localtax = new Localtax($db);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('localtaxvatcard','globalcard')); $hookmanager->initHooks(array('localtaxvatcard','globalcard'));

View File

@ -68,7 +68,7 @@ $pagenext = $page + 1;
if (! $sortorder) $sortorder="DESC"; if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="p.rowid"; if (! $sortfield) $sortfield="p.rowid";
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('paymentlist')); $hookmanager->initHooks(array('paymentlist'));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -48,7 +48,7 @@ $result = restrictedArea($user, 'salaries', '', '', '');
$object = new PaymentSalary($db); $object = new PaymentSalary($db);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('salarycard','globalcard')); $hookmanager->initHooks(array('salarycard','globalcard'));

View File

@ -45,7 +45,7 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
$object = new Tva($db); $object = new Tva($db);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('taxvatcard','globalcard')); $hookmanager->initHooks(array('taxvatcard','globalcard'));

View File

@ -100,7 +100,7 @@ $pagenext = $page + 1;
if (! $sortfield) $sortfield='a.datep, a.id'; if (! $sortfield) $sortfield='a.datep, a.id';
if (! $sortorder) $sortorder='DESC'; if (! $sortorder) $sortorder='DESC';
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('contactcard','globalcard')); $hookmanager->initHooks(array('contactcard','globalcard'));

View File

@ -76,7 +76,7 @@ if (! empty($canvas))
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('contactcard','globalcard')); $hookmanager->initHooks(array('contactcard','globalcard'));

View File

@ -114,7 +114,7 @@ else if ($type == "o")
$urlfiche=""; $urlfiche="";
} }
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array($contextpage)); $hookmanager->initHooks(array($contextpage));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -68,7 +68,7 @@ $usehm=(! empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MA
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'contrat',$id); $result=restrictedArea($user,'contrat',$id);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('contractcard','globalcard')); $hookmanager->initHooks(array('contractcard','globalcard'));
$object = new Contrat($db); $object = new Contrat($db);

View File

@ -86,10 +86,10 @@ $staticcontratligne=new ContratLigne($db);
if ($search_status == '') $search_status=1; if ($search_status == '') $search_status=1;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$contextpage='contractlist'; $contextpage='contractlist';
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array($contextpage)); $hookmanager->initHooks(array($contextpage));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -77,7 +77,7 @@ $filter_opcloture=GETPOST('filter_opcloture');
// Initialize context for list // Initialize context for list
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'servicelist'.$mode; $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'servicelist'.$mode;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array($contextpage)); $hookmanager->initHooks(array($contextpage));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -536,7 +536,7 @@ if (! $error && $massaction == 'delete' && $permtodelete)
$result=$objecttmp->fetch($toselectid); $result=$objecttmp->fetch($toselectid);
if ($result > 0) if ($result > 0)
{ {
if ($objecttmp->element == 'societe') $result = $objecttmp->delete($objecttmp->id, $user, 1); if (in_array($objecttmp->element, array('societe','member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1);
else $result = $objecttmp->delete($user); else $result = $objecttmp->delete($user);
if ($result <= 0) if ($result <= 0)
{ {

View File

@ -156,8 +156,8 @@ class box_actions extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'align' => 'left', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -124,8 +124,8 @@ class box_bookmarks extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'align' => 'left', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -146,8 +146,10 @@ class box_clients extends ModeleBoxes
} }
} }
else { else {
$this->info_box_contents[0][0] = array('align' => 'left', $this->info_box_contents[0][0] = array(
'text' => $langs->trans("ReadPermissionNotAllowed")); 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
} }
} }

View File

@ -165,8 +165,8 @@ class box_commandes extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'align' => 'left', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -158,8 +158,8 @@ class box_comptes extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }

View File

@ -151,8 +151,8 @@ class box_contacts extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'align' => 'left', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }

View File

@ -134,7 +134,7 @@ class box_contracts extends ModeleBoxes
if ($num==0) if ($num==0)
$this->info_box_contents[$line][0] = array( $this->info_box_contents[$line][0] = array(
'td' => 'align="center"', 'td' => 'align="center opacitymedium"',
'text'=>$langs->trans("NoRecordedContracts"), 'text'=>$langs->trans("NoRecordedContracts"),
); );
@ -148,8 +148,8 @@ class box_contracts extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -169,8 +169,8 @@ class box_factures extends ModeleBoxes
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -178,8 +178,8 @@ class box_factures_fourn extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->transnoentities("ReadPermissionNotAllowed"), 'text' => $langs->transnoentities("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -168,8 +168,8 @@ class box_factures_fourn_imp extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }

View File

@ -172,8 +172,8 @@ class box_factures_imp extends ModeleBoxes
} }
else { else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -134,8 +134,10 @@ class box_ficheinter extends ModeleBoxes
} }
else else
{ {
$this->info_box_contents[0][0] = array('td' => '', $this->info_box_contents[0][0] = array(
'text' => $langs->trans("ReadPermissionNotAllowed")); 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
} }
} }

View File

@ -127,8 +127,8 @@ class box_fournisseurs extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }

View File

@ -148,8 +148,10 @@ class box_goodcustomers extends ModeleBoxes
} }
} }
else { else {
$this->info_box_contents[0][0] = array('align' => 'left', $this->info_box_contents[0][0] = array(
'text' => $langs->trans("ReadPermissionNotAllowed")); 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
} }
} }

View File

@ -255,8 +255,10 @@ class box_graph_invoices_permonth extends ModeleBoxes
} }
else { else {
$this->info_box_contents[0][0] = array('td' => '', $this->info_box_contents[0][0] = array(
'text' => $langs->trans("ReadPermissionNotAllowed")); 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
} }
} }

View File

@ -254,8 +254,10 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
} }
else { else {
$this->info_box_contents[0][0] = array('td' => '', $this->info_box_contents[0][0] = array(
'text' => $langs->trans("ReadPermissionNotAllowed")); 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
} }
} }

View File

@ -253,8 +253,10 @@ class box_graph_orders_permonth extends ModeleBoxes
} }
else { else {
$this->info_box_contents[0][0] = array('td' => '', $this->info_box_contents[0][0] = array(
'text' => $langs->trans("ReadPermissionNotAllowed")); 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
} }
} }

View File

@ -252,8 +252,10 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
} }
else { else {
$this->info_box_contents[0][0] = array('td' => '', $this->info_box_contents[0][0] = array(
'text' => $langs->trans("ReadPermissionNotAllowed")); 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
} }
} }

View File

@ -99,6 +99,10 @@ class box_graph_product_distribution extends ModeleBoxes
$nowarray=dol_getdate(dol_now(),true); $nowarray=dol_getdate(dol_now(),true);
if (empty($year)) $year=$nowarray['year']; if (empty($year)) $year=$nowarray['year'];
$nbofgraph=0;
if ($showinvoicenb) $nbofgraph++;
if ($showpropalnb) $nbofgraph++;
if ($showordernb) $nbofgraph++;
$text = $langs->trans("BoxProductDistribution",$max).' - '.$langs->trans("Year").': '.$year; $text = $langs->trans("BoxProductDistribution",$max).' - '.$langs->trans("Year").': '.$year;
$this->info_box_head = array( $this->info_box_head = array(
@ -113,11 +117,6 @@ class box_graph_product_distribution extends ModeleBoxes
); );
$nbofgraph=0;
if ($showinvoicenb) $nbofgraph++;
if ($showpropalnb) $nbofgraph++;
if ($showordernb) $nbofgraph++;
$paramtitle=$langs->transnoentitiesnoconv("Products").'/'.$langs->transnoentitiesnoconv("Services"); $paramtitle=$langs->transnoentitiesnoconv("Products").'/'.$langs->transnoentitiesnoconv("Services");
if (empty($conf->produit->enabled)) $paramtitle=$langs->transnoentitiesnoconv("Services"); if (empty($conf->produit->enabled)) $paramtitle=$langs->transnoentitiesnoconv("Services");
if (empty($conf->service->enabled)) $paramtitle=$langs->transnoentitiesnoconv("Products"); if (empty($conf->service->enabled)) $paramtitle=$langs->transnoentitiesnoconv("Products");
@ -309,6 +308,11 @@ class box_graph_product_distribution extends ModeleBoxes
} }
} }
if (empty($nbofgraph))
{
$langs->load("errors");
$mesg=$langs->trans("ReadPermissionNotAllowed");
}
if (empty($conf->use_javascript_ajax)) if (empty($conf->use_javascript_ajax))
{ {
$langs->load("errors"); $langs->load("errors");
@ -380,9 +384,11 @@ class box_graph_product_distribution extends ModeleBoxes
} }
else else
{ {
$this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"', $this->info_box_contents[0][0] = array(
'maxlength'=>500, 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $mesg); 'maxlength'=>500,
'text' => $mesg
);
} }
} }

View File

@ -254,8 +254,10 @@ class box_graph_propales_permonth extends ModeleBoxes
} }
else { else {
$this->info_box_contents[0][0] = array('td' => '', $this->info_box_contents[0][0] = array(
'text' => $langs->trans("ReadPermissionNotAllowed")); 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
} }
} }

View File

@ -157,8 +157,8 @@ class box_members extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'align' => 'left', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }

View File

@ -113,7 +113,7 @@ class box_produits extends ModeleBoxes
$productstatic->entity = $objp->entity; $productstatic->entity = $objp->entity;
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
'text' => $productstatic->getNomUrl(1), 'text' => $productstatic->getNomUrl(1),
'asis' => 1, 'asis' => 1,
); );
@ -188,8 +188,8 @@ class box_produits extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -195,8 +195,8 @@ class box_produits_alerte_stock extends ModeleBoxes
} }
else { else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -155,8 +155,8 @@ class box_propales extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -156,8 +156,8 @@ class box_prospect extends ModeleBoxes
} }
} else { } else {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -161,8 +161,10 @@ class box_services_contracts extends ModeleBoxes
} }
} }
else { else {
$this->info_box_contents[0][0] = array('td' => '', $this->info_box_contents[0][0] = array(
'text' => $langs->trans("ReadPermissionNotAllowed")); 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
} }
} }

View File

@ -140,8 +140,10 @@ class box_services_expired extends ModeleBoxes
} }
else else
{ {
$this->info_box_contents[0][0] = array('td' => '', $this->info_box_contents[0][0] = array(
'text' => $langs->trans("ReadPermissionNotAllowed")); 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
} }
} }

View File

@ -160,8 +160,8 @@ class box_supplier_orders extends ModeleBoxes
else else
{ {
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed"), 'text' => $langs->trans("ReadPermissionNotAllowed")
); );
} }
} }

View File

@ -759,7 +759,11 @@ class ExtraFields
$list=$this->attribute_list[$key]; $list=$this->attribute_list[$key];
$hidden=$this->attribute_hidden[$key]; $hidden=$this->attribute_hidden[$key];
if ($computed) return '<span class="opacitymedium">'.$langs->trans("AutomaticallyCalculated").'</span>'; if ($computed)
{
if ($keysuffix != 'search_') return '<span class="opacitymedium">'.$langs->trans("AutomaticallyCalculated").'</span>';
else return '';
}
if (empty($showsize)) if (empty($showsize))
{ {

View File

@ -6085,7 +6085,7 @@ class Form
} }
else else
{ {
$nophoto='/public/theme/common/nophoto.png'; $nophoto='/public/theme/common/nophoto.png';
if (in_array($modulepart,array('userphoto','contact'))) // For module that are "physical" users if (in_array($modulepart,array('userphoto','contact'))) // For module that are "physical" users
{ {
$nophoto='/public/theme/common/user_anonymous.png'; $nophoto='/public/theme/common/user_anonymous.png';
@ -6104,10 +6104,7 @@ class Form
} }
else else
{ {
if ($conf->browser->layout != 'phone') $ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'">';
{
$ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'">';
}
} }
} }

View File

@ -210,11 +210,22 @@ class FormActions
$ref=$action->getNomUrl(1,-1); $ref=$action->getNomUrl(1,-1);
$label=$action->getNomUrl(0,38); $label=$action->getNomUrl(0,38);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$ref.'</td>'; print '<td>'.$ref.'</td>';
print '<td>'.$label.'</td>'; print '<td>'.$label.'</td>';
print '<td>'.$action->type.'</td>'; print '<td>';
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
{
if ($action->type_picto) print img_picto('', $action->type_picto);
else {
if ($action->type_code == 'AC_RDV') print img_picto('', 'object_group').' ';
if ($action->type_code == 'AC_TEL') print img_picto('', 'object_phoning').' ';
if ($action->type_code == 'AC_FAX') print img_picto('', 'object_phoning_fax').' ';
if ($action->type_code == 'AC_EMAIL') print img_picto('', 'object_email').' ';
}
}
print $action->type;
print '</td>';
print '<td>'.dol_print_date($action->datep,'dayhour'); print '<td>'.dol_print_date($action->datep,'dayhour');
if ($action->datef) if ($action->datef)
{ {
@ -233,7 +244,7 @@ class FormActions
$userstatic->id = $action->author->id; $userstatic->id = $action->author->id;
$userstatic->firstname = $action->author->firstname; $userstatic->firstname = $action->author->firstname;
$userstatic->lastname = $action->author->lastname; $userstatic->lastname = $action->author->lastname;
print $userstatic->getNomUrl(1); print $userstatic->getNomUrl(1, '', 0, 0, 16, 0, '', '');
} }
print '</td>'; print '</td>';
print '<td align="right">'; print '<td align="right">';

View File

@ -706,7 +706,7 @@ class FormFile
$out.= '<tr class="oddeven">'; $out.= '<tr class="oddeven">';
$documenturl = DOL_URL_ROOT.'/document.php'; $documenturl = DOL_URL_ROOT.'/document.php';
if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) $documenturl=$conf->global->DOL_URL_ROOT_DOCUMENT_PHP; if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) $documenturl=$conf->global->DOL_URL_ROOT_DOCUMENT_PHP; // To use another wrapper
// Show file name with link to download // Show file name with link to download
$out.= '<td class="tdoverflowmax300">'; $out.= '<td class="tdoverflowmax300">';

Some files were not shown because too many files have changed in this diff Show More