From cb510f7c46f231edf29f44dd903a7982cdac30c7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2013 18:51:53 +0200 Subject: [PATCH 01/13] Fix: Travis --- test/phpunit/CoreTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php index a3320c1167b..60f3ac8dd39 100755 --- a/test/phpunit/CoreTest.php +++ b/test/phpunit/CoreTest.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2013 Laurent Destailleur * * 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 @@ -215,7 +215,7 @@ class CoreTest extends PHPUnit_Framework_TestCase /** * testSqlAndScriptInject * - * return void + * @return void */ public function testSqlAndScriptInject() { From 16b2741834ba91365cea477bc7352b04bdebca42 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2013 19:21:56 +0200 Subject: [PATCH 02/13] New: Finished page to make mass stock movement --- ChangeLog | 1 + htdocs/product/stock/massstockmove.php | 94 +++++++++++++++++++++++++- htdocs/product/stock/mouvement.php | 2 +- 3 files changed, 94 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15b50425f45..00a99cef973 100644 --- a/ChangeLog +++ b/ChangeLog @@ -63,6 +63,7 @@ For users: - Fix: [bug #1022] correct margin calculation for credit notes. - New: Can choose contact on event (action com) creation, and filtred by thirdparty. - New: Add hidden option MAIN_FORCE_DEFAULT_STATE_ID. +- New: Add page to make mass stock movement. For translators: - Qual: Normalized sort order of all languages files with english reference files. diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index 1ad1807d459..4e9abfcbaeb 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -122,12 +122,95 @@ if ($action == 'delline' && $idline != '') else unset($_SESSION['massstockmove']); } -if ($action == 'createmovement' && isset($_POST['valid'])) +if ($action == 'createmovements') { + $error=0; + + if (! GETPOST("label")) + { + $error++; + setEventMessage($langs->trans("ErrorFieldRequired"),$langs->transnoentitiesnoconv("LabelMovement")); + } + + $db->begin(); + + if (! $error) + { + $product = new Product($db); + foreach($listofdata as $key => $val) // Loop on each movement to do + { + $id=$val['id']; + $id_product=$val['id_product']; + $id_sw=$val['id_sw']; + $id_tw=$val['id_tw']; + $qty=price2num($val['qty']); + + if (! $error && $id_sw <> $id_tw && is_numeric($qty) && $id_product) + { + $result=$product->fetch($id_product); + $product->load_stock(); // Load array product->stock_warehouse + // Define value of products moved + $pricesrc=0; + if (isset($product->stock_warehouse[$id_sw]->pmp)) $pricesrc=$product->stock_warehouse[$id_sw]->pmp; + $pricedest=$pricesrc; + //print 'price src='.$pricesrc.', price dest='.$pricedest;exit; + + // Remove stock + $result1=$product->correct_stock( + $user, + $id_sw, + $qty, + 1, + GETPOST("label"), + $pricesrc + ); + if ($result1 < 0) + { + $error++; + setEventMessage($product->errors,'errors'); + } + + // Add stock + $result2=$product->correct_stock( + $user, + $id_tw, + $qty, + 0, + GETPOST("label"), + $pricedest + ); + if ($result2 < 0) + { + $error++; + setEventMessage($product->errors,'errors'); + } + } + else + { + dol_print_error('',"Bad value saved into sessions"); + $error++; + } + } + } + + if (! $error) + { + unset($_SESSION['massstockmove']); + + $db->commit(); + setEventMessage($langs->trans("StockMovementRecorded"),'mesgs'); + header("Location: ".DOL_URL_ROOT.'/product/stock/index.php'); // Redirect to avoid pb when using back + exit; + } + else + { + $db->rollback(); + setEventMessage($langs->trans("Error"),'errors'); + } } @@ -230,8 +313,16 @@ foreach($listofdata as $key => $val) print ''; +print ''; + + print '
'; + +print '
'; +print ''; +print ''; + // Button to record mass movement $labelmovement=GETPOST("label")?GETPOST('label'):$langs->trans("MassStockMovement").' '.dol_print_date($now,'%Y-%m-%d %H:%M'); @@ -246,7 +337,6 @@ print ''; print '
'; - print '
'; diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 074d684b10e..eb9391c8698 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -414,7 +414,7 @@ if ($resql) print ""; //print_liste_field_titre($langs->trans("Id"),$_SERVER["PHP_SELF"], "m.rowid","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"], "m.datem","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("LabelMovement"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("ProductRef"),$_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("ProductLabel"),$_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Warehouse"),$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible From af521ec070472a5edb62e5020682fcbc21c2fa84 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 00:33:37 +0200 Subject: [PATCH 03/13] Trans: Missing translation for accountancy module --- htdocs/langs/en_US/compta.lang | 2 ++ htdocs/langs/fr_FR/compta.lang | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index f111648f0e9..69c31ac148b 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -168,3 +168,5 @@ CalculationRuleDesc=To calculate total VAT, there is two methods:
Method 1 is CalculationRuleDescSupplier=according to supplier, choose appropriate method to apply same calculation rule and get same result expected by your supplier. TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode +COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index f08f2ea5634..21537287456 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -167,4 +167,6 @@ Mode2=Mode 2 CalculationRuleDesc=Pour calculer le total de TVA, il existe 2 modes:
Le mode 1 consiste à arrondir la tva de chaque ligne et à sommer cet arrondi.
Le mode 2 consiste à sommer la tva de chaque ligne puis à l'arrondir.
Les résultats peuvent différer de quelques centimes. Le mode par défaut est le mode %s. CalculationRuleDescSupplier=Selon le mode utilisé par le fournisseur, choisissez le mode adéquant afin d'appliquer la même règle et obtenir un résultat identique au mode appliqué par votre fournisseur. TurnoverPerProductInCommitmentAccountingNotRelevant=Le chiffre d'affaire par produit, dans une comptabilité en mode comptabilité de caisse n'est pas définissable. Ce rapport n'est disponible qu'en mode de comptabilité dit comptabilité d'engagement (voir la configuration du module de comptabilité). -CalculationMode=Mode de calcul \ No newline at end of file +CalculationMode=Mode de calcul +COMPTA_ACCOUNT_CUSTOMER=Code comptable par défaut des tiers clients +COMPTA_ACCOUNT_SUPPLIER=Code comptable par défaut des tiers fournisseurs From 8e42a6fd159fd29b68ee3708e42a6f9e08c02c2b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 14:11:56 +0200 Subject: [PATCH 04/13] Avoid email when travis is ok --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6bee6a229b2..c6f3b43c447 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,11 @@ # Command run is phpunit # For syntax, see http://about.travis-ci.org/docs/user/languages/php/ +notifications: + email: + on_success: never # [always|never|change] default: change + on_failure: always # [always|never|change] default: always + services: - memcached # will start memcached From f87afaac108d6ab2c482165f3d057a431d82f0b2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 14:38:49 +0200 Subject: [PATCH 05/13] Suggest a better page name --- htdocs/install/mysql/tables/llx_actioncomm.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql index ea70aa02385..906188d8ceb 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.sql @@ -44,9 +44,9 @@ create table llx_actioncomm fk_contact integer, fk_parent integer NOT NULL default 0, - fk_user_action integer, -- user id of owner of action (currently also user id of actor that must do action. In future, actors assigned to action will be an array into table llx_actioncomm_actors) + fk_user_action integer, -- user id of owner of action (currently also user id of actor that must do action. In future, actors assigned to action will be an array into table llx_actioncomm_resources) - transparency integer, -- transparency (ical standard). used to say if people assigned to event are busy or not by event (in future version, this field is deprecated and will be stored into table llx_actioncomm_actors) + transparency integer, -- transparency (ical standard). used to say if people assigned to event are busy or not by event (in future version, this field is deprecated and will be stored into table llx_actioncomm_resources) fk_user_done integer, -- user id of people that has made action (deprecated) priority smallint, From 4f39632937a4c043d74266c0a92167904303dea5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 14:39:12 +0200 Subject: [PATCH 06/13] Add more PHP versions into travis CI --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index b2bfebd91db..cf608f7f230 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,10 @@ services: # This will tell travis to run phpunit language: php php: + - "5.2" - "5.3" - "5.4" + - "5.5" env: - DB=mysql From db9a329c1deb987cb9bf7889ccb0696a672bd310 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 15:04:54 +0200 Subject: [PATCH 07/13] Remove PHP 5.2 from travis. Travis not ready for this. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cf608f7f230..0a9c00a36a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ services: # This will tell travis to run phpunit language: php php: - - "5.2" +# - "5.2" is not supported because pyrus to install PHP_Codesniffer is not available - "5.3" - "5.4" - "5.5" From c244992abd2548ee49a30c4b812591ffc6b9c70c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 15:22:51 +0200 Subject: [PATCH 08/13] Add php version info into travis output --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 699d2e8bc22..d142e476fea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,9 @@ before_script: - echo Start travis - echo Current dir is `pwd` - echo Home dir is `echo ~` - - echo Update composer + - export PHPV=`phpenv version-name` + - echo PHP version $PHPV +# - echo Update composer # - ~/.phpenv/versions/$(phpenv version-name)/bin/composer.phar self-update - echo Install phpcs then show installed rules - pyrus install pear/PHP_CodeSniffer @@ -42,7 +44,8 @@ before_script: - find $(pwd)/htdocs/documents -type d -exec ls -alt {} \; - echo Edit php.ini file - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - sh -c "if [ '$DB' = '5.3' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - sh -c "if [ '$DB' = '5.4' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini # - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini From d7020c6f503c6679fa8510159b633152c373023c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 15:25:12 +0200 Subject: [PATCH 09/13] Build php ini according to PHP version --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d142e476fea..dd803f5dd8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,11 +44,12 @@ before_script: - find $(pwd)/htdocs/documents -type d -exec ls -alt {} \; - echo Edit php.ini file - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sh -c "if [ '$DB' = '5.3' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sh -c "if [ '$DB' = '5.4' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - sh -c "if [ '$PHPV' = '5.3' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - sh -c "if [ '$PHPV' = '5.4' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini # - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - sh -c "if [ '$PHPV' = '5.3' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - sh -c "if [ '$PHPV' = '5.4' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo Init database - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS myapp_test;' -U postgres; fi" From 9e0a7799895ab2ee88eba9e224dce1a094570c79 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 15:27:09 +0200 Subject: [PATCH 10/13] Syntax error --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd803f5dd8a..5daaa006730 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,12 +44,12 @@ before_script: - find $(pwd)/htdocs/documents -type d -exec ls -alt {} \; - echo Edit php.ini file - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sh -c "if [ '$PHPV' = '5.3' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sh -c "if [ '$PHPV' = '5.4' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini # - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sh -c "if [ '$PHPV' = '5.3' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sh -c "if [ '$PHPV' = '5.4' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - sh -c "if [ '$PHPV' = '5.3' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini" + - sh -c "if [ '$PHPV' = '5.4' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini" + - sh -c "if [ '$PHPV' = '5.3' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini" + - sh -c "if [ '$PHPV' = '5.4' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini" - cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo Init database - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS myapp_test;' -U postgres; fi" From 0707409684d1141a6e15a68ef7909481a9471f3c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 15:28:58 +0200 Subject: [PATCH 11/13] Another syntax error --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5daaa006730..90cfc8a5b91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,10 +46,10 @@ before_script: - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini # - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sh -c "if [ '$PHPV' = '5.3' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini" - - sh -c "if [ '$PHPV' = '5.4' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini" - - sh -c "if [ '$PHPV' = '5.3' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini" - - sh -c "if [ '$PHPV' = '5.4' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini" + - sh -c "if [ '$PHPV' = '5.3' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" + - sh -c "if [ '$PHPV' = '5.4' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" + - sh -c "if [ '$PHPV' = '5.3' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" + - sh -c "if [ '$PHPV' = '5.4' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo Init database - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS myapp_test;' -U postgres; fi" From c02a0cbb9562f70bc98808fa306a2175434a99c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 15:31:08 +0200 Subject: [PATCH 12/13] Conflict betwen ' and " --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 90cfc8a5b91..c0385bff31e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,10 +46,10 @@ before_script: - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini # - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sh -c "if [ '$PHPV' = '5.3' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - - sh -c "if [ '$PHPV' = '5.4' ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - - sh -c "if [ '$PHPV' = '5.3' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - - sh -c "if [ '$PHPV' = '5.4' ]; then - echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" + - sh -c "if [ '$PHPV' = '5.3' ]; then echo 'extension = apc.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" + - sh -c "if [ '$PHPV' = '5.4' ]; then echo 'extension = apc.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" + - sh -c "if [ '$PHPV' = '5.3' ]; then - echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" + - sh -c "if [ '$PHPV' = '5.4' ]; then - echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo Init database - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS myapp_test;' -U postgres; fi" From 586062a911579c2dc51f844151184d9702014e69 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Oct 2013 15:34:18 +0200 Subject: [PATCH 13/13] Fix: syntax error --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c0385bff31e..efa6b3f28fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,8 +48,8 @@ before_script: - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - sh -c "if [ '$PHPV' = '5.3' ]; then echo 'extension = apc.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - sh -c "if [ '$PHPV' = '5.4' ]; then echo 'extension = apc.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - - sh -c "if [ '$PHPV' = '5.3' ]; then - echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - - sh -c "if [ '$PHPV' = '5.4' ]; then - echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" + - sh -c "if [ '$PHPV' = '5.3' ]; then echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" + - sh -c "if [ '$PHPV' = '5.4' ]; then echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo Init database - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS myapp_test;' -U postgres; fi"