Works on paypal module

Fix: better error management
This commit is contained in:
Regis Houssin
2011-05-22 18:12:42 +00:00
parent 975012c6cf
commit 6d56cc196b
8 changed files with 107 additions and 73 deletions

View File

@@ -2469,16 +2469,15 @@ class Commande extends CommonObject
* @param option Where point the link
* @return string String with URL
*/
function getNomUrl($withpicto=0,$option=0,$short=0)
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
{
global $conf, $langs;
$result='';
$file = '/commande/fiche.php';
if ($conf->expedition->enabled && ($option == 1 || $option == 2)) $file = '/expedition/shipment.php';
if ($conf->expedition->enabled && ($option == 1 || $option == 2)) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id;
else $url = DOL_URL_ROOT.'/commande/fiche.php?id='.$this->id;
$url = DOL_URL_ROOT.$file.'?id='.$this->id;
if ($short) return $url;
$linkstart = '<a href="'.$url.'">';