mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge remote-tracking branch 'upstream/develop' into zapier2
This commit is contained in:
commit
f6f6ed3e0c
51
.travis.yml
51
.travis.yml
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
- |
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
|
||||
- |
|
||||
|
|
|
|||
|
|
@ -808,36 +808,39 @@ print '</table>';
|
|||
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"> </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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user