diff --git a/.scrutinizer.yml b/.scrutinizer.yml index a176c114cb8..73b43e95f4b 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -100,8 +100,9 @@ tools: comparison_of_bit_result: true basic_semantic_checks: enabled: true + # Disabled unused code. In most cases, we want to keep it. unused_code: - enabled: true + enabled: false deprecation_checks: enabled: true useless_function_calls: diff --git a/build/debian/README.howto b/build/debian/README.howto index 78f93cd46cc..6b6e71c4874 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -229,7 +229,9 @@ from origin/upstream and origin/pristine. * If new upstream is available onto sourceforge, launch: > debian/get-orig-source.sh -* Edit tgz file to remove ckeditor and phpexcel and renama file into dolibarr-x.y.z+dsfgw.tgz +* Edit tgz file to remove ckeditor and phpexcel and rename file into +dolibarr-x.y.z+dsfgw.tgz +(x.y.z = version, w start from 1 and is increased for each new import) * Staying into git root directory, run > git-import-orig -vv ../dolibarr-x.y.z+dsfgw.tgz diff --git a/build/dmg/dolimamp/install.forced.php b/build/dmg/dolimamp/install.forced.php index da6238945ba..31d0b5ae685 100644 --- a/build/dmg/dolimamp/install.forced.php +++ b/build/dmg/dolimamp/install.forced.php @@ -14,4 +14,3 @@ $force_install_databaserootpass='root'; $force_install_dolibarrlogin='admin'; $force_install_nophpinfo='1'; $force_install_lockinstall='444'; -?> \ No newline at end of file diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 62c6c60fc9c..973b0f65036 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -452,6 +452,7 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/adapters`; # Keep this removal in case we embed libraries #$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf`; # Source of this flash is not available $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`; diff --git a/dev/examples/create_invoice.php b/dev/examples/create_invoice.php index 03bc03ac3d2..d59655ef613 100755 --- a/dev/examples/create_invoice.php +++ b/dev/examples/create_invoice.php @@ -115,4 +115,3 @@ else $db->close(); return $error; -?> diff --git a/dev/rmphpclosingtag.sh b/dev/rmphpclosingtag.sh new file mode 100755 index 00000000000..ec755bc399b --- /dev/null +++ b/dev/rmphpclosingtag.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# vim:ft=sh:ts=3:sts=3:sw=3:et: + +### +# Strips the closing php tag `?>` and any following blank lines from the +# end of any PHP file in the current working directory and sub-directories. Files +# with non-whitespace characters following the closing tag will not be affected. +# +# Author: Bryan C. Geraghty +# Date: 2009-10-28 +# Source: http://bryan.ravensight.org/2010/07/remove-php-closing-tag/ +## + +FILES=$(pcregrep -rnM --include='^.*\.php$' '^\?\>(?=([\s\n]+)?$(?!\n))' .); + +for MATCH in $FILES; +do + FILE=`echo $MATCH | awk -F ':' '{print $1}'`; + TARGET=`echo $MATCH | awk -F ':' '{print $2}'`; + LINE_COUNT=`wc -l $FILE | awk -F " " '{print $1}'`; + echo "Removing lines ${TARGET} through ${LINE_COUNT} from file $FILE..."; + sed -i "${TARGET},${LINE_COUNT}d" $FILE; +done; diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index 072375c89d9..c36dad4b4b5 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -371,4 +371,3 @@ class Skeleton_Class extends CommonObject } } -?> diff --git a/dev/skeletons/skeleton_webservice_server.php b/dev/skeletons/skeleton_webservice_server.php index dca2ae7a564..278057fd4f6 100644 --- a/dev/skeletons/skeleton_webservice_server.php +++ b/dev/skeletons/skeleton_webservice_server.php @@ -271,4 +271,3 @@ function createSkeleton($authentication,$skeleton) // Return the results. $server->service($HTTP_RAW_POST_DATA); -?> diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 288cda7101d..63a69c4b2ef 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -338,4 +338,3 @@ class autoTranslator } } -?> diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php index 62cb86c99eb..fc778770bb9 100755 --- a/dev/translation/strip_language_file.php +++ b/dev/translation/strip_language_file.php @@ -264,4 +264,3 @@ foreach($filesToProcess as $fileToProcess) return 0; -?> diff --git a/htdocs/accountancy/class/accountancyaccount.class.php b/htdocs/accountancy/class/accountancyaccount.class.php index 6190969abd3..229bc79ba41 100644 --- a/htdocs/accountancy/class/accountancyaccount.class.php +++ b/htdocs/accountancy/class/accountancyaccount.class.php @@ -93,4 +93,3 @@ class AccountancyAccount } } -?> diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index dad66600d0e..b88e4b2134f 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -62,7 +62,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon */ private function getTitle($action) { - global $langs; + global $langs,$conf; $out=''; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 91c786b2a10..0fcedb8e96d 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -138,7 +138,7 @@ if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights if ($_POST["userid"] != $object->user_id) // If link differs from currently in database { $result=$object->setUserId($_POST["userid"]); - if ($result < 0) dol_print_error($object->db,$object->error); + if ($result < 0) dol_print_error('',$object->error); $_POST['action']=''; $action=''; } @@ -172,7 +172,7 @@ if ($action == 'setsocid') if (! $error) { $result=$object->setThirdPartyId(GETPOST('socid','int')); - if ($result < 0) dol_print_error($object->db,$object->error); + if ($result < 0) dol_print_error('',$object->error); $_POST['action']=''; $action=''; } @@ -1101,4 +1101,3 @@ else llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index ab964100c04..dbccbdb4f01 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -280,4 +280,3 @@ print '
'; llxFooter(); $db->close(); -?> diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 73036747a6c..77cbff2918a 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -95,6 +95,8 @@ class Adherent extends CommonObject var $first_subscription_date; var $first_subscription_amount; var $last_subscription_date; + var $last_subscription_date_start; + var $last_subscription_date_end; var $last_subscription_amount; var $subscriptions=array(); diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 66f7508fa20..e861af709b8 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -99,8 +99,10 @@ class AdherentType extends CommonObject */ function update($user) { - global $hookmanager; - + global $hookmanager,$conf; + + $error=0; + $this->libelle=trim($this->libelle); $sql = "UPDATE ".MAIN_DB_PREFIX."adherent_type "; @@ -116,6 +118,8 @@ class AdherentType extends CommonObject $result = $this->db->query($sql); if ($result) { + $action='update'; + // Actions on extra fields (by external module or standard code) $hookmanager->initHooks(array('membertypedao')); $parameters=array('membertype'=>$this->id); @@ -132,8 +136,8 @@ class AdherentType extends CommonObject } } else if ($reshook < 0) $error++; - - + + return 1; } else diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 1d8110c00d6..988b49efd07 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -64,7 +64,7 @@ else if ($action == 'update') { if (GETPOST('submit_GENBARCODE_LOCATION')) { - $location = GETPOST('genbarcodelocation','alpha'); + $location = GETPOST('GENBARCODE_LOCATION','alpha'); $res = dolibarr_set_const($db, "GENBARCODE_LOCATION",$location,'chaine',0,'',$conf->entity); } if (GETPOST('submit_PRODUIT_DEFAULT_BARCODE_TYPE')) diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 5c2c8176842..d58a1576a31 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -468,4 +468,3 @@ print ''; llxFooter(); $db->close(); -?> diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 2eee562f217..5c77149c0f0 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -170,4 +170,3 @@ print '

