Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
c6e4206907
@ -43,6 +43,7 @@ For users:
|
||||
- New: Chart are faster to build
|
||||
- New: Value of data into charts are visible on mouse hover.
|
||||
- New: Import wizard can import contacts.
|
||||
- New: Install process is now two times faster.
|
||||
- Fix: Can use POS module with several concurrent users.
|
||||
|
||||
For developers:
|
||||
@ -53,6 +54,7 @@ For developers:
|
||||
- New: Log module outputs can be setup with "or" rule (not only "xor").
|
||||
- New: Add FirePHP output for logging module.
|
||||
- New: Add trigger ACTION_DELETE and ACTION_MODIFY.
|
||||
- New: Trigger now have a priority to define sort execution order.
|
||||
- New: Can define different requests according to database type into migration files.
|
||||
- New: Add "canvas" feature to overwrite page of thirdparty, contact, product with yours.
|
||||
- New: Removed artichow deprecated libraries.
|
||||
|
||||
@ -24,6 +24,9 @@ Url depends on choice made on first step:
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
or
|
||||
|
||||
http://localhost/dolibarr/install/
|
||||
or
|
||||
|
||||
http://yourdolibarrvirtualhost/install/
|
||||
|
||||
- Follow instructions provided by installer...
|
||||
@ -45,7 +48,10 @@ This URL should looks like:
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
or
|
||||
|
||||
http://yourdolibarrhost/install/index.php
|
||||
http://localhost/dolibarr/install/
|
||||
or
|
||||
|
||||
http://yourdolibarrhost/install/
|
||||
|
||||
Then choose the "update" option according to your case.
|
||||
Note: Migrate process can be ran safely several times.
|
||||
|
||||
@ -1,103 +0,0 @@
|
||||
README (english)
|
||||
--------------------------------
|
||||
Starter documentation
|
||||
--------------------------------
|
||||
|
||||
1) Install Dolibarr
|
||||
2) Upgrade Dolibarr from an older version
|
||||
3) What's new in this version
|
||||
4) What Dolibarr can do
|
||||
5) What Dolibarr can't do yet, todo list
|
||||
|
||||
|
||||
I - DOLIBARR INSTALL
|
||||
--------------------
|
||||
|
||||
Dolibarr files and its dependencies are automatically installed when you install
|
||||
the dolibarr Debian package.
|
||||
|
||||
Once package is installed, go on menu entry called Dolibarr or use your web browser
|
||||
to call page http://localhost/dolibarr
|
||||
|
||||
|
||||
|
||||
II - DOLIBARR UPGRADE
|
||||
---------------------
|
||||
|
||||
Dolibarr files and its dependencies are automatically upgraded when you install
|
||||
the dolibarr Debian package.
|
||||
|
||||
Once new package is installed, go on menu entry called Dolibarr or use your web browser
|
||||
to call page http://localhost/dolibarr
|
||||
If a database upgrade is required, you will be prompted to.
|
||||
|
||||
|
||||
|
||||
III - WHAT'S NEW
|
||||
----------------
|
||||
|
||||
See ChangeLog file.
|
||||
|
||||
|
||||
|
||||
IV - WHAT DOLIBARR CAN DO
|
||||
-------------------------
|
||||
|
||||
Main modules/features:
|
||||
- Products and services catalog
|
||||
- Customers, Prospects or Suppliers directory
|
||||
- Address book
|
||||
- Stock management
|
||||
- Bank accounts management
|
||||
- Orders management with PDF export
|
||||
- Commercial proposals management with PDF export
|
||||
- Contracts management
|
||||
- Invoices management with PDF export
|
||||
- Payments management
|
||||
- Standing orders management
|
||||
- Shipping management
|
||||
- ECM (Electronic Content Management)
|
||||
- EMailings
|
||||
- Agenda with ical,vcal export for third tools integration
|
||||
- Management of foundation members
|
||||
- Donation management
|
||||
|
||||
Other modules:
|
||||
- Bookmarks management
|
||||
- Can reports Dolibarr events inside Webcalendar or Phenix
|
||||
- Data export tools
|
||||
- LDAP connectivity
|
||||
- Third parties or products categories
|
||||
- ClickToDial phone numbers
|
||||
- RSS
|
||||
|
||||
Miscellanous:
|
||||
- Mutli-user, with several permissions levels for each feature.
|
||||
- Serveral menu managers (can be used by internal users, as a back-office,
|
||||
with a particular menu, or by external users, as a front-office, with
|
||||
another menu and permissions).
|
||||
- Very user friendly and easy to use.
|
||||
- Optional WYSIWYG forms, optional Ajax forms.
|
||||
- Several skins.
|
||||
- Code is highly customizable (a lot of use of modules and submodules).
|
||||
- Works with Mysql 3.1 or higher, experimental support for PostgreSql.
|
||||
- Works with PHP 4.3 or higher.
|
||||
- An easy to understand and maintain code (PHP with no heavy frameworks).
|
||||
- A trigger architecture to allow you to make Dolibarr business events run
|
||||
PHP code to update your own information system.
|
||||
- "NPR VAT Rate" (French particularity for managing VAT in DOM-TOM
|
||||
called "Non Perçue Récupérable").
|
||||
|
||||
|
||||
|
||||
V - WHAT DOLIBARR CAN'T DO YET (TODO LIST)
|
||||
------------------------------------------
|
||||
This is features that Dolibarr does not support completely yet:
|
||||
- Accountancy.
|
||||
- Dolibarr can manage only one currency.
|
||||
- Dolibarr does not support the double Canadian Tax.
|
||||
- Dolibarr does not make coffee (not yet).
|
||||
- Stock management with option increase/decrease on invoice works on
|
||||
warehouse number one only (no way to choose warehouse).
|
||||
- Stock management with option increase/decrease on orders works on
|
||||
warehouse number one only (no way to choose warehouse).
|
||||
@ -17,8 +17,10 @@ with format .DEB (for Debian, Ubuntu, ...).
|
||||
#
|
||||
# gpg --gen-key Generate a GPG key
|
||||
#
|
||||
# debconf-updatepo To run into po dir to regenate templates.pot
|
||||
# podebconf-report-po --from eldy@destailleur.fr To send email to ask translations
|
||||
# debconf-updatepo To run into po dir to regenate templates.pot
|
||||
# podebconf-report-po --from email@email.com To send email to ask translations
|
||||
# Edit manually file XX.po and remove all lines "#, fuzzy" when translation is complete
|
||||
# msgfmt -v -c -o /dev/null XX.po To have status of translation for language XX
|
||||
#
|
||||
# lintian --pedantic -E -I package.deb To test a package
|
||||
#
|
||||
12
build/debian/README.source
Normal file
12
build/debian/README.source
Normal file
@ -0,0 +1,12 @@
|
||||
==================================================================
|
||||
Dolibarr - Web based software to manage a small company or foundation
|
||||
==================================================================
|
||||
|
||||
|
||||
Note for package maintainers
|
||||
----------------------------
|
||||
This file explains how to modify official sources (from http://www.dolibarr.org)
|
||||
to have ready to use source files to build a debian package.
|
||||
|
||||
All changes are included into patch file
|
||||
build/debian/install.patch
|
||||
@ -6,4 +6,4 @@ dolibarr (3.2.0+nmu1) unstable; urgency=low
|
||||
|
||||
-- Dolibarr team <contact@dolibarr.org> Mon, 10 Aug 2011 12:00:00 +0100
|
||||
|
||||
# For a changelog file dedicated to users, see /usr/share/doc/dolibarr/UserChangeLog.gz file.
|
||||
# For a changelog file dedicated to end users, see /usr/share/doc/dolibarr/ChangeLog.gz
|
||||
@ -4,7 +4,7 @@ Standards-Version: 3.9.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Homepage: http://www.dolibarr.org
|
||||
Build-Depends: debhelper (>= 7), po-debconf
|
||||
Build-Depends: debhelper (>= 7), po-debconf, dpatch
|
||||
|
||||
Package: dolibarr
|
||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||
|
||||
@ -5,24 +5,39 @@ Source: git@github.com:Dolibarr/dolibarr.git
|
||||
|
||||
Files: *
|
||||
Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
2003-2011, Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
2004-2011, Regis Houssin <regis@dolibarr.fr>
|
||||
2006-2011, Auguria SARL <info@auguria.org>
|
||||
2010-2011, Juanjo Menent <jmenent@2byte.es>
|
||||
2003-2006, Jean-Louis Bergamo <jlb@j1b.org>
|
||||
2003-2012, Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
2003, Xavier Dutoit <doli@sydesy.com>
|
||||
2004-2012, Regis Houssin <regis@dolibarr.fr>
|
||||
2004, Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
2004, Benoit Mortier <benoit.mortier@opensides.be>
|
||||
2004, Christophe Combelles <ccomb@free.fr>
|
||||
2004, Guillaume Delecourt <guillaume.delecourt@opensides.be>
|
||||
2004, Eric Seigne <eric.seigne@ryxeo.com>
|
||||
2005, Brice Davoleau <brice.davoleau@gmail.com>
|
||||
2005, Kai Blankenhorn <kaib@bitfolge.de>
|
||||
2005-2006, Marc Barilley/Ocebo <marc@ocebo.com>
|
||||
2005, Matthieu Valleton <mv@seeschloss.org>
|
||||
2005, Patrick Rouillon <patrick@rouillon.net>
|
||||
2005, Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
2005, Simon TOSSER <simon@kornog-computing.com>
|
||||
2006, Andre Cianfarani <acianfa@free.fr>
|
||||
2006-2011, Auguria SARL <info@auguria.org>
|
||||
2006, Jean Heimburger <jean@tiaris.info>
|
||||
2006, Roman Ozana <ozana@omdesign.cz>
|
||||
2006, Yannick Warnier <ywarnier@beeznest.org>
|
||||
2007, Patrick Raguin <patrick.raguin@gmail.com>
|
||||
2007, Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
|
||||
2007-2008, Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
2008, Matteli <unknown@unknown.com>
|
||||
2008, Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
2010, Francois Legastelois <flegastelois@teclib.com>
|
||||
2010-2012, Juanjo Menent <jmenent@2byte.es>
|
||||
2010-2012, Philippe Grand <philippe.grand@atoo-net.com>
|
||||
2010, Pierre Morin <pierre.morin@auguria.net>
|
||||
2010, Servitux Servicios Informaticos <info@servitux.es>
|
||||
2011, Herve Prot <herve.prot@symeos.com>
|
||||
2011, Remy Younes <ryounes@gmail.com>
|
||||
2012, Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public
|
||||
@ -36,43 +51,13 @@ License: GPL-2+
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this package; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
Files: htdocs/includes/artichow/*
|
||||
Copyright: Artichow team
|
||||
License: Public Domain
|
||||
This work is not subject to copyright in any jurisdiction
|
||||
|
||||
Files: htdocs/includes/ckeditor/*
|
||||
Copyright: CKeditor team
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
.
|
||||
This program is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this package; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
Files: htdocs/includes/fpdi/*
|
||||
Copyright: FPDFI team
|
||||
@ -89,15 +74,14 @@ License: GPL-2+
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this package; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
|
||||
Files: htdocs/includes/jquery/*
|
||||
Copyright: JQuery team
|
||||
License: MIT or GPL-2+
|
||||
@ -113,10 +97,8 @@ License: MIT or GPL-2+
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this package; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
@ -140,11 +122,13 @@ License: MIT or GPL-2+
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
Files: htdocs/includes/jquery/plugins/flot/*
|
||||
Copyright: Flot team
|
||||
License: Public Domain
|
||||
This work is not subject to copyright in any jurisdiction
|
||||
|
||||
|
||||
Files: htdocs/includes/jsgantt/*
|
||||
Copyright: JSGantt team
|
||||
License: GPL-2+
|
||||
@ -160,20 +144,20 @@ License: GPL-2+
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this package; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
|
||||
Files: htdocs/includes/phpexcel/*
|
||||
Copyright: PHPExcel team
|
||||
License: LGPL 2.1
|
||||
See http://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html
|
||||
|
||||
|
||||
Files: htdocs/includes/odtphp/*
|
||||
Copyright: 2008, Julien Pauli
|
||||
2008, Cyril PIERRE de GEYER
|
||||
@ -191,17 +175,15 @@ License: GPL-2+
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this package; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
|
||||
Files: htdocs/includes/tcpdf/*
|
||||
Copyright: TCPDF team
|
||||
License: LGPL 3.0
|
||||
See http://www.gnu.org/licenses/old-licenses/lgpl-3.0-standalone.html
|
||||
|
||||
10
build/debian/dolibarr.doc-base
Normal file
10
build/debian/dolibarr.doc-base
Normal file
@ -0,0 +1,10 @@
|
||||
Document: dolibarr
|
||||
Title: Dolibarr ERP & CRM documentation
|
||||
Author: Dolibarr team
|
||||
Abstract: This documentation covers the install, use and administration of
|
||||
Dolibarr ERP & CRM software.
|
||||
Section: Office
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/dolibarr/index.html
|
||||
Files: /usr/share/doc/dolibarr/*.html
|
||||
13
build/debian/dolibarr.install
Executable file
13
build/debian/dolibarr.install
Executable file
@ -0,0 +1,13 @@
|
||||
debian/dolibarr.desktop usr/share/applications
|
||||
debian/dolibarr.xpm usr/share/pixmaps
|
||||
ChangeLog usr/share/doc/dolibarr
|
||||
README usr/share/doc/dolibarr
|
||||
doc/install usr/share/doc/dolibarr
|
||||
doc/user usr/share/doc/dolibarr
|
||||
doc/index.html usr/share/doc/dolibarr
|
||||
build/debian/apache.conf etc/dolibarr
|
||||
build/debian/lighttpd.conf etc/dolibarr
|
||||
build usr/share/dolibarr
|
||||
dev usr/share/dolibarr
|
||||
htdocs usr/share/dolibarr
|
||||
scripts usr/share/dolibarr
|
||||
@ -1,6 +0,0 @@
|
||||
etc/dolibarr/apache.conf
|
||||
etc/dolibarr/lighttpd.conf
|
||||
usr/share/applications/dolibarr.desktop
|
||||
usr/share/dolibarr
|
||||
usr/share/doc/dolibarr
|
||||
usr/share/pixmaps
|
||||
1
build/debian/patches/00list
Normal file
1
build/debian/patches/00list
Normal file
@ -0,0 +1 @@
|
||||
install.dpatch
|
||||
50
build/debian/patches/install.dpatch
Executable file
50
build/debian/patches/install.dpatch
Executable file
@ -0,0 +1,50 @@
|
||||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## install.patch by <eldy@users.sourceforge.net>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Updates htdocs/filefunc.inc.php
|
||||
## DP: Updates htdocs/install/inc.php
|
||||
## DP: Updates htdocs/support/inc.php
|
||||
|
||||
@DPATCH@
|
||||
|
||||
|
||||
--- old/htdocs/filefunc.inc.php 2011-09-03 02:32:48.666952000 +0200
|
||||
+++ new/htdocs/filefunc.inc.php 2011-09-03 02:33:00.510952001 +0200
|
||||
@@ -64,8 +64,8 @@
|
||||
$conffile = "conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
// For debian/redhat like systems
|
||||
-//$conffile = "/etc/dolibarr/conf.php";
|
||||
-//$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
// Include configuration
|
||||
--- old/htdocs/install/inc.php 2011-09-03 02:33:26.450952000 +0200
|
||||
+++ new/htdocs/install/inc.php 2011-09-03 02:33:36.286952001 +0200
|
||||
@@ -84,8 +84,8 @@
|
||||
$conffile = "../conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
// For debian/redhat like systems
|
||||
-//$conffile = "/etc/dolibarr/conf.php";
|
||||
-//$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
||||
--- old/htdocs/support/inc.php 2011-09-03 02:34:39.606952000 +0200
|
||||
+++ new/htdocs/support/inc.php 2011-09-03 02:33:59.814952000 +0200
|
||||
@@ -79,8 +79,8 @@
|
||||
$conffile = "../conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
// For debian/redhat like systems
|
||||
-//$conffile = "/etc/dolibarr/conf.php";
|
||||
-//$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
$charset="UTF-8"; // If not output format found in any conf file
|
||||
if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
||||
@ -1 +1 @@
|
||||
[type: gettext/rfc822deb] templates
|
||||
[type: gettext/rfc822deb] dolibarr.templates
|
||||
@ -45,7 +45,6 @@ msgstr ""
|
||||
#. Type: boolean
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
#, fuzzy
|
||||
msgid "Delete database and uploaded files ?"
|
||||
msgstr "Effacer la base de donnée et les fichiers uploadés ?"
|
||||
|
||||
@ -53,7 +52,6 @@ msgstr "Effacer la base de donnée et les fichiers uploadés ?"
|
||||
#. Type: boolean
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Answer if you want to removed the Dolibarr MySQL database and all other "
|
||||
"datas (datas related to this question are the Dolibarr DBMS account, all "
|
||||
|
||||
106
build/debian/rules
Normal file → Executable file
106
build/debian/rules
Normal file → Executable file
@ -6,5 +6,107 @@ export DH_OPTIONS=-v
|
||||
|
||||
#export DH_COMPAT=7 # This is the debhelper compatability version to use, now defined into compat file
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
# use dpatch
|
||||
include /usr/share/dpatch/dpatch.make
|
||||
|
||||
|
||||
configure:
|
||||
dh $@
|
||||
|
||||
build: patch
|
||||
dh $@
|
||||
|
||||
build-arch: patch
|
||||
dh $@
|
||||
|
||||
build-indep: patch
|
||||
dh $@
|
||||
|
||||
binary:
|
||||
dh $@
|
||||
|
||||
binary-indep:
|
||||
dh $@
|
||||
|
||||
clean:
|
||||
# Delete files
|
||||
rm -f .buildpath
|
||||
rm -fr .cache
|
||||
rm -fr .git
|
||||
rm -f .gitmodules
|
||||
rm -f .gitignore
|
||||
rm -fr .project
|
||||
rm -fr .settings
|
||||
rm -f build.xml
|
||||
rm -f pom.xml
|
||||
rm -f README.md
|
||||
|
||||
rm -f htdocs/install/mssql/README
|
||||
rm -f htdocs/install/mysql/README
|
||||
rm -f htdocs/install/pgsql/README
|
||||
|
||||
rm -fr dev/codesniffer
|
||||
rm -fr dev/codetemplates
|
||||
rm -fr dev/dbmodel
|
||||
rm -fr dev/initdata
|
||||
rm -fr dev/iso-normes
|
||||
rm -fr dev/ldap
|
||||
rm -fr dev/licence
|
||||
rm -fr dev/mail
|
||||
rm -fr dev/phpcheckstyle
|
||||
rm -fr dev/phpunit
|
||||
rm -fr dev/security
|
||||
rm -fr dev/spec
|
||||
rm -fr dev/test
|
||||
rm -fr dev/uml
|
||||
rm -fr dev/xdebug
|
||||
rm -f dev/dolibarr_changes.txt
|
||||
rm -f dev/README
|
||||
rm -f doc/images/dolibarr_screenshot2.png
|
||||
rm -f doc/images/dolibarr_screenshot3.png
|
||||
rm -f doc/images/dolibarr_screenshot4.png
|
||||
rm -f doc/images/dolibarr_screenshot5.png
|
||||
rm -f doc/images/dolibarr_screenshot6.png
|
||||
rm -f doc/images/dolibarr_screenshot7.png
|
||||
rm -f doc/images/dolibarr_screenshot8.png
|
||||
rm -f doc/images/dolibarr_screenshot9.png
|
||||
rm -f doc/images/dolibarr_screenshot10.png
|
||||
rm -f doc/images/dolibarr_screenshot11.png
|
||||
rm -f doc/images/dolibarr_screenshot12.png
|
||||
|
||||
rm -fr test
|
||||
|
||||
# Licence files are included into copyright file.
|
||||
rm -f htdocs/includes/jquery/plugins/flot/LICENSE.txt
|
||||
rm -fr htdocs/includes/phpexcel/license.txt
|
||||
rm -f htdocs/includes/tcpdf/LICENSE.TXT
|
||||
|
||||
rm -fr htdocs/includes/jquery/plugins/lightbox
|
||||
rm -fr htdocs/includes/jquery/plugins/jstree
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
|
||||
rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33
|
||||
rm -fr htdocs/includes/tcpdf/fonts/freefont-20100919
|
||||
rm -fr htdocs/includes/tcpdf/fonts/utils
|
||||
|
||||
rm -fr build/aps
|
||||
rm -fr build/dmg
|
||||
rm -fr build/doap
|
||||
rm -fr build/exe
|
||||
rm -fr build/launchpad
|
||||
rm -fr build/live
|
||||
rm -fr build/patch
|
||||
rm -fr build/perl
|
||||
rm -fr build/rpm
|
||||
rm -fr build/zip
|
||||
rm -fr htdocs/includes/ckeditor
|
||||
rm -fr htdocs/includes/fonts
|
||||
rm -fr htdocs/includes/geoip
|
||||
rm -fr htdocs/includes/nusoap
|
||||
rm -fr htdocs/includes/odtphp/zip/pclzip
|
||||
|
||||
dh $@
|
||||
|
||||
binary-arch:
|
||||
|
||||
@ -1 +1 @@
|
||||
1.0
|
||||
3.0 (native)
|
||||
@ -0,0 +1,3 @@
|
||||
# watch control file for uscan
|
||||
#version=3
|
||||
#http://http://sourceforge.net/projects/dolibarr/files/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/ debian uupdate
|
||||
@ -107,7 +107,7 @@ Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\m
|
||||
; Mysql data files (does not overwrite if exists)
|
||||
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db"
|
||||
; Dolibarr
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,telephonie\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\install.forced.php,*\modBookmark4u.class.php,*\modDocument.class.php,*\modDroitPret.class.php,*\modEditeur.class.php,*\modPostnuke.class.php,*\modTelephonie.class.php,*\interface_modEditeur_Editeur.class.php*,*\bureau2crea,*\rodolphe"
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,telephonie\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\install.forced.php"
|
||||
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,xdebug\*"
|
||||
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
|
||||
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
|
||||
|
||||
@ -10,34 +10,53 @@ a package onto LaunchPad
|
||||
# This is standard command to work on RPM packaging:
|
||||
#
|
||||
# To install all packagers tools:
|
||||
# apt-get install bzr-builder bzr pbuilder
|
||||
# sudo apt-get install bzr-builder bzr dpatch pbuilder debootstrap devscripts
|
||||
|
||||
To submit a package on LaunchPad:
|
||||
# Init local working env
|
||||
- Create account on launchpad.org
|
||||
- Create Project
|
||||
- Link project to official SCM server
|
||||
- Upload SSH public key onto account
|
||||
- Run from command line: bzr launchpad-login yourlogin
|
||||
- Upload you GPG sign key
|
||||
- Run from command line:
|
||||
bzr launchpad-login yourlogin
|
||||
bzr whoami "Your Name <email@email.com>"
|
||||
- Create a file /.pbuilderrc with content
|
||||
COMPONENTS="main universe multiverse restricted"
|
||||
- Create chroot ubuntu env
|
||||
sudo pbuilder create [--distribution sid|squeeze]
|
||||
- Edit file ~/.bashrc ti add
|
||||
DEBFULLNAME="<Your name>"
|
||||
DEBEMAIL="<Your email address>"
|
||||
|
||||
- Create a debian directory and upload it onto bzr branch ~yourlogin/dolibarr/debian
|
||||
|
||||
- Create an empty directory dolibarr and go into it.
|
||||
# Init package tools for launchpad
|
||||
- Create a Bazaar directory
|
||||
mkdir bzr
|
||||
- Create debian directory and upload it onto bzr branch ~yourlogin/dolibarr/debian
|
||||
cd bzr
|
||||
mkdir debian
|
||||
cd debian
|
||||
bzr init
|
||||
cp -pr dolibarr_root/debian bzr/debian
|
||||
bzr add debian
|
||||
bzr commit -m "Init"
|
||||
bzr push lp:~eldy/dolibarr/debian
|
||||
or download it from launchpad bazaar:
|
||||
cd bzr
|
||||
bzr branch lp:~eldy/dolibarr/debian
|
||||
- Create a file dolibarr.recipe with content
|
||||
# bzr-builder format 0.3 deb-version {debupstream}+{revno}+{revno:packaging}
|
||||
lp:dolibarr
|
||||
merge packaging lp:~eldy/dolibarr/debian
|
||||
cd bzr
|
||||
vi dolibarr.recipe
|
||||
# bzr-builder format 0.3 deb-version {debupstream}+{revno}+{revno:packaging}
|
||||
lp:dolibarr
|
||||
merge packaging lp:~eldy/dolibarr/debian
|
||||
- Run command
|
||||
cd bzr
|
||||
bzr dailydeb dolibarr.recipe working-dir
|
||||
This will create a directory "working-dir" with dolibarr sources and will add sources from ~eldy/dolibarr/debian
|
||||
|
||||
- Create a file /.pbuilderrc with content
|
||||
$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build
|
||||
|
||||
- Create chroot ubuntu env
|
||||
sudo pbuilder create
|
||||
- Test package sources
|
||||
sudo pbuilder build <working-dir>/<project>_<version>.dsc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -280,7 +280,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.old`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.postgres`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/install.lock`;
|
||||
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mssql/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mysql/README`;
|
||||
@ -301,6 +300,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/uml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/xdebug`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/dev/dolibarr_changes.txt`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/dev/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot2.png`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot3.png`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot4.png`;
|
||||
@ -318,11 +319,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT/CVS* $BUILDROOT/$PROJECT/*/CVS* $BUILDROOT/$PROJECT/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/*/*/*/*/*/CVS*`;
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT/.svn $BUILDROOT/$PROJECT/*/.svn $BUILDROOT/$PROJECT/*/*/.svn $BUILDROOT/$PROJECT/*/*/*/.svn $BUILDROOT/$PROJECT/*/*/*/*/.svn`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/fckeditor`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/flot/LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/lightbox`;
|
||||
@ -335,8 +333,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-20100919`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
||||
# Removed because not stable yet
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/bureau2crea`;
|
||||
}
|
||||
|
||||
# Build package for each target
|
||||
@ -347,7 +343,8 @@ if ($nboftargetok) {
|
||||
|
||||
print "\nBuild package for target $target\n";
|
||||
|
||||
if ($target eq 'SNAPSHOT') {
|
||||
if ($target eq 'SNAPSHOT')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
|
||||
print "Remove target $FILENAMESNAPSHOT.tgz...\n";
|
||||
@ -371,7 +368,8 @@ if ($nboftargetok) {
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target eq 'TGZ') {
|
||||
if ($target eq 'TGZ')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
|
||||
@ -396,7 +394,8 @@ if ($nboftargetok) {
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target eq 'ZIP') {
|
||||
if ($target eq 'ZIP')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
|
||||
@ -459,9 +458,6 @@ if ($nboftargetok) {
|
||||
|
||||
print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;
|
||||
#$ret=`mkdir -p "$BUILDROOT/$FILENAMETGZ2"`;
|
||||
#print "Create directory $BUILDROOT/$FILENAMETGZ2/usr/share\n";
|
||||
#$ret=`mkdir -p "$BUILDROOT/$FILENAMETGZ2/usr/share"`;
|
||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMETGZ2\n";
|
||||
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
|
||||
$ret=`$cmd`;
|
||||
@ -553,193 +549,105 @@ if ($nboftargetok) {
|
||||
print "Remove target ${FILENAMEDEB}.changes...\n";
|
||||
unlink("$NEWDESTI/${FILENAMEDEB}.changes");
|
||||
|
||||
#rmdir "$BUILDROOT/$PROJECT.tmp";
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build`;
|
||||
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/usr/share\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/usr/share"`;
|
||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT\n";
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT\"";
|
||||
$ret=`$cmd`;
|
||||
|
||||
print "Fix filefunc.inc.php, install/inc.php, support/inc.php\n";
|
||||
$cmd="cat \"$BUILDROOT/$PROJECT/htdocs/filefunc.inc.php\" |
|
||||
sed -e 's/conffile = \"\\\.\\\.\\\/conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffile = \"conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffiletoshow = \"htdocs\\\/conf\\\/conf.php\"/conffiletoshow = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' > \"$BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/filefunc.inc.php\"";
|
||||
$ret=`$cmd`;
|
||||
$cmd="cat \"$BUILDROOT/$PROJECT/htdocs/install/inc.php\" |
|
||||
sed -e 's/conffile = \"\\\.\\\.\\\/conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffile = \"conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffiletoshow = \"htdocs\\\/conf\\\/conf.php\"/conffiletoshow = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' > \"$BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/install/inc.php\"";
|
||||
$ret=`$cmd`;
|
||||
$cmd="cat \"$BUILDROOT/$PROJECT/htdocs/support/inc.php\" |
|
||||
sed -e 's/conffile = \"\\\.\\\.\\\/conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffile = \"conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffiletoshow = \"htdocs\\\/conf\\\/conf.php\"/conffiletoshow = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' > \"$BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/support/inc.php\"";
|
||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp\n";
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp\"";
|
||||
$ret=`$cmd`;
|
||||
|
||||
print "Remove other files\n";
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/ChangeLog`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/COPYING`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/COPYRIGHT`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/INSTALL`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/README-FR`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/README-FR`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/aps`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/dmg`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/pad/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/tgz/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/README`;
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/po`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/source`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/changelog`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/compat`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/config`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/control*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/copyright`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/dolibarr.desktop`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/dolibarr.lintian-overrides`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/format`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/install`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/menu`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/postrm`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/postinst`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/rules`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/README.debian`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/templates`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/templates.futur`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/debian/wash`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/doap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/exe`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/launchpad`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/live`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/patch`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/perl`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/rpm`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/zip`;
|
||||
# We remove embedded libraries or fonts
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/ckeditor`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/fonts`,
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/geoip`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/nusoap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/odtphp/zip/pclzip`;
|
||||
|
||||
# Apache and lighttpd conf files
|
||||
print "Copy apache.conf file into $BUILDROOT/$PROJECT.tmp/etc/$PROJECT/apache.conf\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/etc/$PROJECT"`;
|
||||
$ret=`cp "$SOURCE/build/debian/apache.conf" "$BUILDROOT/$PROJECT.tmp/etc/$PROJECT/apache.conf"`;
|
||||
print "Copy lighttpd.conf file into $BUILDROOT/$PROJECT.tmp/etc/$PROJECT/lighttpd.conf\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/etc/$PROJECT"`;
|
||||
$ret=`cp "$SOURCE/build/debian/lighttpd.conf" "$BUILDROOT/$PROJECT.tmp/etc/$PROJECT/lighttpd.conf"`;
|
||||
|
||||
# dolibarr.desktop
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/usr/share/applications\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/usr/share/applications"`;
|
||||
print "Copy desktop file into $BUILDROOT/$PROJECT.tmp/usr/share/applications/dolibarr.desktop\n";
|
||||
$ret=`cp "$SOURCE/build/debian/dolibarr.desktop" "$BUILDROOT/$PROJECT.tmp/usr/share/applications/dolibarr.desktop"`;
|
||||
|
||||
# pixmap
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/usr/share/pixmaps\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/usr/share/pixmaps"`;
|
||||
print "Copy pixmap file into $BUILDROOT/$PROJECT.tmp/usr/share/pixmaps/dolibarr.xpm\n";
|
||||
$ret=`cp "$SOURCE/doc/images/dolibarr.xpm" "$BUILDROOT/$PROJECT.tmp/usr/share/pixmaps/dolibarr.xpm"`;
|
||||
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/usr/share/doc/$PROJECT\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/usr/share/doc/$PROJECT"`;
|
||||
|
||||
# changelog (to build binary package directly without sources. Useless if we build from sources)
|
||||
$ret=`gzip -9 -c "$SOURCE/build/debian/changelog" > $BUILDROOT/$PROJECT.tmp/usr/share/doc/$PROJECT/changelog.gz`;
|
||||
|
||||
# Set owners
|
||||
print "Set owners on files/dir\n";
|
||||
$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
|
||||
|
||||
# Set permissions
|
||||
print "Set permissions on files/dir\n";
|
||||
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp -type f -exec chmod 644 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build -name '*.pl' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/translation/autotranslator.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/skeletons/modMyModule.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/skeletons/skeleton_class.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/skeletons/skeleton_page.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/skeletons/skeleton_webservice_server.php`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/scripts -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
|
||||
|
||||
# Prepare binary package (init DEBIAN dir)
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/DEBIAN\n";
|
||||
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/DEBIAN"`;
|
||||
print "Copy $SOURCE/build/debian/xxx to $BUILDROOT/$PROJECT.tmp/DEBIAN\n";
|
||||
$ret=`cp -f "$SOURCE/build/debian/config" "$BUILDROOT/$PROJECT.tmp/DEBIAN"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/postinst" "$BUILDROOT/$PROJECT.tmp/DEBIAN"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/postrm" "$BUILDROOT/$PROJECT.tmp/DEBIAN"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/templates" "$BUILDROOT/$PROJECT.tmp/DEBIAN"`;
|
||||
$ret=`cp -fr "$SOURCE/build/debian/po" "$BUILDROOT/$PROJECT.tmp/DEBIAN"`;
|
||||
|
||||
print "Edit version in file $BUILDROOT/$PROJECT.tmp/DEBIAN/control\n";
|
||||
open (SPECFROM,"<$SOURCE/build/debian/control.debianbin") || die "Error";
|
||||
open (SPECTO,">$BUILDROOT/$PROJECT.tmp/DEBIAN/control") || die "Error";
|
||||
while (<SPECFROM>) {
|
||||
$_ =~ s/__VERSION__/$MAJOR.$MINOR.$newbuild/;
|
||||
print SPECTO $_;
|
||||
}
|
||||
close SPECFROM;
|
||||
close SPECTO;
|
||||
print "Version set to $MAJOR.$MINOR.$newbuild\n";
|
||||
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/DEBIAN -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$ret=`chmod 644 $BUILDROOT/$PROJECT.tmp/DEBIAN/control`;
|
||||
$ret=`chmod 644 $BUILDROOT/$PROJECT.tmp/DEBIAN/templates`;
|
||||
|
||||
# Creation of binary package (to build without sources)
|
||||
# Enable this to build a binary package without building sources first
|
||||
#print "Go into directory $BUILDROOT\n";
|
||||
#chdir("$BUILDROOT");
|
||||
#$cmd="dpkg -b $BUILDROOT/$PROJECT.tmp $BUILDROOT/${FILENAMEDEB}_all.deb";
|
||||
#print "Launch DEB build ($cmd)\n";
|
||||
#$ret=`$cmd`;
|
||||
#print $ret."\n";
|
||||
#exit;
|
||||
|
||||
$ret=`rm -fr "$BUILDROOT/$PROJECT.tmp/DEBIAN"`;
|
||||
$ret=`rm -fr "$BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/doc"`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/README-FR`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/aps`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/dmg`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/pad/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/tgz/README`;
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/debian`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/debian/po`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/debian/source`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/changelog`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/compat`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/control*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/copyright`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.config`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.desktop`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.doc-base`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.install`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.lintian-overrides`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.postrm`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.postinst`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.templates`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.templates.futur`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/rules`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/README.howto`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/wash`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/doap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/exe`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/launchpad`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/live`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/patch`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/perl`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`;
|
||||
# We remove embedded libraries or fonts (this is also inside rules file, target clean)
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/fonts`,
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/geoip`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/nusoap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/odtphp/zip/pclzip`;
|
||||
|
||||
# Prepare source package (init debian dir)
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/debian\n";
|
||||
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
print "Copy $SOURCE/build/debian/xxx to $BUILDROOT/$PROJECT.tmp/debian\n";
|
||||
# Add files for dpkg-source
|
||||
$ret=`cp -f "$SOURCE/ChangeLog" "$BUILDROOT/$PROJECT.tmp/usr/share/doc/dolibarr/UserChangeLog"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/README.debian" "$BUILDROOT/$PROJECT.tmp/usr/share/doc/dolibarr/README"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/changelog" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/control" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.lintian-overrides" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/install" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/rules" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/copyright" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/compat" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -fr "$SOURCE/build/debian/source" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/control" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/copyright" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.desktop" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.doc-base" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.install" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.lintian-overrides" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.xpm" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/README.source" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/rules" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -fr "$SOURCE/build/debian/patches" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -fr "$SOURCE/build/debian/po" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
# Add files also required to build binary package with dpkg-buildpackages
|
||||
$ret=`cp -f "$SOURCE/build/debian/config" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/postinst" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/postrm" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/templates" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -fr "$SOURCE/build/debian/source" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
# Add files also required to build binary package
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.config" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postinst" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postrm" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.templates" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
|
||||
# Set owners and permissions
|
||||
print "Set owners on files/dir\n";
|
||||
$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
|
||||
print "Set permissions on files/dir\n";
|
||||
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp -type f -exec chmod 644 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/build -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/build -name '*.dpatch' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/build -name '*.pl' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/dev -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$ret=`chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/modMyModule.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_class.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_page.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_webservice_server.php`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
|
||||
|
||||
print "Rename directory $BUILDROOT/$PROJECT.tmp into $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
|
||||
$cmd="mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
||||
$ret=`$cmd`;
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
# Goal: Goal of module
|
||||
# Version: 1.0
|
||||
# Author: Copyright 2008 - Author name here
|
||||
# Licence: Not yet defined
|
||||
# Licence: GPL
|
||||
# Install: Just unpack content of module package in Dolibarr directory.
|
||||
# Setup: Go on Dolibarr setup - modules page to enable module.
|
||||
# Setup: Go on Dolibarr setup - modules to enable module.
|
||||
#
|
||||
# Files in module
|
||||
htdocs/core/modules/modMyModule.class.php
|
||||
htdocs/core/triggers/interface_mymodule.class.php
|
||||
htdocs/mymodule/core/modules/modMyModule.class.php
|
||||
htdocs/mymodule/core/triggers/interface_mymodule.class.php
|
||||
htdocs/mymodule/page1.php
|
||||
htdocs/mymodule/page2.php
|
||||
htdocs/mymodule/sql/script1.sql
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
diff -up htdocs/filefunc.inc.php.patch htdocs/filefunc.inc.php
|
||||
--- htdocs/filefunc.inc.php.patch 2011-09-03 02:32:48.666952000 +0200
|
||||
+++ htdocs/filefunc.inc.php 2011-09-03 02:33:00.510952001 +0200
|
||||
@@ -64,8 +64,8 @@ $conffiletoshowshort = "conf.php";
|
||||
@@ -64,8 +64,8 @@
|
||||
$conffile = "conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
// For debian/redhat like systems
|
||||
@ -15,7 +15,7 @@ diff -up htdocs/filefunc.inc.php.patch htdocs/filefunc.inc.php
|
||||
diff -up htdocs/install/inc.php.patch htdocs/install/inc.php
|
||||
--- htdocs/install/inc.php.patch 2011-09-03 02:33:26.450952000 +0200
|
||||
+++ htdocs/install/inc.php 2011-09-03 02:33:36.286952001 +0200
|
||||
@@ -75,8 +75,8 @@ $conffiletoshowshort = "conf.php";
|
||||
@@ -84,8 +84,8 @@
|
||||
$conffile = "../conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
// For debian/redhat like systems
|
||||
@ -29,7 +29,7 @@ diff -up htdocs/install/inc.php.patch htdocs/install/inc.php
|
||||
diff -up htdocs/support/inc.php.patch htdocs/support/inc.php
|
||||
--- htdocs/support/inc.php.patch 2011-09-03 02:34:39.606952000 +0200
|
||||
+++ htdocs/support/inc.php 2011-09-03 02:33:59.814952000 +0200
|
||||
@@ -69,8 +69,8 @@ $conffiletoshowshort = "conf.php";
|
||||
@@ -79,8 +79,8 @@
|
||||
$conffile = "../conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
// For debian/redhat like systems
|
||||
|
||||
@ -31,15 +31,6 @@ htdocs/conf/conf.php.mysql
|
||||
htdocs/conf/conf.php.old
|
||||
htdocs/conf/conf.php.postgres
|
||||
htdocs/avoir
|
||||
htdocs/core/modules/modBookmark4u.class.php
|
||||
htdocs/core/modules/modDocument.class.php
|
||||
htdocs/core/modules/modDroitPret.class.php
|
||||
htdocs/core/modules/modEditeur.class.php
|
||||
htdocs/core/modules/modPostnuke.class.php
|
||||
htdocs/core/modules/modTelephonie.class.php
|
||||
htdocs/core/triggers/interface_user.class.php
|
||||
htdocs/core/triggers/interface_contractfrombill.class.php-NORUN
|
||||
htdocs/core/triggers/interface_modEditeur_Editeur.class.php-NORUN
|
||||
htdocs/custom
|
||||
htdocs/custom2
|
||||
htdocs/customleave
|
||||
|
||||
@ -27,15 +27,6 @@
|
||||
*/htdocs/conf/conf.php.mysql
|
||||
*/htdocs/conf/conf.php.old
|
||||
*/htdocs/conf/conf.php.postgres
|
||||
*/htdocs/core/modules/modBookmark4u.class.php
|
||||
*/htdocs/core/modules/modClickToDial.class.php
|
||||
*/htdocs/core/modules/modDocument.class.php
|
||||
*/htdocs/core/modules/modDomain.class.php
|
||||
*/htdocs/core/modules/modDroitPret.class.php
|
||||
*/htdocs/core/modules/modEditeur.class.php
|
||||
*/htdocs/core/modules/modPostnuke.class.php
|
||||
*/htdocs/core/triggers/interface_user.class.php
|
||||
*/htdocs/core/triggers/interface_contractfrombill.class.php-NORUN
|
||||
*/htdocs/custom/*
|
||||
*/htdocs/custom2/*
|
||||
*/htdocs/document/*
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -156,7 +156,7 @@ if ($action == 'setsocid')
|
||||
$thirdparty=new Societe($db);
|
||||
$thirdparty->fetch(GETPOST("socid"));
|
||||
$error++;
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->nom).'</div>';
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name).'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -894,11 +894,11 @@ if ($rowid)
|
||||
print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.($bankdirect?' checked="checked"':'');
|
||||
print '> '.$langs->trans("MoreActionBankDirect").'<br>';
|
||||
}
|
||||
if ($conf->banque->enabled && $conf->societe->enabled && $conf->facture->enabled)
|
||||
if ($conf->societe->enabled && $conf->facture->enabled)
|
||||
{
|
||||
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.($bankviainvoice?' checked="checked"':'');
|
||||
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.($invoiceonly?' checked="checked"':'');
|
||||
if (empty($adh->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"';
|
||||
print '> '.$langs->trans("MoreActionBankViaInvoice");
|
||||
print '> '.$langs->trans("MoreActionInvoiceOnly");
|
||||
if ($adh->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
||||
else
|
||||
{
|
||||
@ -909,11 +909,11 @@ if ($rowid)
|
||||
}
|
||||
print '<br>';
|
||||
}
|
||||
if ($conf->societe->enabled && $conf->facture->enabled)
|
||||
if ($conf->banque->enabled && $conf->societe->enabled && $conf->facture->enabled)
|
||||
{
|
||||
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.($invoiceonly?' checked="checked"':'');
|
||||
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.($bankviainvoice?' checked="checked"':'');
|
||||
if (empty($adh->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"';
|
||||
print '> '.$langs->trans("MoreActionInvoiceOnly");
|
||||
print '> '.$langs->trans("MoreActionBankViaInvoice");
|
||||
if ($adh->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
||||
else
|
||||
{
|
||||
@ -949,7 +949,7 @@ if ($rowid)
|
||||
print '<tr class="bankswitchclass2 fieldrequireddyn"><td>'.$langs->trans('CheckTransmitter');
|
||||
print ' <em>('.$langs->trans("ChequeMaker").')</em>';
|
||||
print '</td>';
|
||||
print '<td><input id="fieldchqemetteur" name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->nom:$_POST['chqemetteur']).'"></td></tr>';
|
||||
print '<td><input id="fieldchqemetteur" name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->name:$_POST['chqemetteur']).'"></td></tr>';
|
||||
|
||||
print '<tr class="bankswitchclass2"><td>'.$langs->trans('Bank');
|
||||
print ' <em>('.$langs->trans("ChequeBank").')</em>';
|
||||
|
||||
@ -57,7 +57,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
|
||||
$arrayofmembers=array();
|
||||
|
||||
// requete en prenant que les adherents a jour de cotisation
|
||||
$sql = "SELECT d.rowid, d.prenom, d.nom, d.login, d.societe, d.datefin,";
|
||||
$sql = "SELECT d.rowid, d.prenom as firstname, d.nom as lastname, d.login, d.societe, d.datefin,";
|
||||
$sql.= " d.adresse, d.cp, d.ville, d.naiss, d.email, d.photo,";
|
||||
$sql.= " t.libelle as type,";
|
||||
$sql.= " p.libelle as pays";
|
||||
@ -81,8 +81,8 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
|
||||
|
||||
// List of values to scan for a replacement
|
||||
$substitutionarray = array (
|
||||
'%PRENOM%'=>$objp->prenom,
|
||||
'%NOM%'=>$objp->nom,
|
||||
'%PRENOM%'=>$objp->firstname,
|
||||
'%NOM%'=>$objp->lastname,
|
||||
'%LOGIN%'=>$objp->login,
|
||||
'%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/",
|
||||
'%SOCIETE%'=>$objp->societe,
|
||||
|
||||
@ -509,8 +509,10 @@ class Adherent extends CommonObject
|
||||
if ($result >= 0)
|
||||
{
|
||||
$luser->civilite_id=$this->civilite_id;
|
||||
$luser->prenom=$this->prenom;
|
||||
$luser->nom=$this->nom;
|
||||
$luser->firstname=$this->firstname;
|
||||
$luser->lastname=$this->lastname;
|
||||
$luser->prenom=$this->firstname; // deprecated
|
||||
$luser->nom=$this->lastname; // deprecated
|
||||
$luser->login=$this->user_login;
|
||||
$luser->pass=$this->pass;
|
||||
$luser->societe_id=$this->societe;
|
||||
@ -1000,19 +1002,19 @@ class Adherent extends CommonObject
|
||||
$this->ref = $obj->rowid;
|
||||
$this->id = $obj->rowid;
|
||||
$this->civilite_id = $obj->civilite;
|
||||
$this->prenom = $obj->firstname;
|
||||
$this->prenom = $obj->firstname; // deprecated
|
||||
$this->firstname = $obj->firstname;
|
||||
$this->nom = $obj->lastname;
|
||||
$this->nom = $obj->lastname; // deprecated
|
||||
$this->lastname = $obj->lastname;
|
||||
$this->login = $obj->login;
|
||||
$this->pass = $obj->pass;
|
||||
$this->societe = $obj->societe;
|
||||
$this->fk_soc = $obj->fk_soc;
|
||||
$this->adresse = $obj->address; // TODO deprecated
|
||||
$this->adresse = $obj->address; // deprecated
|
||||
$this->address = $obj->address;
|
||||
$this->cp = $obj->zip; // TODO deprecated
|
||||
$this->cp = $obj->zip; // deprecated
|
||||
$this->zip = $obj->zip;
|
||||
$this->ville = $obj->town; // TODO deprecated
|
||||
$this->ville = $obj->town; // deprecated
|
||||
$this->town = $obj->town;
|
||||
|
||||
$this->state_id = $obj->fk_departement;
|
||||
@ -1427,7 +1429,7 @@ class Adherent extends CommonObject
|
||||
{
|
||||
$mdpass=dol_hash($this->pass);
|
||||
$htpass=crypt($this->pass,makesalt());
|
||||
$query = "INSERT INTO spip_auteurs (nom, email, login, pass, htpass, alea_futur, statut) VALUES(\"".$this->prenom." ".$this->nom."\",\"".$this->email."\",\"".$this->login."\",\"$mdpass\",\"$htpass\",FLOOR(32000*RAND()),\"1comite\")";
|
||||
$query = "INSERT INTO spip_auteurs (nom, email, login, pass, htpass, alea_futur, statut) VALUES(\"".$this->firstname." ".$this->lastname."\",\"".$this->email."\",\"".$this->login."\",\"$mdpass\",\"$htpass\",FLOOR(32000*RAND()),\"1comite\")";
|
||||
|
||||
$mydb=getDoliDBInstance('mysql',ADHERENT_SPIP_SERVEUR,ADHERENT_SPIP_USER,ADHERENT_SPIP_PASS,ADHERENT_SPIP_DB,ADHERENT_SPIP_PORT);
|
||||
|
||||
@ -1683,12 +1685,16 @@ class Adherent extends CommonObject
|
||||
* @param Translate $langs Language object for translation of civility
|
||||
* @param int $option 0=No option, 1=Add civility
|
||||
* @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname
|
||||
* @param int $maxlen Maximum length
|
||||
* @return string String with full name
|
||||
*/
|
||||
function getFullName($langs,$option=0,$nameorder=-1)
|
||||
function getFullName($langs,$option=0,$nameorder=-1,$maxlen=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (empty($this->lastname)) $this->lastname=($this->name?$this->name:$this->nom);
|
||||
if (empty($this->firstname)) $this->firstname=($this->firstname?$this->firstname:$this->prenom);
|
||||
|
||||
$ret='';
|
||||
if ($option && $this->civilite_id)
|
||||
{
|
||||
@ -1701,17 +1707,17 @@ class Adherent extends CommonObject
|
||||
|
||||
if ($nameorder)
|
||||
{
|
||||
if ($this->prenom) $ret.=$this->prenom;
|
||||
if ($this->prenom && $this->nom) $ret.=' ';
|
||||
if ($this->nom) $ret.=$this->nom;
|
||||
$ret.=$this->firstname;
|
||||
if ($this->firstname && $this->lastname) $ret.=' ';
|
||||
$ret.=$this->lastname;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->nom) $ret.=$this->nom;
|
||||
if ($this->prenom && $this->nom) $ret.=' ';
|
||||
if ($this->prenom) $ret.=$this->prenom;
|
||||
$ret.=$this->lastname;
|
||||
if ($this->firstname && $this->lastname) $ret.=' ';
|
||||
$ret.=$this->firstname;
|
||||
}
|
||||
return trim($ret);
|
||||
return dol_trunc($ret,$maxlen);
|
||||
}
|
||||
|
||||
|
||||
@ -1983,8 +1989,8 @@ class Adherent extends CommonObject
|
||||
$this->id=0;
|
||||
$this->specimen=1;
|
||||
$this->civilite_id = 0;
|
||||
$this->nom = 'DOLIBARR';
|
||||
$this->prenom = 'SPECIMEN';
|
||||
$this->lastname = 'DOLIBARR';
|
||||
$this->firstname = 'SPECIMEN';
|
||||
$this->login='dolibspec';
|
||||
$this->pass='dolibspec';
|
||||
$this->societe = 'Societe ABC';
|
||||
|
||||
@ -64,7 +64,7 @@ llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Modu
|
||||
if ($msg) print $msg.'<br>';
|
||||
|
||||
// Liste des cotisations
|
||||
$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe,";
|
||||
$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as lastname, d.societe,";
|
||||
$sql.= " c.rowid as crowid, c.cotisation,";
|
||||
$sql.= " c.dateadh,";
|
||||
$sql.= " c.datef,";
|
||||
@ -123,7 +123,9 @@ if ($result)
|
||||
$cotisation->ref=$objp->crowid;
|
||||
$cotisation->id=$objp->crowid;
|
||||
|
||||
$adherent->ref=trim($objp->prenom.' '.$objp->nom);
|
||||
$adherent->lastname=$objp->lastname;
|
||||
$adherent->firstname=$objp->firstname;
|
||||
$adherent->ref=$adherent->getFullName($langs);
|
||||
$adherent->id=$objp->rowid;
|
||||
$adherent->login=$objp->login;
|
||||
|
||||
|
||||
@ -172,11 +172,11 @@ if ($id > 0)
|
||||
print '</tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->nom.' </td>';
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Prenom
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->prenom.' </td>';
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->firstname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Status
|
||||
|
||||
@ -137,7 +137,7 @@ if ($_POST['action'] == 'setsocid')
|
||||
$thirdparty=new Societe($db);
|
||||
$thirdparty->fetch($_POST["socid"]);
|
||||
$error++;
|
||||
$errmsg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->nom).'</div>';
|
||||
$errmsg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name).'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,8 +223,10 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
|
||||
|
||||
// Change values
|
||||
$object->civilite_id = trim($_POST["civilite_id"]);
|
||||
$object->prenom = trim($_POST["prenom"]);
|
||||
$object->nom = trim($_POST["nom"]);
|
||||
$object->prenom = trim($_POST["prenom"]); // deprecated
|
||||
$object->nom = trim($_POST["nom"]); // deprecated
|
||||
$object->firstname = trim($_POST["prenom"]);
|
||||
$object->lastname = trim($_POST["nom"]);
|
||||
$object->login = trim($_POST["login"]);
|
||||
$object->pass = trim($_POST["pass"]);
|
||||
|
||||
@ -380,8 +382,10 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer)
|
||||
$socid=$_POST["socid"];
|
||||
|
||||
$object->civilite_id = $civilite_id;
|
||||
$object->prenom = $prenom;
|
||||
$object->nom = $nom;
|
||||
$object->prenom = $prenom; // deprecated
|
||||
$object->nom = $nom; // deprecated
|
||||
$object->firstname = $prenom;
|
||||
$object->lastname = $nom;
|
||||
$object->societe = $societe;
|
||||
$object->adresse = $address; // deprecated
|
||||
$object->address = $address;
|
||||
@ -692,11 +696,11 @@ if ($action == 'create')
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" value="'.(isset($_POST["nom"])?$_POST["nom"]:$object->nom).'" size="40"></td>';
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" value="'.(isset($_POST["nom"])?$_POST["nom"]:$object->lastname).'" size="40"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->prenom).'"></td>';
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->firstname).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Password
|
||||
@ -923,11 +927,11 @@ if ($action == 'edit')
|
||||
print '</tr>';
|
||||
|
||||
// Name
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" size="40" value="'.(isset($_POST["nom"])?$_POST["nom"]:$object->nom).'"></td>';
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" size="40" value="'.(isset($_POST["nom"])?$_POST["nom"]:$object->lastname).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->prenom).'"></td>';
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->firstname).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Password
|
||||
@ -1074,9 +1078,9 @@ if ($rowid && $action != 'edit')
|
||||
{
|
||||
// Full firstname and name separated with a dot : firstname.name
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||
$login=dol_buildlogin($object->nom,$object->prenom);
|
||||
$login=dol_buildlogin($object->lastname,$object->firstname);
|
||||
}
|
||||
if (empty($login)) $login=strtolower(substr($object->prenom, 0, 4)) . strtolower(substr($object->nom, 0, 4));
|
||||
if (empty($login)) $login=strtolower(substr($object->firstname, 0, 4)) . strtolower(substr($object->lastname, 0, 4));
|
||||
|
||||
// Create a form array
|
||||
$formquestion=array(
|
||||
@ -1246,11 +1250,11 @@ if ($rowid && $action != 'edit')
|
||||
print '</tr>';
|
||||
|
||||
// Name
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->nom.' </td>';
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->prenom.' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.' </td></tr>';
|
||||
|
||||
// Password
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
|
||||
@ -203,7 +203,7 @@ $var=true;
|
||||
*/
|
||||
$max=5;
|
||||
|
||||
$sql = "SELECT a.rowid, a.statut, a.nom, a.prenom,";
|
||||
$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname,";
|
||||
$sql.= " a.tms as datem, datefin as date_end_subscription,";
|
||||
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
|
||||
@ -229,8 +229,8 @@ if ($resql)
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr ".$bc[$var].">";
|
||||
$staticmember->id=$obj->rowid;
|
||||
$staticmember->nom=$obj->nom;
|
||||
$staticmember->prenom=$obj->prenom;
|
||||
$staticmember->lastname=$obj->lastname;
|
||||
$staticmember->firstname=$obj->firstname;
|
||||
$staticmember->ref=$staticmember->getFullName($langs);
|
||||
$statictype->id=$obj->typeid;
|
||||
$statictype->libelle=$obj->libelle;
|
||||
@ -283,8 +283,8 @@ if ($resql)
|
||||
$subscriptionstatic->id=$obj->cid;
|
||||
$subscriptionstatic->ref=$obj->cid;
|
||||
$staticmember->id=$obj->rowid;
|
||||
$staticmember->nom=$obj->nom;
|
||||
$staticmember->prenom=$obj->prenom;
|
||||
$staticmember->lastname=$obj->lastname;
|
||||
$staticmember->firstname=$obj->firstname;
|
||||
$staticmember->ref=$staticmember->getFullName($langs);
|
||||
print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.$staticmember->getNomUrl(1,24,'subscription').'</td>';
|
||||
|
||||
@ -109,11 +109,11 @@ print $form->showrefnav($adh,'id');
|
||||
print '</td></tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->nom.' </td>';
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Prenom
|
||||
print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->prenom.' </td>';
|
||||
print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->firstname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Login
|
||||
|
||||
@ -79,7 +79,7 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhé
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, ";
|
||||
$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as name, d.societe, ";
|
||||
$sql.= " d.datefin,";
|
||||
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
|
||||
$sql.= " t.libelle as type, t.cotisation";
|
||||
@ -258,8 +258,8 @@ if ($resql)
|
||||
// Nom
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
$memberstatic->nom=$objp->nom;
|
||||
$memberstatic->prenom=$objp->prenom;
|
||||
$memberstatic->lastname=$objp->lastname;
|
||||
$memberstatic->firstname=$objp->firstname;
|
||||
if ($objp->societe != '')
|
||||
{
|
||||
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.dol_trunc($memberstatic->getFullName($langs))." / ".dol_trunc($objp->societe,12)."</a></td>\n";
|
||||
|
||||
@ -120,11 +120,11 @@ if ($id)
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$adh->nom.' </td>';
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$adh->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$adh->prenom.' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$adh->firstname.' </td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$adh->getLibStatut(4).'</td></tr>';
|
||||
|
||||
@ -338,7 +338,7 @@ if ($rowid > 0)
|
||||
|
||||
$membertypestatic=new AdherentType($db);
|
||||
|
||||
$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, ";
|
||||
$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as lastname, d.societe, ";
|
||||
$sql.= " d.datefin,";
|
||||
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
|
||||
$sql.= " t.libelle as type, t.cotisation";
|
||||
@ -486,17 +486,19 @@ if ($rowid > 0)
|
||||
$datefin=$db->jdate($objp->datefin);
|
||||
|
||||
$adh=new Adherent($db);
|
||||
$adh->lastname=$objp->lastname;
|
||||
$adh->firstname=$objp->firstname;
|
||||
|
||||
// Nom
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
if ($objp->societe != '')
|
||||
{
|
||||
print '<td><a href="fiche.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"),"user").' '.$objp->prenom.' '.dol_trunc($objp->nom,12).' / '.dol_trunc($objp->societe,12).'</a></td>'."\n";
|
||||
print '<td><a href="fiche.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,20).' / '.dol_trunc($objp->societe,12).'</a></td>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td><a href="fiche.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"),"user").' '.$objp->prenom.' '.dol_trunc($objp->nom).'</a></td>'."\n";
|
||||
print '<td><a href="fiche.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,32).'</a></td>'."\n";
|
||||
}
|
||||
|
||||
// Login
|
||||
@ -627,7 +629,7 @@ if ($rowid > 0)
|
||||
print "</td></tr>";
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></center>';
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
require("../main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/triggers/interface_modNotification_Notification.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/triggers/interface_50_modNotification_Notification.class.php");
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/triggers.php
|
||||
* \brief Page de configuration et activation des triggers
|
||||
* \brief Page to view triggers
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@ -25,13 +25,13 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/interfaces.class.php");
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
|
||||
// None
|
||||
|
||||
|
||||
/*
|
||||
@ -50,9 +50,11 @@ print "<br>\n";
|
||||
$template_dir = DOL_DOCUMENT_ROOT.'/core/tpl/';
|
||||
|
||||
$interfaces = new Interfaces($db);
|
||||
$triggers = $interfaces->getTriggersList(0);
|
||||
$triggers = $interfaces->getTriggersList(0,'priority');
|
||||
|
||||
include($template_dir.'triggers.tpl.php');
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -40,7 +40,7 @@ if (empty($phone))
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = "SELECT nom FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql = "SELECT nom as name FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON sp.fk_soc = s.rowid";
|
||||
$sql.= " WHERE s.entity IN (".getEntity(societe, 1).")";
|
||||
$sql.= " AND (s.tel='".$db->escape($phone)."'";
|
||||
@ -53,10 +53,10 @@ dol_syslog('cidlookup search information with phone '.$phone, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$row = $db->fetch_object($resql);
|
||||
if ($row)
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj)
|
||||
{
|
||||
$found = $row->nom;
|
||||
$found = $obj->name;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
|
||||
@ -230,7 +230,6 @@ if ($_GET["id"] > 0 && ! preg_match('/^add/i',$_GET["action"]))
|
||||
{
|
||||
$fuser=new User($db);
|
||||
$fuser->fetch($bookmark->fk_user);
|
||||
//$fuser->nom=$fuser->login; $fuser->prenom='';
|
||||
print $fuser->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
|
||||
@ -127,7 +127,7 @@ if ($resql)
|
||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||
$societe=new Societe($db);
|
||||
$societe->fetch($obj->rowid);
|
||||
$obj->title=$societe->nom;
|
||||
$obj->title=$societe->name;
|
||||
}
|
||||
$title=img_object($langs->trans("ShowCompany"),"company").' '.$obj->title;
|
||||
}
|
||||
@ -154,7 +154,7 @@ if ($resql)
|
||||
if ($obj->fk_user)
|
||||
{
|
||||
$userstatic->id=$obj->fk_user;
|
||||
$userstatic->nom=$obj->login;
|
||||
$userstatic->lastname=$obj->login;
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
|
||||
@ -37,11 +37,11 @@ class BoutiqueClient
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $DB Database handler
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function BoutiqueClient($DB)
|
||||
function BoutiqueClient($db)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -33,12 +33,7 @@ include_once(DOL_DOCUMENT_ROOT.'/boutique/client/class/boutiqueclient.class.php'
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'update' && !$cancel)
|
||||
{
|
||||
$client = new BoutiqueClient($dbosc);
|
||||
$client->nom = $nom;
|
||||
$client->update($id, $user);
|
||||
}
|
||||
// None
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,152 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/boutique/notification/fiche.php
|
||||
* \ingroup boutique
|
||||
* \brief Page fiche notification OS Commerce
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/boutique/osc_master.inc.php');
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
if ($action == 'add') {
|
||||
$editeur = new Editeur($dbosc);
|
||||
|
||||
$editeur->nom = $nom;
|
||||
|
||||
$id = $editeur->create($user);
|
||||
}
|
||||
|
||||
if ($action == 'addga') {
|
||||
$editeur = new Editeur($dbosc);
|
||||
|
||||
$editeur->linkga($id, $ga);
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'update' && !$cancel) {
|
||||
$editeur = new Editeur($dbosc);
|
||||
|
||||
$editeur->nom = $nom;
|
||||
|
||||
$editeur->update($id, $user);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
if ($action == 'create')
|
||||
{
|
||||
|
||||
print "<form action=\"fiche.php?id=$id\" method=\"post\">\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
print '<div class="titre">Nouvel Editeur</div><br>';
|
||||
|
||||
print '<table border="1" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print "<tr>";
|
||||
print '<td>Nom</td><td><input name="nom" size="40" value=""></td></tr>';
|
||||
print '<tr><td> </td><td><input type="submit" value="Cr<43>er"></td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($id)
|
||||
{
|
||||
|
||||
$editeur = new Editeur($dbosc);
|
||||
$result = $editeur->fetch($id);
|
||||
|
||||
if ( $result )
|
||||
{
|
||||
if ($action == 'edit')
|
||||
{
|
||||
print '<div class="titre">Edition de la fiche Editeur : '.$editeur->titre.'</div><br>';
|
||||
|
||||
print "<form action=\"fiche.php?id=$id\" method=\"post\">\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<table border="1" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print "<tr>";
|
||||
print '<td width="20%">Nom</td><td><input name="nom" size="40" value="'.$editeur->nom.'"></td>';
|
||||
|
||||
|
||||
print '<tr><td colspan="2" align="center"><input type="submit" value="'.$langs->trans("Save").'"> <input type="submit" value="'.$langs->trans("Cancel").'" name="cancel"></td></tr>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '</table><hr>';
|
||||
|
||||
}
|
||||
|
||||
print '<div class="titre">Fiche Editeur : '.$editeur->titre.'</div><br>';
|
||||
|
||||
print '<table border="1" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print "<tr>";
|
||||
print '<td width="20%">Nom</td><td width="30%">'.$editeur->nom.'</td></tr>';
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Fetch failed";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Error";
|
||||
}
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Barre d'action */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
if ($action != 'create')
|
||||
{
|
||||
print '<a class="butAction" href="fiche.php?action=edit&id='.$id.'">'.$langs->trans("Modify").'</a>';
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
|
||||
$dbosc->close();
|
||||
|
||||
llxFooter();
|
||||
?>
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 <EFBFBD>ric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -152,7 +152,7 @@ if ($_socid > 0)
|
||||
print '<td>'.dol_print_date($db->jdate($obj->dc),"dayhour").'</td>';
|
||||
print '<td>'.$obj->price_level.' </td>';
|
||||
$userstatic->id=$obj->uid;
|
||||
$userstatic->nom=$obj->login;
|
||||
$userstatic->lastname=$obj->login;
|
||||
print '<td align="right">'.$userstatic->getNomUrl(1).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
@ -322,14 +322,14 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($tab[$i]['source']=='internal')
|
||||
{
|
||||
$userstatic->id=$tab[$i]['id'];
|
||||
$userstatic->nom=$tab[$i]['nom'];
|
||||
$userstatic->prenom=$tab[$i]['firstname'];
|
||||
$userstatic->lastname=$tab[$i]['lastname'];
|
||||
$userstatic->firstname=$tab[$i]['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
if ($tab[$i]['source']=='external')
|
||||
{
|
||||
$contactstatic->id=$tab[$i]['id'];
|
||||
$contactstatic->name=$tab[$i]['nom'];
|
||||
$contactstatic->lastname=$tab[$i]['lastname'];
|
||||
$contactstatic->firstname=$tab[$i]['firstname'];
|
||||
print $contactstatic->getNomUrl(1);
|
||||
}
|
||||
|
||||
@ -313,14 +313,14 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($tab[$i]['source']=='internal')
|
||||
{
|
||||
$userstatic->id=$tab[$i]['id'];
|
||||
$userstatic->nom=$tab[$i]['nom'];
|
||||
$userstatic->prenom=$tab[$i]['firstname'];
|
||||
$userstatic->lastname=$tab[$i]['lastname'];
|
||||
$userstatic->firstname=$tab[$i]['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
if ($tab[$i]['source']=='external')
|
||||
{
|
||||
$contactstatic->id=$tab[$i]['id'];
|
||||
$contactstatic->name=$tab[$i]['nom'];
|
||||
$contactstatic->lastname=$tab[$i]['lastname'];
|
||||
$contactstatic->firstname=$tab[$i]['firstname'];
|
||||
print $contactstatic->getNomUrl(1);
|
||||
}
|
||||
|
||||
@ -308,14 +308,14 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($tab[$i]['source']=='internal')
|
||||
{
|
||||
$userstatic->id=$tab[$i]['id'];
|
||||
$userstatic->nom=$tab[$i]['nom'];
|
||||
$userstatic->prenom=$tab[$i]['firstname'];
|
||||
$userstatic->lastname=$tab[$i]['lastname'];
|
||||
$userstatic->firstname=$tab[$i]['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
if ($tab[$i]['source']=='external')
|
||||
{
|
||||
$contactstatic->id=$tab[$i]['id'];
|
||||
$contactstatic->name=$tab[$i]['nom'];
|
||||
$contactstatic->lastname=$tab[$i]['lastname'];
|
||||
$contactstatic->firstname=$tab[$i]['firstname'];
|
||||
print $contactstatic->getNomUrl(1);
|
||||
}
|
||||
|
||||
@ -604,8 +604,8 @@ if ($conf->deplacement->enabled && $user->rights->deplacement->lire)
|
||||
$deplacementstatic->ref=$objp->rowid;
|
||||
$deplacementstatic->id=$objp->rowid;
|
||||
$userstatic->id=$objp->uid;
|
||||
$userstatic->nom=$objp->name;
|
||||
$userstatic->prenom=$objp->firstname;
|
||||
$userstatic->lastname=$objp->name;
|
||||
$userstatic->firstname=$objp->firstname;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$deplacementstatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.$userstatic->getNomUrl(1).'</td>';
|
||||
|
||||
@ -913,6 +913,9 @@ class Contact extends CommonObject
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (empty($this->lastname)) $this->lastname=($this->name?$this->name:$this->nom);
|
||||
if (empty($this->firstname)) $this->firstname=($this->firstname?$this->firstname:$this->prenom);
|
||||
|
||||
$ret='';
|
||||
if ($option && $this->civilite_id)
|
||||
{
|
||||
@ -925,15 +928,15 @@ class Contact extends CommonObject
|
||||
|
||||
if ($nameorder)
|
||||
{
|
||||
if ($this->firstname) $ret.=$this->firstname;
|
||||
if ($this->firstname && $this->name) $ret.=' ';
|
||||
if ($this->name) $ret.=$this->name;
|
||||
$ret.=$this->firstname;
|
||||
if ($this->firstname && $this->lastname) $ret.=' ';
|
||||
$ret.=$this->lastname;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->name) $ret.=$this->name;
|
||||
if ($this->firstname && $this->name) $ret.=' ';
|
||||
if ($this->firstname) $ret.=$this->firstname;
|
||||
$ret.=$this->lastname;
|
||||
if ($this->firstname && $this->lastname) $ret.=' ';
|
||||
$ret.=$this->firstname;
|
||||
}
|
||||
return trim($ret);
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -113,8 +113,8 @@ llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Modu
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom,";
|
||||
$sql.= " p.rowid as cidp, p.name, p.firstname, p.poste, p.email,";
|
||||
$sql = "SELECT s.rowid as socid, s.nom as name,";
|
||||
$sql.= " p.rowid as cidp, p.name as lastname, p.firstname, p.poste, p.email,";
|
||||
$sql.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv, p.tms,";
|
||||
$sql.= " cp.code as pays_code";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
@ -338,7 +338,7 @@ if ($result)
|
||||
|
||||
// Name
|
||||
print '<td valign="middle">';
|
||||
$contactstatic->name=$obj->name;
|
||||
$contactstatic->lastname=$obj->lastname;
|
||||
$contactstatic->firstname='';
|
||||
$contactstatic->id=$obj->cidp;
|
||||
print $contactstatic->getNomUrl(1,'',20);
|
||||
@ -357,7 +357,7 @@ if ($result)
|
||||
if ($obj->socid)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">';
|
||||
print img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,20).'</a>';
|
||||
print img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,20).'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -308,14 +308,14 @@ if ($id > 0)
|
||||
if ($tab[$i]['source']=='internal')
|
||||
{
|
||||
$userstatic->id=$tab[$i]['id'];
|
||||
$userstatic->nom=$tab[$i]['nom'];
|
||||
$userstatic->prenom=$tab[$i]['firstname'];
|
||||
$userstatic->lastname=$tab[$i]['lastname'];
|
||||
$userstatic->firstname=$tab[$i]['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
if ($tab[$i]['source']=='external')
|
||||
{
|
||||
$contactstatic->id=$tab[$i]['id'];
|
||||
$contactstatic->name=$tab[$i]['nom'];
|
||||
$contactstatic->lastname=$tab[$i]['lastname'];
|
||||
$contactstatic->firstname=$tab[$i]['firstname'];
|
||||
print $contactstatic->getNomUrl(1);
|
||||
}
|
||||
|
||||
@ -353,13 +353,13 @@ class Form
|
||||
/**
|
||||
* Show a text with a picto and a tooltip on picto
|
||||
*
|
||||
* @param text Text to show
|
||||
* @param htmltooltip Content of tooltip
|
||||
* @param direction 1=Icon is after text, -1=Icon is before text, 0=no icon
|
||||
* @param type Type of picto (info, help, warning, superadmin...)
|
||||
* @param extracss Add a CSS style to td tags
|
||||
* @param noencodehtmltext Do not encode into html entity the htmltext
|
||||
* @return string HTML code of text, picto, tooltip
|
||||
* @param string $text Text to show
|
||||
* @param string $htmltooltip Content of tooltip
|
||||
* @param int $direction 1=Icon is after text, -1=Icon is before text, 0=no icon
|
||||
* @param string $type Type of picto (info, help, warning, superadmin...)
|
||||
* @param string $extracss Add a CSS style to td tags
|
||||
* @param int $noencodehtmltext Do not encode into html entity the htmltext
|
||||
* @return string HTML code of text, picto, tooltip
|
||||
*/
|
||||
function textwithpicto($text,$htmltext,$direction=1,$type='help',$extracss='',$noencodehtmltext=0)
|
||||
{
|
||||
@ -885,13 +885,13 @@ class Form
|
||||
global $conf,$langs;
|
||||
|
||||
// On recherche les societes
|
||||
$sql = "SELECT s.rowid, s.name, s.firstname, s.poste FROM";
|
||||
$sql = "SELECT s.rowid, s.name as name, s.firstname, s.poste FROM";
|
||||
$sql.= " ".MAIN_DB_PREFIX ."socpeople as s";
|
||||
$sql.= " WHERE entity = ".$conf->entity;
|
||||
if ($socid > 0) $sql.= " AND fk_soc=".$socid;
|
||||
$sql.= " ORDER BY s.name ASC";
|
||||
|
||||
dol_syslog("Form::select_contacts sql=".$sql);
|
||||
dol_syslog(get_class($this)."::select_contacts sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -913,6 +913,7 @@ class Form
|
||||
|
||||
$contactstatic->id=$obj->rowid;
|
||||
$contactstatic->name=$obj->name;
|
||||
$contactstatic->lastname=$obj->name;
|
||||
$contactstatic->firstname=$obj->firstname;
|
||||
|
||||
if ($htmlname != 'none')
|
||||
|
||||
@ -101,7 +101,7 @@ class FormActions
|
||||
|
||||
/**
|
||||
* Show list of actions for element
|
||||
*
|
||||
*
|
||||
* @param Object $object Object
|
||||
* @param string $typeelement 'invoice','propal','order','invoice_supplier','order_supplier','fichinter'
|
||||
* @param int $socid socid of user
|
||||
@ -133,7 +133,7 @@ class FormActions
|
||||
print_titre($title);
|
||||
|
||||
$total = 0; $var=true;
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><th class="liste_titre">'.$langs->trans('Ref').'</th><th class="liste_titre">'.$langs->trans('Date').'</th><th class="liste_titre">'.$langs->trans('Action').'</th><th class="liste_titre">'.$langs->trans('By').'</th></tr>';
|
||||
print "\n";
|
||||
|
||||
@ -146,8 +146,8 @@ class FormActions
|
||||
print '<td title="'.dol_escape_htmltag($action->label).'">'.dol_trunc($action->label,32).'</td>';
|
||||
$userstatic = new User($this->db);
|
||||
$userstatic->id = $action->author->id;
|
||||
$userstatic->prenom = $action->author->firstname;
|
||||
$userstatic->nom = $action->author->lastname;
|
||||
$userstatic->firstname = $action->author->firstname;
|
||||
$userstatic->lastname = $action->author->lastname;
|
||||
print '<td>'.$userstatic->getNomUrl(1).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -160,7 +160,7 @@ class FormActions
|
||||
|
||||
/**
|
||||
* Output list of type of event
|
||||
*
|
||||
*
|
||||
* @param string $selected Type pre-selectionne
|
||||
* @param string $htmlname Nom champ formulaire
|
||||
* @return void
|
||||
|
||||
@ -374,7 +374,7 @@ class FormFile
|
||||
$out.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
$out.= '<div class="titre">'.$titletoshow.'</div>';
|
||||
$out.= '<table class="border formdoc" summary="listofdocumentstable" width="100%">';
|
||||
$out.= '<table class="liste formdoc" summary="listofdocumentstable" width="100%">';
|
||||
|
||||
$out.= '<tr class="liste_titre">';
|
||||
|
||||
|
||||
@ -67,6 +67,13 @@ class Interfaces
|
||||
dol_syslog(get_class($this).'::run_triggers was called with wrong parameters action='.$action.' object='.is_object($object).' user='.is_object($user).' langs='.is_object($langs).' conf='.is_object($conf), LOG_WARNING);
|
||||
}
|
||||
|
||||
$nbfile = $nbtotal = $nbok = $nbko = 0;
|
||||
|
||||
$files = array();
|
||||
$modules = array();
|
||||
$orders = array();
|
||||
$i=0;
|
||||
|
||||
foreach($conf->triggers_modules as $reldir)
|
||||
{
|
||||
$dir=dol_buildpath($reldir,0);
|
||||
@ -76,111 +83,116 @@ class Interfaces
|
||||
if (!is_dir($dir)) continue;
|
||||
|
||||
$handle=opendir($dir);
|
||||
$modules = array();
|
||||
$nbfile = $nbtotal = $nbok = $nbko = 0;
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_readable($dir."/".$file) && preg_match('/^interface_([^_]+)_(.+)\.class\.php$/i',$file,$reg))
|
||||
if (is_readable($dir."/".$file) && preg_match('/^interface_([0-9]+)_([^_]+)_(.+)\.class\.php$/i',$file,$reg))
|
||||
{
|
||||
$part1=$reg[1];
|
||||
$part2=$reg[2];
|
||||
$part3=$reg[3];
|
||||
|
||||
$nbfile++;
|
||||
|
||||
$modName = "Interface".ucfirst($reg[2]);
|
||||
$modName = "Interface".ucfirst($reg[3]);
|
||||
//print "file=$file"; print "modName=$modName"; exit;
|
||||
if (in_array($modName,$modules))
|
||||
{
|
||||
$langs->load("errors");
|
||||
dol_syslog("Interface::run_triggers action=".$action." ".$langs->trans("ErrorDuplicateTrigger",$modName,"/htdocs/core/triggers/"),LOG_ERR);
|
||||
dol_syslog(get_class($this)."::run_triggers action=".$action." ".$langs->trans("ErrorDuplicateTrigger",$modName,"/htdocs/core/triggers/"),LOG_ERR);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once($dir.'/'.$file);
|
||||
}
|
||||
|
||||
// Check if trigger file is disabled by name
|
||||
if (preg_match('/NORUN$/i',$file))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (preg_match('/NORUN$/i',$file)) continue;
|
||||
// Check if trigger file is for a particular module
|
||||
$qualified=true;
|
||||
if (strtolower($reg[1]) != 'all')
|
||||
if (strtolower($reg[2]) != 'all')
|
||||
{
|
||||
$module=preg_replace('/^mod/i','',$reg[1]);
|
||||
$module=preg_replace('/^mod/i','',$reg[2]);
|
||||
$constparam='MAIN_MODULE_'.strtoupper($module);
|
||||
if (empty($conf->global->$constparam)) $qualified=false;
|
||||
}
|
||||
|
||||
if (! $qualified)
|
||||
{
|
||||
dol_syslog("Interfaces::run_triggers action=".$action." Triggers for file '".$file."' need module to be enabled",LOG_INFO);
|
||||
dol_syslog(get_class($this)."::run_triggers action=".$action." Triggers for file '".$file."' need module to be enabled",LOG_INFO);
|
||||
continue;
|
||||
}
|
||||
|
||||
include_once($dir."/".$file);
|
||||
$objMod = new $modName($this->db);
|
||||
$i=0;
|
||||
if ($objMod)
|
||||
{
|
||||
// Bypass if workflow module is enabled and if the trigger asked to be disable in such case
|
||||
if (! empty($conf->workflow->enabled) && ! empty($objMod->disabled_if_workflow))
|
||||
{
|
||||
dol_syslog("Interfaces::run_triggers action=".$action." Bypass triggers for file '".$file."'",LOG_INFO);
|
||||
continue;
|
||||
}
|
||||
|
||||
dol_syslog("Interfaces::run_triggers action=".$action." Launch triggers for file '".$file."'",LOG_INFO);
|
||||
|
||||
$modules[$i] = $modName;
|
||||
//dol_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
|
||||
$result=$objMod->run_trigger($action,$object,$user,$langs,$conf);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Action OK
|
||||
$nbtotal++;
|
||||
$nbok++;
|
||||
}
|
||||
if ($result == 0)
|
||||
{
|
||||
// Aucune action faite
|
||||
$nbtotal++;
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
// Action KO
|
||||
$nbtotal++;
|
||||
$nbko++;
|
||||
$this->errors[]=$objMod->error;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Interfaces::run_triggers action=".$action." Failed to instantiate trigger for file '".$file."'",LOG_ERR);
|
||||
}
|
||||
|
||||
$modules[$i] = $modName;
|
||||
$files[$i] = $file;
|
||||
$orders[$i] = $part1.'_'.$part2.'_'.$part3; // Set sort criteria value
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
|
||||
asort($orders);
|
||||
|
||||
// Loop on each trigger
|
||||
foreach ($orders as $key => $value)
|
||||
{
|
||||
$modName = $modules[$key];
|
||||
if (empty($modName)) continue;
|
||||
|
||||
$objMod = new $modName($this->db);
|
||||
if ($objMod)
|
||||
{
|
||||
dol_syslog(get_class($this)."::run_triggers action=".$action." Launch triggers for file '".$files[$key]."'",LOG_INFO);
|
||||
|
||||
$result=$objMod->run_trigger($action,$object,$user,$langs,$conf);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Action OK
|
||||
$nbtotal++;
|
||||
$nbok++;
|
||||
}
|
||||
if ($result == 0)
|
||||
{
|
||||
// Aucune action faite
|
||||
$nbtotal++;
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
// Action KO
|
||||
$nbtotal++;
|
||||
$nbko++;
|
||||
$this->errors[]=$objMod->error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog(get_class($this)."::run_triggers action=".$action." Failed to instantiate trigger for file '".$files[$key]."'",LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
if ($nbko)
|
||||
{
|
||||
dol_syslog("Interfaces::run_triggers action=".$action." Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::run_triggers action=".$action." Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_ERR);
|
||||
return -$nbko;
|
||||
}
|
||||
else
|
||||
{
|
||||
//dol_syslog("Interfaces::run_triggers Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_DEBUG);
|
||||
//dol_syslog(get_class($this)."::run_triggers Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_DEBUG);
|
||||
return $nbok;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of triggers. Function used by admin page htdoc/admin/triggers
|
||||
* Return list of triggers. Function used by admin page htdoc/admin/triggers.
|
||||
* List is sorted by trigger filename so by priority to run.
|
||||
*
|
||||
* @param int $workflow 0=Return all triggers, 1=Return only triggers not disabled if workflow module activated
|
||||
* @return array Array list of triggers
|
||||
*/
|
||||
function getTriggersList($workflow=0)
|
||||
function getTriggersList()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@ -204,31 +216,29 @@ class Interfaces
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_readable($dir.'/'.$file) && preg_match('/^interface_([^_]+)_(.+)\.class\.php/',$file,$reg))
|
||||
if (is_readable($dir.'/'.$file) && preg_match('/^interface_([0-9]+)_([^_]+)_(.+)\.class\.php/',$file,$reg))
|
||||
{
|
||||
$modName = 'Interface'.ucfirst($reg[2]);
|
||||
$part1=$reg[1];
|
||||
$part2=$reg[2];
|
||||
$part3=$reg[3];
|
||||
|
||||
$modName = 'Interface'.ucfirst($reg[3]);
|
||||
//print "file=$file"; print "modName=$modName"; exit;
|
||||
if (in_array($modName,$modules))
|
||||
{
|
||||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans("Error").' : '.$langs->trans("ErrorDuplicateTrigger",$modName,"/htdocs/core/triggers/").'</div>';
|
||||
$objMod = new $modName($this->db);
|
||||
|
||||
$modules[$i] = $modName;
|
||||
$files[$i] = $file;
|
||||
$orders[$i] = $objMod->family; // Tri par famille
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once($dir.'/'.$file);
|
||||
$objMod = new $modName($this->db);
|
||||
|
||||
$modules[$i] = $modName;
|
||||
$files[$i] = $file;
|
||||
$orders[$i] = $objMod->family; // Tri par famille
|
||||
$i++;
|
||||
}
|
||||
|
||||
$files[$i] = $file;
|
||||
$modules[$i] = $modName;
|
||||
$orders[$i] = $part1.'_'.$part2.'_'.$part3; // Set sort criteria value
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
@ -244,27 +254,27 @@ class Interfaces
|
||||
foreach ($orders as $key => $value)
|
||||
{
|
||||
$modName = $modules[$key];
|
||||
if ($modName)
|
||||
{
|
||||
$objMod = new $modName($this->db);
|
||||
// Bypass if workflow module is enabled and if the trigger is compatible
|
||||
if ($workflow && ! empty($objMod->disabled_if_workflow)) continue;
|
||||
}
|
||||
if (empty($modName)) continue;
|
||||
|
||||
$objMod = new $modName($this->db);
|
||||
|
||||
// Define disabledbyname and disabledbymodule
|
||||
$disabledbyname=0;
|
||||
$disabledbymodule=1;
|
||||
$module='';
|
||||
|
||||
// Check if trigger file is disabled by name
|
||||
if (preg_match('/NORUN$/i',$files[$key])) $disabledbyname=1;
|
||||
if (preg_match('/^interface_([^_]+)_(.+)\.class\.php/i',$files[$key],$reg))
|
||||
// Check if trigger file is for a particular module
|
||||
if (preg_match('/^interface_([0-9]+)_([^_]+)_(.+)\.class\.php/i',$files[$key],$reg))
|
||||
{
|
||||
// Check if trigger file is for a particular module
|
||||
$module=preg_replace('/^mod/i','',$reg[1]);
|
||||
$module=preg_replace('/^mod/i','',$reg[2]);
|
||||
$constparam='MAIN_MODULE_'.strtoupper($module);
|
||||
if (strtolower($reg[1]) == 'all') $disabledbymodule=0;
|
||||
if (strtolower($reg[2]) == 'all') $disabledbymodule=0;
|
||||
else if (empty($conf->global->$constparam)) $disabledbymodule=2;
|
||||
}
|
||||
|
||||
// We set info of modules
|
||||
$triggers[$j]['picto'] = $objMod->picto?img_object('',$objMod->picto):img_object('','generic');
|
||||
$triggers[$j]['file'] = $files[$key];
|
||||
$triggers[$j]['version'] = $objMod->getVersion();
|
||||
|
||||
@ -442,8 +442,9 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$blSocX2=$blSocW+$blSocX;
|
||||
|
||||
// Sender name
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetXY($blSocX,$blSocY);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','B', $default_font_size - 3);
|
||||
$pdf->SetXY($blSocX,$blSocY+1);
|
||||
$pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
@ -451,7 +452,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 3);
|
||||
$pdf->SetXY($blSocX,$blSocY+3);
|
||||
$pdf->SetXY($blSocX,$blSocY+4);
|
||||
$pdf->MultiCell(80, 2, $carac_emetteur, 0, 'L');
|
||||
|
||||
|
||||
@ -504,12 +505,11 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
/**********************************/
|
||||
//Emplacement Informations Expediteur (My Company)
|
||||
/**********************************/
|
||||
$Yoff = $blSocY;
|
||||
$blExpX=$Xoff-20;
|
||||
$blW=52;
|
||||
$Yoff = $Yoff+5;
|
||||
$Ydef = $Yoff;
|
||||
$blSocY = 1;
|
||||
$pdf->Rect($blExpX, $Yoff, $blW, 20);
|
||||
$pdf->Rect($blExpX, $Yoff, $blW, 26);
|
||||
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
@ -542,7 +542,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$blW=50;
|
||||
$Yoff = $Ydef +1;
|
||||
|
||||
$pdf->Rect($blDestX, $Yoff-1, $blW, 20);
|
||||
$pdf->Rect($blDestX, $Yoff-1, $blW, 26);
|
||||
|
||||
//Titre
|
||||
$pdf->SetFont('','B', $default_font_size - 3);
|
||||
|
||||
13
htdocs/core/triggers/interface_all_Logevents.class.php → htdocs/core/triggers/interface_20_all_Logevents.class.php
Normal file → Executable file
13
htdocs/core/triggers/interface_all_Logevents.class.php → htdocs/core/triggers/interface_20_all_Logevents.class.php
Normal file → Executable file
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/triggers/interface_all_Logevents.class.php
|
||||
* \file htdocs/core/triggers/interface_20_all_Logevents.class.php
|
||||
* \ingroup core
|
||||
* \brief Trigger file for
|
||||
*/
|
||||
@ -38,12 +38,13 @@ class InterfaceLogevents
|
||||
var $desc;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param DB Database handler
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function InterfaceLogevents($DB)
|
||||
function InterfaceLogevents($db)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->db = $db;
|
||||
|
||||
$this->name = preg_replace('/^Interface/i','',get_class($this));
|
||||
$this->family = "core";
|
||||
@ -243,7 +244,7 @@ class InterfaceLogevents
|
||||
$error ="Failed to insert security event: ".$event->error;
|
||||
$this->error=$error;
|
||||
|
||||
dol_syslog("interface_all_Logevents.class.php: ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this).": ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file /htdocs/core/triggers/interface_modPaypal_PaypalWorkflow.class.php
|
||||
* \file /htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php
|
||||
* \ingroup paypal
|
||||
* \brief Trigger file for paypal workflow
|
||||
*/
|
||||
@ -32,11 +32,12 @@ class InterfacePaypalWorkflow
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param DB Database handler
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function InterfacePaypalWorkflow($DB)
|
||||
function InterfacePaypalWorkflow($db)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->db = $db;
|
||||
|
||||
$this->name = preg_replace('/^Interface/i','',get_class($this));
|
||||
$this->family = "paypal";
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/triggers/interface_modWorkflow_WorkflowManager.class.php
|
||||
* \file htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
|
||||
* \ingroup core
|
||||
* \brief Trigger file for workflows
|
||||
*/
|
||||
@ -33,12 +33,13 @@ class InterfaceWorkflowManager
|
||||
var $db;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param DB Database handler
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function InterfaceWorkflowManager($DB)
|
||||
function InterfaceWorkflowManager($db)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->db = $db;
|
||||
|
||||
$this->name = preg_replace('/^Interface/i','',get_class($this));
|
||||
$this->family = "core";
|
||||
11
htdocs/core/triggers/interface_modAgenda_ActionsAuto.class.php → htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
Normal file → Executable file
11
htdocs/core/triggers/interface_modAgenda_ActionsAuto.class.php → htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
Normal file → Executable file
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/triggers/interface_modAgenda_ActionsAuto.class.php
|
||||
* \file htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
|
||||
* \ingroup agenda
|
||||
* \brief Trigger file for agenda module
|
||||
*/
|
||||
@ -39,12 +39,13 @@ class InterfaceActionsAuto
|
||||
var $desc;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param DB Database handler
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function InterfaceActionsAuto($DB)
|
||||
function InterfaceActionsAuto($db)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->db = $db;
|
||||
|
||||
$this->name = preg_replace('/^Interface/i','',get_class($this));
|
||||
$this->family = "agenda";
|
||||
11
htdocs/core/triggers/interface_modLdap_Ldapsynchro.class.php → htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php
Normal file → Executable file
11
htdocs/core/triggers/interface_modLdap_Ldapsynchro.class.php → htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php
Normal file → Executable file
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/triggers/interface_modLdap_Ldapsynchro.class.php
|
||||
* \file htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier de gestion des triggers LDAP
|
||||
*/
|
||||
@ -34,12 +34,13 @@ class InterfaceLdapsynchro
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param DB Database handler
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function InterfaceLdapsynchro($DB)
|
||||
function InterfaceLdapsynchro($db)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->db = $db;
|
||||
|
||||
$this->name = preg_replace('/^Interface/i','',get_class($this));
|
||||
$this->family = "ldap";
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/triggers/interface_modNotification_Notification.class.php
|
||||
* \file htdocs/core/triggers/interface_50_modNotification_Notification.class.php
|
||||
* \ingroup notification
|
||||
* \brief File of class of triggers for notification module
|
||||
*/
|
||||
@ -34,12 +34,13 @@ class InterfaceNotification
|
||||
'FICHEINTER_VALIDATE','ORDER_SUPPLIER_APPROVE','ORDER_SUPPLIER_REFUSE');
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param DB Database handler
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function InterfaceNotification($DB)
|
||||
function InterfaceNotification($db)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->db = $db;
|
||||
|
||||
$this->name = preg_replace('/^Interface/i','',get_class($this));
|
||||
$this->family = "notification";
|
||||
15
htdocs/core/triggers/interface_all_Demo.class.php-NORUN → htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN
Normal file → Executable file
15
htdocs/core/triggers/interface_all_Demo.class.php-NORUN → htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN
Normal file → Executable file
@ -17,12 +17,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/triggers/interface_all_Demo.class.php
|
||||
* \file htdocs/core/triggers/interface_90_all_Demo.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier de demo de personalisation des actions du workflow
|
||||
* \remarks Son propre fichier d'actions peut etre cree par recopie de celui-ci:
|
||||
* - Le nom du fichier doit etre: interface_modMymodule_Mytrigger.class.php
|
||||
* ou: interface_all_Mytrigger.class.php
|
||||
* - Le nom du fichier doit etre: interface_99_modMymodule_Mytrigger.class.php
|
||||
* ou: interface_99_all_Mytrigger.class.php
|
||||
* - Le fichier doit rester stocke dans core/triggers
|
||||
* - Le nom de la classe doit etre InterfaceMytrigger
|
||||
* - Le nom de la methode constructeur doit etre InterfaceMytrigger
|
||||
@ -39,12 +39,13 @@ class InterfaceDemo
|
||||
var $db;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param DB Database handler
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function InterfaceDemo($DB)
|
||||
function InterfaceDemo($db)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->db = $db;
|
||||
|
||||
$this->name = preg_replace('/^Interface/i','',get_class($this));
|
||||
$this->family = "demo";
|
||||
@ -739,7 +739,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti
|
||||
// Info
|
||||
print '<td align="center">';
|
||||
$userstatic->id=$val['fk_user_c'];
|
||||
$userstatic->nom=$val['login_c'];
|
||||
$userstatic->lastname=$val['login_c'];
|
||||
$htmltooltip='<b>'.$langs->trans("ECMSection").'</b>: '.$val['label'].'<br>';
|
||||
$htmltooltip='<b>'.$langs->trans("Type").'</b>: '.$langs->trans("ECMSectionManual").'<br>';
|
||||
$htmltooltip.='<b>'.$langs->trans("ECMCreationUser").'</b>: '.$userstatic->getNomUrl(1).'<br>';
|
||||
|
||||
@ -850,7 +850,7 @@ else
|
||||
$head=shipping_prepare_head($object);
|
||||
dol_fiche_head($head, 'shipping', $langs->trans("Sending"), 0, 'sending');
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
/*
|
||||
* Confirmation de la suppression
|
||||
@ -970,7 +970,7 @@ else
|
||||
|
||||
// Date creation
|
||||
print '<tr><td>'.$langs->trans("DateCreation").'</td>';
|
||||
print '<td colspan="3">'.dol_print_date($object->date_creation,"daytext")."</td>\n";
|
||||
print '<td colspan="3">'.dol_print_date($object->date_creation,"day")."</td>\n";
|
||||
print '</tr>';
|
||||
|
||||
// Delivery date planed
|
||||
@ -1159,7 +1159,7 @@ else
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
|
||||
$label = ( ! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label;
|
||||
}
|
||||
else
|
||||
|
||||
@ -298,14 +298,14 @@ if ($id > 0)
|
||||
if ($tab[$i]['source']=='internal')
|
||||
{
|
||||
$userstatic->id=$tab[$i]['id'];
|
||||
$userstatic->nom=$tab[$i]['nom'];
|
||||
$userstatic->prenom=$tab[$i]['firstname'];
|
||||
$userstatic->lastname=$tab[$i]['lastname'];
|
||||
$userstatic->firstname=$tab[$i]['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
if ($tab[$i]['source']=='external')
|
||||
{
|
||||
$contactstatic->id=$tab[$i]['id'];
|
||||
$contactstatic->name=$tab[$i]['nom'];
|
||||
$contactstatic->lastname=$tab[$i]['lastname'];
|
||||
$contactstatic->firstname=$tab[$i]['firstname'];
|
||||
print $contactstatic->getNomUrl(1);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.2.0-alpha'); // Also defined in htdocs/install/inc.php (Ex: x.y.z-alpha, x.y.z)
|
||||
if (! defined('EURO')) define('EURO',chr(128));
|
||||
|
||||
// Definition des constantes syslog
|
||||
// Define syslog constants
|
||||
if (! defined('LOG_DEBUG'))
|
||||
{
|
||||
if (function_exists("define_syslog_variables"))
|
||||
|
||||
@ -130,7 +130,7 @@ dol_htmloutput_mesg($mesg);
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$langs->trans("OrderCard");
|
||||
|
||||
|
||||
if ($object->fetch($id, $ref) > 0)
|
||||
{
|
||||
$soc = new Societe($db);
|
||||
@ -303,14 +303,14 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($tab[$i]['source']=='internal')
|
||||
{
|
||||
$userstatic->id=$tab[$i]['id'];
|
||||
$userstatic->nom=$tab[$i]['nom'];
|
||||
$userstatic->prenom=$tab[$i]['firstname'];
|
||||
$userstatic->lastname=$tab[$i]['lastname'];
|
||||
$userstatic->firstname=$tab[$i]['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
if ($tab[$i]['source']=='external')
|
||||
{
|
||||
$contactstatic->id=$tab[$i]['id'];
|
||||
$contactstatic->name=$tab[$i]['nom'];
|
||||
$contactstatic->lastname=$tab[$i]['lastname'];
|
||||
$contactstatic->firstname=$tab[$i]['firstname'];
|
||||
print $contactstatic->getNomUrl(1);
|
||||
}
|
||||
|
||||
@ -223,8 +223,8 @@ if ($resql)
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>';
|
||||
$userstatic->id=$obj->rowid;
|
||||
$userstatic->nom=$obj->name;
|
||||
$userstatic->prenom=$obj->firstname;
|
||||
$userstatic->lastname=$obj->name;
|
||||
$userstatic->firstname=$obj->firstname;
|
||||
print $userstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -299,14 +299,14 @@ if ($id > 0)
|
||||
if ($tab[$i]['source']=='internal')
|
||||
{
|
||||
$userstatic->id=$tab[$i]['id'];
|
||||
$userstatic->nom=$tab[$i]['nom'];
|
||||
$userstatic->prenom=$tab[$i]['firstname'];
|
||||
$userstatic->lastname=$tab[$i]['lastname'];
|
||||
$userstatic->firstname=$tab[$i]['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
if ($tab[$i]['source']=='external')
|
||||
{
|
||||
$contactstatic->id=$tab[$i]['id'];
|
||||
$contactstatic->name=$tab[$i]['nom'];
|
||||
$contactstatic->lastname=$tab[$i]['lastname'];
|
||||
$contactstatic->firstname=$tab[$i]['firstname'];
|
||||
print $contactstatic->getNomUrl(1);
|
||||
}
|
||||
|
||||
@ -18,9 +18,10 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** \file htdocs/install/inc.php
|
||||
* \ingroup core
|
||||
* \brief File that define environment for install pages
|
||||
/**
|
||||
* \file htdocs/install/inc.php
|
||||
* \ingroup core
|
||||
* \brief File that define environment for support pages
|
||||
*/
|
||||
|
||||
define('DOL_VERSION','3.2.0-alpha'); // Also defined in htdocs/master.inc.php (Ex: x.y.z-alpha, x.y.z)
|
||||
@ -53,25 +54,25 @@ if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
|
||||
}
|
||||
|
||||
|
||||
// Definition des constantes syslog
|
||||
if (function_exists("define_syslog_variables"))
|
||||
// Define syslog constants
|
||||
if (! defined('LOG_DEBUG'))
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '5.3.0', '<'))
|
||||
if (function_exists("define_syslog_variables"))
|
||||
{
|
||||
define_syslog_variables(); // Deprecated since php 5.3.0, syslog variables no longer need to be initialized
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pour PHP sans syslog (comme sous Windows)
|
||||
define('LOG_EMERG',0);
|
||||
define('LOG_ALERT',1);
|
||||
define('LOG_CRIT',2);
|
||||
define('LOG_ERR',3);
|
||||
define('LOG_WARNING',4);
|
||||
define('LOG_NOTICE',5);
|
||||
define('LOG_INFO',6);
|
||||
define('LOG_DEBUG',7);
|
||||
else
|
||||
{
|
||||
// Pour PHP sans syslog (comme sous Windows)
|
||||
define('LOG_EMERG',0);
|
||||
define('LOG_ALERT',1);
|
||||
define('LOG_CRIT',2);
|
||||
define('LOG_ERR',3);
|
||||
define('LOG_WARNING',4);
|
||||
define('LOG_NOTICE',5);
|
||||
define('LOG_INFO',6);
|
||||
define('LOG_DEBUG',7);
|
||||
}
|
||||
}
|
||||
|
||||
$includeconferror='';
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
-- ========================================================================
|
||||
-- This table logs all dolibarr security events
|
||||
-- Content of this table is not managed by users but by Dolibarr
|
||||
-- trigger interface_all_LogEvent.
|
||||
-- trigger interface_20_all_Logevents.
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_events
|
||||
|
||||
@ -73,15 +73,12 @@ ContractStatusClosed=Κλειστό
|
||||
ContractStatusRunning=Ενεργό
|
||||
ContractStatusExpired=Ληγμένο
|
||||
ContractStatusOnHold=Ανενεργό
|
||||
ContractStatusToRun=A mettre en service
|
||||
ContractNotRunning=Το Συμβόλαιο είναι Ανενεργό
|
||||
ErrorProductAlreadyExists=Ένα προϊόν με κωδικό %s υπάρχει ήδη.
|
||||
ErrorProductBadRefOrLabel=Wrong value for reference or label.
|
||||
Suppliers=Προμηθευτές
|
||||
SupplierRef=Κωδ. Προμηθευτή
|
||||
ShowProduct=Εμφάνιση προϊόντων
|
||||
ShowService=Εμφάνιση Υπηρεσίας
|
||||
ProductsAndServicesArea=Product and Services area
|
||||
ProductsArea=Περιοχή Προϊόντων
|
||||
ServicesArea=Περιοχή Υπηρεσιών
|
||||
AddToMyProposals=Προσθήκη στις Προτάσεις μου
|
||||
@ -95,19 +92,15 @@ NoPhotoYet=Δεν υπάρχει φωτογραφία
|
||||
BuiingPrice=Τιμή Αγοράς
|
||||
SupplierCard=Κάρτα προμηθευτή
|
||||
CommercialCard=Εμπορική Κάρτα
|
||||
AllWays=Path to find your product in stock
|
||||
NoCat=Το προϊόν σας, δεν ανήκει σε κάποια κατηγορία
|
||||
PrimaryWay=Κύρια διαδρομή
|
||||
DeleteFromCat=Αφαίρεση από την κατηγορία
|
||||
PriceRemoved=Η τιμή αφαιρέθηκε
|
||||
BarCode=Barcode
|
||||
BarcodeType=τύπος Barcode
|
||||
SetDefaultBarcodeType=Ορισμός τύπου barcode
|
||||
BarcodeValue=ΤΙμή Barcode
|
||||
GenbarcodeLocation=Bar code generation command line tool (used by phpbarcode engine for some bar code types)
|
||||
NoteNotVisibleOnBill=Σημείωση (μη ορατή σε τιμολόγια, προτάσεις...)
|
||||
CreateCopy=Δημιουργία Αντιγράφου
|
||||
ServiceLimitedDuration=If product is a service with limited duration:
|
||||
MultiPricesAbility=Ενεργοποίηση πολυ-τιμών
|
||||
MultiPricesNumPrices=Αριθμός τιμής
|
||||
MultiPriceLevelsName=Κατηγορίες τιμών
|
||||
@ -122,48 +115,21 @@ ProductToAddSearch=Εύρεση προϊόντως προς προσθήκη
|
||||
AddDel=Προσθήκη/Διαγραφή
|
||||
Quantity=Ποσότητα
|
||||
NoMatchFound=Δεν βρέθηκε κατάλληλη εγγραφή
|
||||
ProductAssociationList=List of related products/services: name of product/service (quantity affected)
|
||||
ErrorAssociationIsFatherOfThis=One of selected product is parent with current product
|
||||
DeleteProduct=Διαγραφή προϊόντος/υπηρεσίας
|
||||
ConfirmDeleteProduct=Are you sure you want to delete this product/service?
|
||||
ProductDeleted=Product/Service "%s" deleted from database.
|
||||
DeletePicture=Διαγραφή εικόνας
|
||||
ConfirmDeletePicture=Είστε σίγουροι ότι θέλετε να διαγράψετε την εικόνα;
|
||||
ExportDataset_produit_1=Προϊόντα
|
||||
ExportDataset_service_1=Υπηρεσίες
|
||||
ImportDataset_produit_1=Προϊόντα
|
||||
ImportDataset_service_1=Υπηρεσίες
|
||||
DeleteProductLine=Delete product line
|
||||
ConfirmDeleteProductLine=Are you sure you want to delete this product line?
|
||||
NoProductMatching=No product/service match your criteria
|
||||
MatchingProducts=Matching products/services
|
||||
NoStockForThisProduct=No stock for this product
|
||||
NoStock=Χωρίς απόθεμα
|
||||
Restock=Restock
|
||||
ProductSpecial=Special
|
||||
QtyMin=Quantity minimum
|
||||
PriceQty=Price for this quantity
|
||||
PriceQtyMin=Price quantity min.
|
||||
NoPriceDefinedForThisSupplier=No price/qty defined for this supplier/product
|
||||
NoSupplierPriceDefinedForThisProduct=No supplier price/qty defined for this product
|
||||
RecordedProducts=Products recorded
|
||||
RecordedProductsAndServices=Products/services recorded
|
||||
GenerateThumb=Δημιουργία μικρογραφίας
|
||||
ProductCanvasAbility=Use special "canvas" addons
|
||||
ServiceNb=Υπηρεσία #%s
|
||||
ListProductServiceByPopularity=List of products/services by popularity
|
||||
ListProductByPopularity=List of products by popularity
|
||||
ListServiceByPopularity=List of services by popularity
|
||||
Finished=Κατασκευασμένο Προϊόν
|
||||
RowMaterial=Πρώτη ύλη
|
||||
CloneProduct=Κλώνοποίηση προϊόντος ή υπηρεσίας
|
||||
ConfirmCloneProduct=Are you sure you want to clone product or service <b>%s</b> ?
|
||||
CloneContentProduct=Clone all main informations of product/service
|
||||
ClonePricesProduct=Clone main informations and prices
|
||||
ProductIsUsed=Μεταχειρισμένο
|
||||
NewRefForClone=Ref. of new product/service
|
||||
CustomerPrices=Τιμές πελατών
|
||||
SuppliersPrices=Τιμές προμηθευτών
|
||||
CustomCode=Custom code
|
||||
CountryOrigin=Χώρα προέλευσης
|
||||
HiddenIntoCombo=Hidden into select lists
|
||||
|
||||
@ -166,6 +166,6 @@ ProductIsUsed=This product is used
|
||||
NewRefForClone=Ref. of new product/service
|
||||
CustomerPrices=Customers prices
|
||||
SuppliersPrices=Suppliers prices
|
||||
CustomCode=Custom code
|
||||
CustomCode=Customs code
|
||||
CountryOrigin=Origin country
|
||||
HiddenIntoCombo=Hidden into select lists
|
||||
@ -88,7 +88,7 @@ class Product extends CommonObject
|
||||
// Statut indique si le produit est un produit fini '1' ou une matiere premiere '0'
|
||||
var $finished;
|
||||
|
||||
var $customcode; // Custom code
|
||||
var $customcode; // Customs code
|
||||
var $country_id; // Country origin id
|
||||
var $country_code; // Country origin code (US, FR, ...)
|
||||
|
||||
@ -479,7 +479,7 @@ class Product extends CommonObject
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Appel des triggers
|
||||
@ -526,23 +526,6 @@ class Product extends CommonObject
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
// Delete supplier prices log
|
||||
/*if (! $error)
|
||||
{
|
||||
$sql = 'DELETE pfpl';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'product_fournisseur_price_log as pfpl, '.MAIN_DB_PREFIX.'product_fournisseur_price as pfp';
|
||||
$sql.= ' WHERE pfpl.fk_product_fournisseur = pfp.rowid';
|
||||
$sql.= ' AND pf.fk_product = '.$id;
|
||||
dol_syslog(get_class($this).'::delete sql='.$sql, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if (! $result)
|
||||
{
|
||||
$error++;
|
||||
$this->error = $this->db->lasterror();
|
||||
dol_syslog(get_class($this).'::delete error '.$this->error, LOG_ERR);
|
||||
}
|
||||
}*/
|
||||
|
||||
// Delete supplier prices
|
||||
if (! $error)
|
||||
{
|
||||
@ -639,6 +622,7 @@ class Product extends CommonObject
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1018,13 +1002,13 @@ class Product extends CommonObject
|
||||
|
||||
global $langs, $conf;
|
||||
|
||||
dol_syslog("Product::fetch id=$id ref=$ref ref_ext=$ref_ext");
|
||||
dol_syslog(get_class($this)."::fetch id=".$id." ref=".$ref." ref_ext=".$ref_ext);
|
||||
|
||||
// Check parameters
|
||||
if (! $id && ! $ref && ! $ref_ext)
|
||||
{
|
||||
$this->error=$langs->trans('ErrorWrongParameters');
|
||||
dol_print_error("Product::fetch ".$this->error, LOG_ERR);
|
||||
dol_print_error(get_class($this)."::fetch ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1039,7 +1023,7 @@ class Product extends CommonObject
|
||||
else if ($ref) $sql.= " WHERE ref = '".$this->db->escape($ref)."'";
|
||||
else if ($ref_ext) $sql.= " WHERE ref_ext = '".$this->db->escape($ref_ext)."'";
|
||||
|
||||
dol_syslog("Product::fetch sql=".$sql);
|
||||
dol_syslog(get_class($this)."::fetch sql=".$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if ( $resql )
|
||||
{
|
||||
@ -2371,7 +2355,7 @@ class Product extends CommonObject
|
||||
/**
|
||||
* Load information about stock of a product into stock_warehouse[] and stock_reel
|
||||
*
|
||||
* @return int < 0 si erreur, > 0 si ok
|
||||
* @return int < 0 if KO, > 0 if OK
|
||||
*/
|
||||
function load_stock()
|
||||
{
|
||||
@ -2381,7 +2365,7 @@ class Product extends CommonObject
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_stock";
|
||||
$sql.= " WHERE fk_product = '".$this->id."'";
|
||||
|
||||
dol_syslog("Product::load_stock sql=".$sql);
|
||||
dol_syslog(get_class($this)."::load_stock sql=".$sql);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@ -2403,7 +2387,7 @@ class Product extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->error=$this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -2938,4 +2922,4 @@ class Product extends CommonObject
|
||||
$this->note='This is a comment (private)';
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@ -771,7 +771,7 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Custom code
|
||||
// Customs code
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" size="10" value="'.$_POST["customcode"].'"></td></tr>';
|
||||
|
||||
// Origin country
|
||||
@ -961,7 +961,7 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Custom code
|
||||
// Customs code
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td colspan="2"><input name="customcode" size="10" value="'.$object->customcode.'"></td></tr>';
|
||||
|
||||
// Origin country
|
||||
@ -1177,7 +1177,7 @@ else
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// Custom code
|
||||
// Customs code
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td colspan="2">'.$object->customcode.'</td>';
|
||||
|
||||
// Origin country code
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
@ -272,7 +272,8 @@ print "</table>\n";
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
|
||||
/* ************************************************************************** */
|
||||
@ -281,7 +282,7 @@ if ($mesg) print $mesg;
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($action == 'delete')
|
||||
if (! $action || $action == 'delete')
|
||||
{
|
||||
print "\n".'<div class="tabsAction">'."\n";
|
||||
|
||||
@ -531,5 +532,4 @@ else
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
?>
|
||||
|
||||
@ -321,7 +321,7 @@ if ($resql)
|
||||
// Author
|
||||
print '<td>';
|
||||
$userstatic->id=$objp->fk_user_author;
|
||||
$userstatic->nom=$objp->login;
|
||||
$userstatic->lastname=$objp->login;
|
||||
print $userstatic->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
// Value
|
||||
|
||||
@ -245,7 +245,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
print '<td nowrap="nowrap">';
|
||||
print img_object('','contact').' '.$langs->trans("ThirdPartyContacts");
|
||||
@ -327,14 +327,14 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($tab[$i]['source']=='internal')
|
||||
{
|
||||
$userstatic->id=$tab[$i]['id'];
|
||||
$userstatic->nom=$tab[$i]['nom'];
|
||||
$userstatic->prenom=$tab[$i]['firstname'];
|
||||
$userstatic->lastname=$tab[$i]['nom'];
|
||||
$userstatic->firstname=$tab[$i]['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
if ($tab[$i]['source']=='external')
|
||||
{
|
||||
$contactstatic->id=$tab[$i]['id'];
|
||||
$contactstatic->name=$tab[$i]['nom'];
|
||||
$contactstatic->lastname=$tab[$i]['nom'];
|
||||
$contactstatic->firstname=$tab[$i]['firstname'];
|
||||
print $contactstatic->getNomUrl(1);
|
||||
}
|
||||
|
||||
@ -328,14 +328,14 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($tab[$i]['source']=='internal')
|
||||
{
|
||||
$userstatic->id=$tab[$i]['id'];
|
||||
$userstatic->nom=$tab[$i]['nom'];
|
||||
$userstatic->prenom=$tab[$i]['firstname'];
|
||||
$userstatic->lastname=$tab[$i]['lastname'];
|
||||
$userstatic->firstname=$tab[$i]['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
if ($tab[$i]['source']=='external')
|
||||
{
|
||||
$contactstatic->id=$tab[$i]['id'];
|
||||
$contactstatic->name=$tab[$i]['nom'];
|
||||
$contactstatic->lastname=$tab[$i]['lastname'];
|
||||
$contactstatic->firstname=$tab[$i]['firstname'];
|
||||
print $contactstatic->getNomUrl(1);
|
||||
}
|
||||
|
||||
@ -603,8 +603,8 @@ abstract class ActionsCardCommon
|
||||
foreach($listsalesrepresentatives as $val)
|
||||
{
|
||||
$userstatic->id=$val['id'];
|
||||
$userstatic->nom=$val['name'];
|
||||
$userstatic->prenom=$val['firstname'];
|
||||
$userstatic->lastname=$val['name'];
|
||||
$userstatic->firstname=$val['firstname'];
|
||||
$this->tpl['sales_representatives'].= $userstatic->getNomUrl(1);
|
||||
$i++;
|
||||
if ($i < $nbofsalesrepresentative) $this->tpl['sales_representatives'].= ', ';
|
||||
|
||||
@ -678,7 +678,7 @@ class Societe extends CommonObject
|
||||
|
||||
$this->ref = $obj->rowid;
|
||||
$this->name = $obj->name;
|
||||
$this->nom = $obj->name; // TODO obsolete
|
||||
$this->nom = $obj->name; // deprecated
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
$this->ref_int = $obj->ref_int;
|
||||
|
||||
@ -1333,6 +1333,8 @@ class Societe extends CommonObject
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$name=$this->name?$this->name:$this->nom;
|
||||
|
||||
$result='';
|
||||
$lien=$lienfin='';
|
||||
|
||||
@ -1365,8 +1367,6 @@ class Societe extends CommonObject
|
||||
$lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$name=$this->name?$this->name:$this->nom;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name,'company').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
$result.=$lien.($maxlen?dol_trunc($name,$maxlen):$name).$lienfin;
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
require("../../main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/triggers/interface_modNotification_Notification.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/triggers/interface_50_modNotification_Notification.class.php");
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("mails");
|
||||
|
||||
@ -1802,8 +1802,8 @@ else
|
||||
foreach($listsalesrepresentatives as $val)
|
||||
{
|
||||
$userstatic->id=$val['id'];
|
||||
$userstatic->nom=$val['name'];
|
||||
$userstatic->prenom=$val['firstname'];
|
||||
$userstatic->lastname=$val['name'];
|
||||
$userstatic->firstname=$val['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
$i++;
|
||||
if ($i < $nbofsalesrepresentative) print ', ';
|
||||
|
||||
@ -19,8 +19,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/support/inc.php
|
||||
* \brief File that define environment for support pages
|
||||
* \file htdocs/support/inc.php
|
||||
* \ingroup core
|
||||
* \brief File that define environment for support pages
|
||||
*/
|
||||
|
||||
define('DOL_VERSION','3.2.0-alpha'); // Also defined in htdocs/master.inc.php
|
||||
@ -49,27 +50,26 @@ if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
|
||||
}
|
||||
|
||||
|
||||
// Definition des constantes syslog
|
||||
if (function_exists("define_syslog_variables"))
|
||||
// Define syslog constants
|
||||
if (! defined('LOG_DEBUG'))
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '5.3.0', '<'))
|
||||
{
|
||||
define_syslog_variables(); // Deprecated since php 5.3.0, syslog variables no longer need to be initialized
|
||||
}
|
||||
if (function_exists("define_syslog_variables"))
|
||||
{
|
||||
define_syslog_variables(); // Deprecated since php 5.3.0, syslog variables no longer need to be initialized
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pour PHP sans syslog (comme sous Windows)
|
||||
define('LOG_EMERG',0);
|
||||
define('LOG_ALERT',1);
|
||||
define('LOG_CRIT',2);
|
||||
define('LOG_ERR',3);
|
||||
define('LOG_WARNING',4);
|
||||
define('LOG_NOTICE',5);
|
||||
define('LOG_INFO',6);
|
||||
define('LOG_DEBUG',7);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pour PHP sans syslog (comme sous Windows)
|
||||
define('LOG_EMERG',0);
|
||||
define('LOG_ALERT',1);
|
||||
define('LOG_CRIT',2);
|
||||
define('LOG_ERR',3);
|
||||
define('LOG_WARNING',4);
|
||||
define('LOG_NOTICE',5);
|
||||
define('LOG_INFO',6);
|
||||
define('LOG_DEBUG',7);
|
||||
}
|
||||
|
||||
|
||||
$includeconferror='';
|
||||
|
||||
|
||||
@ -383,7 +383,7 @@ a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active {
|
||||
padding: 0px 5px 0px 5px;
|
||||
margin: 0px 1px 2px 1px;
|
||||
white-space: nowrap;
|
||||
text-shadow: 1px 2px 3px #AFAFAF;
|
||||
text-shadow: 1px 2px 4px #BFBFBF;
|
||||
}
|
||||
a.tmenu:hover, a.tmenu:active {
|
||||
margin: 0px 0px 0px 0px;
|
||||
@ -394,7 +394,7 @@ a.tmenu:hover, a.tmenu:active {
|
||||
}
|
||||
a.tmenu:hover, a.tmenu:active {
|
||||
background: #F4F4F4;
|
||||
text-shadow: 1px 2px 3px #AFAFAF;
|
||||
text-shadow: 1px 2px 4px #BFBFBF;
|
||||
}
|
||||
|
||||
a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active {
|
||||
@ -408,7 +408,7 @@ a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active {
|
||||
border-<?php print $left; ?>: 1px solid #D8D8D8;
|
||||
border-bottom: 2px solid #F4F4F4;
|
||||
white-space: nowrap;
|
||||
text-shadow: 1px 2px 3px #AFAFAF;
|
||||
text-shadow: 1px 2px 4px #BFBFBF;
|
||||
}
|
||||
|
||||
|
||||
@ -1693,7 +1693,7 @@ div.titre {
|
||||
font-weight: bold;
|
||||
color: rgb(<?php print $colortext; ?>);
|
||||
text-decoration: none;
|
||||
text-shadow: 1px 2px 3px #AFAFAF;
|
||||
text-shadow: 2px 2px 4px #BFBFBF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1717,6 +1717,9 @@ class User extends CommonObject
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (empty($this->lastname)) $this->lastname=($this->name?$this->name:$this->nom);
|
||||
if (empty($this->firstname)) $this->firstname=($this->firstname?$this->firstname:$this->prenom);
|
||||
|
||||
$ret='';
|
||||
if ($option && $this->civilite_id)
|
||||
{
|
||||
@ -1729,15 +1732,15 @@ class User extends CommonObject
|
||||
|
||||
if ($nameorder)
|
||||
{
|
||||
if ($this->firstname) $ret.=$this->firstname;
|
||||
$ret.=$this->firstname;
|
||||
if ($this->firstname && $this->lastname) $ret.=' ';
|
||||
if ($this->lastname) $ret.=$this->lastname;
|
||||
$ret.=$this->lastname;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->lastname) $ret.=$this->lastname;
|
||||
$ret.=$this->lastname;
|
||||
if ($this->firstname && $this->lastname) $ret.=' ';
|
||||
if ($this->firstname) $ret.=$this->firstname;
|
||||
$ret.=$this->firstname;
|
||||
}
|
||||
|
||||
return trim($ret);
|
||||
|
||||
@ -75,7 +75,7 @@ class UserGroup extends CommonObject
|
||||
|
||||
$this->id = $id;
|
||||
|
||||
$sql = "SELECT g.rowid, g.entity, g.nom, g.note, g.datec, g.tms as datem";
|
||||
$sql = "SELECT g.rowid, g.entity, g.nom as name, g.note, g.datec, g.tms as datem";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g";
|
||||
$sql.= " WHERE g.rowid = ".$this->id;
|
||||
|
||||
@ -90,7 +90,8 @@ class UserGroup extends CommonObject
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref = $obj->rowid;
|
||||
$this->entity = $obj->entity;
|
||||
$this->nom = $obj->nom;
|
||||
$this->nom = $obj->name; // depecated
|
||||
$this->name = $obj->name;
|
||||
$this->note = $obj->note;
|
||||
$this->datec = $obj->datec;
|
||||
$this->datem = $obj->datem;
|
||||
@ -106,7 +107,7 @@ class UserGroup extends CommonObject
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::Fetch ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ $objPHPExcel->getActiveSheet()->setTitle('Contacts');
|
||||
|
||||
//$page->set_column(0,4,18); // A
|
||||
|
||||
$sql = "SELECT distinct c.name, c.firstname, c.email, s.nom";
|
||||
$sql = "SELECT distinct c.name as lastname, c.firstname, c.email, s.nom as name";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = c.fk_soc";
|
||||
|
||||
@ -84,27 +84,19 @@ if ($resql)
|
||||
$i = 0;
|
||||
$j = 1;
|
||||
|
||||
//$page->write_string(0, 0, $langs->trans("ThirdParty"));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('A1', $langs->trans("Firstname"));
|
||||
//$page->write_string(0, 1, $langs->trans("Firstname"));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('B1', $langs->trans("Lastname"));
|
||||
//$page->write_string(0, 2, $langs->trans("Lastname"));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('C1', $langs->trans("Email"));
|
||||
//$page->write_string(0, 3, $langs->trans("Email"));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('D1', $langs->trans("ThirdPart"));
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
//$page->write_string($j, 0, $obj->nom);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('A'.($i+2), $obj->firstname);
|
||||
//$page->write_string($j, 1, $obj->firstname);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('B'.($i+2), $obj->name);
|
||||
//$page->write_string($j, 2, $obj->name);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('B'.($i+2), $obj->lastname);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('C'.($i+2), $obj->email);
|
||||
//$page->write_string($j, 3, $obj->email);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('D'.($i+2), $obj->nom);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('D'.($i+2), $obj->name);
|
||||
|
||||
$j++;
|
||||
$i++;
|
||||
|
||||
@ -93,7 +93,7 @@ $nbok=0; $nbko=0;
|
||||
|
||||
// On choisit les mails non deja envoyes pour ce mailing (statut=0)
|
||||
// ou envoyes en erreur (statut=-1)
|
||||
$sql = "SELECT mc.rowid, mc.nom, mc.prenom, mc.email, mc.other, mc.source_url, mc.source_id, mc.source_type";
|
||||
$sql = "SELECT mc.rowid, mc.nom as lastname, mc.prenom as firstname, mc.email, mc.other, mc.source_url, mc.source_id, mc.source_type";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
|
||||
$sql .= " WHERE mc.statut < 1 AND mc.fk_mailing = ".$id;
|
||||
|
||||
@ -123,7 +123,7 @@ if ($resql)
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
// sendto en RFC2822
|
||||
$sendto = str_replace(',',' ',$obj->prenom." ".$obj->nom) ." <".$obj->email.">";
|
||||
$sendto = str_replace(',',' ',$obj->firstname." ".$obj->lastname) ." <".$obj->email.">";
|
||||
|
||||
// Make subtsitutions on topic and body
|
||||
$other=explode(';',$obj->other);
|
||||
@ -135,8 +135,8 @@ if ($resql)
|
||||
$substitutionarray=array(
|
||||
'__ID__' => $obj->source_id,
|
||||
'__EMAIL__' => $obj->email,
|
||||
'__LASTNAME__' => $obj->nom,
|
||||
'__FIRSTNAME__' => $obj->prenom,
|
||||
'__LASTNAME__' => $obj->lastname,
|
||||
'__FIRSTNAME__' => $obj->firstname,
|
||||
'__OTHER1__' => $other1,
|
||||
'__OTHER2__' => $other2,
|
||||
'__OTHER3__' => $other3,
|
||||
|
||||
@ -47,7 +47,7 @@ require_once (DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php");
|
||||
|
||||
$error = 0;
|
||||
|
||||
$sql = "SELECT f.facnumber, f.total_ttc, s.nom, u.name, u.firstname, u.email";
|
||||
$sql = "SELECT f.facnumber, f.total_ttc, s.nom as name, u.name, u.firstname, u.email";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -85,7 +85,7 @@ if ($resql)
|
||||
$total = 0;
|
||||
}
|
||||
|
||||
$message .= "Facture ".$obj->facnumber." : ".price($obj->total_ttc)." : ".$obj->nom."\n";
|
||||
$message .= "Facture ".$obj->facnumber." : ".price($obj->total_ttc)." : ".$obj->name."\n";
|
||||
$total += $obj->total_ttc;
|
||||
|
||||
dol_syslog("email_unpaid_invoices_to_representatives.php: ".$obj->email);
|
||||
|
||||
@ -181,23 +181,25 @@ if ($result >= 0)
|
||||
$member = new Adherent($db);
|
||||
|
||||
// Propriete membre
|
||||
$member->prenom=$ldapuser[$conf->global->LDAP_FIELD_FIRSTNAME];
|
||||
$member->nom=$ldapuser[$conf->global->LDAP_FIELD_NAME];
|
||||
$member->prenom=$ldapuser[$conf->global->LDAP_FIELD_FIRSTNAME]; // deprecated
|
||||
$member->nom=$ldapuser[$conf->global->LDAP_FIELD_NAME]; // deprecated
|
||||
$member->firstname=$ldapuser[$conf->global->LDAP_FIELD_FIRSTNAME];
|
||||
$member->lastname=$ldapuser[$conf->global->LDAP_FIELD_NAME];
|
||||
$member->login=$ldapuser[$conf->global->LDAP_FIELD_LOGIN];
|
||||
$member->pass=$ldapuser[$conf->global->LDAP_FIELD_PASSWORD];
|
||||
|
||||
//$member->societe;
|
||||
$member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; // TODO obsolete
|
||||
$member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; // deprecated
|
||||
$member->address=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS];
|
||||
$member->cp=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; // TODO obsolete
|
||||
$member->cp=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; // deprecated
|
||||
$member->zip=$ldapuser[$conf->global->LDAP_FIELD_ZIP];
|
||||
$member->ville=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; // TODO obsolete
|
||||
$member->ville=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; // deprecated
|
||||
$member->town=$ldapuser[$conf->global->LDAP_FIELD_TOWN];
|
||||
$member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; // TODO obsolete
|
||||
$member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; // deprecated
|
||||
$member->country=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY];
|
||||
$member->pays_id=$countries[$hashlib2rowid[strtolower($member->country)]]['rowid']; // TODO obsolete
|
||||
$member->pays_id=$countries[$hashlib2rowid[strtolower($member->country)]]['rowid']; // deprecated
|
||||
$member->country_id=$countries[$hashlib2rowid[strtolower($member->country)]]['rowid'];
|
||||
$member->pays_code=$countries[$hashlib2rowid[strtolower($member->country)]]['code']; // TODO obsolete
|
||||
$member->pays_code=$countries[$hashlib2rowid[strtolower($member->country)]]['code']; // deprecated
|
||||
$member->country_code=$countries[$hashlib2rowid[strtolower($member->country)]]['code'];
|
||||
|
||||
$member->phone=$ldapuser[$conf->global->LDAP_FIELD_PHONE];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user