Merge branch 'develop' into prod-attr
# Conflicts: # htdocs/core/class/html.form.class.php # htdocs/core/tpl/objectline_create.tpl.php # htdocs/fourn/facture/card.php # htdocs/install/mysql/migration/3.9.0-4.0.0.sql
@@ -257,7 +257,7 @@ script:
|
|||||||
# Ensure we catch errors
|
# Ensure we catch errors
|
||||||
set -e
|
set -e
|
||||||
# Exclusions are defined in the ruleset.xml file
|
# Exclusions are defined in the ruleset.xml file
|
||||||
phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/codesniffer/ruleset.xml --encoding=utf-8 .
|
phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 .
|
||||||
set +e
|
set +e
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ jQuery UI 1.11.4 GPL and MIT License Yes
|
|||||||
jQuery select2 3.5.2 GPL and Apache License Yes JS library plugin for sexier multiselect
|
jQuery select2 3.5.2 GPL and Apache License Yes JS library plugin for sexier multiselect
|
||||||
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||||
jQuery DataTables 1.9.4 BSD Yes JS library for tables output
|
|
||||||
jQuery FileUpload 5.0.3 GPL and MIT License Yes JS library to upload files
|
jQuery FileUpload 5.0.3 GPL and MIT License Yes JS library to upload files
|
||||||
jQuery Flot 0.8.3 MIT License Yes JS library to build graph
|
jQuery Flot 0.8.3 MIT License Yes JS library to build graph
|
||||||
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
|
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
|
||||||
|
|||||||
75
ChangeLog
@@ -22,13 +22,86 @@ WARNING:
|
|||||||
Following changes may create regression for some external modules, but were necessary to make
|
Following changes may create regression for some external modules, but were necessary to make
|
||||||
Dolibarr better:
|
Dolibarr better:
|
||||||
- Function delete of class Facture (invoice) need the object $user as first parameter. Also you must
|
- Function delete of class Facture (invoice) need the object $user as first parameter. Also you must
|
||||||
check you make a fetch on object before calling the delete.
|
check you make a fetch on object before calling the delete.
|
||||||
- The old driver of "mysql" has been removed. Dolibarr use the new one (mysqli) by default.
|
- The old driver of "mysql" has been removed. Dolibarr use the new one (mysqli) by default.
|
||||||
- Remove not used function calculate_byte(). Use dol_print_size() instead.
|
- Remove not used function calculate_byte(). Use dol_print_size() instead.
|
||||||
- Function pdf_getTotalQty is now deprecated. Not used by Dolibarr core.
|
- Function pdf_getTotalQty is now deprecated. Not used by Dolibarr core.
|
||||||
|
- Method expensereport->delete(id, user) has been replaced with ->delete(user)
|
||||||
|
Method warehouse->delete(id) has been replace with ->delete(user)
|
||||||
|
This is to follow good practice to make a fetch on object before deleting it.
|
||||||
|
- The form to add a product to a draft proposal/order/invoice from the product card is hidden by default.
|
||||||
|
It was not commonly used and usage generates some problems (cost price for margin calculation not entered, vat setting).
|
||||||
|
Set constant PRODUCT_ADD_FORM_ADD_TO to retrieve it.
|
||||||
|
- The javascript "datatables" library was used to be provided into Dolibarr sources, but it was not used by application.
|
||||||
|
So there is no reason to maintain its compatibility with other dolibarr components. If an external module need this
|
||||||
|
library, this external module must embed hte library in his own sources/packages.
|
||||||
|
- Trigger name SUPPLIER_PROPOSAL_CREATE has been renamed into PROPOSAL_SUPPLIER_CREATE
|
||||||
|
- A new paramater sqlfilters was introduced to allow filter on any fields int the REST API. Few old parameters
|
||||||
|
no more required were also removed. Use this new one if you ware using one of them.
|
||||||
|
- Method commande->deleteline($lindeid) has been replaced with commande->deleteline($user, $lineid).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 4.0.2 compared to 4.0.1 *****
|
||||||
|
FIX: #5340
|
||||||
|
FIX: #5779
|
||||||
|
FIX: #5849
|
||||||
|
FIX: #5866
|
||||||
|
FIX: #5907
|
||||||
|
FIX: Addline if $txlocaltax1 is empty
|
||||||
|
FIX: Avoid error 500 if phpexcel is disabled
|
||||||
|
FIX: Avoid errors on debian
|
||||||
|
FIX: Can edit the customer ref even if order is not draft.
|
||||||
|
FIX: Documents not moved in new directory if we change reference of the task.
|
||||||
|
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is child of an already linked to object
|
||||||
|
FIX: Extra fields of task not copied on project cloning
|
||||||
|
FIX: Hidden option PRODUCT_MAX_VISIBLE_PHOTO
|
||||||
|
FIX: Link on supplier invoice in widget was not clickable
|
||||||
|
FIX: margin tab on customer card must filter on current entity invoices
|
||||||
|
FIX: missing column into SQL on thirdparty list
|
||||||
|
FIX: Nber of attached files were not reported in event report of email sent
|
||||||
|
FIX: only show projects of related third if external user
|
||||||
|
FIX: Search provider by price
|
||||||
|
FIX: Solve backup when using mysqldump that return warning
|
||||||
|
FIX: Sql error in widget of product for stock alerts
|
||||||
|
FIX: updateligne if $txlocaltax1 is null
|
||||||
|
|
||||||
|
***** ChangeLog for 4.0.1 compared to 4.0.0 *****
|
||||||
|
FIX: #2853
|
||||||
|
FIX: #2991
|
||||||
|
FIX: #3128
|
||||||
|
FIX: #5699
|
||||||
|
FIX: #5734
|
||||||
|
FIX: #5742 error on project list if an extra field separator is added.
|
||||||
|
FIX: #5746 chrome php Try a fix. Not sure it solved all problems reported
|
||||||
|
FIX: #5748 Bug: Error updating to 4.0.1 with Postgresql. Field must be varchar.
|
||||||
|
FIX: #5750 Bug: CmailFile::server_parse enters an infinite loop if $server_response is false
|
||||||
|
FIX: #5752 Bug VAT NPR not propagated during proposal cloning
|
||||||
|
FIX: #5763 Bug: Cannot Create Supplier Price Request
|
||||||
|
FIX: #5770 Dolibarr doesn't modify correctly the hour of a task
|
||||||
|
FIX: #5776
|
||||||
|
FIX: #5802 Incoterms not set
|
||||||
|
FIX: #5813 Bug: Incoterms not being read correctly
|
||||||
|
FIX: #5818
|
||||||
|
FIX: alignement of intervention status
|
||||||
|
FIX: Clean of search fields
|
||||||
|
FIX: Creation of donation should go back on card after creation
|
||||||
|
FIX: Date visible on project overview
|
||||||
|
FIX: Execute a dedicated job from its id may results of launching other jobs too.
|
||||||
|
FIX: Failed to export contact categories with contact extra fields
|
||||||
|
FIX: inversion customer/supplier price
|
||||||
|
FIX: link "back to list" was not visible.
|
||||||
|
FIX: Lost filter on opportunities
|
||||||
|
FIX: Mandatory field payment term was not css highlighted.
|
||||||
|
FIX: Menu users not visible on dolidroid.
|
||||||
|
FIX: SEC for HTB23302
|
||||||
|
FIX: The email test sender in email setup was broken
|
||||||
|
FIX: Translation of "Name" is not a good choice for floow-up.
|
||||||
|
FIX: Update of maxnbrun on job list failed.
|
||||||
|
FIX: Value of payment term and project are not set on correct default value when invoice generated from template.
|
||||||
|
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
|
||||||
|
FIX: Vat not visible in dictionnary
|
||||||
|
|
||||||
***** ChangeLog for 4.0.0 compared to 3.9.* *****
|
***** ChangeLog for 4.0.0 compared to 3.9.* *****
|
||||||
For users:
|
For users:
|
||||||
NEW: Add recurring invoice feature and automatic generation of invoices.
|
NEW: Add recurring invoice feature and automatic generation of invoices.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ FROM php:5.6-apache
|
|||||||
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libldap2-dev \
|
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libldap2-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||||
&& docker-php-ext-install gd
|
&& docker-php-ext-install gd \
|
||||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||||
&& docker-php-ext-install ldap \
|
&& docker-php-ext-install ldap \
|
||||||
&& docker-php-ext-install mysqli \
|
&& docker-php-ext-install mysqli \
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ These are features that Dolibarr does **not** yet fully support:
|
|||||||
|
|
||||||
## DOCUMENTATION
|
## DOCUMENTATION
|
||||||
|
|
||||||
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](http://wiki.dolibarr.org).
|
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org).
|
||||||
|
|
||||||
## CONTRIBUTING
|
## CONTRIBUTING
|
||||||
|
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
README (French)
|
|
||||||
################################
|
|
||||||
Building packages
|
|
||||||
################################
|
|
||||||
|
|
||||||
Les sous repertoires du repertoire "build" contiennent tous les fichiers
|
|
||||||
requis pour packager Dolibarr de maniere automatisee.
|
|
||||||
On trouve plusieurs outils:
|
|
||||||
|
|
||||||
- Pour construire un package Dolibarr complet, il suffit de
|
|
||||||
> Editer la version dans le fichier makepack-dolibarr.pl
|
|
||||||
> Lancer la commande perl makepack-dolibarr.pl
|
|
||||||
|
|
||||||
- Pour construire un package d'une traduction, il suffit de lancer le script
|
|
||||||
> perl makepack-dolibarrlang.pl
|
|
||||||
|
|
||||||
- Pour construire un package d'un theme, il suffit de lancer le script
|
|
||||||
> perl makepack-dolibarrtheme.pl
|
|
||||||
|
|
||||||
- Pour construire un package d'un module, il suffit de lancer le script
|
|
||||||
> perl makepack-dolibarrmodule.pl
|
|
||||||
|
|
||||||
- Pour construire un package DoliWamp autoexe:
|
|
||||||
> Installer InnoSetup (http://www.jrsoftware.org)
|
|
||||||
> Installer WampServer dans "C:\Program Files\Wamp" (http://www.wampserver.com)
|
|
||||||
> Installer les addon WampServer afin d'y mettre les versions:
|
|
||||||
Apache2.2.6, Mysql5.0.45, Php5.2.5
|
|
||||||
> Modifier dans le fichier build/exe/doliwamp.iss la variable SourceDir
|
|
||||||
afin d'y mettre le repository Dolibarr.
|
|
||||||
> Modifier AppVerName et OutputBaseFilename.
|
|
||||||
> Lancer innosetup, ouvrir le fichier build/exe/doliwamp.iss et cliquer sur
|
|
||||||
le bouton "Compile". Le fichier .exe sera fabrique dans le repertoire build.
|
|
||||||
|
|
||||||
- Pour generer la documentation developpeur, lancer le script
|
|
||||||
> perl dolybarr-doxygen-build.pl
|
|
||||||
|
|
||||||
|
|
||||||
Note:
|
|
||||||
|
|
||||||
Le repertoire build et tout ce qu'il contient n'est absolument pas requis
|
|
||||||
pour faire fonctionner Dolibarr. Ils ne servent qu'a la generation des
|
|
||||||
packages. Certains packages, une fois construit, n'incluent par le repertoire
|
|
||||||
"build".
|
|
||||||
|
|
||||||
On trouve dans le repertoire "build", les sous-repertoires utilises par
|
|
||||||
l'outil makepack-dolibarr.pl:
|
|
||||||
|
|
||||||
* deb:
|
|
||||||
Fichier de config pour construire un package Debian.
|
|
||||||
|
|
||||||
* rpm:
|
|
||||||
Fichier de config pour construire un package Redhat ou Mandrake.
|
|
||||||
|
|
||||||
* tgz:
|
|
||||||
Fichier de config pour construire un package tgz.
|
|
||||||
|
|
||||||
* exe:
|
|
||||||
Fichier de config pour construire un package exe pour Windows des sources
|
|
||||||
ou pour construire l'assistant d'installation complet DoliWamp.
|
|
||||||
|
|
||||||
* zip:
|
|
||||||
Fichier de config pour construire un package zip.
|
|
||||||
|
|
||||||
* live:
|
|
||||||
Fichier pour fabriquer un live CD de demo de Dolibarr.
|
|
||||||
|
|
||||||
* patch:
|
|
||||||
Fichier exemple de generation de fichier patch pour diffusion d'une
|
|
||||||
modification de Dolibarr.
|
|
||||||
|
|
||||||
* doap:
|
|
||||||
Fichier descriptif DOAP pour promouvoir/decrire la version de Dolibarr.
|
|
||||||
|
|
||||||
* pad:
|
|
||||||
Fichier descriptif PAD pour promouvoir/decrire la version de Dolibarr.
|
|
||||||
|
|
||||||
* dmg:
|
|
||||||
Fichier de config pour construire un package dmg DoliMamp pour Mac OS X
|
|
||||||
@@ -154,8 +154,10 @@ tag 729538 -moreinfo
|
|||||||
##### Testing a package into unstable env
|
##### Testing a package into unstable env
|
||||||
|
|
||||||
Check you have a mysql server available from another interface than "localhost".
|
Check you have a mysql server available from another interface than "localhost".
|
||||||
Comment line in /etc/mysql/my.cnf if required and restart mysql
|
Set line in /etc/mysql/my.cnf if required and restart mysql
|
||||||
#bind-address = 127.0.0.1
|
|
||||||
|
[mysqld]
|
||||||
|
bind-address = *
|
||||||
|
|
||||||
Create a chroot called "unstable-amd64-sbuild".
|
Create a chroot called "unstable-amd64-sbuild".
|
||||||
Chroot env is stored into /srv/chroot directory.
|
Chroot env is stored into /srv/chroot directory.
|
||||||
@@ -170,6 +172,8 @@ Puis pour se connecter et préparer l'environnement
|
|||||||
> schroot -c name_of_chroot
|
> schroot -c name_of_chroot
|
||||||
> cat /etc/debian_chroot to check which debian branch we are into
|
> cat /etc/debian_chroot to check which debian branch we are into
|
||||||
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
|
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
|
||||||
|
> apt-get update
|
||||||
|
> apt-get upgrade
|
||||||
> apt-get install links mysql-client
|
> apt-get install links mysql-client
|
||||||
|
|
||||||
To test a package
|
To test a package
|
||||||
@@ -185,7 +189,7 @@ To test a package
|
|||||||
If there is a problem launching apache, because port is already used, change it into your chroot install with
|
If there is a problem launching apache, because port is already used, change it into your chroot install with
|
||||||
> vi /etc/apache2/ports.conf
|
> vi /etc/apache2/ports.conf
|
||||||
Then restart.
|
Then restart.
|
||||||
Then you can call/test dolibarr with http://localhost:port/dolibarr/ (It can be also called from host).
|
Then you can call/test dolibarr with http://localhost:port/dolibarr/ . It can be also called FROM HOST (port must be a not used port on host).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -291,13 +295,18 @@ If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VER
|
|||||||
* Edit orig.tar.gz file to remove
|
* Edit orig.tar.gz file to remove
|
||||||
- debian
|
- debian
|
||||||
- htdocs/includes/ckeditor
|
- htdocs/includes/ckeditor
|
||||||
|
- htdocs/includes/jszip
|
||||||
|
- htdocs/includes/jquery/plugins/datatables
|
||||||
|
- htdocs/includes/mike42
|
||||||
- htdocs/includes/phpexcel or htdocs/includes/phpoffice
|
- htdocs/includes/phpexcel or htdocs/includes/phpoffice
|
||||||
- htdocs/includes/tcpdf or htdocs/includes/tecnickom
|
- htdocs/includes/swiftmailer
|
||||||
|
- htdocs/includes/restler/framework/Luracast/Restler/explorer
|
||||||
|
- htdocs/includes/tcpdf or htdocs/includes/tecnickcom
|
||||||
And rename file into
|
And rename file into
|
||||||
dolibarr-x.y.z+dfsgw.tgz
|
dolibarr-x.y.z+dfsgw.tgz
|
||||||
(x.y.z = version, w start from 1 and is increased for each new git-import-orig already done)
|
(x.y.z = version, w start from 1 and is increased for each new git-import-orig already done)
|
||||||
|
|
||||||
* Staying into git root directory, run
|
* Staying into projet gitted root directory, run
|
||||||
> git-import-orig -vv ../dolibarr-x.y.z+dfsgw.tgz --debian-branch=[master|jessie] --upstream-branch=[upstream|upstream-3.5.x]
|
> git-import-orig -vv ../dolibarr-x.y.z+dfsgw.tgz --debian-branch=[master|jessie] --upstream-branch=[upstream|upstream-3.5.x]
|
||||||
and enter version when requested with format
|
and enter version when requested with format
|
||||||
x.y.z+dfsgw
|
x.y.z+dfsgw
|
||||||
@@ -324,7 +333,7 @@ To update dolibarr debian package when only files into debian has changed:
|
|||||||
To update dolibarr debian package when only files not into debian has changed:
|
To update dolibarr debian package when only files not into debian has changed:
|
||||||
|
|
||||||
* Manually, add patches into debian/patches and update file debian/series, or do the 2 steps with "quilt import filepatch.patch"
|
* Manually, add patches into debian/patches and update file debian/series, or do the 2 steps with "quilt import filepatch.patch"
|
||||||
* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revien a l'état du upstream sans les patch.
|
* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
|
||||||
|
|
||||||
Once files has been prepared, it's time to test:
|
Once files has been prepared, it's time to test:
|
||||||
|
|
||||||
@@ -341,7 +350,7 @@ Note: Package is built into directory ../build-area
|
|||||||
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
|
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
|
||||||
|
|
||||||
* Test package (see dedicated chapter to test it with debian unstable env)
|
* Test package (see dedicated chapter to test it with debian unstable env)
|
||||||
> cp ../build-area/* /srv/chroot/unstable/tmp
|
> sudo rm /srv/chroot/unstable/tmp/* >/dev/null 2>&1; cp ../build-area/* /srv/chroot/unstable/tmp
|
||||||
See rest of process into dedicated chapter "To test a package" to test it with debian unstable env
|
See rest of process into dedicated chapter "To test a package" to test it with debian unstable env
|
||||||
|
|
||||||
* If package .deb is ok:
|
* If package .deb is ok:
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
|||||||
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap,
|
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap,
|
||||||
# Required PHP libraries
|
# Required PHP libraries
|
||||||
php-pear, php-mail-mime,
|
php-pear, php-mail-mime,
|
||||||
# php-tcpdf, libfpdi-php,
|
# php-tcpdf,
|
||||||
# libfpdf-tpl-php, php-fpdf,
|
# libfpdf-tpl-php, php-fpdf,
|
||||||
# libphp-adodb,
|
# libphp-adodb,
|
||||||
# libnusoap-php,
|
# libnusoap-php,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
Upstream-Name: Dolibarr
|
Upstream-Name: Dolibarr
|
||||||
Upstream-Contact: Laurent Destailleur <eldy@users.sourceforge.net>
|
Upstream-Contact: Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
Source: http://www.dolibarr.org/files/stable/standard/
|
Source: https://www.dolibarr.org/files/stable/standard/
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
@@ -197,9 +197,6 @@ License: GPL-2+
|
|||||||
On Debian systems, the full text of the GNU General Public
|
On Debian systems, the full text of the GNU General Public
|
||||||
License version 2 can be found in the file
|
License version 2 can be found in the file
|
||||||
`/usr/share/common-licenses/GPL-2'.
|
`/usr/share/common-licenses/GPL-2'.
|
||||||
Comment:
|
|
||||||
Those files are not shipped in the binary package as we
|
|
||||||
configure Dolibarr to use the library packaged in "libfpdi-php".
|
|
||||||
|
|
||||||
Files: htdocs/includes/geoip/*
|
Files: htdocs/includes/geoip/*
|
||||||
Copyright: 2007 MaxMind LLC
|
Copyright: 2007 MaxMind LLC
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ case "$1" in
|
|||||||
# File already exist. We add params not found.
|
# File already exist. We add params not found.
|
||||||
#echo Add new params to overwrite path to use shared libraries/fonts
|
#echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
|
||||||
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
#grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
#grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ $force_install_lockinstall='444';
|
|||||||
// - not removed from package (see rm in rules file),
|
// - not removed from package (see rm in rules file),
|
||||||
// - declared into dependencies (see Depends in control file)
|
// - declared into dependencies (see Depends in control file)
|
||||||
//$force_dolibarr_lib_TCPDF_PATH='';
|
//$force_dolibarr_lib_TCPDF_PATH='';
|
||||||
//$force_dolibarr_lib_FPDF_PATH='/usr/share/php/fpdf';
|
|
||||||
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
|
||||||
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ override_dh_install:
|
|||||||
|
|
||||||
# clean from all PHP embedded libraries (we use package dependencies instead)
|
# clean from all PHP embedded libraries (we use package dependencies instead)
|
||||||
# rm -fr htdocs/includes/adodbtime
|
# rm -fr htdocs/includes/adodbtime
|
||||||
# rm -fr htdocs/includes/fpdfi
|
|
||||||
# rm -fr htdocs/includes/geoip
|
# rm -fr htdocs/includes/geoip
|
||||||
# rm -fr htdocs/includes/nusoap
|
# rm -fr htdocs/includes/nusoap
|
||||||
# rm -fr htdocs/includes/odtphp/zip/pclzip
|
# rm -fr htdocs/includes/odtphp/zip/pclzip
|
||||||
|
|||||||
@@ -32,11 +32,33 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require_once($path."../htdocs/master.inc.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
|
||||||
// Main
|
|
||||||
|
/*
|
||||||
|
* Main
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (empty($argv[1]))
|
||||||
|
{
|
||||||
|
print "Usage: ".$script_file." release=x.y.z\n";
|
||||||
|
exit -1;
|
||||||
|
}
|
||||||
parse_str($argv[1]);
|
parse_str($argv[1]);
|
||||||
|
|
||||||
|
if ($release != DOL_VERSION)
|
||||||
|
{
|
||||||
|
print 'Error: release is not version declared into filefunc.in.php.'."\n";
|
||||||
|
exit -1;
|
||||||
|
}
|
||||||
|
|
||||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||||
$outputfile=dirname(__FILE__).'/../htdocs/install/filelist.xml';
|
$outputdir=dirname(__FILE__).'/../htdocs/install';
|
||||||
|
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
|
||||||
|
dol_delete_file($outputdir.'/filelist*.xml',0,1,1);
|
||||||
|
|
||||||
|
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
|
||||||
$fp = fopen($outputfile,'w');
|
$fp = fopen($outputfile,'w');
|
||||||
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
|
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
|
||||||
fputs($fp, '<checksum_list version="'.$release.'">'."\n");
|
fputs($fp, '<checksum_list version="'.$release.'">'."\n");
|
||||||
@@ -73,6 +73,8 @@ If you want to build/test package locally:
|
|||||||
bzr commit -m "Upstream version x.y"
|
bzr commit -m "Upstream version x.y"
|
||||||
bzr push
|
bzr push
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Init debian dir repository into launchpad (when repository for sources does not exist)
|
# Init debian dir repository into launchpad (when repository for sources does not exist)
|
||||||
#----------------------------------
|
#----------------------------------
|
||||||
- Create debian directory and upload it onto bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
|
- Create debian directory and upload it onto bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
|
||||||
@@ -104,12 +106,13 @@ If you want to build/test package locally:
|
|||||||
bzr push lp:~yourlogin/+junk/debian-[dev|stable]
|
bzr push lp:~yourlogin/+junk/debian-[dev|stable]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Define a recipe into launchpad (a rule to build packages into a PPA)
|
# Define a recipe into launchpad (a rule to build packages into a PPA)
|
||||||
#----------------------------------
|
#----------------------------------
|
||||||
- Create a file dolibarr.recipe with content
|
- Create a file dolibarr-[beta|stable].recipe with content
|
||||||
cd bzr
|
cd bzr
|
||||||
vi dolibarr.recipe
|
vi dolibarr-[beta|stable].recipe
|
||||||
For dev:
|
For beta/dev:
|
||||||
# bzr-builder format 0.3 deb-version {debupstream}-0~{revno}
|
# bzr-builder format 0.3 deb-version {debupstream}-0~{revno}
|
||||||
lp:dolibarr
|
lp:dolibarr
|
||||||
merge packaging lp:~yourlogin/+junk/debian-dev
|
merge packaging lp:~yourlogin/+junk/debian-dev
|
||||||
@@ -119,7 +122,7 @@ If you want to build/test package locally:
|
|||||||
merge packaging lp:~yourlogin/+junk/debian-stable
|
merge packaging lp:~yourlogin/+junk/debian-stable
|
||||||
- Run command
|
- Run command
|
||||||
cd bzr
|
cd bzr
|
||||||
bzr dailydeb dolibarr.recipe working-dir
|
bzr dailydeb dolibarr-[beta|stable].recipe working-dir
|
||||||
This will create a directory "working-dir" with dolibarr sources and will add sources from ~yourlogin/+junk/debian-[dev|stable]
|
This will create a directory "working-dir" with dolibarr sources and will add sources from ~yourlogin/+junk/debian-[dev|stable]
|
||||||
- Test package sources
|
- Test package sources
|
||||||
sudo pbuilder build <working-dir>/<project>_<version>.dsc
|
sudo pbuilder build <working-dir>/<project>_<version>.dsc
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
Howto (English)
|
|
||||||
##################################################
|
|
||||||
Building a live CD/USB
|
|
||||||
##################################################
|
|
||||||
|
|
||||||
This is all steps to follow to build a live CD/USB demo of Dolibarr using
|
|
||||||
SLAX distribution.
|
|
||||||
|
|
||||||
1) Download SLAX (www.slax.org) as a zip file.
|
|
||||||
|
|
||||||
2) Unzip file on a directory on any USB key with at least 512Mo free (even
|
|
||||||
if you want to build a CD live).
|
|
||||||
|
|
||||||
3) Download following modules from SLAX web sites and put files
|
|
||||||
into the /slax/modules directory:
|
|
||||||
apr-1.2.12-i486-1.lzm
|
|
||||||
apr-util-1.2.12-i486-1.lzm
|
|
||||||
cairomm-1.4.8-i686.lzm
|
|
||||||
cli-ftp-pack.lzm
|
|
||||||
codecs-essential-20071007.lzm
|
|
||||||
firefox-2.0.0.14.lzm
|
|
||||||
ghostscript-8.62-i486-5.lzm
|
|
||||||
gimp-2.4.5-i486-1sl.lzm
|
|
||||||
gparted-0.3.7-i486-1as.lzm
|
|
||||||
grsync.lzm
|
|
||||||
httpd-2.2.8-i486-1.lzm
|
|
||||||
libsigc++-2.0.18-i686.lzm
|
|
||||||
mysql-5.0.51b-i486-1.lzm
|
|
||||||
php-5.2.6-i486-1.lzm
|
|
||||||
printmodule-s6.lzm
|
|
||||||
Save_by_Pastrugno-0.1.lzm
|
|
||||||
telnet-1.5.lzm
|
|
||||||
|
|
||||||
4) Copy dolibarr files into path
|
|
||||||
\slax\changes\var\www\htdocs\dolibarr
|
|
||||||
|
|
||||||
5) Run the script
|
|
||||||
> /boot/bootinst.bat
|
|
||||||
or
|
|
||||||
> /boot/bootinst.sh
|
|
||||||
and answer yes to overwrite the MBR of the disk of your USB key.
|
|
||||||
|
|
||||||
6) Boot on USB key (Change your BIOS setup if required).
|
|
||||||
|
|
||||||
7) After boot, run the script
|
|
||||||
> mysql_install_db --user=mysql
|
|
||||||
This will create mysql empty system database.
|
|
||||||
|
|
||||||
8) Edit the file /etc/httpd/httpd.conf to uncomment the line
|
|
||||||
with PHP activation.
|
|
||||||
Include /etc/httpd/mod_php.conf
|
|
||||||
|
|
||||||
9) Edit \slax\changes\etc\httpd\php.ini file to disabled features where librairies does not
|
|
||||||
exists. You can comment lines:
|
|
||||||
;extension=gd.so
|
|
||||||
;extension=mhash.so
|
|
||||||
;extension=snmp.so
|
|
||||||
|
|
||||||
10) Personalized your desktop.
|
|
||||||
Add a link to application
|
|
||||||
"firefox http://localhost/dolibarr/htdocs/index.php"
|
|
||||||
Add a link to application
|
|
||||||
"/var/www/htdocs/dolibarr/dev/initdemo/initdemo.sh"
|
|
||||||
Add a link to application
|
|
||||||
"/var/www/htdocs/dolibarr/dev/initdemo/removedemo.sh"
|
|
||||||
|
|
||||||
11) Reboot again on your USB key.
|
|
||||||
|
|
||||||
12) Now you can run Dolibarr install process
|
|
||||||
http://localhost/dolibarr/htdocs/install/index.php
|
|
||||||
or copy USB key content to build another one quickly.
|
|
||||||
or build a CD with command (TODO).
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
README (English)
|
|
||||||
##################################################
|
|
||||||
Building a live CD/USB
|
|
||||||
##################################################
|
|
||||||
|
|
||||||
This directory contains files and docs used to build
|
|
||||||
a live CD or USB demo of Dolibarr.
|
|
||||||
@@ -159,6 +159,7 @@ $REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
|
|||||||
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
|
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
|
||||||
$FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1";
|
$FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1";
|
||||||
$FILENAMERPM=$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm";
|
$FILENAMERPM=$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm";
|
||||||
|
$FILENAMERPMSRC=$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm";
|
||||||
# For Deb
|
# For Deb
|
||||||
$newbuild = $BUILD;
|
$newbuild = $BUILD;
|
||||||
$newbuild =~ s/(dev|alpha)/1/gi; # dev
|
$newbuild =~ s/(dev|alpha)/1/gi; # dev
|
||||||
@@ -317,8 +318,13 @@ print "\n";
|
|||||||
if ($CHOOSEDTARGET{'-CHKSUM'})
|
if ($CHOOSEDTARGET{'-CHKSUM'})
|
||||||
{
|
{
|
||||||
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
||||||
$ret=`php $SOURCE/build/generate_filecheck_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
||||||
print $ret."\n";
|
print $ret."\n";
|
||||||
|
# Copy to final dir
|
||||||
|
$NEWDESTI=$DESTI;
|
||||||
|
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
|
||||||
|
use File::Copy qw(copy);
|
||||||
|
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -363,6 +369,11 @@ if ($nboftargetok) {
|
|||||||
if (! $ret)
|
if (! $ret)
|
||||||
{
|
{
|
||||||
print "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n";
|
print "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with commande:'\n";
|
||||||
|
}
|
||||||
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
||||||
{
|
{
|
||||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||||
@@ -372,11 +383,9 @@ if ($nboftargetok) {
|
|||||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||||
}
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
exit;
|
if (! $ret)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog'\n";
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||||
@@ -725,8 +734,8 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
print "Remove target ".$FILENAMERPM."...\n";
|
print "Remove target ".$FILENAMERPM."...\n";
|
||||||
unlink("$NEWDESTI/".$FILENAMERPM);
|
unlink("$NEWDESTI/".$FILENAMERPM);
|
||||||
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm...\n";
|
print "Remove target ".$FILENAMERPMSRC."...\n";
|
||||||
unlink("$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm");
|
unlink("$NEWDESTI/".$FILENAMERPMSRC);
|
||||||
|
|
||||||
print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
|
print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
|
||||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;
|
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;
|
||||||
@@ -1132,15 +1141,19 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
print "\nList of files to publish (BUILD=$BUILD)\n";
|
print "\nList of files to publish (BUILD=$BUILD)\n";
|
||||||
%filestoscansf=(
|
%filestoscansf=(
|
||||||
|
"$DESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml"=>'none', # none means it won't be published on SF
|
||||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||||
|
"$DESTI/package_rpm_generic/$FILENAMERPMSRC"=>'none', # none means it won't be published on SF
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none',
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF
|
||||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
||||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
||||||
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
||||||
);
|
);
|
||||||
%filestoscanstableasso=(
|
%filestoscanstableasso=(
|
||||||
|
"$DESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml"=>'signatures',
|
||||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
|
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
|
||||||
|
"$DESTI/package_rpm_generic/$FILENAMERPMSRC"=>'package_rpm_generic',
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
||||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
|
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
|
||||||
@@ -1202,9 +1215,10 @@ if ($nboftargetok) {
|
|||||||
my $filesize = -s $file;
|
my $filesize = -s $file;
|
||||||
if (! $filesize) { next; }
|
if (! $filesize) { next; }
|
||||||
|
|
||||||
print "\n";
|
if ($target eq 'SF') {
|
||||||
|
if ($filestoscan{$file} eq 'none') {
|
||||||
if ($target eq 'SF' && $filestoscan{$file} ne 'none') {
|
next;
|
||||||
|
}
|
||||||
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
|
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
|
||||||
}
|
}
|
||||||
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {
|
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {
|
||||||
@@ -1221,6 +1235,8 @@ if ($nboftargetok) {
|
|||||||
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
|
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
|
||||||
$destFolder="$NEWPUBLISH/$dirnameonly";
|
$destFolder="$NEWPUBLISH/$dirnameonly";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "\n";
|
||||||
print "Publish file ".$file." to ".$destFolder."\n";
|
print "Publish file ".$file." to ".$destFolder."\n";
|
||||||
|
|
||||||
# mkdir
|
# mkdir
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ Go into project you want to update. It mught be:
|
|||||||
|
|
||||||
Once logged, click on "Add file" in section "Source Files", then select mode "Upload From: Remote URL"
|
Once logged, click on "Add file" in section "Source Files", then select mode "Upload From: Remote URL"
|
||||||
Keep empty for "Filename", choose "Remote URL" and enter into last field, URL that should looks like this:
|
Keep empty for "Filename", choose "Remote URL" and enter into last field, URL that should looks like this:
|
||||||
http://www.dolibarr.org/files/stable/package_rpm_generic/dolibarr-x.y.v-0.3.src.rpm
|
http://www.dolibarr.org/files/stable/package_rpm_generic/dolibarr-x.y.v-0.4.src.rpm
|
||||||
|
|
||||||
Then add into Advanded - Attributes
|
Then add into Advanded - Attributes
|
||||||
OBS:Screenshots http://www.dolibarr.org/images/dolibarr_screenshot1.png
|
OBS:Screenshots http://www.dolibarr.org/images/dolibarr_screenshot1.png
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ AutoReqProv: no
|
|||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
An easy to use CRM & ERP open source/free software for small
|
An easy to use CRM & ERP open source/free software package for small
|
||||||
and medium companies, foundations or freelances. It includes different
|
and medium companies, foundations or freelances. It includes different
|
||||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||||
Management (CRM) but also for different other activities.
|
Management (CRM) but also for different other activities.
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ AutoReqProv: no
|
|||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
An easy to use CRM & ERP open source/free software for small
|
An easy to use CRM & ERP open source/free software package for small
|
||||||
and medium companies, foundations or freelances. It includes different
|
and medium companies, foundations or freelances. It includes different
|
||||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||||
Management (CRM) but also for different other activities.
|
Management (CRM) but also for different other activities.
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ AutoReqProv: no
|
|||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
An easy to use CRM & ERP open source/free software for small
|
An easy to use CRM & ERP open source/free software package for small
|
||||||
and medium companies, foundations or freelances. It includes different
|
and medium companies, foundations or freelances. It includes different
|
||||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||||
Management (CRM) but also for different other activities.
|
Management (CRM) but also for different other activities.
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ AutoReqProv: no
|
|||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
An easy to use CRM & ERP open source/free software for small
|
An easy to use CRM & ERP open source/free software package for small
|
||||||
and medium companies, foundations or freelances. It includes different
|
and medium companies, foundations or freelances. It includes different
|
||||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||||
Management (CRM) but also for different other activities.
|
Management (CRM) but also for different other activities.
|
||||||
|
|||||||
@@ -55,6 +55,6 @@
|
|||||||
"ext-soap": "Native SOAP",
|
"ext-soap": "Native SOAP",
|
||||||
"ext-zip": "ODT and Excel support",
|
"ext-zip": "ODT and Excel support",
|
||||||
"ext-xml": "Excel support",
|
"ext-xml": "Excel support",
|
||||||
"firephp/firephp-core": "Logging to Firebug console support",
|
"firephp/firephp-core": "Logging to Firebug console support"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ provided with a standard release.
|
|||||||
|
|
||||||
|
|
||||||
There is also some documentation on Dolibarr Wiki:
|
There is also some documentation on Dolibarr Wiki:
|
||||||
http://wiki.dolibarr.org/
|
https://wiki.dolibarr.org/
|
||||||
and
|
and
|
||||||
http://www.dolibarr.org/html_doxygen/index.html
|
https://doxygen.dolibarr.org/
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
@@ -9,6 +9,7 @@
|
|||||||
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
|
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
|
||||||
<exclude-pattern type="relative">htdocs/conf.php</exclude-pattern>
|
<exclude-pattern type="relative">htdocs/conf.php</exclude-pattern>
|
||||||
<exclude-pattern type="relative">*/nltechno*</exclude-pattern>
|
<exclude-pattern type="relative">*/nltechno*</exclude-pattern>
|
||||||
|
<exclude-pattern type="relative">*/htdocs/includes</exclude-pattern>
|
||||||
|
|
||||||
<!-- List of all tests -->
|
<!-- List of all tests -->
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
@@ -2,24 +2,32 @@ README (English)
|
|||||||
--------------------------------
|
--------------------------------
|
||||||
This directory contains PHP script samples that can be used to start a development on Dolibarr.
|
This directory contains PHP script samples that can be used to start a development on Dolibarr.
|
||||||
|
|
||||||
build_class_from_table.php:
|
|
||||||
|
*** build_class_from_table.php:
|
||||||
|
|
||||||
This is the script to use to generate PHP code of a PHP POJO class
|
This is the script to use to generate PHP code of a PHP POJO class
|
||||||
object, a PHP script that use this POJO. This script use the files
|
object, a PHP script that use this POJO. This script use the files
|
||||||
skeleton_*.php to build its generated code.
|
skeleton_*.php to build its generated code.
|
||||||
|
|
||||||
|
|
||||||
modMyModule.class.php:
|
*** modMyModule.class.php:
|
||||||
|
|
||||||
Is a sample of module descriptor that you can use if you want to build a new module/plugin for
|
Is a sample of module descriptor that you can use if you want to build a new module/plugin for
|
||||||
Dolibarr.
|
Dolibarr.
|
||||||
|
|
||||||
|
|
||||||
skeleton_script.php:
|
*** skeleton_script.php:
|
||||||
|
|
||||||
Is a sample you can use as an example if you need to build a script to run on command line
|
Is a sample you can use as an example if you need to build a script to run on command line
|
||||||
|
|
||||||
skeleton_page.php:
|
|
||||||
|
*** skeleton_page.php:
|
||||||
|
|
||||||
Is a sample you can use as an example if you need to build an HTML page to include in Dolibarr GUI.
|
Is a sample you can use as an example if you need to build an HTML page to include in Dolibarr GUI.
|
||||||
|
|
||||||
skeleton_class.class.php:
|
|
||||||
|
*** skeleton_class.class.php:
|
||||||
|
|
||||||
Is a sample you can use as an example if you need to build a class file to access a new table required by a Dolibarr development.
|
Is a sample you can use as an example if you need to build a class file to access a new table required by a Dolibarr development.
|
||||||
However it is better to run the build_class_from_table.php script that accepts a table name as a parameter and will uses the description table within database and the skeleton_class.class.php file to generate full code for your class file.
|
However it is better to run the build_class_from_table.php script that accepts a table name as a parameter and will uses the description table within database and the skeleton_class.class.php file to generate full code for your class file.
|
||||||
After running this script, the class to access your table (insert a record, update, delete and select) is directly finished and can be used by your module's code.
|
After running this script, the class to access your table (insert a record, update, delete and select) is directly finished and can be used by your module's code.
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class modMyModule extends DolibarrModules
|
|||||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||||
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
|
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
|
||||||
$this->description = "Description of module MyModule";
|
$this->description = "Description of module MyModule";
|
||||||
$this->descriptionlong = "A very lon description. Can be a full HTML content";
|
$this->descriptionlong = "A very long description. Can be a full HTML content";
|
||||||
$this->editor_name = 'Editor name';
|
$this->editor_name = 'Editor name';
|
||||||
$this->editor_url = 'http://www.dolibarr.org';
|
$this->editor_url = 'http://www.dolibarr.org';
|
||||||
|
|
||||||
@@ -105,9 +105,9 @@ class modMyModule extends DolibarrModules
|
|||||||
|
|
||||||
// Dependencies
|
// Dependencies
|
||||||
$this->hidden = false; // A condition to hide module
|
$this->hidden = false; // A condition to hide module
|
||||||
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
|
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
|
||||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||||
$this->conflictwith = array(); // List of modules id this module is in conflict with
|
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||||
$this->phpmin = array(5,0); // Minimum version of PHP required by module
|
$this->phpmin = array(5,0); // Minimum version of PHP required by module
|
||||||
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
|
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
|
||||||
$this->langfiles = array("mylangfile@mymodule");
|
$this->langfiles = array("mylangfile@mymodule");
|
||||||
|
|||||||
@@ -93,12 +93,12 @@ class SkeletonApi extends DolibarrApi
|
|||||||
* @param string $sortorder Sort order
|
* @param string $sortorder Sort order
|
||||||
* @param int $limit Limit for list
|
* @param int $limit Limit for list
|
||||||
* @param int $page Page number
|
* @param int $page Page number
|
||||||
*
|
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101') or (t.import_key:=:'20160101')"
|
||||||
* @return array Array of skeleton objects
|
* @return array Array of skeleton objects
|
||||||
*
|
*
|
||||||
* @url GET /skeletons/
|
* @url GET /skeletons/
|
||||||
*/
|
*/
|
||||||
function getList($mode, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
function index($mode, $sortfield = "t.rowid", $sortorder = 'ASC', $limit = 0, $page = 0, $sqlfilters = '') {
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
|
|
||||||
$obj_ret = array();
|
$obj_ret = array();
|
||||||
@@ -124,18 +124,19 @@ class SkeletonApi extends DolibarrApi
|
|||||||
if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND s.fk_soc = sc.fk_soc";
|
if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND s.fk_soc = sc.fk_soc";
|
||||||
if ($socid) $sql.= " AND s.fk_soc = ".$socid;
|
if ($socid) $sql.= " AND s.fk_soc = ".$socid;
|
||||||
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale
|
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale
|
||||||
|
|
||||||
// Insert sale filter
|
// Insert sale filter
|
||||||
if ($search_sale > 0)
|
if ($search_sale > 0)
|
||||||
{
|
{
|
||||||
$sql .= " AND sc.fk_user = ".$search_sale;
|
$sql .= " AND sc.fk_user = ".$search_sale;
|
||||||
}
|
}
|
||||||
|
if ($sqlfilters)
|
||||||
$nbtotalofrecords = 0;
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
if (! DolibarrApi::_checkFilters($sqlfilters))
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
{
|
||||||
|
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
|
||||||
|
}
|
||||||
|
$regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
|
||||||
|
$sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql.= $db->order($sortfield, $sortorder);
|
$sql.= $db->order($sortfield, $sortorder);
|
||||||
|
|||||||
@@ -59,25 +59,27 @@ $myparam = GETPOST('myparam','alpha');
|
|||||||
$search_field1=GETPOST("search_field1");
|
$search_field1=GETPOST("search_field1");
|
||||||
$search_field2=GETPOST("search_field2");
|
$search_field2=GETPOST("search_field2");
|
||||||
|
|
||||||
|
if (empty($action) && empty($id) && empty($ref)) $action='view';
|
||||||
|
|
||||||
// Protection if external user
|
// Protection if external user
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
//accessforbidden();
|
//accessforbidden();
|
||||||
}
|
}
|
||||||
|
//$result = restrictedArea($user, 'mymodule', $id);
|
||||||
|
|
||||||
if (empty($action) && empty($id) && empty($ref)) $action='list';
|
|
||||||
|
|
||||||
// Load object if id or ref is provided as parameter
|
$object = new Skeleton_Class($db);
|
||||||
$object=new Skeleton_Class($db);
|
$extrafields = new ExtraFields($db);
|
||||||
if (($id > 0 || ! empty($ref)) && $action != 'add')
|
|
||||||
{
|
// fetch optionals attributes and labels
|
||||||
$result=$object->fetch($id,$ref);
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
if ($result < 0) dol_print_error($db);
|
|
||||||
}
|
// Load object
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('skeleton'));
|
$hookmanager->initHooks(array('skeleton'));
|
||||||
$extrafields = new ExtraFields($db);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -281,8 +283,13 @@ if (($id || $ref) && $action == 'edit')
|
|||||||
|
|
||||||
|
|
||||||
// Part to show record
|
// Part to show record
|
||||||
if ($id && (empty($action) || $action == 'view' || $action == 'delete'))
|
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create')))
|
||||||
{
|
{
|
||||||
|
$res = $object->fetch_optionals($object->id, $extralabels);
|
||||||
|
|
||||||
|
$head = commande_prepare_head($object);
|
||||||
|
dol_fiche_head($head, 'order', $langs->trans("CustomerOrder"), 0, 'order');
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("MyModule"));
|
print load_fiche_titre($langs->trans("MyModule"));
|
||||||
|
|
||||||
dol_fiche_head();
|
dol_fiche_head();
|
||||||
@@ -293,7 +300,7 @@ if ($id && (empty($action) || $action == 'view' || $action == 'delete'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="border centpercent">'."\n";
|
print '<table class="border centpercent">'."\n";
|
||||||
// print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input class="flat" type="text" size="36" name="label" value="'.$label.'"></td></tr>';
|
// print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td>'.$object->label.'</td></tr>';
|
||||||
// LIST_OF_TD_LABEL_FIELDS_VIEW
|
// LIST_OF_TD_LABEL_FIELDS_VIEW
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@@ -164,10 +164,14 @@ class Skeleton_Class extends CommonObject
|
|||||||
$sql .= ' t.field2';
|
$sql .= ' t.field2';
|
||||||
//...
|
//...
|
||||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
|
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
|
||||||
|
$sql.= ' WHERE 1 = 1';
|
||||||
|
if (! empty($conf->multicompany->enabled)) {
|
||||||
|
$sql .= " AND entity IN (" . getEntity("skeleton", 1) . ")";
|
||||||
|
}
|
||||||
if (null !== $ref) {
|
if (null !== $ref) {
|
||||||
$sql .= ' WHERE t.ref = ' . '\'' . $ref . '\'';
|
$sql .= ' AND t.ref = ' . '\'' . $ref . '\'';
|
||||||
} else {
|
} else {
|
||||||
$sql .= ' WHERE t.rowid = ' . $id;
|
$sql .= ' AND t.rowid = ' . $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
@@ -181,6 +185,16 @@ class Skeleton_Class extends CommonObject
|
|||||||
$this->prop2 = $obj->field2;
|
$this->prop2 = $obj->field2;
|
||||||
//...
|
//...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Retrieve all extrafields for invoice
|
||||||
|
// fetch optionals attributes and labels
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
|
$extrafields=new ExtraFields($this->db);
|
||||||
|
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||||
|
$this->fetch_optionals($this->id,$extralabels);
|
||||||
|
|
||||||
|
// $this->fetch_lines();
|
||||||
|
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
if ($numrows) {
|
if ($numrows) {
|
||||||
@@ -226,16 +240,20 @@ class Skeleton_Class extends CommonObject
|
|||||||
$sqlwhere [] = $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
|
$sqlwhere [] = $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (count($sqlwhere) > 0) {
|
$sql.= ' WHERE 1 = 1';
|
||||||
$sql .= ' WHERE ' . implode(' '.$filtermode.' ', $sqlwhere);
|
if (! empty($conf->multicompany->enabled)) {
|
||||||
|
$sql .= " AND entity IN (" . getEntity("skeleton", 1) . ")";
|
||||||
|
}
|
||||||
|
if (count($sqlwhere) > 0) {
|
||||||
|
$sql .= ' AND ' . implode(' '.$filtermode.' ', $sqlwhere);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($sortfield)) {
|
if (!empty($sortfield)) {
|
||||||
$sql .= $this->db->order($sortfield,$sortorder);
|
$sql .= $this->db->order($sortfield,$sortorder);
|
||||||
}
|
}
|
||||||
if (!empty($limit)) {
|
if (!empty($limit)) {
|
||||||
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
@@ -355,6 +373,8 @@ class Skeleton_Class extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If you need to delete child tables to, you can insert them here
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element;
|
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element;
|
||||||
$sql .= ' WHERE rowid=' . $this->id;
|
$sql .= ' WHERE rowid=' . $this->id;
|
||||||
@@ -427,41 +447,55 @@ class Skeleton_Class extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a link to the user card (with optionaly the picto)
|
* Return a link to the object card (with optionaly the picto)
|
||||||
* Use this->id,this->lastname, this->firstname
|
|
||||||
*
|
*
|
||||||
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
||||||
* @param string $option On what the link point to
|
* @param string $option On what the link point to
|
||||||
* @param integer $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @param int $maxlen Max length of visible user name
|
* @param int $maxlen Max length of visible user name
|
||||||
* @param string $morecss Add more css on link
|
* @param string $morecss Add more css on link
|
||||||
* @return string String with URL
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='')
|
function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='')
|
||||||
{
|
{
|
||||||
global $langs, $conf, $db;
|
global $db, $conf, $langs;
|
||||||
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
||||||
global $menumanager;
|
global $menumanager;
|
||||||
|
|
||||||
|
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||||
|
|
||||||
$result = '';
|
$result = '';
|
||||||
$companylink = '';
|
$companylink = '';
|
||||||
|
|
||||||
$label = '<u>' . $langs->trans("MyModule") . '</u>';
|
$label = '<u>' . $langs->trans("MyModule") . '</u>';
|
||||||
$label.= '<div width="100%">';
|
$label.= '<br>';
|
||||||
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||||
|
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/mymodule/card.php?id='.$this->id.'"';
|
$url = DOL_URL_ROOT.'/mymodule/'.$this->table_name.'_card.php?id='.$this->id;
|
||||||
$link.= ($notooltip?'':' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip'.($morecss?' '.$morecss:'').'"');
|
|
||||||
$link.= '>';
|
$linkclose='';
|
||||||
|
if (empty($notooltip))
|
||||||
|
{
|
||||||
|
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
|
{
|
||||||
|
$label=$langs->trans("ShowProject");
|
||||||
|
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||||
|
}
|
||||||
|
$linkclose.=' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
|
$linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
|
||||||
|
}
|
||||||
|
else $linkclose = ($morecss?' class="'.$morecss.'"':'');
|
||||||
|
|
||||||
|
$linkstart = '<a href="'.$url.'"';
|
||||||
|
$linkstart.=$linkclose.'>';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|
||||||
if ($withpicto)
|
if ($withpicto)
|
||||||
{
|
{
|
||||||
$result.=($link.img_object(($notooltip?'':$label), 'label', ($notooltip?'':'class="classfortooltip"')).$linkend);
|
$result.=($linkstart.img_object(($notooltip?'':$label), 'label', ($notooltip?'':'class="classfortooltip"')).$linkend);
|
||||||
if ($withpicto != 2) $result.=' ';
|
if ($withpicto != 2) $result.=' ';
|
||||||
}
|
}
|
||||||
$result.= $link . $this->ref . $linkend;
|
$result.= $linkstart . $this->ref . $linkend;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,13 +511,13 @@ class Skeleton_Class extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoi le libelle d'un status donne
|
* Return the status
|
||||||
*
|
*
|
||||||
* @param int $status Id status
|
* @param int $status Id status
|
||||||
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 5=Long label + Picto
|
||||||
* @return string Label of status
|
* @return string Label of status
|
||||||
*/
|
*/
|
||||||
function LibStatut($status,$mode=0)
|
static function LibStatut($status,$mode=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@@ -518,6 +552,11 @@ class Skeleton_Class extends CommonObject
|
|||||||
if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
|
if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
|
||||||
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
|
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
|
||||||
}
|
}
|
||||||
|
if ($mode == 6)
|
||||||
|
{
|
||||||
|
if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
|
||||||
|
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ $action = GETPOST('action','alpha');
|
|||||||
$backtopage = GETPOST('backtopage');
|
$backtopage = GETPOST('backtopage');
|
||||||
$myparam = GETPOST('myparam','alpha');
|
$myparam = GETPOST('myparam','alpha');
|
||||||
|
|
||||||
|
$search_all=trim(GETPOST("sall"));
|
||||||
$search_field1=GETPOST("search_field1");
|
$search_field1=GETPOST("search_field1");
|
||||||
$search_field2=GETPOST("search_field2");
|
$search_field2=GETPOST("search_field2");
|
||||||
$search_myfield=GETPOST('search_myfield');
|
$search_myfield=GETPOST('search_myfield');
|
||||||
@@ -141,22 +142,23 @@ $parameters=array();
|
|||||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
if (empty($reshook))
|
||||||
|
|
||||||
// Purge search criteria
|
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
|
||||||
{
|
{
|
||||||
|
// Selection of new fields
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
|
|
||||||
|
// Purge search criteria
|
||||||
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
|
||||||
|
{
|
||||||
$search_field1='';
|
$search_field1='';
|
||||||
$search_field2='';
|
$search_field2='';
|
||||||
$search_date_creation='';
|
$search_date_creation='';
|
||||||
$search_date_update='';
|
$search_date_update='';
|
||||||
$toselect='';
|
$toselect='';
|
||||||
$search_array_options=array();
|
$search_array_options=array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mass actions
|
||||||
if (empty($reshook))
|
|
||||||
{
|
|
||||||
$objectclass='Skeleton';
|
$objectclass='Skeleton';
|
||||||
$objectlabel='Skeleton';
|
$objectlabel='Skeleton';
|
||||||
$permtoread = $user->rights->skeleton->read;
|
$permtoread = $user->rights->skeleton->read;
|
||||||
@@ -180,7 +182,6 @@ $form=new Form($db);
|
|||||||
//$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
|
//$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
|
||||||
$help_url='';
|
$help_url='';
|
||||||
$title = $langs->trans('MyModuleListTitle');
|
$title = $langs->trans('MyModuleListTitle');
|
||||||
llxHeader('', $title, $help_url);
|
|
||||||
|
|
||||||
// Put here content of your page
|
// Put here content of your page
|
||||||
|
|
||||||
@@ -247,83 +248,97 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
|
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
$sql.= $db->plimit($limit+1, $offset);
|
||||||
|
|
||||||
|
|
||||||
dol_syslog($script_file, LOG_DEBUG);
|
dol_syslog($script_file, LOG_DEBUG);
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
dol_print_error($db);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
$params='';
|
// Direct jump if only one record found
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all)
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
{
|
||||||
if ($search_field1 != '') $params.= '&search_field1='.urlencode($search_field1);
|
$obj = $db->fetch_object($resql);
|
||||||
if ($search_field2 != '') $params.= '&search_field2='.urlencode($search_field2);
|
$id = $obj->rowid;
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
header("Location: ".DOL_URL_ROOT.'/skeleton/card.php?id='.$id);
|
||||||
// Add $param from extra fields
|
exit;
|
||||||
foreach ($search_array_options as $key => $val)
|
}
|
||||||
{
|
|
||||||
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
|
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||||
|
|
||||||
|
$param='';
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
|
if ($search_field1 != '') $param.= '&search_field1='.urlencode($search_field1);
|
||||||
|
if ($search_field2 != '') $param.= '&search_field2='.urlencode($search_field2);
|
||||||
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
|
// Add $param from extra fields
|
||||||
|
foreach ($search_array_options as $key => $val)
|
||||||
|
{
|
||||||
$crit=$val;
|
$crit=$val;
|
||||||
$tmpkey=preg_replace('/search_options_/','',$key);
|
$tmpkey=preg_replace('/search_options_/','',$key);
|
||||||
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
|
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
|
||||||
}
|
}
|
||||||
|
|
||||||
$arrayofmassactions = array(
|
$arrayofmassactions = array(
|
||||||
'presend'=>$langs->trans("SendByMail"),
|
'presend'=>$langs->trans("SendByMail"),
|
||||||
'builddoc'=>$langs->trans("PDFMerge"),
|
'builddoc'=>$langs->trans("PDFMerge"),
|
||||||
);
|
);
|
||||||
if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
|
if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
|
||||||
if ($massaction == 'presend') $arrayofmassactions=array();
|
if ($massaction == 'presend') $arrayofmassactions=array();
|
||||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||||
|
|
||||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
||||||
|
|
||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||||
}
|
}
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escpae_htmltag($search_myfield).'">';
|
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
|
||||||
$moreforfilter.= '</div>';
|
$moreforfilter.= '</div>';
|
||||||
|
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
||||||
else $moreforfilter = $hookmanager->resPrint;
|
else $moreforfilter = $hookmanager->resPrint;
|
||||||
|
|
||||||
if (! empty($moreforfilter))
|
if (! empty($moreforfilter))
|
||||||
{
|
{
|
||||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||||
print $moreforfilter;
|
print $moreforfilter;
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||||
|
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
// Fields title
|
// Fields title
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
// LIST_OF_TD_TITLE_FIELDS
|
// LIST_OF_TD_TITLE_FIELDS
|
||||||
//if (! empty($arrayfields['t.field1']['checked'])) print_liste_field_titre($arrayfields['t.field1']['label'],$_SERVER['PHP_SELF'],'t.field1','',$params,'',$sortfield,$sortorder);
|
//if (! empty($arrayfields['t.field1']['checked'])) print_liste_field_titre($arrayfields['t.field1']['label'],$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder);
|
||||||
//if (! empty($arrayfields['t.field2']['checked'])) print_liste_field_titre($arrayfields['t.field2']['label'],$_SERVER['PHP_SELF'],'t.field2','',$params,'',$sortfield,$sortorder);
|
//if (! empty($arrayfields['t.field2']['checked'])) print_liste_field_titre($arrayfields['t.field2']['label'],$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
foreach($extrafields->attribute_label as $key => $val)
|
foreach($extrafields->attribute_label as $key => $val)
|
||||||
{
|
{
|
||||||
if (! empty($arrayfields["ef.".$key]['checked']))
|
if (! empty($arrayfields["ef.".$key]['checked']))
|
||||||
@@ -332,25 +347,25 @@ if ($resql)
|
|||||||
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
|
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters=array('arrayfields'=>$arrayfields);
|
$parameters=array('arrayfields'=>$arrayfields);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['t.datec']['checked'])) print_liste_field_titre($arrayfields['t.datec']['label'],$_SERVER["PHP_SELF"],"t.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
if (! empty($arrayfields['t.datec']['checked'])) print_liste_field_titre($arrayfields['t.datec']['label'],$_SERVER["PHP_SELF"],"t.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'],$_SERVER["PHP_SELF"],"t.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'],$_SERVER["PHP_SELF"],"t.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||||
//if (! empty($arrayfields['t.status']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder);
|
//if (! empty($arrayfields['t.status']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
// Fields title search
|
// Fields title search
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
// LIST_OF_TD_TITLE_SEARCH
|
// LIST_OF_TD_TITLE_SEARCH
|
||||||
//if (! empty($arrayfields['t.field1']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field1" value="'.$search_field1.'" size="10"></td>';
|
//if (! empty($arrayfields['t.field1']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field1" value="'.$search_field1.'" size="10"></td>';
|
||||||
//if (! empty($arrayfields['t.field2']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field2" value="'.$search_field2.'" size="10"></td>';
|
//if (! empty($arrayfields['t.field2']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field2" value="'.$search_field2.'" size="10"></td>';
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
foreach($extrafields->attribute_label as $key => $val)
|
foreach($extrafields->attribute_label as $key => $val)
|
||||||
{
|
{
|
||||||
if (! empty($arrayfields["ef.".$key]['checked']))
|
if (! empty($arrayfields["ef.".$key]['checked']))
|
||||||
@@ -370,43 +385,43 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters=array('arrayfields'=>$arrayfields);
|
$parameters=array('arrayfields'=>$arrayfields);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['t.datec']['checked']))
|
if (! empty($arrayfields['t.datec']['checked']))
|
||||||
{
|
{
|
||||||
// Date creation
|
// Date creation
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['t.tms']['checked']))
|
if (! empty($arrayfields['t.tms']['checked']))
|
||||||
{
|
{
|
||||||
// Date modification
|
// Date modification
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
/*if (! empty($arrayfields['u.statut']['checked']))
|
/*if (! empty($arrayfields['u.statut']['checked']))
|
||||||
{
|
{
|
||||||
// Status
|
// Status
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut);
|
print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}*/
|
}*/
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||||
print $searchpitco;
|
print $searchpitco;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
|
||||||
$i=0;
|
$i=0;
|
||||||
$var=true;
|
$var=true;
|
||||||
$totalarray=array();
|
$totalarray=array();
|
||||||
while ($i < min($num, $limit))
|
while ($i < min($num, $limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if ($obj)
|
if ($obj)
|
||||||
{
|
{
|
||||||
@@ -486,11 +501,11 @@ if ($resql)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show total line
|
// Show total line
|
||||||
if (isset($totalarray['totalhtfield']))
|
if (isset($totalarray['totalhtfield']))
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $totalarray['nbfield'])
|
while ($i < $totalarray['nbfield'])
|
||||||
@@ -507,21 +522,21 @@ if ($resql)
|
|||||||
else print '<td></td>';
|
else print '<td></td>';
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
|
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
||||||
{
|
{
|
||||||
// Show list of available documents
|
// Show list of available documents
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
@@ -530,22 +545,11 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->facture->lire;
|
$genallowed=$user->rights->facture->lire;
|
||||||
$delallowed=$user->rights->facture->lire;
|
$delallowed=$user->rights->facture->lire;
|
||||||
|
|
||||||
print '<br><a name="show_files"></a>';
|
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||||
$paramwithoutshowfiles=preg_replace('/show_files=1&?/','',$param);
|
|
||||||
$title=$langs->trans("MassFilesArea").' <a href="'.$_SERVER["PHP_SELF"].'?'.$paramwithoutshowfiles.'">('.$langs->trans("Hide").')</a>';
|
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$error++;
|
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
||||||
dol_print_error($db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ fi
|
|||||||
|
|
||||||
if [ "x$1" = "xlist" ]
|
if [ "x$1" = "xlist" ]
|
||||||
then
|
then
|
||||||
|
echo "Search duplicate keys into en_US lang files (there is no cross file check)"
|
||||||
for file in `find htdocs/langs/en_US -name *.lang -type f`
|
for file in `find htdocs/langs/en_US -name *.lang -type f`
|
||||||
do
|
do
|
||||||
dupes=$(
|
dupes=$(
|
||||||
@@ -16,6 +16,7 @@ fi
|
|||||||
# To detect
|
# To detect
|
||||||
if [ "x$1" = "xlist" ]
|
if [ "x$1" = "xlist" ]
|
||||||
then
|
then
|
||||||
|
echo "Search duplicate line for lang en_US"
|
||||||
for file in `find htdocs/langs/en_US -type f -name *.lang`
|
for file in `find htdocs/langs/en_US -type f -name *.lang`
|
||||||
do
|
do
|
||||||
if [ `sort "$file" | grep -v '^$' | uniq -d | wc -l` -gt 0 ]
|
if [ `sort "$file" | grep -v '^$' | uniq -d | wc -l` -gt 0 ]
|
||||||
@@ -29,6 +30,7 @@ fi
|
|||||||
# To fix
|
# To fix
|
||||||
if [ "x$1" = "xfix" ]
|
if [ "x$1" = "xfix" ]
|
||||||
then
|
then
|
||||||
|
echo "Fix duplicate line for lang en_US"
|
||||||
for file in `find htdocs/langs/en_US -type f -name *.lang`
|
for file in `find htdocs/langs/en_US -type f -name *.lang`
|
||||||
do
|
do
|
||||||
awk -i inplace ' !x[$0]++' "$file"
|
awk -i inplace ' !x[$0]++' "$file"
|
||||||