'.showModulesExludedForExte llxFooter(); $db->close(); -?> diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index a78ee9ea761..794cc1b890a 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -157,4 +157,3 @@ if ($action == 'edit' && ! empty($attrname)) llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/admin/osc-languages.php b/htdocs/admin/osc-languages.php index 83446034f0d..804c72f2850 100644 --- a/htdocs/admin/osc-languages.php +++ b/htdocs/admin/osc-languages.php @@ -88,4 +88,3 @@ print ""; $db->close(); llxFooter(); -?> diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index 0dc27149006..9cb2dc65880 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -156,4 +156,3 @@ if ($action == 'edit' && ! empty($attrname)) llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 3dae4273319..b69e8a4cacf 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -253,4 +253,3 @@ print "\n"; llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index 48b690a7198..e7490225107 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -113,28 +113,23 @@ print '
  • Google print ''; -print $langs->trans("OfficialWebHostingService").':'; -$url='http://wiki.dolibarr.org/index.php/Cloud_Solutions'; $title=$langs->trans('List'); +print $langs->trans("OtherResources").':'; +print '
      '; + +$url='http://saas.dolibarr.org'; $title=$langs->trans("OfficialWebHostingService"); if (preg_match('/^fr_/i',$langs->getDefaultLang())) $url='http://wiki.dolibarr.org/index.php/Solutions_de_Cloud'; if (preg_match('/^es_/i',$langs->getDefaultLang())) $url='http://wiki.dolibarr.org/index.php/Soluciones_en_la_Nube'; -print ''; llxFooter(); $db->close(); -?> - - - - - - - - - - diff --git a/htdocs/admin/system/os.php b/htdocs/admin/system/os.php index 35645345426..669e8d84be9 100644 --- a/htdocs/admin/system/os.php +++ b/htdocs/admin/system/os.php @@ -51,4 +51,3 @@ print ''; llxFooter(); -?> diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index bbb2c60e51f..22fecdfd524 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -120,4 +120,3 @@ foreach($phparray as $key => $value) llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/admin/system/web.php b/htdocs/admin/system/web.php index 159915ee456..6c2e36a3e8e 100644 --- a/htdocs/admin/system/web.php +++ b/htdocs/admin/system/web.php @@ -64,4 +64,3 @@ print ''; llxFooter(); $db->close(); -?> diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 5f12b6c150f..cab2881ed16 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -214,4 +214,3 @@ print '
      '; llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/cashdesk/class/Auth.class.php b/htdocs/cashdesk/class/Auth.class.php index ac8d58f93d1..33bbd094050 100644 --- a/htdocs/cashdesk/class/Auth.class.php +++ b/htdocs/cashdesk/class/Auth.class.php @@ -141,4 +141,3 @@ class Auth } -?> \ No newline at end of file diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 292252c2716..b2bb87a0bb2 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -653,4 +653,3 @@ class Facturation } -?> diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index 3b65d7dd132..42e1c00f651 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -166,4 +166,3 @@ $_SESSION['serObjFacturation'] = serialize($obj_facturation); header('Location: '.$redirection); exit; -?> diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index 9f7e0332046..c96b4f2b6f1 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -142,4 +142,3 @@ else exit; } -?> \ No newline at end of file diff --git a/htdocs/cashdesk/validation.php b/htdocs/cashdesk/validation.php index d9cd286691c..289c864ca32 100644 --- a/htdocs/cashdesk/validation.php +++ b/htdocs/cashdesk/validation.php @@ -26,4 +26,3 @@ $form=new Form($db); // Affichage des templates require ('tpl/validation1.tpl.php'); -?> diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 7f9d7ede440..279044ccf25 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -179,4 +179,3 @@ else llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index ccd318c93fb..d224c20bc97 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -142,4 +142,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index abd6564779f..58a384df6d0 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -466,4 +466,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 055d4a42787..e4b30a6e60d 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -224,4 +224,3 @@ if ($id > 0 || ! empty($ref)) $db->close(); llxFooter(); -?> \ No newline at end of file diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 5c2d6812302..27690ae7093 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -855,4 +855,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index ededeab44a1..316c589f046 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -798,7 +798,8 @@ else if ($action == 'add' && $user->rights->facture->creer) $object->fetch_thirdparty(); // If creation from another object of another module (Example: origin=propal, originid=1) - if ($_POST['origin'] && $_POST['originid']) { + if ($_POST['origin'] && $_POST['originid']) + { // Parse element/subelement (ex: project_task) $element = $subelement = $_POST['origin']; if (preg_match('/^([^_]+)_([^_]+)/i', $_POST['origin'], $regs)) { @@ -835,15 +836,20 @@ else if ($action == 'add' && $user->rights->facture->creer) $id = $object->create($user); - if ($id > 0) { + if ($id > 0) + { // If deposit invoice - if ($_POST['type'] == 3) { + if ($_POST['type'] == 3) + { $typeamount = GETPOST('typedeposit', 'alpha'); $valuedeposit = GETPOST('valuedeposit', 'int'); - if ($typeamount == 'amount') { + if ($typeamount == 'amount') + { $amountdeposit = $valuedeposit; - } else { + } + else + { $amountdeposit = 0; dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); @@ -853,7 +859,8 @@ else if ($action == 'add' && $user->rights->facture->creer) dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add deposit lines"); $result = $srcobject->fetch($object->origin_id); - if ($result > 0) { + if ($result > 0) + { $totalamount = 0; $lines = $srcobject->lines; $numlines=count($lines); @@ -898,7 +905,9 @@ else if ($action == 'add' && $user->rights->facture->creer) 0, $langs->trans('Deposit') ); - } else { + } + else + { dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); @@ -907,10 +916,10 @@ else if ($action == 'add' && $user->rights->facture->creer) dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines"); $result = $srcobject->fetch($object->origin_id); - if ($result > 0) { + if ($result > 0) + { $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - $lines = $srcobject->fetch_lines(); + if (empty($lines) && method_exists($srcobject, 'fetch_lines')) $lines = $srcobject->fetch_lines(); $fk_parent_line=0; $num=count($lines); @@ -919,7 +928,8 @@ else if ($action == 'add' && $user->rights->facture->creer) $label=(! empty($lines[$i]->label)?$lines[$i]->label:''); $desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle); - if ($lines [$i]->subprice < 0) { + if ($lines [$i]->subprice < 0) + { // Negative line, we create a discount line $discount = new DiscountAbsolute($db); $discount->fk_soc = $object->socid; diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index 5365cf2bee9..ccd208c7c6f 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -156,4 +156,3 @@ if ($action == 'edit' && ! empty($attrname)) llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 6bafdd827cd..81bf47715e6 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2056,7 +2056,7 @@ class Facture extends CommonInvoice $localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc); - $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, '', $localtaxes_type); + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; @@ -2133,7 +2133,7 @@ class Facture extends CommonInvoice if (! empty($fk_parent_line)) $this->line_order(true,'DESC'); // Mise a jour informations denormalisees au niveau de la facture meme - $result=$this->update_price(1,'auto'); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. + $result=$this->update_price(1,'auto',0,$mysoc); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. if ($result > 0) { $this->db->commit(); diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 31a741d9dcf..60c47564743 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -166,4 +166,3 @@ else $db->close(); llxFooter(); -?> diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 097a89c3918..cc71b402060 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -310,4 +310,3 @@ print ''; $db->close(); llxFooter(); -?> diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index 5cee6ad4d82..c7ee207f853 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -179,4 +179,3 @@ else $db->close(); llxFooter(); -?> diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index eba0f8633a8..4187de7136c 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1094,4 +1094,3 @@ class Contact extends CommonObject } } -?> diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 86462d05fae..92ba03e9861 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -249,4 +249,3 @@ if ($action != 'edit') llxFooter(); $db->close(); -?> diff --git a/htdocs/contrat/info.php b/htdocs/contrat/info.php index 8764c53eea5..234f986a00c 100644 --- a/htdocs/contrat/info.php +++ b/htdocs/contrat/info.php @@ -58,4 +58,3 @@ print '
  • '; $db->close(); llxFooter(); -?> diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 8759af8a719..d1a64f6b256 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -253,4 +253,3 @@ if ($section) // Close db if mode is not noajax if ((! isset($mode) || $mode != 'noajax') && is_object($db)) $db->close(); -?> diff --git a/htdocs/core/ajax/bankconciliate.php b/htdocs/core/ajax/bankconciliate.php index dc0e5f092dc..855709f48e2 100644 --- a/htdocs/core/ajax/bankconciliate.php +++ b/htdocs/core/ajax/bankconciliate.php @@ -71,4 +71,3 @@ if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $ exit; } -?> diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index 025e7e9cb48..69a0bbc72c7 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -115,4 +115,3 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ } } -?> diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index a1094a8274c..ff63927b526 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -156,4 +156,3 @@ class box_actions extends ModeleBoxes } -?> diff --git a/htdocs/core/class/antivir.class.php b/htdocs/core/class/antivir.class.php index 1ea2dddd557..68241cb4d62 100644 --- a/htdocs/core/class/antivir.class.php +++ b/htdocs/core/class/antivir.class.php @@ -165,4 +165,3 @@ class AntiVir } -?> \ No newline at end of file diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 31419e64e9d..f51056b2551 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -198,4 +198,3 @@ class Canvas } } -?> diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6eae61063ba..095a1a9ba12 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -627,25 +627,25 @@ abstract class CommonObject /** * Load data for barcode into properties ->barcode_type* - * Properties ->barcode_type is used to find others. - * If not defined, ->element must be defined to know default barcode type. + * Properties ->barcode_type that is id of barcode type is used to find other properties, but + * if it is not defined, ->element must be defined to know default barcode type. * - * @return int <0 if KO, >=0 if OK + * @return int <0 if KO, 0 if can't guess type of barcode (ISBN, EAN13...), >0 if OK (all barcode properties loaded) */ function fetch_barcode() { global $conf; dol_syslog(get_class($this).'::fetch_barcode this->element='.$this->element.' this->barcode_type='.$this->barcode_type); - + $idtype=$this->barcode_type; - if (! $idtype) + if (empty($idtype) && $idtype != '0') // If type of barcode no set, we try to guess. If set to '0' it means we forced to have type remain not defined { if ($this->element == 'product') $idtype = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; else if ($this->element == 'societe') $idtype = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY; - else dol_print_error('','Call fetch_barcode with barcode_type not defined and cant be guessed'); + else dol_syslog('Call fetch_barcode with barcode_type not defined and cant be guessed', LOG_WARNING); } - + if ($idtype > 0) { if (empty($this->barcode_type) || empty($this->barcode_type_code) || empty($this->barcode_type_label) || empty($this->barcode_type_coder)) // If data not already loaded @@ -1518,7 +1518,7 @@ abstract class CommonObject * @param int $exclspec >0 = Exclude special product (product_type=9) * @param string $roundingadjust 'none'=Do nothing, 'auto'=Use default method (MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND if defined, or '0'), '0'=Force use total of rounding, '1'=Force use rounding of total * @param int $nodatabaseupdate 1=Do not update database. Update only properties of object. - * @param Societe $seller If roundingadjust is 0, it means we recalculate total for lines before calculating total for object. For this, we need seller object. + * @param Societe $seller If roundingadjust is '0' or '1', it means we recalculate total for lines before calculating total for object. For this, we need seller object. * @return int <0 if KO, >0 if OK */ function update_price($exclspec=0,$roundingadjust='none',$nodatabaseupdate=0,$seller='') diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d3111d38a05..d16c9f19a5a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4087,11 +4087,11 @@ class Form // Complete object if not complete if (empty($object->barcode_type_code) || empty($object->barcode_type_coder)) { - $result = $object->fetch_barcode(); - //Check if fetch_barcode() failed + $result = $object->fetch_barcode(); + //Check if fetch_barcode() failed if ($result < 1) return ''; } - + // Barcode image $url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($object->barcode_type_coder).'&code='.urlencode($object->barcode).'&encoding='.urlencode($object->barcode_type_code); $out =''; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 73aa3742206..16cab849514 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1184,4 +1184,3 @@ class FormFile } -?> diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 6567204232a..b99467c20f0 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -1164,4 +1164,3 @@ class FormOther } -?> diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index 06d26c94edf..80ca1b155b7 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -775,4 +775,3 @@ function xml2php($xml) } -?> diff --git a/htdocs/core/filemanagerdol/connectors/php/basexml.php b/htdocs/core/filemanagerdol/connectors/php/basexml.php index 84d2e04666a..439353b4e26 100644 --- a/htdocs/core/filemanagerdol/connectors/php/basexml.php +++ b/htdocs/core/filemanagerdol/connectors/php/basexml.php @@ -108,4 +108,3 @@ function SendErrorNode($number, $text) else echo '' ; } -?> diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index 83d161a20a0..bc0422a5fb4 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -416,4 +416,3 @@ function barcode_outimage($text, $bars, $scale = 1, $mode = "png", $total_y = 0, } } -?> diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php index 37ab1f7881f..1086d4dcd14 100644 --- a/htdocs/core/lib/contract.lib.php +++ b/htdocs/core/lib/contract.lib.php @@ -119,4 +119,3 @@ function contract_admin_prepare_head() return $head; } -?> diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index b25bfe808f2..01d79cdcabe 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -134,4 +134,3 @@ function fichinter_admin_prepare_head() } -?> diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php index a6981be8355..171eda67a90 100644 --- a/htdocs/core/lib/fourn.lib.php +++ b/htdocs/core/lib/fourn.lib.php @@ -198,4 +198,3 @@ function supplierorder_admin_prepare_head($object) } -?> \ No newline at end of file diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 91544d83485..a8609af05bd 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4589,4 +4589,3 @@ function natural_search($fields, $value) return " AND " . ($end > 1? '(' : '') . $res; } -?> diff --git a/htdocs/core/lib/invoice2.lib.php b/htdocs/core/lib/invoice2.lib.php index 5eed1e8e2df..9309d083187 100644 --- a/htdocs/core/lib/invoice2.lib.php +++ b/htdocs/core/lib/invoice2.lib.php @@ -286,4 +286,3 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte else return $result; } -?> diff --git a/htdocs/core/lib/mailmanspip.lib.php b/htdocs/core/lib/mailmanspip.lib.php index eb57f4b6163..ce7f2927630 100644 --- a/htdocs/core/lib/mailmanspip.lib.php +++ b/htdocs/core/lib/mailmanspip.lib.php @@ -44,4 +44,3 @@ function mailmanspip_admin_prepare_head() ); } -?> \ No newline at end of file diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 655efe5b61b..67b6794f3a3 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -205,4 +205,3 @@ function member_stats_prepare_head($object) return $head; } -?> diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 6c1a51471fa..31e900f8e7e 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -311,7 +311,9 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature } } - //print "Delete access is ko"; + // If a or and at least one ok + if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) $deleteok=1; + if (! $deleteok) accessforbidden(); //print "Delete access is ok"; } diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 99f34b24d3b..e5835ff6a68 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -286,7 +286,7 @@ function dol_loginfunction($langs,$conf,$mysoc) // Set jquery theme $dol_loginmesg = (! empty($_SESSION["dol_loginmesg"])?$_SESSION["dol_loginmesg"]:''); - $favicon=DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/favicon.ico'; + $favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1); if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL; $jquerytheme = 'smoothness'; if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 35165597cff..a52aeb37345 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -588,4 +588,3 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, return $list; } -?> \ No newline at end of file diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index 54093976a68..1bbf2e55e27 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -165,4 +165,3 @@ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree') if (empty($pere['rowid'])) print ''; } -?> \ No newline at end of file diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index 37273397ee6..e03bdc6d2e9 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -161,20 +161,23 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode /** * Check validity of code according to its rules * - * @param DoliDB $db Database handler - * @param string &$code Code to check/correct - * @param Product $product Object product - * @param int $type 0 = customer/prospect , 1 = supplier - * @return int 0 if OK - * -1 ErrorBadCustomerCodeSyntax - * -2 ErrorCustomerCodeRequired - * -3 ErrorCustomerCodeAlreadyUsed - * -4 ErrorPrefixRequired + * @param DoliDB $db Database handler + * @param string &$code Code to check/correct + * @param Product $product Object product + * @param int $thirdparty_type 0 = customer/prospect , 1 = supplier + * @param string $type type of barcode (EAN, ISBN, ...) + * @return int 0 if OK + * -1 ErrorBadCustomerCodeSyntax + * -2 ErrorCustomerCodeRequired + * -3 ErrorCustomerCodeAlreadyUsed + * -4 ErrorPrefixRequired */ - function verif($db, &$code, $product, $type) + function verif($db, &$code, $product, $thirdparty_type, $type) { global $conf; + //var_dump($code.' '.$product->ref.' '.$thirdparty_type);exit; + require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php'; $result=0; @@ -190,7 +193,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode } else { - if ($this->verif_syntax($code) >= 0) + if ($this->verif_syntax($code, $type) >= 0) { $is_dispo = $this->verif_dispo($db, $code, $product); if ($is_dispo <> 0) @@ -215,7 +218,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode } } - dol_syslog(get_class($this)."::verif type=".$type." result=".$result); + dol_syslog(get_class($this)."::verif type=".$thirdparty_type." result=".$result); return $result; } @@ -254,12 +257,13 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode } /** - * Renvoi si un code respecte la syntaxe + * Return if a barcode value match syntax * - * @param string $code Code a verifier + * @param string $codefortest Code to check syntax + * @param string $typefortest Type of barcode (ISBN, EAN, ...) * @return int 0 if OK, <0 if KO */ - function verif_syntax($code) + function verif_syntax($codefortest, $typefortest) { global $conf; @@ -273,7 +277,13 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode return ''; } - $result=check_value($mask,$code); + $newcodefortest=$codefortest; + if (in_array($typefortest,array('EAN13','ISBN'))) // We remove the CRC char not included into mask + { + $newcodefortest=substr($newcodefortest,0,12); + } + + $result=check_value($mask,$newcodefortest); return $result; } diff --git a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php index 7b2b099b67c..96214f08d66 100644 --- a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php @@ -403,4 +403,3 @@ class BordereauChequeBlochet extends ModeleChequeReceipts } -?> diff --git a/htdocs/core/modules/commande/modules_commande.php b/htdocs/core/modules/commande/modules_commande.php index 5ddcc38e8d9..1146b1cc181 100644 --- a/htdocs/core/modules/commande/modules_commande.php +++ b/htdocs/core/modules/commande/modules_commande.php @@ -256,4 +256,3 @@ function commande_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0 return -1; } } -?> diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php index a595fb5f59c..a07f3261133 100644 --- a/htdocs/core/modules/contract/mod_contract_serpis.php +++ b/htdocs/core/modules/contract/mod_contract_serpis.php @@ -144,4 +144,3 @@ class mod_contract_serpis extends ModelNumRefContracts } } -?> diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index 5fb3db1ddfe..ba779658051 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -143,4 +143,3 @@ class mod_expedition_safor extends ModelNumRefExpedition } } -?> diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 220df75dc72..9a8b5feaed7 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -224,4 +224,3 @@ class mod_facture_terre extends ModeleNumRefFactures } -?> diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 5e7c2141a0f..f2055e8d643 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -600,4 +600,3 @@ class pdf_soleil extends ModelePDFFicheinter } -?> diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index 3d0b15d0d09..65e5aa979b9 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -145,4 +145,3 @@ class mod_pacific extends ModeleNumRefFicheinter } -?> diff --git a/htdocs/core/modules/modImport.class.php b/htdocs/core/modules/modImport.class.php index cc05e0eba5e..3a371ecf2e7 100644 --- a/htdocs/core/modules/modImport.class.php +++ b/htdocs/core/modules/modImport.class.php @@ -117,4 +117,3 @@ class modImport extends DolibarrModules } } -?> diff --git a/htdocs/core/modules/modNotification.class.php b/htdocs/core/modules/modNotification.class.php index 6a5fb72c953..78e939f4048 100644 --- a/htdocs/core/modules/modNotification.class.php +++ b/htdocs/core/modules/modNotification.class.php @@ -107,4 +107,3 @@ class modNotification extends DolibarrModules } } -?> diff --git a/htdocs/core/modules/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php index 1e3645745da..8c1e0fe4797 100644 --- a/htdocs/core/modules/modPaypal.class.php +++ b/htdocs/core/modules/modPaypal.class.php @@ -199,4 +199,3 @@ class modPaypal extends DolibarrModules } -?> \ No newline at end of file diff --git a/htdocs/core/modules/modPrelevement.class.php b/htdocs/core/modules/modPrelevement.class.php index 21feb8c4a37..7bb5e748037 100644 --- a/htdocs/core/modules/modPrelevement.class.php +++ b/htdocs/core/modules/modPrelevement.class.php @@ -158,4 +158,3 @@ class modPrelevement extends DolibarrModules } } -?> diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index 49b08003a23..05c934a8ea6 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -245,6 +245,7 @@ class modProduct extends DolibarrModules $this->import_tables_array[$r]=array('p'=>MAIN_DB_PREFIX.'product','extra'=>MAIN_DB_PREFIX.'product_extrafields'); $this->import_tables_creator_array[$r]=array('p'=>'fk_user_author'); // Fields to store import user id $this->import_fields_array[$r]=array('p.ref'=>"Ref*",'p.label'=>"Label*",'p.description'=>"Description",'p.url'=>"PublicUrl",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.duration'=>"Duration",'p.customcode'=>'CustomCode','p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell*",'p.tobuy'=>"OnBuy*",'p.fk_product_type'=>"Type*",'p.finished'=>'Nature','p.datec'=>'DateCreation*'); + if (! empty($conf->barcode->enabled)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.barcode'=>'BarCode')); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity = ".$conf->entity; $resql=$this->db->query($sql); diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index a998f41298e..2b9bb8d44f8 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin @@ -17,7 +17,6 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * */ /** @@ -209,7 +208,8 @@ class modService extends DolibarrModules $this->import_tables_array[$r]=array('p'=>MAIN_DB_PREFIX.'product','extra'=>MAIN_DB_PREFIX.'product_extrafields'); $this->import_tables_creator_array[$r]=array('p'=>'fk_user_author'); // Fields to store import user id $this->import_fields_array[$r]=array('p.ref'=>"Ref*",'p.label'=>"Label*",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.duration'=>"Duration",'p.customcode'=>'CustomCode','p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell*",'p.tobuy'=>"OnBuy*",'p.fk_product_type'=>"Type*",'p.finished'=>'Nature','p.datec'=>'DateCreation*'); - // Add extra fields + if (! empty($conf->barcode->enabled)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.barcode'=>'BarCode')); + // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index ea0b6144c91..3ab5fdb9e09 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -301,4 +301,3 @@ class mod_codeproduct_elephant extends ModeleProductCode } -?> diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index 6aae57c34d5..2595485eac1 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -247,4 +247,3 @@ function project_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, } } -?> \ No newline at end of file diff --git a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php index 9525639dd9c..75b06755b80 100644 --- a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php @@ -1037,4 +1037,3 @@ class doc_generic_project_odt extends ModelePDFProjects } } -?> diff --git a/htdocs/core/modules/project/task/modules_task.php b/htdocs/core/modules/project/task/modules_task.php index f9d10f90534..8aacc535b7e 100644 --- a/htdocs/core/modules/project/task/modules_task.php +++ b/htdocs/core/modules/project/task/modules_task.php @@ -248,4 +248,3 @@ function task_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $h } } -?> diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index 50982a8b1c7..f7e6b75adc2 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -258,4 +258,3 @@ function supplier_order_pdf_create($db, $object, $modele, $outputlangs, $hidedet } } -?> diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index 6cfd835925d..facca267160 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -252,4 +252,3 @@ if ($id > 0 || ! empty($ref)) llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index f208c82b5d2..1fd33b29c53 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1688,4 +1688,3 @@ else if ($id || $ref) llxFooter(); $db->close(); -?> diff --git a/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.js b/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.js new file mode 100644 index 00000000000..34f3c88232b --- /dev/null +++ b/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.js @@ -0,0 +1,400 @@ +/** + * TableDnD plug-in for JQuery, allows you to drag and drop table rows + * You can set up various options to control how the system will work + * Copyright (c) Denis Howlett + * Licensed like jQuery, see http://docs.jquery.com/License. + * + * Configuration options: + * + * onDragStyle + * This is the style that is assigned to the row during drag. There are limitations to the styles that can be + * associated with a row (such as you can't assign a border--well you can, but it won't be + * displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as + * a map (as used in the jQuery css(...) function). + * onDropStyle + * This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations + * to what you can do. Also this replaces the original style, so again consider using onDragClass which + * is simply added and then removed on drop. + * onDragClass + * This class is added for the duration of the drag and then removed when the row is dropped. It is more + * flexible than using onDragStyle since it can be inherited by the row cells and other content. The default + * is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your + * stylesheet. + * onDrop + * Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table + * and the row that was dropped. You can work out the new order of the rows by using + * table.rows. + * onDragStart + * Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the + * table and the row which the user has started to drag. + * onAllowDrop + * Pass a function that will be called as a row is over another row. If the function returns true, allow + * dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under + * the cursor. It returns a boolean: true allows the drop, false doesn't allow it. + * scrollAmount + * This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the + * window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2, + * FF3 beta + * dragHandle + * This is the name of a class that you assign to one or more cells in each row that is draggable. If you + * specify this class, then you are responsible for setting cursor: move in the CSS and only these cells + * will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where + * the whole row is draggable. + * + * Other ways to control behaviour: + * + * Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows + * that you don't want to be draggable. + * + * Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form + * []=&[]= so that you can send this back to the server. The table must have + * an ID as must all the rows. + * + * Other methods: + * + * $("...").tableDnDUpdate() + * Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells). + * This is useful if you have updated the table rows using Ajax and you want to make the table draggable again. + * The table maintains the original configuration (so you don't have to specify it again). + * + * $("...").tableDnDSerialize() + * Will serialize and return the serialized string as above, but for each of the matching tables--so it can be + * called from anywhere and isn't dependent on the currentTable being set up correctly before calling + * + * Known problems: + * - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0 + * + * Version 0.2: 2008-02-20 First public version + * Version 0.3: 2008-02-07 Added onDragStart option + * Made the scroll amount configurable (default is 5 as before) + * Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes + * Added onAllowDrop to control dropping + * Fixed a bug which meant that you couldn't set the scroll amount in both directions + * Added serialize method + * Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row + * draggable + * Improved the serialize method to use a default (and settable) regular expression. + * Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table + * Version 0.6: 2011-12-02 Added support for touch devices + */ +// Determine if this is a touch device +var hasTouch = 'ontouchstart' in document.documentElement, + startEvent = hasTouch ? 'touchstart' : 'mousedown', + moveEvent = hasTouch ? 'touchmove' : 'mousemove', + endEvent = hasTouch ? 'touchend' : 'mouseup'; + +jQuery.tableDnD = { + /** Keep hold of the current table being dragged */ + currentTable : null, + /** Keep hold of the current drag object if any */ + dragObject: null, + /** The current mouse offset */ + mouseOffset: null, + /** Remember the old value of Y so that we don't do too much processing */ + oldY: 0, + + + /** Actually build the structure */ + build: function(options) { + // Set up the defaults if any + + this.each(function() { + // This is bound to each matching table, set up the defaults and override with user options + this.tableDnDConfig = jQuery.extend({ + onDragStyle: null, + onDropStyle: null, + // Add in the default class for whileDragging + onDragClass: "tDnD_whileDrag", + onDrop: null, + onDragStart: null, + scrollAmount: 5, + + serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs + serializeParamName: null, // If you want to specify another parameter name instead of the table ID + dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable + }, options || {}); + // Now make the rows draggable + jQuery.tableDnD.makeDraggable(this); + }); + + // Don't break the chain + return this; + }, + + /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */ + makeDraggable: function(table) { + + var config = table.tableDnDConfig; + if (config.dragHandle) { + // We only need to add the event to the specified cells + var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table); + cells.each(function() { + // The cell is bound to "this" + jQuery(this).bind(startEvent, function(ev) { + jQuery.tableDnD.initialiseDrag(this.parentNode, table, this, ev, config); + return false; + }); + }) + } else { + // For backwards compatibility, we add the event to the whole row + var rows = jQuery("tr", table); // get all the rows as a wrapped set + rows.each(function() { + // Iterate through each row, the row is bound to "this" + var row = jQuery(this); + if (! row.hasClass("nodrag")) { + row.bind(startEvent, function(ev) { + if (ev.target.tagName == "TD") { + jQuery.tableDnD.initialiseDrag(this, table, this, ev, config); + return false; + } + }).css("cursor", "move"); // Store the tableDnD object + } + }); + } + }, + + initialiseDrag: function(dragObject, table, target, evnt, config) { + jQuery.tableDnD.dragObject = dragObject; + jQuery.tableDnD.currentTable = table; + jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(target, evnt); + jQuery.tableDnD.originalOrder = jQuery.tableDnD.serialize(); + // Now we need to capture the mouse up and mouse move event + // We can use bind so that we don't interfere with other event handlers + jQuery(document) + .bind(moveEvent, jQuery.tableDnD.mousemove) + .bind(endEvent, jQuery.tableDnD.mouseup); + if (config.onDragStart) { + // Call the onDragStart method if there is one + config.onDragStart(table, target); + } + }, + + updateTables: function() { + this.each(function() { + // this is now bound to each matching table + if (this.tableDnDConfig) { + jQuery.tableDnD.makeDraggable(this); + } + }) + }, + + /** Get the mouse coordinates from the event (allowing for browser differences) */ + mouseCoords: function(ev){ + if(ev.pageX || ev.pageY){ + return {x:ev.pageX, y:ev.pageY}; + } + return { + x:ev.clientX + document.body.scrollLeft - document.body.clientLeft, + y:ev.clientY + document.body.scrollTop - document.body.clientTop + }; + }, + + /** Given a target element and a mouse event, get the mouse offset from that element. + To do this we need the element's position and the mouse position */ + getMouseOffset: function(target, ev) { + ev = ev || window.event; + + var docPos = this.getPosition(target); + var mousePos = this.mouseCoords(ev); + return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y}; + }, + + /** Get the position of an element by going up the DOM tree and adding up all the offsets */ + getPosition: function(e){ + var left = 0; + var top = 0; + /** Safari fix -- thanks to Luis Chato for this! */ + if (e.offsetHeight == 0) { + /** Safari 2 doesn't correctly grab the offsetTop of a table row + this is detailed here: + http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/ + the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild. + note that firefox will return a text node as a first child, so designing a more thorough + solution may need to take that into account, for now this seems to work in firefox, safari, ie */ + e = e.firstChild; // a table cell + } + + while (e.offsetParent){ + left += e.offsetLeft; + top += e.offsetTop; + e = e.offsetParent; + } + + left += e.offsetLeft; + top += e.offsetTop; + + return {x:left, y:top}; + }, + + mousemove: function(ev) { + if (jQuery.tableDnD.dragObject == null) { + return; + } + if (ev.type == 'touchmove') { + // prevent touch device screen scrolling + event.preventDefault(); + } + + var dragObj = jQuery(jQuery.tableDnD.dragObject); + var config = jQuery.tableDnD.currentTable.tableDnDConfig; + var mousePos = jQuery.tableDnD.mouseCoords(ev); + var y = mousePos.y - jQuery.tableDnD.mouseOffset.y; + //auto scroll the window + var yOffset = window.pageYOffset; + if (document.all) { + // Windows version + //yOffset=document.body.scrollTop; + if (typeof document.compatMode != 'undefined' && + document.compatMode != 'BackCompat') { + yOffset = document.documentElement.scrollTop; + } + else if (typeof document.body != 'undefined') { + yOffset=document.body.scrollTop; + } + + } + + if (mousePos.y-yOffset < config.scrollAmount) { + window.scrollBy(0, -config.scrollAmount); + } else { + var windowHeight = window.innerHeight ? window.innerHeight + : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight; + if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) { + window.scrollBy(0, config.scrollAmount); + } + } + + + if (y != jQuery.tableDnD.oldY) { + // work out if we're going up or down... + var movingDown = y > jQuery.tableDnD.oldY; + // update the old value + jQuery.tableDnD.oldY = y; + // update the style to show we're dragging + if (config.onDragClass) { + dragObj.addClass(config.onDragClass); + } else { + dragObj.css(config.onDragStyle); + } + // If we're over a row then move the dragged row to there so that the user sees the + // effect dynamically + var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y); + if (currentRow) { + // TODO worry about what happens when there are multiple TBODIES + if (movingDown && jQuery.tableDnD.dragObject != currentRow) { + jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling); + } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) { + jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow); + } + } + } + + return false; + }, + + /** We're only worried about the y position really, because we can only move rows up and down */ + findDropTargetRow: function(draggedRow, y) { + var rows = jQuery.tableDnD.currentTable.rows; + for (var i=0; i rowY - rowHeight) && (y < (rowY + rowHeight))) { + // that's the row we're over + // If it's the same as the current row, ignore it + if (row == draggedRow) {return null;} + var config = jQuery.tableDnD.currentTable.tableDnDConfig; + if (config.onAllowDrop) { + if (config.onAllowDrop(draggedRow, row)) { + return row; + } else { + return null; + } + } else { + // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic) + var nodrop = jQuery(row).hasClass("nodrop"); + if (! nodrop) { + return row; + } else { + return null; + } + } + return row; + } + } + return null; + }, + + mouseup: function(e) { + if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) { + // Unbind the event handlers + jQuery(document) + .unbind(moveEvent, jQuery.tableDnD.mousemove) + .unbind(endEvent, jQuery.tableDnD.mouseup); + var droppedRow = jQuery.tableDnD.dragObject; + var config = jQuery.tableDnD.currentTable.tableDnDConfig; + // If we have a dragObject, then we need to release it, + // The row will already have been moved to the right place so we just reset stuff + if (config.onDragClass) { + jQuery(droppedRow).removeClass(config.onDragClass); + } else { + jQuery(droppedRow).css(config.onDropStyle); + } + jQuery.tableDnD.dragObject = null; + var newOrder = jQuery.tableDnD.serialize(); + if (config.onDrop && (jQuery.tableDnD.originalOrder != newOrder)) { + // Call the onDrop method if there is one + config.onDrop(jQuery.tableDnD.currentTable, droppedRow); + } + jQuery.tableDnD.currentTable = null; // let go of the table too + } + }, + + serialize: function() { + if (jQuery.tableDnD.currentTable) { + return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable); + } else { + return "Error: No Table id set, you need to set an id on your table and every row"; + } + }, + + serializeTable: function(table) { + var result = ""; + var tableId = table.id; + var rows = table.rows; + for (var i=0; i 0) result += "&"; + var rowId = rows[i].id; + if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) { + rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0]; + } + + result += tableId + '[]=' + rowId; + } + return result; + }, + + serializeTables: function() { + var result = ""; + this.each(function() { + // this is now bound to each matching table + result += jQuery.tableDnD.serializeTable(this); + }); + return result; + } + +}; + + +jQuery.fn.extend( + { + tableDnD : jQuery.tableDnD.build, + tableDnDUpdate : jQuery.tableDnD.updateTables, + tableDnDSerialize: jQuery.tableDnD.serializeTables + } +); \ No newline at end of file diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index de0a8fe28a1..9b15d36ffe9 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -444,4 +444,3 @@ if ($db->connected) $db->close(); // Return code if ran from command line if ($ret) exit($ret); -?> diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1f3cb7ed0c1..7a83dc69db1 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index 49049a20783..c3b7e7da1c7 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -807,4 +807,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index da7642e8df4..5d9babd0e89 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -247,4 +247,3 @@ if (! defined('MAIN_LABEL_MENTION_NPR') ) define('MAIN_LABEL_MENTION_NPR','NPR') // We force FPDF if (! empty($dolibarr_pdf_force_fpdf)) $conf->global->MAIN_USE_FPDF=$dolibarr_pdf_force_fpdf; -?> diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index c98993526f5..37c04e50a29 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -519,4 +519,3 @@ class Opensurveysondage extends CommonObject $this->sujet = trim($this->sujet); } } -?> diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 4b0ca196639..d7cdaae62ac 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -193,4 +193,3 @@ print ''."\n"; llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index bd0ff34073e..01bb969df20 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -741,4 +741,3 @@ print ''."\n"; llxFooterSurvey(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index a7f788250eb..6e10e10778a 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -555,4 +555,3 @@ print ''."\n"; llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index a1e08f25632..b63536247f5 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -199,4 +199,3 @@ print ''."\n"; llxFooter(); $db->close(); -?> diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 89664230492..69b0664eb9d 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -386,4 +386,3 @@ if (! empty($conf->use_javascript_ajax)) llxFooter(); $db->close(); -?> diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ae1c0f2f43c..5eaf183428d 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -267,7 +267,10 @@ class Product extends CommonObject $this->accountancy_code_buy = trim($this->accountancy_code_buy); $this->accountancy_code_sell= trim($this->accountancy_code_sell); - // Check parameters + // Barcode value + $this->barcode=trim($this->barcode); + + // Check parameters if (empty($this->libelle)) { $this->error='ErrorMandatoryParametersNotProvided'; @@ -277,7 +280,7 @@ class Product extends CommonObject { // Load object modCodeProduct $module=(! empty($conf->global->PRODUCT_CODEPRODUCT_ADDON)?$conf->global->PRODUCT_CODEPRODUCT_ADDON:'mod_codeproduct_leopard'); - if ($module != 'mod_codeproduct_leopard') // Do not load module file + if ($module != 'mod_codeproduct_leopard') // Do not load module file for leopard { if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') { @@ -306,11 +309,11 @@ class Product extends CommonObject // For automatic creation during create action (not used by Dolibarr GUI, can be used by scripts) if ($this->barcode == -1) $this->barcode = $this->get_barcode($this,$this->barcode_type_code); - + // Check more parameters // If error, this->errors[] is filled $result = $this->verify(); - + if ($result >= 0) { $sql = "SELECT count(*) as nb"; @@ -453,7 +456,8 @@ class Product extends CommonObject /** - * Check properties of product are ok (like name, barcode, ...) + * Check properties of product are ok (like name, barcode, ...). + * All properties must be already loaded on object (this->barcode, this->barcode_type_code, ...). * * @return int 0 if OK, <0 if KO */ @@ -470,7 +474,7 @@ class Product extends CommonObject $result = -2; } - $rescode = $this->check_barcode($this->barcode); + $rescode = $this->check_barcode($this->barcode,$this->barcode_type_code); if ($rescode <> 0) { if ($rescode == -1) @@ -492,15 +496,16 @@ class Product extends CommonObject } /** - * Check customer code + * Check barcode * * @param string $valuetotest Value to test + * @param string $typefortest Type of barcode (ISBN, EAN, ...) * @return int 0 if OK * -1 ErrorBadBarCodeSyntax * -2 ErrorBarCodeRequired * -3 ErrorBarCodeAlreadyUsed */ - function check_barcode($valuetotest) + function check_barcode($valuetotest,$typefortest) { global $conf; if (! empty($conf->barcode->enabled) && ! empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) @@ -515,9 +520,9 @@ class Product extends CommonObject } $mod = new $module(); - - dol_syslog(get_class($this)."::check_barcode barcode=".$valuetotest." module=".$module); - $result = $mod->verif($this->db, $valuetotest, $this, 0); + + dol_syslog(get_class($this)."::check_barcode value=".$valuetotest." type=".$typefortest." module=".$module); + $result = $mod->verif($this->db, $valuetotest, $this, 0, $typefortest); return $result; } else @@ -566,7 +571,7 @@ class Product extends CommonObject if (empty($this->country_id)) $this->country_id = 0; - //Gencod + // Barcode value $this->barcode=trim($this->barcode); $this->accountancy_code_buy = trim($this->accountancy_code_buy); @@ -581,7 +586,7 @@ class Product extends CommonObject { $result = $this->verify(); // We don't check when update called during a create because verify was already done } - + if ($result >= 0) { // For automatic creation @@ -595,7 +600,7 @@ class Product extends CommonObject $sql.= ", recuperableonly = " . $this->tva_npr; $sql.= ", localtax1_tx = " . $this->localtax1_tx; $sql.= ", localtax2_tx = " . $this->localtax2_tx; - + $sql.= ", barcode = ". (empty($this->barcode)?"null":"'".$this->db->escape($this->barcode)."'"); $sql.= ", fk_barcode_type = ". (empty($this->barcode_type)?"null":$this->db->escape($this->barcode_type)); @@ -622,7 +627,7 @@ class Product extends CommonObject $sql.= ", accountancy_code_sell= '" . $this->accountancy_code_sell."'"; $sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? $this->desiredstock : "null"); $sql.= " WHERE rowid = " . $id; - + dol_syslog(get_class($this)."update sql=".$sql); $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 0f88d80d34b..3e5417ae9e8 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -153,4 +153,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 21fa78abd7f..deeae6784e6 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -36,6 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; @@ -122,7 +123,7 @@ if (empty($reshook)) // Barcode value if ($action == 'setbarcode' && $createbarcode) { - $result=$object->check_barcode(GETPOST('barcode')); + $result=$object->check_barcode(GETPOST('barcode'),GETPOT('barcode_type_code')); if ($result >= 0) { @@ -206,7 +207,20 @@ if (empty($reshook)) $object->barcode_type = GETPOST('fk_barcode_type'); $object->barcode = GETPOST('barcode'); - + // Set barcode_type_xxx from barcode_type id + $stdobject=new GenericObject($db); + $stdobject->element='product'; + $stdobject->barcode_type=GETPOST('fk_barcode_type'); + $result=$stdobject->fetch_barcode(); + if ($result < 0) + { + $error++; + setEventMessage('Failed to get bar code type information '.$stdobject->error, 'errors'); + } + $object->barcode_type_code = $stdobject->barcode_type_code; + $object->barcode_type_coder = $stdobject->barcode_type_coder; + $object->barcode_type_label = $stdobject->barcode_type_label; + $object->description = dol_htmlcleanlastbr(GETPOST('desc')); $object->url = GETPOST('url'); $object->note = dol_htmlcleanlastbr(GETPOST('note')); @@ -307,7 +321,20 @@ if (empty($reshook)) $object->barcode_type = GETPOST('fk_barcode_type'); $object->barcode = GETPOST('barcode'); - + // Set barcode_type_xxx from barcode_type id + $stdobject=new GenericObject($db); + $stdobject->element='product'; + $stdobject->barcode_type=GETPOST('fk_barcode_type'); + $result=$stdobject->fetch_barcode(); + if ($result < 0) + { + $error++; + setEventMessage('Failed to get bar code type information '.$stdobject->error, 'errors'); + } + $object->barcode_type_code = $stdobject->barcode_type_code; + $object->barcode_type_coder = $stdobject->barcode_type_coder; + $object->barcode_type_label = $stdobject->barcode_type_label; + $object->accountancy_code_sell = GETPOST('accountancy_code_sell'); $object->accountancy_code_buy = GETPOST('accountancy_code_buy'); @@ -798,8 +825,8 @@ else if ($showbarcode) { - print ''.$langs->trans('BarcodeType').''; - if (isset($_POST['fk_barcode_type'])) + print ''.$langs->trans('BarcodeType').''; + if (isset($_POST['fk_barcode_type'])) { $fk_barcode_type=GETPOST('fk_barcode_type'); } @@ -1066,6 +1093,7 @@ else } else { + $fk_barcode_type=$object->barcode_type; if (empty($fk_barcode_type) && ! empty($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE)) $fk_barcode_type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; } require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; @@ -1250,7 +1278,7 @@ else if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) $nblignes+=2; if ($object->isservice()) $nblignes++; else $nblignes+=4; - + // Photo if ($showphoto || $showbarcode) { @@ -1260,7 +1288,7 @@ else if ($showbarcode) print $form->showbarcode($object); print ''; } - + print ''; // Type @@ -1272,7 +1300,7 @@ else print $form->editfieldval("Type",'fk_product_type',$object->type,$object,$user->rights->produit->creer||$user->rights->service->creer,$typeformat); print ''; } - + if ($showbarcode) { // Barcode type @@ -1309,6 +1337,7 @@ else print '
    '; print ''; print ''; + print ''; print ''; print ' '; } diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 015e7a8a1e3..2eccb9095a5 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -368,6 +368,15 @@ else print ' '; print ''; } + else + { + print ''; + print ' '; + print ''; + print ''; + print ' '; + print ''; + } print ''; print $form->selectarray('tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')),$tosell,1); @@ -429,7 +438,7 @@ else print ''.$objp->barcode.''; } - // Date + // Modification Date print ''.dol_print_date($db->jdate($objp->datem),'day')."\n"; // Duration @@ -454,7 +463,8 @@ else } // Better buy price - if ($user->rights->produit->creer) { + if ($user->rights->produit->creer) + { print ''; if ($objp->minsellprice != '') { @@ -489,7 +499,12 @@ else } else { - print ' '; + print ''; + print ' '; + print ''; + print ''; + print ' '; + print ''; } } diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index fcf03068935..2a06c30a496 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -199,4 +199,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 05be133ac00..a55673c62b0 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -186,4 +186,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 00716b9df01..1498b12a033 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -569,4 +569,3 @@ llxFooter(); $db->close(); -?> diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index e2899e4e465..17e23fef009 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -162,4 +162,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 1a2f6603d1d..218e165a195 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -335,4 +335,3 @@ print ''; llxFooter(); $db->close(); -?> diff --git a/htdocs/projet/admin/project_extrafields.php b/htdocs/projet/admin/project_extrafields.php index 9ed4381103a..5707c6be640 100644 --- a/htdocs/projet/admin/project_extrafields.php +++ b/htdocs/projet/admin/project_extrafields.php @@ -150,4 +150,3 @@ if ($action == 'edit' && ! empty($attrname)) llxFooter(); $db->close(); -?> diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index c652c591ff7..d40682d7ce6 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -157,4 +157,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/projet/jsgantt_language.js.php b/htdocs/projet/jsgantt_language.js.php index d7135e9ca0d..16b89fbebb3 100644 --- a/htdocs/projet/jsgantt_language.js.php +++ b/htdocs/projet/jsgantt_language.js.php @@ -73,4 +73,3 @@ i18n["Period"] = "transnoentities("Period") ?>"; close(); -?> diff --git a/htdocs/public/emailing/mailing-unsubscribe.php b/htdocs/public/emailing/mailing-unsubscribe.php index ec95078808c..0b11ec3642b 100644 --- a/htdocs/public/emailing/mailing-unsubscribe.php +++ b/htdocs/public/emailing/mailing-unsubscribe.php @@ -124,4 +124,3 @@ if (! empty($tag) && ($unsuscrib=='1')) } $db->close(); -?> diff --git a/htdocs/public/paybox/index.php b/htdocs/public/paybox/index.php index 08cbbd48176..0b7ad1c82e4 100644 --- a/htdocs/public/paybox/index.php +++ b/htdocs/public/paybox/index.php @@ -26,4 +26,3 @@ require '../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); -?> diff --git a/htdocs/resource/add.php b/htdocs/resource/add.php index 5b127204185..fde152b6185 100755 --- a/htdocs/resource/add.php +++ b/htdocs/resource/add.php @@ -172,4 +172,3 @@ if ( !$action ) // End of page llxFooter(); $db->close(); -?> diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 1ecf827fe39..38562557e3a 100755 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -249,4 +249,3 @@ else { // End of page llxFooter(); $db->close(); -?> diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index cdeb11950eb..f618581aecd 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -201,4 +201,3 @@ class FormResource } -?> diff --git a/htdocs/resource/class/resource.class.php b/htdocs/resource/class/resource.class.php index 6b3f0d6d6ee..6edeef201fb 100644 --- a/htdocs/resource/class/resource.class.php +++ b/htdocs/resource/class/resource.class.php @@ -894,4 +894,3 @@ class Resource extends CommonObject return $result; } } -?> diff --git a/htdocs/societe/ajaxcountries.php b/htdocs/societe/ajaxcountries.php index 6b23b3290ce..78018a22035 100644 --- a/htdocs/societe/ajaxcountries.php +++ b/htdocs/societe/ajaxcountries.php @@ -76,4 +76,3 @@ if (! empty($country)) } } -?> \ No newline at end of file diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php index d64adde4cb6..b8cb94a820b 100644 --- a/htdocs/societe/canvas/individual/actions_card_individual.class.php +++ b/htdocs/societe/canvas/individual/actions_card_individual.class.php @@ -141,4 +141,3 @@ class ActionsCardIndividual extends ActionsCardCommon } -?> \ No newline at end of file diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 0fb2da5a053..20c9068d4f6 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -169,4 +169,3 @@ if ($messagetoshow) llxFooter(); -?> diff --git a/htdocs/societe/class/client.class.php b/htdocs/societe/class/client.class.php index 7c11b074e3b..27209c05abd 100644 --- a/htdocs/societe/class/client.class.php +++ b/htdocs/societe/class/client.class.php @@ -86,4 +86,3 @@ class Client extends Societe } } -?> diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 04210617d3d..198739398a2 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -406,4 +406,3 @@ $db->close(); llxFooter(); -?> diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index 921a64963bf..58b9de1d38c 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -239,4 +239,3 @@ function pFooter($nonext=0,$setuplang='') print ''."\n"; } -?> diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 38df086e267..f47813271a8 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -2112,6 +2112,14 @@ div.jnotify-background { .sorting_desc { background: url('') no-repeat center right; } .sorting_asc_disabled { background: url('') no-repeat center right; } .sorting_desc_disabled { background: url('') no-repeat center right; } +.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover +{ + font-weight: normal; +} +.paginate_enabled_previous:hover, .paginate_enabled_next:hover +{ + text-decoration: underline !important; +} /* ============================================================================== */ diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index a3b5150bb57..47e982404d2 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -2287,6 +2287,14 @@ div.ecmjqft { .sorting_desc { background: url('') no-repeat center right; } .sorting_asc_disabled { background: url('') no-repeat center right; } .sorting_desc_disabled { background: url('') no-repeat center right; } +.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover +{ + font-weight: normal; +} +.paginate_enabled_previous:hover, .paginate_enabled_next:hover +{ + text-decoration: underline !important; +} /* ============================================================================== */ diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 00bb6e62a14..ab50dae7ae9 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -2475,6 +2475,14 @@ div.ecmjqft { .sorting_desc { background: url('') no-repeat center right; } .sorting_asc_disabled { background: url('') no-repeat center right; } .sorting_desc_disabled { background: url('') no-repeat center right; } +.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover +{ + font-weight: normal; +} +.paginate_enabled_previous:hover, .paginate_enabled_next:hover +{ + text-decoration: underline !important; +} /* ============================================================================== */ diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index ff6e3696d33..285fcad6880 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -2370,6 +2370,14 @@ div.ecmjqft { .sorting_desc { background: url('') no-repeat center right; } .sorting_asc_disabled { background: url('') no-repeat center right; } .sorting_desc_disabled { background: url('') no-repeat center right; } +.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover +{ + font-weight: normal; +} +.paginate_enabled_previous:hover, .paginate_enabled_next:hover +{ + text-decoration: underline !important; +} /* ============================================================================== */ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 2f2622cd9c1..a1bec8fe86c 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2693,7 +2693,14 @@ div.dolEventError h1, div.dolEventError h2 { .sorting_desc { background: url('') no-repeat center right; } .sorting_asc_disabled { background: url('') no-repeat center right; } .sorting_desc_disabled { background: url('') no-repeat center right; } - +.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover +{ + font-weight: normal; +} +.paginate_enabled_previous:hover, .paginate_enabled_next:hover +{ + text-decoration: underline !important; +} /* For jquery plugin combobox */ /* Disable this. It breaks wrapping of boxes diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index b95374d800b..3dc3c14cc12 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -217,4 +217,3 @@ if ($id > 0) llxFooter(); $db->close(); -?> diff --git a/htdocs/webservices/server_category.php b/htdocs/webservices/server_category.php index 5e55dae8b18..1b85c677175 100644 --- a/htdocs/webservices/server_category.php +++ b/htdocs/webservices/server_category.php @@ -302,4 +302,3 @@ function getCategory($authentication,$id) // Return the results. $server->service($HTTP_RAW_POST_DATA); -?> diff --git a/scripts/company/export-contacts-xls-example.php b/scripts/company/export-contacts-xls-example.php index 55c1b04b400..bf55c4a2eaf 100755 --- a/scripts/company/export-contacts-xls-example.php +++ b/scripts/company/export-contacts-xls-example.php @@ -122,4 +122,3 @@ $objWriter->save($fname); print 'File '.$fname.' was generated.'."\n"; exit(0); -?> diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 60cb1118c37..a1237b999cb 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -311,4 +311,3 @@ function dolValidElement($element) return (trim($element) != ''); } -?> diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index 339d8e50ede..d8dda85f2fc 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -196,4 +196,3 @@ class AllTests } } -?> diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 89da06c559e..50f9598e79e 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -424,4 +424,3 @@ class BuildDocTest extends PHPUnit_Framework_TestCase return 0; } } -?> diff --git a/test/phpunit/CategorieTest.php b/test/phpunit/CategorieTest.php index ae3e92268df..bae2e989f24 100755 --- a/test/phpunit/CategorieTest.php +++ b/test/phpunit/CategorieTest.php @@ -336,4 +336,3 @@ class CategorieTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/ChargeSocialesTest.php b/test/phpunit/ChargeSocialesTest.php index 23df7ff09fd..69b1f93f776 100755 --- a/test/phpunit/ChargeSocialesTest.php +++ b/test/phpunit/ChargeSocialesTest.php @@ -239,4 +239,3 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/ContactTest.php b/test/phpunit/ContactTest.php index 27610daa16b..3c09df861f0 100755 --- a/test/phpunit/ContactTest.php +++ b/test/phpunit/ContactTest.php @@ -404,4 +404,3 @@ class ContactTest extends PHPUnit_Framework_TestCase return $localobjectadd->id; } } -?> diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php index 2142f69e646..8d56b4a0b42 100755 --- a/test/phpunit/CoreTest.php +++ b/test/phpunit/CoreTest.php @@ -297,4 +297,3 @@ class CoreTest extends PHPUnit_Framework_TestCase $this->assertEquals($result,$expectedresult); } } -?> diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index 4d59ca7eb57..f5d9e7d0cc4 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -342,4 +342,3 @@ class DateLibTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/DiscountTest.php b/test/phpunit/DiscountTest.php index 80343da8083..d9f92c84bd1 100755 --- a/test/phpunit/DiscountTest.php +++ b/test/phpunit/DiscountTest.php @@ -187,4 +187,3 @@ class DiscountTest extends PHPUnit_Framework_TestCase return $result; } } -?> \ No newline at end of file diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php index 2cacb073b60..a5855b37a37 100644 --- a/test/phpunit/FactureFournisseurTest.php +++ b/test/phpunit/FactureFournisseurTest.php @@ -265,4 +265,3 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/FactureTestRounding.php b/test/phpunit/FactureTestRounding.php index 6adeb71471d..d4bb8b9dff7 100644 --- a/test/phpunit/FactureTestRounding.php +++ b/test/phpunit/FactureTestRounding.php @@ -333,4 +333,3 @@ class FactureTestRounding extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index 21444d2a60a..0e011c96d2c 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -387,4 +387,3 @@ class FilesLibTest extends PHPUnit_Framework_TestCase $this->assertEquals(0,count($result)); } } -?> diff --git a/test/phpunit/Functions2LibTest.php b/test/phpunit/Functions2LibTest.php index e302e1858e7..8e4bfe7550f 100755 --- a/test/phpunit/Functions2LibTest.php +++ b/test/phpunit/Functions2LibTest.php @@ -155,4 +155,3 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/HolidayTest.php b/test/phpunit/HolidayTest.php index d9b0b54b5f7..e91305c21e2 100644 --- a/test/phpunit/HolidayTest.php +++ b/test/phpunit/HolidayTest.php @@ -290,4 +290,3 @@ class HolidayTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/ImportTest.php b/test/phpunit/ImportTest.php index af3b53a837e..4d9590e7a1d 100755 --- a/test/phpunit/ImportTest.php +++ b/test/phpunit/ImportTest.php @@ -134,4 +134,3 @@ class ImportTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/JsonLibTest.php b/test/phpunit/JsonLibTest.php index e5610981399..caceb6d0dc3 100755 --- a/test/phpunit/JsonLibTest.php +++ b/test/phpunit/JsonLibTest.php @@ -170,4 +170,3 @@ class JsonLibTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index 916f870d874..75bdc958c14 100755 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -174,4 +174,3 @@ class LangTest extends PHPUnit_Framework_TestCase return; } } -?> diff --git a/test/phpunit/MarginsLibTest.php b/test/phpunit/MarginsLibTest.php index 79d8f021d47..7ae615e4934 100644 --- a/test/phpunit/MarginsLibTest.php +++ b/test/phpunit/MarginsLibTest.php @@ -148,4 +148,3 @@ class MarginsLibTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php index 4b834bded69..a3788b309d1 100644 --- a/test/phpunit/NumberingModulesTest.php +++ b/test/phpunit/NumberingModulesTest.php @@ -545,4 +545,3 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/PdfDocTest.php b/test/phpunit/PdfDocTest.php index ee1a8bdf599..02d20a816a8 100755 --- a/test/phpunit/PdfDocTest.php +++ b/test/phpunit/PdfDocTest.php @@ -168,4 +168,3 @@ class PdfDocTest extends PHPUnit_Framework_TestCase $this->assertEquals($result,10.4); } } -?> diff --git a/test/phpunit/ProjectTest.php b/test/phpunit/ProjectTest.php index 9ed50eb2475..8b97f9fe8ea 100644 --- a/test/phpunit/ProjectTest.php +++ b/test/phpunit/ProjectTest.php @@ -233,4 +233,3 @@ class ProjectTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/ScriptsTest.php b/test/phpunit/ScriptsTest.php index 73310291cf3..76d59c6705b 100755 --- a/test/phpunit/ScriptsTest.php +++ b/test/phpunit/ScriptsTest.php @@ -254,4 +254,3 @@ class ScriptsTest extends PHPUnit_Framework_TestCase return $result; } } -?> diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index e3717a7023f..0d92aee8b76 100755 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -265,4 +265,3 @@ class SecurityTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/UserGroupTest.php b/test/phpunit/UserGroupTest.php index 5ab1976506f..0e43b361e20 100644 --- a/test/phpunit/UserGroupTest.php +++ b/test/phpunit/UserGroupTest.php @@ -284,4 +284,3 @@ class UserGroupTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/WebservicesOrdersTest.php b/test/phpunit/WebservicesOrdersTest.php index f2a47e2718a..d76fc784722 100755 --- a/test/phpunit/WebservicesOrdersTest.php +++ b/test/phpunit/WebservicesOrdersTest.php @@ -180,4 +180,3 @@ class WebservicesOrdersTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/WebservicesOtherTest.php b/test/phpunit/WebservicesOtherTest.php index b3462bb8ec9..1ea80beb4bf 100755 --- a/test/phpunit/WebservicesOtherTest.php +++ b/test/phpunit/WebservicesOtherTest.php @@ -213,4 +213,3 @@ class WebservicesOtherTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/WebservicesProductsTest.php b/test/phpunit/WebservicesProductsTest.php index 3ebeab4dfc0..a4ff7293091 100755 --- a/test/phpunit/WebservicesProductsTest.php +++ b/test/phpunit/WebservicesProductsTest.php @@ -321,4 +321,3 @@ class WebservicesProductsTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/WebservicesUserTest.php b/test/phpunit/WebservicesUserTest.php index e5e5de6d1bd..e06b98d0921 100755 --- a/test/phpunit/WebservicesUserTest.php +++ b/test/phpunit/WebservicesUserTest.php @@ -212,4 +212,3 @@ class WebservicesUserTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/XCalLibTest.php b/test/phpunit/XCalLibTest.php index ab16d4e3cb6..6ec63912878 100644 --- a/test/phpunit/XCalLibTest.php +++ b/test/phpunit/XCalLibTest.php @@ -138,4 +138,3 @@ class XCalLibTest extends PHPUnit_Framework_TestCase } } -?>