diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 9d61ea07afa0c..c7807bc6b00e9 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -219,7 +219,9 @@ function makeSubstitution($text) // Substitutions $substitutionarray=array( - '__CIVILITY__'=>$this->getCivilityLabel(), + '__ID__'=>$this->id, + '__MEMBER_ID__'=>$this->id, + '__CIVILITY__'=>$this->getCivilityLabel(), '__FIRSTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname, '__LASTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname, '__FULLNAME__'=>$msgishtml?dol_htmlentitiesbr($this->getFullName($langs)):$this->getFullName($langs), diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 53d1ff60836d3..225cac7c47cca 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -347,7 +347,7 @@ if (! $error) { // Send confirmation Email - if ($object->email && $sendalsoemail) + if ($object->email && $sendalsoemail) // $object is 'Adherent' { $subject = ''; $msg= ''; diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index a0e992e9da95f..e76f6c3a1426e 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -211,8 +211,7 @@ public function calculTotaux() $total_localtax1 = 0; $total_localtax2 = 0; - $tab=array(); - $tab = $_SESSION['poscart']; + $tab = (! empty($_SESSION['poscart'])?$_SESSION['poscart']:array()); $tab_size=count($tab); for($i=0;$i < $tab_size;$i++) diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 24b945629157e..c09521585e60e 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -41,6 +41,8 @@ $usertxt=GETPOST('user','',1); $err=GETPOST("err"); +// Instantiate hooks of thirdparty module only if not already define +$hookmanager->initHooks(array('cashdeskloginpage')); /* * View @@ -51,6 +53,15 @@ $arrayofcss=array('/cashdesk/css/style.css'); top_htmlhead('','',0,0,'',$arrayofcss); + +// Execute hook getLoginPageOptions (for table) +$parameters=array('entity' => GETPOST('entity','int')); +$reshook = $hookmanager->executeHooks('getLoginPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks. +if (is_array($hookmanager->resArray) && ! empty($hookmanager->resArray)) { + $morelogincontent = $hookmanager->resArray; // (deprecated) For compatibility +} else { + $morelogincontent = $hookmanager->resPrint; +} ?>
@@ -92,6 +103,24 @@