Merge remote-tracking branch 'upstream/develop' into socialnetworks
This commit is contained in:
commit
c57c8eee88
68
.travis.yml
68
.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,10 +299,70 @@ script:
|
||||
set +e
|
||||
echo
|
||||
|
||||
# TODO: Check Javascript (jshint?)
|
||||
- |
|
||||
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php ' > $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
|
||||
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
|
||||
#cat $INSTALL_FORCED_FILE
|
||||
|
||||
# TODO: Check CSS (csslint?)
|
||||
#- |
|
||||
# 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"
|
||||
mysql -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
|
||||
mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql -e 'FLUSH PRIVILEGES;'
|
||||
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/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
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Upgrading Dolibarr"
|
||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -138,15 +138,15 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$this->marge_haute =isset($conf->global->MAIN_PDF_MARGIN_TOP)?$conf->global->MAIN_PDF_MARGIN_TOP:10;
|
||||
$this->marge_basse =isset($conf->global->MAIN_PDF_MARGIN_BOTTOM)?$conf->global->MAIN_PDF_MARGIN_BOTTOM:10;
|
||||
|
||||
$this->option_logo = 1; // Affiche logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION
|
||||
$this->option_codeproduitservice = 1; // Affiche code produit-service
|
||||
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
$this->option_codeproduitservice = 1; // Display product-service code
|
||||
|
||||
// Retrieves transmitter
|
||||
// Get source company
|
||||
$this->emetteur=$mysoc;
|
||||
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined
|
||||
|
||||
// Define column position
|
||||
// Define position of columns
|
||||
$this->posxref=$this->marge_gauche+1;
|
||||
$this->posxlabel=$this->marge_gauche+25;
|
||||
$this->posxworkload=$this->marge_gauche+120;
|
||||
@ -167,7 +167,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Fonction generant le projet sur le disque
|
||||
* Function to build pdf project onto disk
|
||||
*
|
||||
* @param Project $object Object project a generer
|
||||
* @param Translate $outputlangs Lang output object
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/core/modules/project/doc/pdf_beluga.modules.php
|
||||
* \ingroup project
|
||||
* \brief File of the class allowing to generate projects with the beluga model
|
||||
* \brief File of class to generate project document beluga
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/project/modules_project.php';
|
||||
@ -99,15 +99,15 @@ class pdf_beluga extends ModelePDFProjects
|
||||
$this->marge_haute =isset($conf->global->MAIN_PDF_MARGIN_TOP)?$conf->global->MAIN_PDF_MARGIN_TOP:10;
|
||||
$this->marge_basse =isset($conf->global->MAIN_PDF_MARGIN_BOTTOM)?$conf->global->MAIN_PDF_MARGIN_BOTTOM:10;
|
||||
|
||||
$this->option_logo = 1; // Affiche logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION
|
||||
$this->option_codeproduitservice = 1; // Affiche code produit-service
|
||||
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
$this->option_codeproduitservice = 1; // Display product-service code
|
||||
|
||||
// Retrieves transmitter
|
||||
// Get source company
|
||||
$this->emetteur=$mysoc;
|
||||
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined
|
||||
|
||||
// Define column position
|
||||
// Define position of columns
|
||||
if ($this->orientation == 'L' || $this->orientation == 'Landscape') {
|
||||
$this->posxref=$this->marge_gauche+1;
|
||||
$this->posxdate=$this->marge_gauche+105;
|
||||
|
||||
@ -70,15 +70,15 @@ class pdf_timespent extends ModelePDFProjects
|
||||
$this->marge_haute =isset($conf->global->MAIN_PDF_MARGIN_TOP)?$conf->global->MAIN_PDF_MARGIN_TOP:10;
|
||||
$this->marge_basse =isset($conf->global->MAIN_PDF_MARGIN_BOTTOM)?$conf->global->MAIN_PDF_MARGIN_BOTTOM:10;
|
||||
|
||||
$this->option_logo = 1; // Affiche logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION
|
||||
$this->option_codeproduitservice = 1; // Affiche code produit-service
|
||||
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
$this->option_codeproduitservice = 1; // Display product-service code
|
||||
|
||||
// Retrieves transmitter
|
||||
// Get source company
|
||||
$this->emetteur=$mysoc;
|
||||
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined
|
||||
|
||||
// Define column position
|
||||
// Define position of columns
|
||||
$this->posxref=$this->marge_gauche+1;
|
||||
$this->posxlabel=$this->marge_gauche+25;
|
||||
$this->posxtimespent=$this->marge_gauche+120;
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
/**
|
||||
* \file htdocs/core/modules/propale/doc/pdf_azur.modules.php
|
||||
* \ingroup propale
|
||||
* \brief Fichier de la classe permettant de generer les propales au modele Azur
|
||||
* \brief File of Class to generate PDF proposal with Azur template
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
@ -148,16 +148,16 @@ class pdf_azur extends ModelePDFPropales
|
||||
$this->marge_haute =isset($conf->global->MAIN_PDF_MARGIN_TOP)?$conf->global->MAIN_PDF_MARGIN_TOP:10;
|
||||
$this->marge_basse =isset($conf->global->MAIN_PDF_MARGIN_BOTTOM)?$conf->global->MAIN_PDF_MARGIN_BOTTOM:10;
|
||||
|
||||
$this->option_logo = 1; // Affiche logo
|
||||
$this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION
|
||||
$this->option_modereg = 1; // Affiche mode reglement
|
||||
$this->option_condreg = 1; // Affiche conditions reglement
|
||||
$this->option_codeproduitservice = 1; // Affiche code produit-service
|
||||
$this->option_multilang = 1; // Dispo en plusieurs langues
|
||||
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
$this->option_modereg = 1; // Display payment mode
|
||||
$this->option_condreg = 1; // Display payment terms
|
||||
$this->option_codeproduitservice = 1; // Display product-service code
|
||||
$this->option_multilang = 1; // Available in several languages
|
||||
$this->option_escompte = 0; // Displays if there has been a discount
|
||||
$this->option_credit_note = 0; // Support credit notes
|
||||
$this->option_freetext = 1; // Support add of a personalised text
|
||||
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
||||
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
|
||||
|
||||
$this->franchise=!$mysoc->tva_assuj;
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
/**
|
||||
* \file htdocs/core/modules/propale/doc/pdf_cyan.modules.php
|
||||
* \ingroup propale
|
||||
* \brief Fichier de la classe permettant de generer les propales au modele Cyan
|
||||
* \brief File of Class to generate PDF proposal with Cyan template
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
@ -148,16 +148,16 @@ class pdf_cyan extends ModelePDFPropales
|
||||
$this->marge_haute =isset($conf->global->MAIN_PDF_MARGIN_TOP)?$conf->global->MAIN_PDF_MARGIN_TOP:10;
|
||||
$this->marge_basse =isset($conf->global->MAIN_PDF_MARGIN_BOTTOM)?$conf->global->MAIN_PDF_MARGIN_BOTTOM:10;
|
||||
|
||||
$this->option_logo = 1; // Affiche logo
|
||||
$this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION
|
||||
$this->option_modereg = 1; // Affiche mode reglement
|
||||
$this->option_condreg = 1; // Affiche conditions reglement
|
||||
$this->option_codeproduitservice = 1; // Affiche code produit-service
|
||||
$this->option_multilang = 1; // Dispo en plusieurs langues
|
||||
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
$this->option_modereg = 1; // Display payment mode
|
||||
$this->option_condreg = 1; // Display payment terms
|
||||
$this->option_codeproduitservice = 1; // Display product-service code
|
||||
$this->option_multilang = 1; // Available in several languages
|
||||
$this->option_escompte = 0; // Displays if there has been a discount
|
||||
$this->option_credit_note = 0; // Support credit notes
|
||||
$this->option_freetext = 1; // Support add of a personalised text
|
||||
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
||||
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
|
||||
|
||||
$this->franchise=!$mysoc->tva_assuj;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -80,6 +80,7 @@ if (@file_exists($forcedfile)) {
|
||||
// If forced install is enabled, replace the post values. These are empty because form fields are disabled.
|
||||
if ($force_install_noedit) {
|
||||
$main_dir = detect_dolibarr_main_document_root();
|
||||
if (!empty($argv[1])) $main_dir = $argv[1]; // override when executing the script in command line
|
||||
if (!empty($force_install_main_data_root)) {
|
||||
$main_data_dir = $force_install_main_data_root;
|
||||
} else {
|
||||
|
||||
@ -64,6 +64,8 @@ if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.fo
|
||||
if (@file_exists($forcedfile)) {
|
||||
$useforcedwizard = true;
|
||||
include_once $forcedfile;
|
||||
// test for travis
|
||||
if (!empty($argv[1]) && $argv[1] == "set") $action = "set";
|
||||
}
|
||||
|
||||
dolibarr_install_syslog("- step2: entering step2.php page");
|
||||
|
||||
@ -243,7 +243,7 @@ if (!empty($object->id))
|
||||
|
||||
// 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);
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user