diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index e34861450eb663ed51604d3353d1db3aba55669c..596aefa803e3f2bb74eb3f7b14e0168319418a61 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -104,12 +104,18 @@ if ($action=='install') } else { - if (! preg_match('/\.zip/i',$original_file)) + if (! preg_match('/\.zip$/i',$original_file)) { $langs->load("errors"); setEventMessages($langs->trans("ErrorFileMustBeADolibarrPackage",$original_file), null, 'errors'); $error++; } + if (! preg_match('/module_.*\-[\d]+\.[\d]+.*$/i',$original_file)) + { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorFilenameDosNotMatchDolibarrPackageRules",$original_file, 'module_*-x.y*.zip'), null, 'errors'); + $error++; + } } if (! $error) @@ -152,7 +158,7 @@ if ($action=='install') //var_dump($modulenamedir); if (! dol_is_dir($modulenamedir)) { - setEventMessages($langs->trans("ErrorModuleFileSeemsToHaveAWrongFormat"), null, 'errors'); + setEventMessages($langs->trans("ErrorModuleFileSeemsToHaveAWrongFormat").'<br>Dir not found: '.$conf->admin->dir_temp.'/'.$tmpdir.'/'.$modulename.'<br>'.$conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulename, null, 'errors'); $error++; } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f0ed512e9408fdbf2161c5fd59c65879836e8458..f4a85ee1a00f109f2ebf8fef7c8f660da2d1f3ce 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1,18 +1,18 @@ <?php -/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> - * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> - * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> - * Copyright (C) 2004 Christophe Combelles <ccomb@free.fr> - * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> - * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> - * Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> - * Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> - * Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr> - * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> +/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> + * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> + * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> + * Copyright (C) 2004 Christophe Combelles <ccomb@free.fr> + * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> + * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> + * Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr> + * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> + * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -983,6 +983,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $showbarcode=empty($conf->barcode->enabled)?0:($object->barcode?1:0); if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0; $modulepart='unknown'; + if ($object->element == 'societe') $modulepart='societe'; if ($object->element == 'contact') $modulepart='contact'; if ($object->element == 'member') $modulepart='memberphoto'; @@ -1006,7 +1007,6 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $nophoto='/public/theme/common/nophoto.png'; $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'"></div>'; } - } } else @@ -1091,7 +1091,11 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $morehtmlstatus.=$tmptxt; } if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty - if ($object->element == 'product' && ! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>'; + + if ($object->element == 'product' || $object->element == 'bank_account') + { + if(! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>'; + } if ($object->element != 'product' && $object->element != 'bookmark') { diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index e493bc675247c2c49be5687da0d5a02384fd0eb6..a822a98650cf1fdf2ca423e0be7344cf437c2153 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -182,6 +182,8 @@ ErrorBankStatementNameMustFollowRegex=Error, bank statement name must follow the ErrorPhpMailDelivery=Check that you don't use a too high number of recipients and that your email content is not similar to a Spam. Ask also your administrator to check firewall and server logs files for a more complete information. ErrorUserNotAssignedToTask=User must be assigned to task to be able to enter time consumed. ErrorTaskAlreadyAssigned=Task already assigned to user +ErrorModuleFileSeemsToHaveAWrongFormat=The module package seems to have a wrong format. +ErrorFilenameDosNotMatchDolibarrPackageRules=The name of the module package (<strong>%s</strong>) does not match expected name syntax: <strong>%s</strong> # Warnings WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 7a15ee64ea9f5ecefe7722098ec0e2ba69078543..8281ef244d182a7309b8f373708691e1df0ce83d 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1668,7 +1668,7 @@ class User extends CommonObject $subject = $outputlangs->transnoentitiesnoconv("SubjectNewPassword", $appli); // Define $urlwithroot - //$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); + $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current