Fix bugs
This commit is contained in:
parent
892ab420a7
commit
d340ce6380
@ -103,10 +103,10 @@ function showOnlinePaymentUrl($type,$ref)
|
|||||||
$langs->load("paybox");
|
$langs->load("paybox");
|
||||||
$servicename='Online';
|
$servicename='Online';
|
||||||
|
|
||||||
$out.=img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
|
$out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
|
||||||
$url=getOnlinePaymentUrl(0,$type,$ref);
|
$url = getOnlinePaymentUrl(0,$type,$ref);
|
||||||
$out.='<input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.'">';
|
$out.= '<input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.'">';
|
||||||
$out.=ajax_autoselect("onlinepaymenturl", 0);
|
$out.= ajax_autoselect("onlinepaymenturl", 0);
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,6 +126,7 @@ function getOnlinePaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$ref=str_replace(' ','',$ref);
|
$ref=str_replace(' ','',$ref);
|
||||||
|
$out='';
|
||||||
|
|
||||||
if ($type == 'free')
|
if ($type == 'free')
|
||||||
{
|
{
|
||||||
@ -210,7 +211,7 @@ function getOnlinePaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f
|
|||||||
}
|
}
|
||||||
|
|
||||||
// For multicompany
|
// For multicompany
|
||||||
$out.="&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities
|
if (! empty($out)) $out.="&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities
|
||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
|
|||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
if (is_array($conf->modules))
|
if (is_array($conf->modules))
|
||||||
{
|
{
|
||||||
$this->enabled=in_array('mymodule',$conf->modules);
|
$this->enabled=in_array('mymodule',$conf->modules)?1:0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,15 +186,14 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
|
|||||||
*
|
*
|
||||||
* @param string $filter Filter
|
* @param string $filter Filter
|
||||||
* @param string $option Options
|
* @param string $option Options
|
||||||
* @return int Nb of recipients
|
* @return int Nb of recipients or -1 if KO
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients($filter=1,$option='')
|
function getNbOfRecipients($filter=1,$option='')
|
||||||
{
|
{
|
||||||
$a=parent::getNbOfRecipients("select count(distinct(email)) as nb from ".MAIN_DB_PREFIX."myobject as p where email IS NOT NULL AND email != ''");
|
$a=parent::getNbOfRecipients("select count(distinct(email)) as nb from ".MAIN_DB_PREFIX."myobject as p where email IS NOT NULL AND email != ''");
|
||||||
|
|
||||||
if ($a < 0 || $b < 0) return -1;
|
if ($a < 0) return -1;
|
||||||
if ($option == '') return $a;
|
return $a;
|
||||||
return ($a+$b);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user