Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into 11.0_accountancy…
Browse files Browse the repository at this point in the history
…_portal
  • Loading branch information
aspangaro committed Oct 1, 2019
2 parents f915139 + 41bfc89 commit 6726a7c
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 33 deletions.
51 changes: 27 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ before_script:
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
fi
if [ "$DB" = 'postgresql' ]; then
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
#pgloader mysql://root:pass@127.0.0.1/dolibarr_9 postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dev
echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
Expand All @@ -209,7 +210,6 @@ before_script:
#echo 'select * from information_schema.table_constraints;' | psql travis
#echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis
fi
# TODO: SQLite
echo
- |
Expand All @@ -222,6 +222,7 @@ before_script:
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=\'3306\'';' >> $CONF_FILE
Expand All @@ -230,7 +231,6 @@ before_script:
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
fi
# TODO: SQLite
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
cat $CONF_FILE
echo
Expand Down Expand Up @@ -299,13 +299,9 @@ script:
set +e
echo
# TODO: Check Javascript (jshint?)

# TODO: Check CSS (csslint?)

- |
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
echo "Setting up Dolibarr $INSTALL_FORCED_FILE"
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
# Ensure we catch errors
set +e
echo '<?php ' > $INSTALL_FORCED_FILE
Expand All @@ -326,23 +322,25 @@ script:
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
# TODO: SQLite
#cat $INSTALL_FORCED_FILE
echo "Installation test"
cd htdocs/install
php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log
php step2.php set >> $TRAVIS_BUILD_DIR/install.log
if [ "$?" -ne "0" ]; then
echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS"
exit 1
fi
cd ../..
rm $INSTALL_FORCED_FILE
#cat $TRAVIS_BUILD_DIR/install.log
set +e
echo
- |
#- |
# echo "Installing Dolibarr"
# cd htdocs/install
# php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log
# php step2.php set >> $TRAVIS_BUILD_DIR/install.log
# if [ "$?" -ne "0" ]; then
# echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS"
# cat $TRAVIS_BUILD_DIR/install.log
# exit 1
# fi
# cd ../..
# rm $INSTALL_FORCED_FILE
# #cat $TRAVIS_BUILD_DIR/install.log
# set +e
# echo

- |
echo "Setting up database to test migrations"
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
echo "MySQL"
Expand All @@ -355,9 +353,14 @@ script:
if [ "$DB" = 'postgresql' ]; then
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
#pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr
echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis
#echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis
#echo 'select * from information_schema.table_constraints;' | psql travis
#echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis
fi
# TODO: SQLite
echo
- |
Expand Down
15 changes: 9 additions & 6 deletions htdocs/admin/facture.php
Original file line number Diff line number Diff line change
Expand Up @@ -808,36 +808,39 @@
print '<br>';
print load_fiche_titre($langs->trans("PathToDocuments"), '', '');

print '<table class="noborder" width="100%">'."\n";
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'."\n";
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Name").'</td>'."\n";
print '<td>'.$langs->trans("Value").'</td>'."\n";
print "</tr>\n";
print '<tr '.$bc[false].'>'."\n";
print '<tr class="oddeven">'."\n";
print '<td width="140">'.$langs->trans("PathDirectory").'</td>'."\n";
print '<td>'.$conf->facture->dir_output.'</td>'."\n";
print '</tr>'."\n";
print "</table>\n";

print "</div>\n";

/*
* Notifications
*/
print '<br>';
print load_fiche_titre($langs->trans("Notifications"), '', '');
print '<table class="noborder" width="100%">';

print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td class="center" width="60"></td>';
print '<td width="80">&nbsp;</td>';
print "</tr>\n";

print '<tr class="oddeven"><td colspan="2">';
print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
print '</td><td class="right">';
print "</td></tr>\n";

print '</table>';
print "</div>\n";


dol_fiche_end();

Expand Down
8 changes: 6 additions & 2 deletions htdocs/install/inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,12 +544,16 @@ function detect_dolibarr_main_url_root()
$dolibarr_main_url_root = $_SERVER["SERVER_URL"] . $_SERVER["DOCUMENT_URI"];
} // If SCRIPT_URI, SERVER_URL, DOCUMENT_URI not defined (Ie: Apache 2.0.44 for Windows)
else {
$proto = ( (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') || $_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http';
$proto = ((!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') || (! empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)) ? 'https' : 'http';
if (!empty($_SERVER["HTTP_HOST"])) {
$serverport = $_SERVER["HTTP_HOST"];
} else {
}
elseif (!empty($_SERVER["SERVER_NAME"])) {
$serverport = $_SERVER["SERVER_NAME"];
}
else {
$serverport = 'localhost';
}
$dolibarr_main_url_root = $proto . "://" . $serverport . $_SERVER["SCRIPT_NAME"];
}
// Clean proposed URL
Expand Down
2 changes: 1 addition & 1 deletion htdocs/ticket/messaging.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@

// Show link to add event (if read and not closed)
$btnstatus = $object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
$url = dol_buildpath('/comm/action/card.php', 1).'?action=create&datep='.date('YmdHi').'&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"]);
$url = dol_buildpath('/comm/action/card.php', 1).'?action=create&datep='.date('YmdHi').'&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id=' . $object->track_id);
$morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, 'add-new-ticket-even-button', $btnstatus);


Expand Down

0 comments on commit 6726a7c

Please sign in to comment.