diff --git a/build/deb/README b/build/deb/README index 09c64853215..e898dd43821 100644 --- a/build/deb/README +++ b/build/deb/README @@ -5,4 +5,17 @@ DEB Package tools This directory contains files used by makepack-dolibarr.pl script to build a package, ready to be distributed, -with format .DEB (for Debian, Ubuntu, ...). \ No newline at end of file +with format .DEB (for Debian, Ubuntu, ...). + +# This is standard command to work on Debian packaging: +# +# lintian package To test a package +# +# dpkg -l List all packages +# dpkg -b To build package +# dpkg -c package.deb List content of package +# dpkg -I package.deb Give informations on package +# dpkg -i package.deb Install a package +# +# dpkg -L packagename List content of installed package +# dpkg --purge Remove config files and interactive saved answers diff --git a/build/deb/apache.conf b/build/deb/apache.conf index 05b21148f8d..fa29149ee59 100644 --- a/build/deb/apache.conf +++ b/build/deb/apache.conf @@ -4,7 +4,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs -# You can also use phpLDAPadmin as a VirtualHost +# You can also use dolibarr as a VirtualHost # # ServerName mydolibarrhostname.com # ServerAdmin root@example.com @@ -13,7 +13,10 @@ Alias /dolibarr /usr/share/dolibarr/htdocs # CustomLog logs/ldap.example.com-access.log common # - +# Directory for web pages + + Order deny,allow + Allow from all DirectoryIndex index.php Options +FollowSymLinks +Indexes @@ -53,10 +56,23 @@ Alias /dolibarr /usr/share/dolibarr/htdocs #ExpiresByType application/x-javascript A2592000 #ExpiresByType application/javascript A2592000 - + - +# Directory for public pages + AllowOverride All Order deny,allow Allow from all - + + +# Directory for data files + + AllowOverride All + Order deny,allow + Allow from all + + + AllowOverride All + Order deny,allow + Allow from all + diff --git a/build/deb/changelog b/build/deb/changelog new file mode 100644 index 00000000000..d75fd100a60 --- /dev/null +++ b/build/deb/changelog @@ -0,0 +1,4 @@ +dolibarr 3.1.0 unstable; urgency=low + * New 3.1.0 release + More information into /usr/share/dolibarr/ChangeLog file. + -- maintainer Laurent Destailleur 2011-07-09 \ No newline at end of file diff --git a/build/deb/config b/build/deb/config index 74220322386..1965ef73cc5 100644 --- a/build/deb/config +++ b/build/deb/config @@ -1,15 +1,6 @@ #!/bin/sh # Debian install package run: config, preinst, prerm, postinst, postrm # -# dpkg -l list all packages -# dpkg -b is to build package -# dpkg -c package.deb list content of package -# dpkg -I package.deb give informations on package -# dpkg -i package.deb install a package -# -# dpkg -L packagename list content of installed package -# dpkg --purge remove interactive saved answers -# set -e diff --git a/build/deb/control b/build/deb/control index 819a8b1668e..2d356fc7b2b 100644 --- a/build/deb/control +++ b/build/deb/control @@ -3,36 +3,39 @@ Version: __VERSION__ Architecture: all Maintainer: Laurent Destailleur Essential: no -Installed-Size: 31200 -Depends: apache2, libapache2-mod-php5, php5, php5-cgi, php5-curl, php5-gd, php5-ldap, php5-mysql, mysql-server, perl +Installed-Size: 61200 +Depends: apache2, libapache2-mod-php5, php5, php5-cli, php5-cgi, php5-curl, php5-gd, php5-ldap, php5-mysql, mysql-server, perl Section: web Priority: optional -Recommends: mozilla | netscape +Recommends: firefox Homepage: http://www.dolibarr.org -Description: Dolibarr ERP & CRM - Dolibarr ERP/CRM is an open source/free software for - small and medium companies, foundations or freelances. It includes - different features for Enterprise Resource Planning (ERP) and Customer - Relationship Management (CRM) but also other features for different - activities. +Description: Easy to use ERP & CRM software to manage your activity. + Dolibarr ERP & CRM is an easy to use open source/free software for small + and medium companies, foundations or freelances. It includes different + features for Enterprise Resource Planning (ERP) and Customer Relationship + Management (CRM) but also for different other activities. + It's a web software you can install as a standalone program or on any web + hosting provider to use it from anywhere with any web browser. + Dolibarr was designed to provide only features you need and be easy to use. . - Dolibarr features are activated by modules. Most common modules are: + Only features you need are visible, depending on which module were activated. + Most common used modules are: . - * Products and services catalog - * Stock management - * Bank accounts management * Customers, Suppliers or Prospects directory * Contacts directory * Orders management * Commercial proposals management * Invoices management + * Products and services catalog + * Stock management + * Foundations members management + * Bank accounts management * Point of Sale * Payments management * Commercial actions management * Contracts management * Standing orders management * Shipping management - * Foundations members management * Donations management * Bookmarks management * Mass Emailings @@ -40,4 +43,7 @@ Description: Dolibarr ERP & CRM * Data export and import tools * LDAP connectivity * PDF exports - * And a lot of other modules + * And a lot of more modules... + . + You can also add third parties external modules or develop yours. + \ No newline at end of file diff --git a/build/deb/copyright b/build/deb/copyright new file mode 100644 index 00000000000..00aafd563b1 --- /dev/null +++ b/build/deb/copyright @@ -0,0 +1,4 @@ +Copyright 2011 Laurent Destailleur + +This software is distributed under GPL v2 licence. +See file /usr/share/common-licenses/GPL-2 \ No newline at end of file diff --git a/build/deb/dolibarr.desktop b/build/deb/dolibarr.desktop index 7ae7d4d8a7a..5d11eb40ffb 100644 --- a/build/deb/dolibarr.desktop +++ b/build/deb/dolibarr.desktop @@ -3,15 +3,20 @@ # It must be saved into directory /usr/share/applications Version=1.0 Encoding=UTF-8 -Name=Dolibarr ERP/CRM -GenericName=Dolibarr ERP/CRM -Comment=The easy to use manager for small and medium enterprises or foundations -# xdg-open use default bowser to open url (exo-open for xfde, gnome-open for gnome, ...) -Exec=xdg-open http://localhost/dolibarr +Name=Dolibarr ERP & CRM +Name[fr]=Dolibarr ERP & CRM +GenericName=Dolibarr ERP & CRM +Comment=The easy to use manager (ERP & CRM) for small and medium enterprises or foundations +Comment[fr]=L'ERP & CRM simple pour la gestion des PME et associations +# Command to open an URL +# For Fedora: xdg-open +# For Debian/Ubuntu: x-www-browser +# (exo-open for xfde, gnome-open for gnome, ...) +Exec=x-www-browser http://localhost/dolibarr Icon=dolibarr Terminal=false Type=Application -Category=Application;Office; +Categories=Office StartupNotify=true InitialPreference=5 #NoDisplay=true diff --git a/build/deb/install.forced.php.install b/build/deb/install.forced.php.install index 4b92d7681d6..1166abe41ae 100755 --- a/build/deb/install.forced.php.install +++ b/build/deb/install.forced.php.install @@ -4,11 +4,13 @@ // This file must be present into htdocs/install directory // during install process to be used. // -// $Id: install.forced.php.install,v 1.5 2011/06/26 11:41:50 eldy Exp $ +// $Id: install.forced.php.install,v 1.7 2011/07/09 15:48:19 eldy Exp $ // + $force_install_noedit=1; $force_install_message='KeepDefaultValuesDeb'; $force_install_main_data_root='/usr/share/dolibarr/documents'; +#$force_install_main_data_root='/var/lib/dolibarr'; $force_install_type='mysqli'; $force_install_dbserver='localhost'; $force_install_port='3306'; diff --git a/build/deb/postinst b/build/deb/postinst index 0fbb8c73d7e..be9fb7521b7 100644 --- a/build/deb/postinst +++ b/build/deb/postinst @@ -49,26 +49,28 @@ case "$1" in cat $fileorig | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $config fi - # Create /var/lib/dolibarr/documents - mkdir -p /var/lib/dolibarr/documents - chown -R www-data.www-data /var/lib/dolibarr/documents; - chmod -R 775 /var/lib/dolibarr/documents; - chmod -R g+s /var/lib/dolibarr/documents; + # Create document directory + #docdir='/var/lib/dolibarr/documents' + docdir='/usr/share/dolibarr/documents' + mkdir -p $docdir + chown -R www-data:www-data $docdir + chmod -R 775 $docdir + chmod -R g+s $docdir # Create an empty conf.php with permission to web server if [ ! -f /usr/share/dolibarr/htdocs/conf/conf.php ] then echo Create empty file /usr/share/dolibarr/htdocs/conf/conf.php touch /usr/share/dolibarr/htdocs/conf/conf.php - chown -R www-data.www-data /usr/share/dolibarr/htdocs/conf/conf.php; - chmod -R 750 /usr/share/dolibarr/htdocs/conf/conf.php; + chown -R www-data:www-data /usr/share/dolibarr/htdocs/conf/conf.php + chmod -R 750 /usr/share/dolibarr/htdocs/conf/conf.php fi #db_reset "dolibarr/webserver" # Get the web server type (use db_get for interactive mode). -# db_get "dolibarr/webserver" # Read value for webserver. -# webserver="$RET" + #db_get "dolibarr/webserver" # Read value for webserver. + #webserver="$RET" case $webserver in Apache) webservers="apache2" ;; @@ -81,23 +83,10 @@ case "$1" in for server in $webservers ; do echo Complete config of server $server - # Add info for PHP (obsolete) - #typestr='application/x-httpd-php' - #extension='.php' - #. /usr/share/wwwconfig-common/apache-addtype_all.sh - - # Enable PHP module (obsolete) - #. /usr/share/wwwconfig-common/apache-php.sh - #echo Result of enabling PHP modules: $status - # Detect webuser and webgroup webuser= webgroup= - # Search in httpd.conf (obsolete) - #. /usr/share/wwwconfig-common/apache-run.get - #echo Web user.group found is $webuser.$webgroup - if [ -z "$webuser" ] ; then webuser=www-data fi @@ -111,30 +100,14 @@ case "$1" in # That may lead to problems if apache & apache-ssl do # not have the same user/group. # - chown -R $webuser.$webgroup /usr/share/dolibarr + chown -R $webuser:$webgroup /usr/share/dolibarr - # Put content of conf file into apache httpd.conf main file (/etc/apache2/httpd.conf) - #includefile="/etc/dolibarr/apache.conf" - #. /usr/share/dolibarr/build/deb/apache-include_all.sh - #test "$status" = "uncomment" -o "$status" = "include" && restart="$server $restart" - # Add link to config file echo Setup web server $server to add dolibarr config file - ln -fs /etc/dolibarr/apache.conf /etc/apache2/conf.d + ln -fs /etc/dolibarr/apache.conf /etc/apache2/conf.d/dolibarr.conf - # (useless) - #for index in index.php; do - # . /usr/share/wwwconfig-common/apache-index_all.sh - # test "$status" = "added" && restart="$server $restart" - #done done - # Copy icon file - #echo "Copy icon file" - #fileorig="/usr/share/dolibarr/doc/images/dolibarr.xpm" - #target="/usr/share/pixmaps/" - #cp -f $fileorig $target - #echo "Install menu entry" # This one is for Gnome ubuntu #fileorig="/usr/share/dolibarr/build/deb/dolibarr.desktop" @@ -157,22 +130,17 @@ case "$1" in # Restart servers servers="apache2-ssl apache2 mysql" - if [ -f /usr/share/wwwconfig-common/restart.sh ] ; - then - echo Restart web servers running /usr/share/wwwconfig-common/restart.sh - . /usr/share/wwwconfig-common/restart.sh - else - # Another way to restart - for server in $servers ; do - echo Restart web server $server - if [ -x /usr/sbin/invoke-rc.d ]; then - # This on works with Debian (5.05,...) and Ubuntu (9.10,10.04,...) - invoke-rc.d $server reload || true - else - /etc/init.d/$server reload || true - fi - done - fi + # Another way to restart + for server in $servers ; do + if [ -x /usr/sbin/invoke-rc.d ]; then + echo Restart web server $server using invoke-rc.d + # This works with Debian (5.05,...) and Ubuntu (9.10,10.04,...) + invoke-rc.d $server reload || true + else + echo Restart web server $server using $server reload + /etc/init.d/$server reload || true + fi + done echo ---------- echo "Call Dolibarr page http://localhost/dolibarr/ to complete the installation and use Dolibarr." diff --git a/build/deb/postrm b/build/deb/postrm index 610f67772ac..c4d1c790e5d 100644 --- a/build/deb/postrm +++ b/build/deb/postrm @@ -72,10 +72,6 @@ case "$1" in echo postrm Mysql superuser found to use is $superuserlogin dbadmin="$superuserlogin" dbadmpass="$superuserpassword" - #db_get "dolibarr/db/admin/name" - #dbadmin="$RET" - #db_get "dolibarr/db/admin/password" - #dbadmpass="$RET" dbtype="mysql" # To delete a mysql user (disabled) @@ -149,30 +145,6 @@ case "$1" in # Remove include files for server in $webservers ; do - - # Old usage - #export conffile="/etc/$server/httpd.conf" - #export error="" - #echo "postrm conffile=$conffile" - #if [ -f $conffile ] ; - #then - # if [ -s $conffile ] ; - # then - # echo postrm remove dolibarr include from /etc/dolibarr/apache.conf - # # We disable set -e to avoid premature end of script if error - # set +e - # GREP="Include[[:space:]]\+$includefile\b" - # if grep -e "$GREP" $conffile > /dev/null 2>&1; then - # log="${log}Include of $includefile found in $conffile file, purging." - # status=purge - # grep -v -e "$GREP" < $conffile > $conffile.purg - # mv $conffile.purg $conffile - # fi - # # We restore blocking errors - # set -e - # fi - #fi - # New usage export conffile="/etc/$server/conf.d/dolibarr.conf" if [ -f $conffile ] ; @@ -189,25 +161,18 @@ case "$1" in rm -rf /etc/dolibarr # Restart servers - servers="apache2-ssl apache2 mysql" - if [ -f /usr/share/wwwconfig-common/restart.sh ] ; - then - . /usr/share/wwwconfig-common/restart.sh - else - # Another way to restart - for server in $servers ; do - # We disable blocking errors - set +e - echo "Restart server $server if exists" - if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d $server reload || true - else - /etc/init.d/$server reload || true - fi - # We restore blocking errors - set -e - done - fi + for server in $servers ; do + # We disable blocking errors + set +e + echo "Restart server $server if exists" + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $server reload || true + else + /etc/init.d/$server reload || true + fi + # We restore blocking errors + set -e + done # Remove file and conf file for dir in /usr/share/dolibarr ; do diff --git a/build/deb/rules b/build/deb/rules index 6ac50a11ba1..df233257ac4 100644 --- a/build/deb/rules +++ b/build/deb/rules @@ -1,100 +1,4 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. # -# This script is not used. The script used to build the root -# for making Debian pakcage is build/makepack-dolibarr.pl +# Sample debian/rules # - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This is the debhelper compatability version to use. -export DH_COMPAT=3 - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - touch configure-stamp - -build: configure-stamp build-stamp -build-stamp: - dh_testdir - - # Add here commands to compile the package. - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Add here commands to clean up after the build process. - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - @# Add here commands to install the package into debian/dolibarr - - install --mode=644 -D --group=www-data --owner=www-data \ - DEBIAN/apache.conf \ - debian/dolibarr/etc/dolibarr/apache.conf - - mkdir -p debian/dolibarr/usr/share/dolibarr - cp -rp htdocs/* debian/dolibarr/usr/share/dolibarr/htdocs - mkdir -p debian/dolibarr/usr/share/dolibarr/documents - chmod -R 644 debian/dolibarr/usr/share/dolibarr - - find debian/dolibarr/usr/share/dolibarr -type d | xargs chmod 755 - - find debian/dolibarr \( -name CVS -o -name .cvsignore \) | xargs rm -fr - - mkdir -p debian/dolibarr/usr/lib/dolibarr - cp -rp scripts/* debian/dolibarr/usr/lib/dolibarr - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot -# dh_movefiles - - dh_installdebconf - dh_installdocs -# dh_installexamples -# dh_installmenu -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit -# dh_installcron - dh_installman -# dh_installinfo -# dh_undocumented -# dh_installchangelogs - dh_link - dh_strip - dh_compress - dh_fixperms -# dh_makeshlibs - dh_installdeb -# dh_perl -# dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure +# This script is not used, so is empty. diff --git a/build/deb/templates b/build/deb/templates index 703aa9fc2db..1d1c133f99a 100644 --- a/build/deb/templates +++ b/build/deb/templates @@ -1,6 +1,6 @@ Template: dolibarr/configuration/note Type: note -Description: Package configuration note. +Description: Package configuration note Dolibarr can be and should be configured entirely via web, so, in the following configuration steps, I'm going to prompt you for the passwords that Dolibarr uses for web configuration and some default values for the @@ -15,19 +15,13 @@ Description: Package configuration note. Template: dolibarr/webserver Type: select Choices: Apache, Apache-ssl, Both, None -Description: Which Web Server are you running? +Description: Which Web Server are you running ? Dolibarr supports any web server with PHP capabilities, but this configuration process only supports Apache and Apache-SSL. -Template: dolibarr/db/setup/skip -Type: boolean -Default: false -Description: DB setup skipped. - DB setup will be skipped. - Template: dolibarr/db Type: text -Description: Dolibarr DB setup NOTE. +Description: Dolibarr DB setup note Now you should specify the DBMS settings. You must provide the host name on which the DBMS server is installed, the type (i.e. MySql), the DB name, the DBMS administrator user-name, etc. @@ -71,7 +65,7 @@ Description: Please, retype the password to access the DB: Template: dolibarr/db/user/password/mismatch Type: text -Description: Passwords mismatch. +Description: Passwords mismatch The DB access passwords you inserted mismatch. Please, try again. Template: dolibarr/db/admin/name @@ -97,6 +91,15 @@ Template: dolibarr/postrm Type: boolean Default: true Description: Delete database ? - Do I have to delete also the Dolibarr MySQL database and all its datas - (datas subjected to this quetion are the Dolibarr DBMS account and all + Delete the Dolibarr MySQL database and all its datas (datas related + to this quetion are the Dolibarr DBMS account and all Dolibarr tables) ? + +Template: dolibarr/postrmfile +Type: boolean +Default: true +Description: Delete attached files ? + Delete also all uploaded and generated files (datas related + to this quetion are all files found into /usr/share/dolibarr/documents, + uploaded or generated when using Dolibarr) ? + \ No newline at end of file diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 5ad1e1653b3..8e0e3a0b1d1 100644 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -2,7 +2,7 @@ #---------------------------------------------------------------------------- # \file build/makepack-dolibarr.pl # \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps) -# \version $Id: makepack-dolibarr.pl,v 1.105 2011/06/26 11:41:50 eldy Exp $ +# \version $Id: makepack-dolibarr.pl,v 1.109 2011/07/11 11:09:02 eldy Exp $ # \author (c)2004-2011 Laurent Destailleur #---------------------------------------------------------------------------- @@ -48,7 +48,7 @@ if (-d "/usr/src/RPM") { use vars qw/ $REVISION $VERSION /; -$REVISION='$Revision: 1.105 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1; +$REVISION='$Revision: 1.109 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1; $VERSION="1.0 (build $REVISION)"; @@ -98,7 +98,7 @@ if (! $TEMP || ! -d $TEMP) { $BUILDROOT="$TEMP/buildroot"; -my $copyalreadydone=0; +my $copyalreadydone=0; # Use - before number of choice to avoid copy my $batch=0; for (0..@ARGV-1) { @@ -262,6 +262,7 @@ 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 -fr $BUILDROOT/$PROJECT/documents`; $ret=`rm -fr $BUILDROOT/$PROJECT/document`; @@ -277,9 +278,13 @@ if ($nboftargetok) { $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*`; $ret=`rm -fr $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF/fonts/utils/freetype6.dll`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF/fonts/utils/zlib1.dll`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php_writeexcel/php.bmp`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/php_writeexcel/php.bmp`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF/fonts/utils/freetype6.dll`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF/fonts/utils/zlib1.dll`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF/fonts/utils/pfm2afm`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF/fonts/utils/ttf2ufm`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils/pfm2afm`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils/ttf2ufm`; } # Build package for each target @@ -402,7 +407,7 @@ if ($nboftargetok) { $ret=`$cmd`; print "Remove other files\n"; - $ret=`rm -f $BUILDROOT/$FILENAMETGZ2/*.dll $BUILDROOT/$FILENAMETGZ2/*/*.dll $BUILDROOT/$FILENAMETGZ2/*/*/*.dll $BUILDROOT/$FILENAMETGZ2/*/*/*/*.dll $BUILDROOT/$FILENAMETGZ2/*/*/*/*/*.dll $BUILDROOT/$FILENAMETGZ2/*/*/*/*/*/*.dll $BUILDROOT/$FILENAMETGZ2/*/*/*/*/*/*/*.dll`; + $ret=`rm -f $BUILDROOT/$FILENAMETGZ2/htdocs/includes/barcode/php-barcode/genbarcode/genbarcode`; print "Compress $FILENAMETGZ2 into $FILENAMETGZ2.tgz...\n"; $ret=`tar --exclude-from "$SOURCE/build/tgz/tar_exclude.txt" --directory "$BUILDROOT" -czvf "$BUILDROOT/$FILENAMETGZ2.tgz" $FILENAMETGZ2`; @@ -436,11 +441,11 @@ if ($nboftargetok) { if ($target eq 'DEB') { $newbuild = $BUILD; - $newbuild =~ s/(dev|alpha)/0/gi; # dev - $newbuild =~ s/beta/1/gi; # beta - $newbuild =~ s/rc./2/gi; # rc - if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale - # now newbuild is 0-0 or 0-3 for example + $newbuild =~ s/(dev|alpha)/1/gi; # dev + $newbuild =~ s/beta/2/gi; # beta + $newbuild =~ s/rc./3/gi; # rc + if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale + # now newbuild is 0-1 or 0-4 for example print "Version is $MAJOR.$MINOR.$newbuild\n"; print "Remove target $FILENAMEDEB.deb...\n"; @@ -453,7 +458,6 @@ if ($nboftargetok) { 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 "Create directory $BUILDROOT/$PROJECT.tmp/DEBIAN\n"; $ret=`mkdir "$BUILDROOT/$PROJECT.tmp/DEBIAN"`; print "Copy $SOURCE/build/deb/* to $BUILDROOT/$PROJECT.tmp/DEBIAN\n"; @@ -475,6 +479,7 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/doc/tshirt`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/doc/rollup`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/test`; + $ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/barcode/php-barcode/genbarcode/genbarcode`; # To remove once stable $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/htdocs/theme/bureau2crea`; @@ -493,29 +498,45 @@ if ($nboftargetok) { $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/deb/dolibarr.desktop" "$BUILDROOT/$PROJECT.tmp/usr/share/applications/dolibarr.desktop"`; - + 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"`; + print "Copy README file into $BUILDROOT/$PROJECT.tmp/DEBIAN\n"; $ret=`cp "$SOURCE/README" "$BUILDROOT/$PROJECT.tmp/DEBIAN/README"`; + $ret=`cp "$SOURCE/README" "$BUILDROOT/$PROJECT.tmp/usr/share/doc/$PROJECT/README"`; - print "Copy copyright file into $BUILDROOT/$PROJECT.tmp/DEBIAN\n"; - $ret=`cp "$SOURCE/COPYRIGHT" "$BUILDROOT/$PROJECT.tmp/DEBIAN/copyright"`; + print "Copy copyright file into $BUILDROOT/$PROJECT.tmp/usr/share/doc/$PROJECT/copyright\n"; + $ret=`cp "$BUILDROOT/$PROJECT.tmp/DEBIAN/copyright" "$BUILDROOT/$PROJECT.tmp/usr/share/doc/$PROJECT/copyright"`; - print "Create directory $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/documents\n"; - $ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/documents"`; + #$ret=`gzip -9 -c $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/ChangeLog > $BUILDROOT/$PROJECT.tmp/usr/share/doc/$PROJECT/changelog.Debian.gz`; + $ret=`gzip -9 -c $BUILDROOT/$PROJECT.tmp/DEBIAN/changelog > $BUILDROOT/$PROJECT.tmp/usr/share/doc/$PROJECT/changelog.Debian.gz`; - print "Set permissions/owners on files/dir\n"; + print "Set owners on files/dir\n"; $ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`; - $ret=`chown -R www-data.www-data $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/documents`; - $ret=`chmod -R 555 $BUILDROOT/$PROJECT.tmp`; - $ret=`chmod 755 $BUILDROOT/$PROJECT.tmp`; - $ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/documents`; - $ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/DEBIAN`; + 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/DEBIAN -type f -exec chmod 755 {} \\; "; + $ret=`$cmd`; + $ret=`chmod 644 $BUILDROOT/$PROJECT.tmp/DEBIAN/control`; + $ret=`chmod 644 $BUILDROOT/$PROJECT.tmp/DEBIAN/templates`; + $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`; + $cmd="find $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/scripts -name *.php -type f -exec chmod 755 {} \\; "; + $ret=`$cmd`; + print "Go to directory $BUILDROOT\n"; $olddir=getcwd(); chdir("$BUILDROOT"); diff --git a/build/pad/DoliWamp.pml b/build/pad/DoliWamp.pml index 757924a6f49..beb13bbae0d 100644 --- a/build/pad/DoliWamp.pml +++ b/build/pad/DoliWamp.pml @@ -4,9 +4,9 @@ DoliWamp - 3.0.0 - 01 - 16 + 3.1.0 + 07 + 09 2011 @@ -14,7 +14,7 @@ Freeware Major Update Install and Uninstall - Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP + Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other English,Arabic,Catalan,Chinese,Dutch,Finnish,French,German,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish http://www.dolibarr.org Business @@ -42,16 +42,25 @@ DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs. DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. - DoliWamp is the Dolibarr ERP/CRM for Windows. - -Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). - -It's an OpenSource project, based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop. - -DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. - - + DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop. +DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. + + doliwamp, dolibarr, erp, crm, factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations, entreprises, PME, TPE + DoliWamp, Dolibarr ERP/CRM pour Windows + DoliWamp, la distribution de Dolibarr pour gérer votre entreprise ou association + DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations) + DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations) + DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations) + + + doliwamp, dolibarr, erp, crm, gestionale, medie imprese, fondazioni + DoliWamp, Dolibarr ERP/CRM per Windows + Gestionale open source e gratuito per piccole e medie imprese, fondazioni + Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. + Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. + Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. + @@ -72,11 +81,6 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to GNU GPL GNU GPL - - Y - N - - Y 1.4 @@ -183,4 +187,9 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to + + Y + N + + diff --git a/build/pad/Dolibarr developpers.cml b/build/pad/Dolibarr developpers.cml index d784baa2c1e..06be3b4770f 100644 --- a/build/pad/Dolibarr developpers.cml +++ b/build/pad/Dolibarr developpers.cml @@ -1,31 +1,31 @@ - - - PADGen 3.0.1.38 - - Dolibarr team - 61 Boulevard Vauban - - Montigny-le-Bretonneux - - 78180 - FRANCE - http://www.dolibarr.org - - Dolibarr team - Dolibarr team - dolibarr-dev@nongnu.org - Dolibarr team - Dolibarr team - dolibarr-dev@nongnu.org - - - dolibarr-dev@nongnu.org - dolibarr-dev@nongnu.org - dolibarr-dev@nongnu.org - - - - - - - + + + PADGen 3.1.1.47 + + Dolibarr team + 11 rue raymond Queneau + + Rueil Malmaison + + 92500 + FRANCE + http://www.dolibarr.org + + Dolibarr team + Dolibarr team + dolibarr-dev@nongnu.org + Dolibarr team + Dolibarr team + dolibarr-dev@nongnu.org + + + dolibarr-dev@nongnu.org + dolibarr-dev@nongnu.org + dolibarr-dev@nongnu.org + + + + + + + diff --git a/build/pad/Dolibarr.pml b/build/pad/Dolibarr.pml index 58e00f77c9d..2e342d34a0a 100644 --- a/build/pad/Dolibarr.pml +++ b/build/pad/Dolibarr.pml @@ -4,9 +4,9 @@ Dolibarr - 3.0.0 - 01 - 16 + 3.1..0 + 07 + 09 2011 @@ -38,28 +38,36 @@ dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp - Dolibarr ERP/CRM - Dolibarr ERP/CRM, the easy to use open source software to manage your activity - Dolibarr ERP/CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow. - Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this. - Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). - - - -It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: - - - - * Simple to install - - * Simple to use - - * Simple to develop - - - + Dolibarr ERP & CRM + Dolibarr ERP & CRM, the easy to use open source software to manage your activity + Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow. + Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this. + Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: +Simple to install +Simple to use +Simple to develop Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian). + + erp, crm, gestionale, medie imprese, fondazioni + Gestionale open source e gratuito + Gestionale open source e gratuito per piccole e medie imprese, fondazioni + Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. + Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. + Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. + + + dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp + Dolibarr ERP & CRM + Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité + Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations) + Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). + Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S): +Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle) +Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie) +Simple pour le développement (pas de frameworks lourds). +Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. + @@ -80,11 +88,6 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt GNU GPL GNU GPL - - Y - N - - Y 1.4 @@ -191,4 +194,9 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt + + Y + N + + diff --git a/build/pad/pad_dolibarr.xml b/build/pad/pad_dolibarr.xml index 98b1367d97b..972de244b79 100644 --- a/build/pad/pad_dolibarr.xml +++ b/build/pad/pad_dolibarr.xml @@ -1,4 +1,4 @@ - + 3.11 @@ -7,11 +7,11 @@ Dolibarr team - 61 Boulevard Vauban + 11 rue raymond Queneau - Montigny-le-Bretonneux + Rueil Malmaison - 78180 + 92500 FRANCE http://www.dolibarr.org @@ -34,9 +34,9 @@ Dolibarr - 3.0.0 - 01 - 16 + 3.1..0 + 07 + 09 2011 @@ -68,44 +68,36 @@ dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp - Dolibarr ERP/CRM - Dolibarr ERP/CRM, the easy to use open source software to manage your activity - Dolibarr ERP/CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow. - Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this. - Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). - - - - - - - -It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: - - - - - - - - * Simple to install - - - - * Simple to use - - - - * Simple to develop - - - - - - - + Dolibarr ERP & CRM + Dolibarr ERP & CRM, the easy to use open source software to manage your activity + Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow. + Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this. + Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: +Simple to install +Simple to use +Simple to develop Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian). + + dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp + Dolibarr ERP & CRM + Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité + Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations) + Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). + Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S): +Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle) +Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie) +Simple pour le développement (pas de frameworks lourds). +Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. + + + erp, crm, gestionale, medie imprese, fondazioni + Gestionale open source e gratuito + Gestionale open source e gratuito per piccole e medie imprese, fondazioni + Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. + Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. + Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. + @@ -126,11 +118,6 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt GNU GPL GNU GPL - - Y - N - - Y 1.4 @@ -237,4 +224,9 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt + + Y + N + + diff --git a/build/pad/pad_doliwamp.xml b/build/pad/pad_doliwamp.xml index bfa0c1b79f6..6e860da929b 100644 --- a/build/pad/pad_doliwamp.xml +++ b/build/pad/pad_doliwamp.xml @@ -1,4 +1,4 @@ - + 3.11 @@ -34,9 +34,9 @@ DoliWamp - 3.0.0 - 01 - 16 + 3.1.0 + 07 + 09 2011 @@ -44,7 +44,7 @@ Freeware Major Update Install and Uninstall - Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP + Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other English,Arabic,Catalan,Chinese,Dutch,Finnish,French,German,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish http://www.dolibarr.org Business @@ -72,16 +72,25 @@ DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs. DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. - DoliWamp is the Dolibarr ERP/CRM for Windows. - -Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). - -It's an OpenSource project, based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop. - -DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. - - + DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop. +DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. + + doliwamp, dolibarr, erp, crm, factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations, entreprises, PME, TPE + DoliWamp, Dolibarr ERP/CRM pour Windows + DoliWamp, la distribution de Dolibarr pour gérer votre entreprise ou association + DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations) + DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations) + DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations) + + + doliwamp, dolibarr, erp, crm, gestionale, medie imprese, fondazioni + DoliWamp, Dolibarr ERP/CRM per Windows + Gestionale open source e gratuito per piccole e medie imprese, fondazioni + Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. + Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. + Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. + @@ -102,11 +111,6 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to GNU GPL GNU GPL - - Y - N - - Y 1.4 @@ -213,4 +217,9 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to + + Y + N + + diff --git a/build/rpm/README b/build/rpm/README index 395ba283fa9..d868ed411b8 100644 --- a/build/rpm/README +++ b/build/rpm/README @@ -5,4 +5,20 @@ RPM Package tools This directory contains files used by makepack-dolibarr.pl script to build a package, ready to be distributed, -with format RPM (for Redhat, Mandriva, ...). \ No newline at end of file +with format RPM (for Redhat, Mandriva, ...). + + +# This is standard command to work on Debian packaging: +# +# On Fedora +# rpm -i --test dolibarr-...rpm To list dependencies of RPM +# yum install dolibarr-...rpm To install package and dependencies +# yum erase dolibarr To remove package +# +# On OpenSuse +# yast --install dolibarr-...rpm To install package and dependencies +# yast --remove dolibarr To remove package +# +# On Mageia (after su - root) +# urpmi dolibarr-...rpm To install package and dependencies +# urpme dolibarr To remove package \ No newline at end of file diff --git a/build/rpm/dolibarr.desktop b/build/rpm/dolibarr.desktop new file mode 100755 index 00000000000..ab2a758867f --- /dev/null +++ b/build/rpm/dolibarr.desktop @@ -0,0 +1,26 @@ +[Desktop Entry] +# This file is used to add Ubuntu menu entry +# It must be saved into directory /usr/share/applications +Version=1.0 +Encoding=UTF-8 +Name=Dolibarr ERP & CRM +Name[fr]=Dolibarr ERP & CRM +Name[it]=Dolibarr ERP & CRM +GenericName=Dolibarr ERP & CRM +Comment=The easy to use manager (ERP & CRM) for small and medium enterprises or foundations +Comment[fr]=L'ERP & CRM simple pour la gestion des TPE, PME, associations et auto-entrepreneurs +Comment[it]=Programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti +Comment[es]=Software para gestión de PYMES, profesionales independientes, auto emprendedores ó asociaciones +# Command to open an URL +# For Fedora: xdg-open +# For Debian/Ubuntu: x-www-browser +# (exo-open for xfde, gnome-open for gnome, ...) +Exec=xdg-open http://localhost/dolibarr +Icon=dolibarr +Terminal=false +Type=Application +Categories=Office +StartupNotify=true +InitialPreference=5 +#NoDisplay=true +#OnlyShowIn=GNOME diff --git a/build/rpm/dolibarr.spec b/build/rpm/dolibarr.spec index d8bad08806c..11090951bdd 100644 --- a/build/rpm/dolibarr.spec +++ b/build/rpm/dolibarr.spec @@ -19,31 +19,67 @@ Packager: Laurent Destailleur (Eldy) Vendor: Dolibarr dev team URL: http://www.%{name}.org -#Source: http://sourceforge.net/projects/%{name}/files/Dolibarr%20ERP-CRM/%{version}/%{name}-%{version}.tgz/download Source: /usr/src/RPM/SOURCES/%{name}-%{version}.tgz #BuildArch: noarch #BuildArchitectures: noarch BuildRoot: /tmp/%{name}-buildroot #Icon: dolibarr_logo1.gif -# For Mandrake +# For Mandriva-Mageia Group: Networking/WWW # For all other distrib Group: Applications/Internet +# Requires can use lua to be defined dynamically (but still at build time) +# %{lua: if posix.access("/aaa") then print("Requires: bidon1 mysql-server mysql httpd php php-cli php-gd php-ldap php-imap php-mysql") end } + +# Requires for Fedora-Redhat Requires: mysql-server mysql httpd php php-cli php-gd php-ldap php-imap php-mysql -AutoReqProv: yes +# Requires for OpenSuse +#Requires: mysql-community-server mysql-community-server-client apache2 apache2-mod_php5 php5 php5-gd php5-ldap php5-imap php5-mysql php5-openssl +# Requires for Mandriva-Mageia +#Requires: mysql mysql-client apache-base apache-mod_php php-cgi php-cli php-bz2 php-gd php-ldap php-imap php-mysqli php-openssl + +#Requires(pre): +#Requires(postun): + +# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse) +AutoReqProv: no %description -Dolibarr ERP & CRM +Dolibarr ERP & CRM is an easy to use open source/free software for small +and medium companies, foundations or freelances. It includes different +features for Enterprise Resource Planning (ERP) and Customer Relationship +Management (CRM) but also for different other activities. +Dolibarr was designed to provide only features you need and be easy to +use. +%description -l es +Dolibarr ERP y CRM es un software open source/gratis para pequeñas y +medianas empresas, asociaciones o autónomos. Incluye diferentes +funcionalidades para la Planificación de Recursos Empresariales (ERP) y +Gestión de la Relación con los Clientes (CRM) así como para para otras +diferentes actividades. Dolibarr ha sido diseñado para suministrarle +solamente las funcionalidades que necesita y haciendo hincapié en su +facilidad de uso. + %description -l fr Dolibarr ERP & CRM est un logiciel de gestion de PME/PMI, autoentrepreneurs, artisans ou associations. Il permet de gérer vos clients, prospect, fournisseurs, devis, factures, comptes bancaires, agenda, campagne emailings et bien d'autres choses dans une interface pensée pour la simplicité. +%description -l it +Dolibarr è un programma gestionale open source e gratuito per piccole e medie +imprese, fondazioni e liberi professionisti. Include varie funzionalità per +Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori +attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno +ed essere facile da usare. +Dolibar è completamente web-based, progettato per poter fornire solo ciò di +cui hai bisogno ed essere facile da usare. + + #---- prep %prep @@ -64,14 +100,17 @@ mkdir -p $RPM_BUILD_ROOT/var/www/dolibarr/build mkdir -p $RPM_BUILD_ROOT/var/www/dolibarr/doc mkdir -p $RPM_BUILD_ROOT/var/www/dolibarr/htdocs mkdir -p $RPM_BUILD_ROOT/var/www/dolibarr/scripts -#mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/dolibarr -#mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily -install -m 444 README $RPM_BUILD_ROOT/var/www/dolibarr/README +mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps +cp doc/images/dolibarr_48x48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/dolibarr.png +mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications +cp build/rpm/dolibarr.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/dolibarr.desktop + +install -m 444 README $RPM_BUILD_ROOT/var/www/dolibarr/README install -m 444 COPYRIGHT $RPM_BUILD_ROOT/var/www/dolibarr/COPYRIGHT -cp -pr build $RPM_BUILD_ROOT/var/www/dolibarr -cp -pr doc $RPM_BUILD_ROOT/var/www/dolibarr -cp -pr htdocs $RPM_BUILD_ROOT/var/www/dolibarr +cp -pr build $RPM_BUILD_ROOT/var/www/dolibarr +cp -pr doc $RPM_BUILD_ROOT/var/www/dolibarr +cp -pr htdocs $RPM_BUILD_ROOT/var/www/dolibarr cp -pr scripts $RPM_BUILD_ROOT/var/www/dolibarr @@ -89,6 +128,8 @@ rm -rf $RPM_BUILD_ROOT %dir /var/www/dolibarr/build %dir /var/www/dolibarr/htdocs %dir /var/www/dolibarr/scripts +%_datadir/pixmaps/* +%_datadir/applications/%{name}.desktop /var/www/dolibarr/build/* /var/www/dolibarr/htdocs/* /var/www/dolibarr/scripts/* @@ -96,8 +137,10 @@ rm -rf $RPM_BUILD_ROOT /var/www/dolibarr/COPYRIGHT #%config /var/www/dolibarr/htdocs/conf/conf.php + #---- post (after install) %post +%update_menus # Dolibarr files are stored into /var/www export targetdir='/var/www/dolibarr' @@ -135,30 +178,59 @@ if [ ! -f %{_sysconfdir}/dolibarr/apache.conf ]; then chmod go-w %{_sysconfdir}/dolibarr/apache.conf fi -# Create a config link %{_sysconfdir}/httpd/conf.d/dolibarr.conf -if [ ! -f %{_sysconfdir}/httpd/conf.d/dolibarr.conf ]; then - echo Create dolibarr web server config link %{_sysconfdir}/httpd/conf.d/dolibarr.conf - ln -fs /etc/dolibarr/apache.conf %{_sysconfdir}/httpd/conf.d/dolibarr.conf + +# Detect OS +os='unknown'; +if [ -d %{_sysconfdir}/httpd/conf.d ]; then + export os='fedora-redhat'; + export conffile="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + export apacheuser='apache'; + export apachegroup='apache'; +fi +if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then + export os='opensuse'; + export conffile="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + export apacheuser='wwwrun'; + export apachegroup='www'; +fi +if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then + export os='mageia-mandriva'; + export conffile="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + export apacheuser='apache'; + export apachegroup='apache'; +fi +if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then + export os='ubuntu-debian'; + export conffile="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + export apacheuser='www-data'; + export apachegroup='www-data'; +fi +echo OS detected: $os + +# Create a config link dolibarr.conf for Fedora or Redhat +if [ ! -f $conffile ]; then + echo Create dolibarr web server config link $conffile + ln -fs /etc/dolibarr/apache.conf $conffile fi # Set permissions -echo Set permission on $targetdir -chown -R apache.apache $targetdir +echo Set permission to $apacheuser:$apachegroup on $targetdir +chown -R $apacheuser:$apachegroup $targetdir chmod -R a-w $targetdir -echo Set permission on $docdir -chown -R apache.apache $docdir +echo Set permission to $apacheuser:$apachegroup on $docdir +chown -R $apacheuser:$apachegroup $docdir chmod -R o-w $docdir # Create empty conf.php file for web installer if [ ! -s $targetdir/htdocs/conf/conf.php ]; then echo Create empty Dolibarr conf.php file touch $targetdir/htdocs/conf/conf.php - chown apache.apache $targetdir/htdocs/conf/conf.php + chown $apacheuser:$apachegroup $targetdir/htdocs/conf/conf.php chmod ug+rw $targetdir/htdocs/conf/conf.php fi -if [ -s /usr/bin/chcon ]; then +if [ "x$os" = "xfedora-redhat" -a -s /usr/bin/chcon ]; then echo Set SELinux permissions # Warning: chcon seems not cumulative #chcon -R -h -t httpd_sys_content_t $targetdir @@ -173,6 +245,9 @@ echo Restart web server if [ -f %{_sysconfdir}/init.d/httpd ]; then %{_sysconfdir}/init.d/httpd restart fi +if [ -f %{_sysconfdir}/init.d/apache2 ]; then + %{_sysconfdir}/init.d/apache2 restart +fi # Show result echo @@ -187,13 +262,41 @@ echo #---- postun (after uninstall) %postun +%clean_menus + +# Detect OS +os='unknown'; +if [ -d %{_sysconfdir}/httpd/conf.d ]; then + export os='fedora-redhat'; + export conffile="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + export apacheuser='apache'; + export apachegroup='apache'; +fi +if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then + export os='opensuse'; + export conffile="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + export apacheuser='wwwrun'; + export apachegroup='www'; +fi +if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then + export os='mageia-mandriva'; + export conffile="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + export apacheuser='apache'; + export apachegroup='apache'; +fi +if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then + export os='ubuntu-debian'; + export conffile="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + export apacheuser='www-data'; + export apachegroup='www-data'; +fi +echo OS detected: $os # Dolibarr files are stored into /var/www export targetdir='/var/www/dolibarr' # Dolibarr uploaded files and generated documents are stored into /usr/share/dolibarr/documents export docdir='/usr/share/dolibarr/documents' -export conffile="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" if [ -f $conffile ] ; then echo Delete apache config file for Dolibarr @@ -208,11 +311,17 @@ then if [ -f %{_sysconfdir}/init.d/httpd ]; then %{_sysconfdir}/init.d/httpd restart fi + if [ -f %{_sysconfdir}/init.d/apache2 ]; then + %{_sysconfdir}/init.d/apache2 restart + fi fi +# Removed dirs after apache restart +echo Removed remaining dirs rm -rf /etc/dolibarr rm -rf $targetdir/htdocs/conf rm -rf $targetdir/htdocs/install - +rmdir $targetdir/doc >/dev/null 2>&1 +rmdir $targetdir/htdocs >/dev/null 2>&1 %changelog diff --git a/build/rpm/httpd-dolibarr.conf b/build/rpm/httpd-dolibarr.conf index 38af8c4839e..4a395f235a2 100644 --- a/build/rpm/httpd-dolibarr.conf +++ b/build/rpm/httpd-dolibarr.conf @@ -1,28 +1,79 @@ -Alias /dolibarr /var/www/dolibarr/htdocs +# Apache config file for Dolibarr - + +Alias /dolibarr /var/www/dolibarr/htdocs + + +# You can also use dolibarr as a VirtualHost +# +# ServerName mydolibarrhostname.com +# ServerAdmin root@example.com +# DocumentRoot /usr/share/dolibarr/ +# ErrorLog logs/ldap.example.com-error.log +# CustomLog logs/ldap.example.com-access.log common +# + +# Directory for web pages + + Order deny,allow + Allow from all + DirectoryIndex index.php Options +FollowSymLinks +Indexes - ErrorDocument 401 /public/error-401.html + ErrorDocument 401 /public/error-401.php ErrorDocument 404 /public/error-404.php php_flag magic_quotes_gpc Off + php_flag register_globals Off + php_flag magic_quotes_gpc Off + php_flag register_globals Off + + # OPTIMIZE: To use gzip compressed files (for Dolibarr already compressed files). + # Note that constant MAIN_OPTIMIZE_SPEED must have a value with bit 0 set. + #AddType text/javascript .jgz + #AddEncoding gzip .jgz + + # OPTIMIZE: To use gzip compression (on the fly). + # Note that you must also enable the module mod_deflate. + # You can also set this with constant MAIN_OPTIMIZE_SPEED and bit 2 set. + #TODO + + # OPTIMIZE: To use cache on static pages (A259200 = 1 month). + # Note that you must also enable the module mod_expires. + #ExpiresActive On + #ExpiresByType image/x-icon A2592000 + #ExpiresByType image/gif A2592000 + #ExpiresByType image/png A2592000 + #ExpiresByType image/jpeg A2592000 + #ExpiresByType text/css A2592000 + #ExpiresByType text/javascript A2592000 + #ExpiresByType application/x-javascript A2592000 + #ExpiresByType application/javascript A2592000 + - +# Directory for public pages + AllowOverride All Order deny,allow Allow from all - +# Directory for data files + AllowOverride All Order deny,allow Allow from all + + AllowOverride All + Order deny,allow + Allow from all + + diff --git a/dev/initdata/generate-commande.php b/dev/initdata/generate-commande.php index 98305ee38dd..a0b65ca05b3 100644 --- a/dev/initdata/generate-commande.php +++ b/dev/initdata/generate-commande.php @@ -1,3 +1,4 @@ +#!/usr/bin/php * Copyright (C) 2004-2007 Laurent Destailleur @@ -22,7 +23,7 @@ /** \file htdocs/dev/generate-commande.php \brief Script de generation de donnees aleatoires pour les commandes - \version $Id$ + \version $Id: generate-commande.php,v 1.17 2011/07/09 14:11:40 eldy Exp $ */ // Test si mode batch diff --git a/dev/initdata/generate-facture.php b/dev/initdata/generate-facture.php index 354f724fc62..7653d65ce41 100644 --- a/dev/initdata/generate-facture.php +++ b/dev/initdata/generate-facture.php @@ -1,4 +1,5 @@ - * * This program is free software; you can redistribute it and/or modify @@ -21,7 +22,7 @@ /** * \file htdocs/dev/generate-facture.php * \brief Script de generation de donnees aleatoires pour les factures - * \version $Id$ + * \version $Id: generate-facture.php,v 1.14 2011/07/09 14:11:40 eldy Exp $ */ // Test si mode batch diff --git a/dev/initdata/generate-produit.php b/dev/initdata/generate-produit.php index 37c7557b327..6bbc92b812e 100644 --- a/dev/initdata/generate-produit.php +++ b/dev/initdata/generate-produit.php @@ -1,3 +1,4 @@ +#!/usr/bin/php * Copyright (C) 2004-2010 Laurent Destailleur @@ -22,7 +23,7 @@ /** * \file htdocs/dev/generate-produit.php * \brief Script de generation de donnees aleatoires pour les produits - * \version $Id$ + * \version $Id: generate-produit.php,v 1.16 2011/07/09 14:11:40 eldy Exp $ */ // Test si mode batch diff --git a/dev/initdata/generate-propale.php b/dev/initdata/generate-propale.php index 16bd4d7d9a8..56c6debdad2 100644 --- a/dev/initdata/generate-propale.php +++ b/dev/initdata/generate-propale.php @@ -1,4 +1,5 @@ - * Copyright (C) 2007 Laurent Destailleur * @@ -22,7 +23,7 @@ /** * \file htdocs/dev/generate-propale.php * \brief Script de generation de donnees aleatoires pour les propales - * \version $Id$ + * \version $Id: generate-propale.php,v 1.15 2011/07/09 14:11:40 eldy Exp $ */ // Test si mode batch diff --git a/dev/initdata/generate-societe.php b/dev/initdata/generate-societe.php index 58fe6269eff..ed6cb9edce2 100644 --- a/dev/initdata/generate-societe.php +++ b/dev/initdata/generate-societe.php @@ -1,3 +1,4 @@ +#!/usr/bin/php * Copyright (C) 2006-2010 Laurent Destailleur @@ -22,7 +23,7 @@ /** * \file htdocs/dev/generate-societe.php * \brief Script de generation de donnees aleatoires pour les societes - * \version $Id$ + * \version $Id: generate-societe.php,v 1.16 2011/07/09 14:11:40 eldy Exp $ */ // Test si mode batch diff --git a/dev/samples/create_invoice.php b/dev/samples/create_invoice.php index 25c70fc1fe6..47cd61cac1b 100644 --- a/dev/samples/create_invoice.php +++ b/dev/samples/create_invoice.php @@ -1,4 +1,5 @@ - * * This program is free software; you can redistribute it and/or modify @@ -19,7 +20,7 @@ /** * \file dev/samples/manage_order.php * \brief This file is an example for a command line script - * \version $Id$ + * \version $Id: create_invoice.php,v 1.5 2011/07/09 14:11:41 eldy Exp $ * \author Put author name here * \remarks Put here some comments */ @@ -35,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') { } // Global variables -$version='$Revision$'; +$version='$Revision: 1.5 $'; $error=0; diff --git a/dev/samples/create_order.php b/dev/samples/create_order.php index d099fd29ae9..d955f35d0d4 100644 --- a/dev/samples/create_order.php +++ b/dev/samples/create_order.php @@ -1,4 +1,5 @@ - * * This program is free software; you can redistribute it and/or modify @@ -19,7 +20,7 @@ /** * \file dev/samples/manage_order.php * \brief This file is an example for a command line script - * \version $Id$ + * \version $Id: create_order.php,v 1.9 2011/07/09 14:11:41 eldy Exp $ * \author Put author name here * \remarks Put here some comments */ @@ -35,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') { } // Global variables -$version='$Revision$'; +$version='$Revision: 1.9 $'; $error=0; diff --git a/dev/samples/create_product.php b/dev/samples/create_product.php index 055d28aa4cd..fbf4c5ab835 100644 --- a/dev/samples/create_product.php +++ b/dev/samples/create_product.php @@ -1,4 +1,5 @@ - * * This program is free software; you can redistribute it and/or modify @@ -19,7 +20,7 @@ /** * \file dev/samples/create_product.php * \brief This file is an example for a command line script - * \version $Id$ + * \version $Id: create_product.php,v 1.8 2011/07/09 14:11:41 eldy Exp $ * \author Put author name here * \remarks Put here some comments */ @@ -35,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') { } // Global variables -$version='$Revision$'; +$version='$Revision: 1.8 $'; $error=0; diff --git a/dev/skeletons/build_class_from_table.php b/dev/skeletons/build_class_from_table.php index d228068d99f..c50f3ac4ec4 100644 --- a/dev/skeletons/build_class_from_table.php +++ b/dev/skeletons/build_class_from_table.php @@ -1,3 +1,4 @@ +#!/usr/bin/php * @@ -20,7 +21,7 @@ * \file dev/skeletons/build_class_from_table.php * \ingroup core * \brief Create a complete class file from a table in database - * \version $Id$ + * \version $Id: build_class_from_table.php,v 1.32 2011/07/09 14:11:40 eldy Exp $ */ $sapi_type = php_sapi_name(); @@ -38,7 +39,7 @@ require_once($path."../../htdocs/master.inc.php"); // After this $db is a defined handler to database. // Main -$version='$Revision$'; +$version='$Revision: 1.32 $'; @set_time_limit(0); $error=0; diff --git a/dev/skeletons/build_webservice_from_class.php b/dev/skeletons/build_webservice_from_class.php index 8a890118ab7..03c1f254ab7 100644 --- a/dev/skeletons/build_webservice_from_class.php +++ b/dev/skeletons/build_webservice_from_class.php @@ -1,3 +1,4 @@ +#!/usr/bin/php * @@ -20,7 +21,7 @@ * \file dev/skeletons/build_webservice_from_class.php * \ingroup core * \brief Create a complete webservice file from CRUD functions of a PHP class - * \version $Id$ + * \version $Id: build_webservice_from_class.php,v 1.6 2011/07/09 14:11:40 eldy Exp $ */ $sapi_type = php_sapi_name(); @@ -38,7 +39,7 @@ require_once($path."../../htdocs/master.inc.php"); // After this $db is a defined handler to database. // Main -$version='$Revision$'; +$version='$Revision: 1.6 $'; @set_time_limit(0); $error=0; diff --git a/dev/skeletons/skeleton_script.php b/dev/skeletons/skeleton_script.php index 8e1d2c7824e..eaffb1e1357 100644 --- a/dev/skeletons/skeleton_script.php +++ b/dev/skeletons/skeleton_script.php @@ -1,5 +1,6 @@ +#!/usr/bin/php +/* Copyright (C) 2007-2011 Laurent Destailleur * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software; you can redistribute it and/or modify @@ -21,7 +22,7 @@ * \file dev/skeletons/skeleton_script.php * \ingroup mymodule othermodule1 othermodule2 * \brief This file is an example for a command line script - * \version $Id$ + * \version $Id: skeleton_script.php,v 1.27 2011/07/09 14:11:41 eldy Exp $ * \author Put author name here * \remarks Put here some comments */ @@ -37,7 +38,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') { } // Global variables -$version='$Revision$'; +$version='$Revision: 1.27 $'; $error=0; diff --git a/dev/translation/autotranslator.php b/dev/translation/autotranslator.php index b7f01926b06..0b43ca0c34f 100644 --- a/dev/translation/autotranslator.php +++ b/dev/translation/autotranslator.php @@ -1,4 +1,5 @@ - * * This program is free software; you can redistribute it and/or modify @@ -20,7 +21,7 @@ * \file dev/translation/autotranslator.php * \ingroup mymodule othermodule1 othermodule2 * \brief This file is an example for a command line script - * \version $Id: autotranslator.php,v 1.11 2011/06/26 18:52:49 eldy Exp $ + * \version $Id: autotranslator.php,v 1.12 2011/07/09 14:11:41 eldy Exp $ * \author Put author name here * \remarks Put here some comments */ @@ -44,7 +45,7 @@ require_once($path.'../../htdocs/lib/files.lib.php'); $langs->load("main"); // Global variables -$version='$Revision: 1.11 $'; +$version='$Revision: 1.12 $'; $error=0; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 6f6bb746336..c9d5ac88812 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -20,7 +20,7 @@ /** * \file htdocs/admin/mails.php * \brief Page to setup emails sending - * \version $Id: mails.php,v 1.70 2011/07/02 16:48:31 eldy Exp $ + * \version $Id: mails.php,v 1.73 2011/07/10 20:03:39 eldy Exp $ */ require("../main.inc.php"); @@ -61,9 +61,9 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["can if (isset($_POST["MAIN_MAIL_SMTPS_ID"])) dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", $_POST["MAIN_MAIL_SMTPS_ID"],'chaine',0,'',0); if (isset($_POST["MAIN_MAIL_SMTPS_PW"])) dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", $_POST["MAIN_MAIL_SMTPS_PW"],'chaine',0,'',0); if (isset($_POST["MAIN_MAIL_EMAIL_TLS"])) dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", $_POST["MAIN_MAIL_EMAIL_TLS"],'chaine',0,'',0); - dolibarr_set_const($db, "MAIN_MAIL_EMAIL_INLINE_IMAGES", $_POST["MAIN_MAIL_EMAIL_INLINE_IMAGES"],'chaine',0,'',0); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", $_POST["MAIN_MAIL_EMAIL_FROM"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", $_POST["MAIN_MAIL_ERRORS_TO"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", $_POST["MAIN_MAIL_AUTOCOPY_TO"],'chaine',0,'',$conf->entity); Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); @@ -80,7 +80,7 @@ if ($_POST['addfile'] || $_POST['addfilehtml']) // Set tmp user directory $vardir=$conf->user->dir_output."/".$user->id; - $upload_dir = $vardir.'/temp/'; + $upload_dir = $vardir.'/temp'; if (create_exdir($upload_dir) >= 0) { @@ -127,7 +127,7 @@ if (! empty($_POST['removedfile']) || ! empty($_POST['removedfilehtml'])) { // Set tmp user directory $vardir=$conf->user->dir_output."/".$user->id; - $upload_dir = $vardir.'/temp/'; + $upload_dir = $vardir.'/temp'; $keytodelete=isset($_POST['removedfile'])?$_POST['removedfile']:$_POST['removedfilehtml']; $keytodelete--; @@ -283,8 +283,6 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') jQuery(".drag").hide(); jQuery("#MAIN_MAIL_EMAIL_TLS").val(0); jQuery("#MAIN_MAIL_EMAIL_TLS").attr(\'disabled\', \'disabled\'); - jQuery("#MAIN_MAIL_EMAIL_INLINE_IMAGES").val('.$conf->global->MAIN_MAIL_EMAIL_INLINE_IMAGES.'); - jQuery("#MAIN_MAIL_EMAIL_INLINE_IMAGES").removeAttr(\'disabled\'); '; if ($linuxlike) { @@ -300,8 +298,6 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') jQuery("#MAIN_MAIL_EMAIL_TLS").removeAttr(\'disabled\'); jQuery("#MAIN_MAIL_SMTP_SERVER").removeAttr(\'disabled\'); jQuery("#MAIN_MAIL_SMTP_PORT").removeAttr(\'disabled\'); - jQuery("#MAIN_MAIL_EMAIL_INLINE_IMAGES").val(0); - jQuery("#MAIN_MAIL_EMAIL_INLINE_IMAGES").attr(\'disabled\', \'disabled\'); } } initfields(); @@ -463,15 +459,6 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') else print yn(0).' ('.$langs->trans("NotSupported").')'; print ''; - // Inline images - if ($conf->global->MAIN_FEATURES_LEVEL > 0) - { - $var=!$var; - print ''.$langs->trans("MAIN_MAIL_EMAIL_INLINE_IMAGES").''; - print $html->selectyesno('MAIN_MAIL_EMAIL_INLINE_IMAGES',$conf->global->MAIN_MAIL_EMAIL_INLINE_IMAGES,1); - print ''; - } - // Separator $var=!$var; print ' '; @@ -482,6 +469,12 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') print ''; + // From + $var=!$var; + print ''.$langs->trans("MAIN_MAIL_ERRORS_TO").''; + print ''; + // Autocopy to $var=!$var; print ''.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").''; @@ -571,15 +564,6 @@ else else print yn(0).' ('.$langs->trans("NotSupported").')'; print ''; - // Inline images - if ($conf->global->MAIN_FEATURES_LEVEL > 0) - { - $var=!$var; - print ''.$langs->trans("MAIN_MAIL_EMAIL_INLINE_IMAGES").''; - print yn($conf->global->MAIN_MAIL_EMAIL_INLINE_IMAGES,1,0); - print ''; - } - // Separator $var=!$var; print ' '; @@ -591,6 +575,13 @@ else if (!empty($conf->global->MAIN_MAIL_EMAIL_FROM) && ! isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail")); print ''; + // Errors To + $var=!$var; + print ''.$langs->trans("MAIN_MAIL_ERRORS_TO").''; + print ''.$conf->global->MAIN_MAIL_ERRORS_TO; + if (!empty($conf->global->MAIN_MAIL_ERRORS_TO) && ! isValidEmail($conf->global->MAIN_MAIL_ERRORS_TO)) print img_warning($langs->trans("ErrorBadEMail")); + print ''; + // Autocopy to $var=!$var; print ''.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").''; @@ -746,5 +737,5 @@ else $db->close(); -llxFooter('$Date: 2011/07/02 16:48:31 $ - $Revision: 1.70 $'); +llxFooter('$Date: 2011/07/10 20:03:39 $ - $Revision: 1.73 $'); ?> diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 687a5e9053d..994d9d97303 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -21,7 +21,7 @@ * \file htdocs/comm/mailing/fiche.php * \ingroup mailing * \brief Fiche mailing, onglet general - * \version $Id: fiche.php,v 1.121 2011/07/02 16:48:32 eldy Exp $ + * \version $Id: fiche.php,v 1.122 2011/07/10 13:33:53 eldy Exp $ */ require("../../main.inc.php"); @@ -617,7 +617,7 @@ if ($_GET["action"] == 'create') print ''; print ''; print ''; - print ''; + print ''; print '
'.$langs->trans("MailTitle").'
'.$langs->trans("MailFrom").'
'.$langs->trans("MailErrorsTo").'
'.$langs->trans("MailErrorsTo").'
'; print '

'; @@ -1073,5 +1073,5 @@ else $db->close(); -llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.121 $'); +llxFooter('$Date: 2011/07/10 13:33:53 $ - $Revision: 1.122 $'); ?> diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 35d69e13cda..dad5364d523 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -27,7 +27,7 @@ * \file htdocs/comm/propal.php * \ingroup propale * \brief Page of commercial proposals card and list - * \version $Id: propal.php,v 1.609 2011/07/07 21:32:22 eldy Exp $ + * \version $Id: propal.php,v 1.610 2011/07/10 20:03:41 eldy Exp $ */ require("../main.inc.php"); @@ -427,9 +427,9 @@ if ($_POST['addfile']) // Set tmp user directory TODO Use a dedicated directory for temp mails files $vardir=$conf->user->dir_output."/".$user->id; - $upload_dir = $vardir.'/temp/'; + $upload_dir_tmp = $vardir.'/temp'; - $mesg=dol_add_file_process($upload_dir,0,0); + $mesg=dol_add_file_process($upload_dir_tmp,0,0); $action='presend'; $_POST["action"]='presend'; @@ -444,7 +444,7 @@ if (! empty($_POST['removedfile'])) // Set tmp user directory $vardir=$conf->user->dir_output."/".$user->id; - $upload_dir = $vardir.'/temp/'; + $upload_dir_tmp = $vardir.'/temp'; $mesg=dol_remove_file_process($_POST['removedfile'],0); @@ -1291,7 +1291,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - // adresse de livraison + // Delivery address (deprecated) if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS) { print ''; @@ -1335,7 +1335,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - // Origine de la demande + // Origin of demand print ''; print ''; $rowspan=5; - if (! empty($conf->global->MAIN_JS_ON_PAYMENT)) $rowspan++; + if ($conf->use_javascript_ajax) $rowspan++; // Payment mode print '\n"; print ''; + print ''; print ''; // Payment amount - if (! empty($conf->global->MAIN_JS_ON_PAYMENT)) + if ($conf->use_javascript_ajax) { print ''; print '\n"; } else { $out.= '\n"; } } @@ -503,14 +505,27 @@ class FormMail $out.= ''; $out.= ''; $out.= '\n"; } @@ -543,7 +556,7 @@ class FormMail if ($this->param["models"]=='invoice_supplier_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendSupplierInvoice"); } if ($this->param["models"]=='shipping_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendShipping"); } if ($this->param["models"]=='fichinter_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendFichInter"); } - + if ($conf->paypal->enabled && $conf->global->PAYPAL_ADD_PAYMENT_URL) { require_once(DOL_DOCUMENT_ROOT."/paypal/lib/paypal.lib.php"); diff --git a/htdocs/core/tpl/ajaxfileupload.tpl.php b/htdocs/core/tpl/ajaxfileupload.tpl.php index c55f6d319bd..42ece24a3b8 100644 --- a/htdocs/core/tpl/ajaxfileupload.tpl.php +++ b/htdocs/core/tpl/ajaxfileupload.tpl.php @@ -15,11 +15,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Id: ajaxfileupload.tpl.php,v 1.9 2011/07/08 14:00:08 hregis Exp $ + * $Id: ajaxfileupload.tpl.php,v 1.10 2011/07/10 13:39:34 eldy Exp $ */ ?> +" - Response.End -End Sub - -%> diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/asp/upload.asp b/htdocs/includes/fckeditor/editor/filemanager/connectors/asp/upload.asp deleted file mode 100644 index 05ca3c4beb5..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/asp/upload.asp +++ /dev/null @@ -1,65 +0,0 @@ -<%@ CodePage=65001 Language="VBScript"%> -<% -Option Explicit -Response.Buffer = True -%> -<% - ' FCKeditor - The text editor for Internet - http://www.fckeditor.net - ' Copyright (C) 2003-2010 Frederico Caldeira Knabben - ' - ' == BEGIN LICENSE == - ' - ' Licensed under the terms of any of the following licenses at your - ' choice: - ' - ' - GNU General Public License Version 2 or later (the "GPL") - ' http://www.gnu.org/licenses/gpl.html - ' - ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - ' http://www.gnu.org/licenses/lgpl.html - ' - ' - Mozilla Public License Version 1.1 or later (the "MPL") - ' http://www.mozilla.org/MPL/MPL-1.1.html - ' - ' == END LICENSE == - ' - ' This is the "File Uploader" for ASP. -%> - - - - - -<% - -Sub SendError( number, text ) - SendUploadResults number, "", "", text -End Sub - -' Check if this uploader has been enabled. -If ( ConfigIsEnabled = False ) Then - SendUploadResults "1", "", "", "This file uploader is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file" -End If - - Dim sCommand, sResourceType, sCurrentFolder - - sCommand = "QuickUpload" - - sResourceType = Request.QueryString("Type") - If ( sResourceType = "" ) Then sResourceType = "File" - - sCurrentFolder = "/" - - ' Is Upload enabled? - if ( Not IsAllowedCommand( sCommand ) ) then - SendUploadResults "1", "", "", "The """ & sCommand & """ command isn't allowed" - end if - - ' Check if it is an allowed resource type. - if ( Not IsAllowedType( sResourceType ) ) Then - SendUploadResults "1", "", "", "The " & sResourceType & " resource type isn't allowed" - end if - - FileUpload sResourceType, sCurrentFolder, sCommand - -%> diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/asp/util.asp b/htdocs/includes/fckeditor/editor/filemanager/connectors/asp/util.asp deleted file mode 100644 index 7c9190827c9..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/asp/util.asp +++ /dev/null @@ -1,55 +0,0 @@ -<% - ' FCKeditor - The text editor for Internet - http://www.fckeditor.net - ' Copyright (C) 2003-2010 Frederico Caldeira Knabben - ' - ' == BEGIN LICENSE == - ' - ' Licensed under the terms of any of the following licenses at your - ' choice: - ' - ' - GNU General Public License Version 2 or later (the "GPL") - ' http://www.gnu.org/licenses/gpl.html - ' - ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - ' http://www.gnu.org/licenses/lgpl.html - ' - ' - Mozilla Public License Version 1.1 or later (the "MPL") - ' http://www.mozilla.org/MPL/MPL-1.1.html - ' - ' == END LICENSE == - ' - ' This file include generic functions used by the ASP Connector. -%> -<% -Function RemoveFromStart( sourceString, charToRemove ) - Dim oRegex - Set oRegex = New RegExp - oRegex.Pattern = "^" & charToRemove & "+" - - RemoveFromStart = oRegex.Replace( sourceString, "" ) -End Function - -Function RemoveFromEnd( sourceString, charToRemove ) - Dim oRegex - Set oRegex = New RegExp - oRegex.Pattern = charToRemove & "+$" - - RemoveFromEnd = oRegex.Replace( sourceString, "" ) -End Function - -Function ConvertToXmlAttribute( value ) - ConvertToXmlAttribute = Replace( value, "&", "&" ) -End Function - -Function InArray( value, sourceArray ) - Dim i - For i = 0 to UBound( sourceArray ) - If sourceArray(i) = value Then - InArray = True - Exit Function - End If - Next - InArray = False -End Function - -%> diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/aspx/config.ascx b/htdocs/includes/fckeditor/editor/filemanager/connectors/aspx/config.ascx deleted file mode 100644 index 23ee5daa81a..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/aspx/config.ascx +++ /dev/null @@ -1,98 +0,0 @@ -<%@ Control Language="C#" EnableViewState="false" AutoEventWireup="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Config" %> -<%-- - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2010 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Configuration file for the File Browser Connector for ASP.NET. ---%> - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/aspx/connector.aspx b/htdocs/includes/fckeditor/editor/filemanager/connectors/aspx/connector.aspx deleted file mode 100644 index 896359d7011..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/aspx/connector.aspx +++ /dev/null @@ -1,32 +0,0 @@ -<%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Connector" AutoEventWireup="false" %> -<%@ Register Src="config.ascx" TagName="Config" TagPrefix="FCKeditor" %> -<%-- - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2010 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This is the File Browser Connector for ASP.NET. - * - * The code of this page if included in the FCKeditor.Net package, - * in the FredCK.FCKeditorV2.dll assembly file. So to use it you must - * include that DLL in your "bin" directory. - * - * To download the FCKeditor.Net package, go to our official web site: - * http://www.fckeditor.net ---%> - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/aspx/upload.aspx b/htdocs/includes/fckeditor/editor/filemanager/connectors/aspx/upload.aspx deleted file mode 100644 index 37898b0aabb..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/aspx/upload.aspx +++ /dev/null @@ -1,32 +0,0 @@ -<%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Uploader" AutoEventWireup="false" %> -<%@ Register Src="config.ascx" TagName="Config" TagPrefix="FCKeditor" %> -<%-- - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2010 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This is the Uploader for ASP.NET. - * - * The code of this page if included in the FCKeditor.Net package, - * in the FredCK.FCKeditorV2.dll assemblyfile. So to use it you must - * include that DLL in your "bin" directory. - * - * To download the FCKeditor.Net package, go to our official web site: - * http://www.fckeditor.net ---%> - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc deleted file mode 100644 index b9b919c7704..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm deleted file mode 100644 index b1769968d36..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - - - - - - userFilesPath = config.userFilesPath; - - if ( userFilesPath eq "" ) - { - userFilesPath = "/userfiles/"; - } - - // make sure the user files path is correctly formatted - userFilesPath = replace(userFilesPath, "\", "/", "ALL"); - userFilesPath = replace(userFilesPath, '//', '/', 'ALL'); - if ( right(userFilesPath,1) NEQ "/" ) - { - userFilesPath = userFilesPath & "/"; - } - if ( left(userFilesPath,1) NEQ "/" ) - { - userFilesPath = "/" & userFilesPath; - } - - // make sure the current folder is correctly formatted - url.currentFolder = replace(url.currentFolder, "\", "/", "ALL"); - url.currentFolder = replace(url.currentFolder, '//', '/', 'ALL'); - if ( right(url.currentFolder,1) neq "/" ) - { - url.currentFolder = url.currentFolder & "/"; - } - if ( left(url.currentFolder,1) neq "/" ) - { - url.currentFolder = "/" & url.currentFolder; - } - - if ( find("/",getBaseTemplatePath()) neq 0 ) - { - fs = "/"; - } - else - { - fs = "\"; - } - - // Get the base physical path to the web root for this application. The code to determine the path automatically assumes that - // the "FCKeditor" directory in the http request path is directly off the web root for the application and that it's not a - // virtual directory or a symbolic link / junction. Use the serverPath config setting to force a physical path if necessary. - if ( len(config.serverPath) ) - { - serverPath = config.serverPath; - - if ( right(serverPath,1) neq fs ) - { - serverPath = serverPath & fs; - } - } - else - { - serverPath = replaceNoCase(getBaseTemplatePath(),replace(cgi.script_name,"/",fs,"all"),"") & replace(userFilesPath,"/",fs,"all"); - } - - rootPath = left( serverPath, Len(serverPath) - Len(userFilesPath) ) ; - xmlContent = ""; // append to this string to build content - invalidName = false; - - - - - - "> - -])', url.currentFolder)> - - - "> - - - - - '> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - i=1; - folders = ""; - while( i lte qDir.recordCount ) { - if( not compareNoCase( qDir.type[i], "FILE" )) - break; - if( not listFind(".,..", qDir.name[i]) ) - folders = folders & ''; - i=i+1; - } - - xmlContent = xmlContent & '' & folders & ''; - - - - - - - - - - - - i=1; - folders = ""; - files = ""; - while( i lte qDir.recordCount ) { - if( not compareNoCase( qDir.type[i], "DIR" ) and not listFind(".,..", qDir.name[i]) ) { - folders = folders & ''; - } else if( not compareNoCase( qDir.type[i], "FILE" ) ) { - fileSizeKB = round(qDir.size[i] / 1024); - files = files & ''; - } - i=i+1; - } - - xmlContent = xmlContent & '' & folders & ''; - xmlContent = xmlContent & '' & files & ''; - - - - - - - - - - - newFolderName = url.newFolderName; - if( reFind("[^A-Za-z0-9_\-\.]", newFolderName) ) { - // Munge folder name same way as we do the filename - // This means folder names are always US-ASCII so we don't have to worry about CF5 and UTF-8 - newFolderName = reReplace(newFolderName, "[^A-Za-z0-9\-\.]", "_", "all"); - newFolderName = reReplace(newFolderName, "_{2,}", "_", "all"); - newFolderName = reReplace(newFolderName, "([^_]+)_+$", "\1", "all"); - newFolderName = reReplace(newFolderName, "$_([^_]+)$", "\1", "all"); - newFolderName = reReplace(newFolderName, '\.+', "_", "all" ); - } - - - - - - - - - - - - - - - - - - - - - '> - - - - - - - - - - - - xmlHeader = ''; - if (invalidName) { - xmlHeader = xmlHeader & ''; - } - else { - xmlHeader = xmlHeader & ''; - xmlHeader = xmlHeader & ''; - } - xmlFooter = ''; - - - - - - -#xmlHeader##xmlContent##xmlFooter# diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm deleted file mode 100644 index cbf86df036f..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - function SendUploadResults(errorNumber, fileUrl, fileName, customMsg) - { - WriteOutput(''); - } - - - - - - - - - - - - - - - - - - - - - - -])', url.currentFolder)> - - - - - - - userFilesPath = config.userFilesPath; - - if ( userFilesPath eq "" ) { - userFilesPath = "/userfiles/"; - } - - // make sure the user files path is correctly formatted - userFilesPath = replace(userFilesPath, "\", "/", "ALL"); - userFilesPath = replace(userFilesPath, '//', '/', 'ALL'); - if ( right(userFilesPath,1) NEQ "/" ) { - userFilesPath = userFilesPath & "/"; - } - if ( left(userFilesPath,1) NEQ "/" ) { - userFilesPath = "/" & userFilesPath; - } - - // make sure the current folder is correctly formatted - url.currentFolder = replace(url.currentFolder, "\", "/", "ALL"); - url.currentFolder = replace(url.currentFolder, '//', '/', 'ALL'); - if ( right(url.currentFolder,1) neq "/" ) { - url.currentFolder = url.currentFolder & "/"; - } - if ( left(url.currentFolder,1) neq "/" ) { - url.currentFolder = "/" & url.currentFolder; - } - - if (find("/",getBaseTemplatePath())) { - fs = "/"; - } else { - fs = "\"; - } - - // Get the base physical path to the web root for this application. The code to determine the path automatically assumes that - // the "FCKeditor" directory in the http request path is directly off the web root for the application and that it's not a - // virtual directory or a symbolic link / junction. Use the serverPath config setting to force a physical path if necessary. - if ( len(config.serverPath) ) { - serverPath = config.serverPath; - - if ( right(serverPath,1) neq fs ) { - serverPath = serverPath & fs; - } - } else { - serverPath = replaceNoCase(getBaseTemplatePath(),replace(cgi.script_name,"/",fs,"all"),"") & replace(userFilesPath,"/",fs,"all"); - } - - rootPath = left( serverPath, Len(serverPath) - Len(userFilesPath) ) ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - errorNumber = 0; - fileName = cffile.ClientFileName ; - fileExt = cffile.ServerFileExt ; - fileExisted = false ; - - // munge filename for html download. Only a-z, 0-9, _, - and . are allowed - if( reFind("[^A-Za-z0-9_\-\.]", fileName) ) { - fileName = reReplace(fileName, "[^A-Za-z0-9\-\.]", "_", "ALL"); - fileName = reReplace(fileName, "_{2,}", "_", "ALL"); - fileName = reReplace(fileName, "([^_]+)_+$", "\1", "ALL"); - fileName = reReplace(fileName, "$_([^_]+)$", "\1", "ALL"); - } - - // remove additional dots from file name - if( isDefined("Config.ForceSingleExtension") and Config.ForceSingleExtension ) - fileName = replace( fileName, '.', "_", "all" ) ; - - // When the original filename already exists, add numbers (0), (1), (2), ... at the end of the filename. - counter = 0; - tmpFileName = fileName; - while( fileExists("#currentFolderPath##fileName#.#fileExt#") ) { - fileExisted = true ; - counter = counter + 1 ; - fileName = tmpFileName & '(#counter#)' ; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm deleted file mode 100644 index 0b67e17f488..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm deleted file mode 100644 index ec126537ae6..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sFileExt = GetExtension( sFileName ) ; - sFilePart = RemoveExtension( sFileName ); - while( fileExists( sServerDir & sFileName ) ) - { - counter = counter + 1; - sFileName = sFilePart & '(#counter#).' & CFFILE.ClientFileExt; - errorNumber = 201; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - while( i lte qDir.recordCount ) - { - if( compareNoCase( qDir.type[i], "FILE" ) and not listFind( ".,..", qDir.name[i] ) ) - { - folders = folders & '' ; - } - i = i + 1; - } - - #folders# - - - - - - - - - - - - - - - - while( i lte qDir.recordCount ) - { - if( not compareNoCase( qDir.type[i], "DIR" ) and not listFind( ".,..", qDir.name[i] ) ) - { - folders = folders & '' ; - } - else if( not compareNoCase( qDir.type[i], "FILE" ) ) - { - fileSizeKB = round(qDir.size[i] / 1024) ; - files = files & '' ; - } - i = i + 1 ; - } - - #folders# - #files# - - - - - - - - - - - - - - - - sNewFolderName = SanitizeFolderName( sNewFolderName ) ; - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm deleted file mode 100644 index fda24221319..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm deleted file mode 100644 index 3ba6bc29817..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ])', sCurrentFolder)> - - - - - - - - - - - - - - - - +|[[:cntrl:]]+', "_", "all" )> - - - - - - - - - - var chunk = ""; - var fileReaderClass = ""; - var fileReader = ""; - var file = ""; - var done = false; - var counter = 0; - var byteArray = ""; - - if( not fileExists( ARGUMENTS.fileName ) ) - { - return "" ; - } - - if (REQUEST.CFVersion gte 8) - { - file = FileOpen( ARGUMENTS.fileName, "readbinary" ) ; - byteArray = FileRead( file, 1024 ) ; - chunk = toString( toBinary( toBase64( byteArray ) ) ) ; - FileClose( file ) ; - } - else - { - fileReaderClass = createObject("java", "java.io.FileInputStream"); - fileReader = fileReaderClass.init(fileName); - - while(not done) - { - char = fileReader.read(); - counter = counter + 1; - if ( char eq -1 or counter eq ARGUMENTS.bytes) - { - done = true; - } - else - { - chunk = chunk & chr(char) ; - } - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +|[[:cntrl:]]+', "_", "all" )> - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm deleted file mode 100644 index 53375515006..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm deleted file mode 100644 index 5d0bc4f6ef1..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/config.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/config.cfm deleted file mode 100644 index 1f5ad20da87..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/config.cfm +++ /dev/null @@ -1,150 +0,0 @@ - - - - - Config = StructNew() ; - - // SECURITY: You must explicitly enable this "connector". (Set enabled to "true") - Config.Enabled = false ; - - // Path to uploaded files relative to the document root. - Config.UserFilesPath = "/userfiles/" ; - - // Use this to force the server path if FCKeditor is not running directly off - // the root of the application or the FCKeditor directory in the URL is a virtual directory - // or a symbolic link / junction - // Example: C:\inetpub\wwwroot\myDocs\ - Config.ServerPath = "" ; - - // Due to security issues with Apache modules, it is recommended to leave the - // following setting enabled. - Config.ForceSingleExtension = true ; - - // Perform additional checks for image files - if set to true, validate image size - // (This feature works in MX 6.0 and above) - Config.SecureImageUploads = true; - - // What the user can do with this connector - Config.ConfigAllowedCommands = "QuickUpload,FileUpload,GetFolders,GetFoldersAndFiles,CreateFolder" ; - - //Allowed Resource Types - Config.ConfigAllowedTypes = "File,Image,Flash,Media" ; - - // For security, HTML is allowed in the first Kb of data for files having the - // following extensions only. - // (This feature works in MX 6.0 and above)) - Config.HtmlExtensions = "html,htm,xml,xsd,txt,js" ; - - //Due to known issues with GetTempDirectory function, it is - //recommended to set this vairiable to a valid directory - //instead of using the GetTempDirectory function - //(used by MX 6.0 and above) - Config.TempDirectory = GetTempDirectory(); - - - - - - - - - - - - - - - - -// Configuration settings for each Resource Type -// -// - AllowedExtensions: the possible extensions that can be allowed. -// If it is empty then any file type can be uploaded. -// - DeniedExtensions: The extensions that won't be allowed. -// If it is empty then no restrictions are done here. -// -// For a file to be uploaded it has to fulfill both the AllowedExtensions -// and DeniedExtensions (that's it: not being denied) conditions. -// -// - FileTypesPath: the virtual folder relative to the document root where -// these resources will be located. -// Attention: It must start and end with a slash: '/' -// -// - FileTypesAbsolutePath: the physical path to the above folder. It must be -// an absolute path. -// If it's an empty string then it will be autocalculated. -// Usefull if you are using a virtual directory, symbolic link or alias. -// Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -// Attention: The above 'FileTypesPath' must point to the same directory. -// Attention: It must end with a slash: '/' -// -// -// - QuickUploadPath: the virtual folder relative to the document root where -// these resources will be uploaded using the Upload tab in the resources -// dialogs. -// Attention: It must start and end with a slash: '/' -// -// - QuickUploadAbsolutePath: the physical path to the above folder. It must be -// an absolute path. -// If it's an empty string then it will be autocalculated. -// Usefull if you are using a virtual directory, symbolic link or alias. -// Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -// Attention: The above 'QuickUploadPath' must point to the same directory. -// Attention: It must end with a slash: '/' - - Config.AllowedExtensions = StructNew() ; - Config.DeniedExtensions = StructNew() ; - Config.FileTypesPath = StructNew() ; - Config.FileTypesAbsolutePath = StructNew() ; - Config.QuickUploadPath = StructNew() ; - Config.QuickUploadAbsolutePath = StructNew() ; - - Config.AllowedExtensions["File"] = "7z,aiff,asf,avi,bmp,csv,doc,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xml,zip" ; - Config.DeniedExtensions["File"] = "" ; - Config.FileTypesPath["File"] = Config.UserFilesPath & 'file/' ; - Config.FileTypesAbsolutePath["File"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'file/') ) ; - Config.QuickUploadPath["File"] = Config.FileTypesPath["File"] ; - Config.QuickUploadAbsolutePath["File"] = Config.FileTypesAbsolutePath["File"] ; - - Config.AllowedExtensions["Image"] = "bmp,gif,jpeg,jpg,png" ; - Config.DeniedExtensions["Image"] = "" ; - Config.FileTypesPath["Image"] = Config.UserFilesPath & 'image/' ; - Config.FileTypesAbsolutePath["Image"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'image/') ) ; - Config.QuickUploadPath["Image"] = Config.FileTypesPath["Image"] ; - Config.QuickUploadAbsolutePath["Image"] = Config.FileTypesAbsolutePath["Image"] ; - - Config.AllowedExtensions["Flash"] = "swf,flv" ; - Config.DeniedExtensions["Flash"] = "" ; - Config.FileTypesPath["Flash"] = Config.UserFilesPath & 'flash/' ; - Config.FileTypesAbsolutePath["Flash"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'flash/') ) ; - Config.QuickUploadPath["Flash"] = Config.FileTypesPath["Flash"] ; - Config.QuickUploadAbsolutePath["Flash"] = Config.FileTypesAbsolutePath["Flash"] ; - - Config.AllowedExtensions["Media"] = "aiff,asf,avi,bmp,fla,flv,gif,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,png,qt,ram,rm,rmi,rmvb,swf,tif,tiff,wav,wma,wmv" ; - Config.DeniedExtensions["Media"] = "" ; - Config.FileTypesPath["Media"] = Config.UserFilesPath & 'media/' ; - Config.FileTypesAbsolutePath["Media"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'media/') ) ; - Config.QuickUploadPath["Media"] = Config.FileTypesPath["Media"] ; - Config.QuickUploadAbsolutePath["Media"] = Config.FileTypesAbsolutePath["Media"] ; - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/connector.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/connector.cfm deleted file mode 100644 index a0de684b211..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/connector.cfm +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/image.cfc b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/image.cfc deleted file mode 100644 index 378c4b4b959..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/image.cfc +++ /dev/null @@ -1,1324 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - paths = arrayNew(1); - paths[1] = expandPath("metadata-extractor-2.3.1.jar"); - loader = createObject("component", "javaloader.JavaLoader").init(paths); - - //at this stage we only have access to the class, but we don't have an instance - JpegMetadataReader = loader.create("com.drew.imaging.jpeg.JpegMetadataReader"); - - myMetaData = JpegMetadataReader.readMetadata(inFile); - directories = myMetaData.getDirectoryIterator(); - while (directories.hasNext()) { - currentDirectory = directories.next(); - tags = currentDirectory.getTagIterator(); - while (tags.hasNext()) { - currentTag = tags.next(); - if (currentTag.getTagName() DOES NOT CONTAIN "Unknown") { //leave out the junk data - queryAddRow(retQry); - querySetCell(retQry,"dirName",replace(currentTag.getDirectoryName(),' ','_','ALL')); - tagName = replace(currentTag.getTagName(),' ','','ALL'); - tagName = replace(tagName,'/','','ALL'); - querySetCell(retQry,"tagName",tagName); - querySetCell(retQry,"tagValue",currentTag.getDescription()); - } - } - } - return retQry; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - resizedImage = CreateObject("java", "java.awt.image.BufferedImage"); - at = CreateObject("java", "java.awt.geom.AffineTransform"); - op = CreateObject("java", "java.awt.image.AffineTransformOp"); - - w = img.getWidth(); - h = img.getHeight(); - - if (preserveAspect and cropToExact and newHeight gt 0 and newWidth gt 0) - { - if (w / h gt newWidth / newHeight){ - newWidth = 0; - } else if (w / h lt newWidth / newHeight){ - newHeight = 0; - } - } else if (preserveAspect and newHeight gt 0 and newWidth gt 0) { - if (w / h gt newWidth / newHeight){ - newHeight = 0; - } else if (w / h lt newWidth / newHeight){ - newWidth = 0; - } - } - if (newWidth gt 0 and newHeight eq 0) { - scale = newWidth / w; - w = newWidth; - h = round(h*scale); - } else if (newHeight gt 0 and newWidth eq 0) { - scale = newHeight / h; - h = newHeight; - w = round(w*scale); - } else if (newHeight gt 0 and newWidth gt 0) { - w = newWidth; - h = newHeight; - } else { - retVal = throw( retVal.errorMessage); - return retVal; - } - resizedImage.init(javacast("int",w),javacast("int",h),img.getType()); - - w = w / img.getWidth(); - h = h / img.getHeight(); - - - - op.init(at.getScaleInstance(javacast("double",w),javacast("double",h)), rh); - // resizedImage = op.createCompatibleDestImage(img, img.getColorModel()); - op.filter(img, resizedImage); - - imgInfo = getimageinfo(resizedImage, ""); - if (imgInfo.errorCode gt 0) - { - return imgInfo; - } - - cropOffsetX = max( Int( (imgInfo.width/2) - (newWidth/2) ), 0 ); - cropOffsetY = max( Int( (imgInfo.height/2) - (newHeight/2) ), 0 ); - // There is a chance that the image is exactly the correct - // width and height and don't need to be cropped - if - ( - preserveAspect and cropToExact - and - (imgInfo.width IS NOT specifiedWidth OR imgInfo.height IS NOT specifiedHeight) - ) - { - // Get the correct offset to get the center of the image - cropOffsetX = max( Int( (imgInfo.width/2) - (specifiedWidth/2) ), 0 ); - cropOffsetY = max( Int( (imgInfo.height/2) - (specifiedHeight/2) ), 0 ); - - cropImageResult = crop( resizedImage, "", "", cropOffsetX, cropOffsetY, specifiedWidth, specifiedHeight ); - if ( cropImageResult.errorCode GT 0) - { - return cropImageResult; - } else { - resizedImage = cropImageResult.img; - } - } - if (outputFile eq "") - { - retVal.img = resizedImage; - return retVal; - } else { - saveImage = writeImage(outputFile, resizedImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (fromX + newWidth gt img.getWidth() - OR - fromY + newHeight gt img.getHeight() - ) - { - retval = throw( "The cropped image dimensions go beyond the original image dimensions."); - return retVal; - } - croppedImage = img.getSubimage(javaCast("int", fromX), javaCast("int", fromY), javaCast("int", newWidth), javaCast("int", newHeight) ); - if (outputFile eq "") - { - retVal.img = croppedImage; - return retVal; - } else { - saveImage = writeImage(outputFile, croppedImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rotatedImage = CreateObject("java", "java.awt.image.BufferedImage"); - at = CreateObject("java", "java.awt.geom.AffineTransform"); - op = CreateObject("java", "java.awt.image.AffineTransformOp"); - - iw = img.getWidth(); h = iw; - ih = img.getHeight(); w = ih; - - if(arguments.degrees eq 180) { w = iw; h = ih; } - - x = (w/2)-(iw/2); - y = (h/2)-(ih/2); - - rotatedImage.init(javacast("int",w),javacast("int",h),img.getType()); - - at.rotate(arguments.degrees * 0.0174532925,w/2,h/2); - at.translate(x,y); - op.init(at, rh); - - op.filter(img, rotatedImage); - - if (outputFile eq "") - { - retVal.img = rotatedImage; - return retVal; - } else { - saveImage = writeImage(outputFile, rotatedImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (outputFile eq "") - { - retVal = throw( "The convert method requires a valid output filename."); - return retVal; - } else { - saveImage = writeImage(outputFile, img, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /* - JPEG output method handles compression - */ - out = createObject("java", "java.io.BufferedOutputStream"); - fos = createObject("java", "java.io.FileOutputStream"); - fos.init(tempOutputFile); - out.init(fos); - JPEGCodec = createObject("java", "com.sun.image.codec.jpeg.JPEGCodec"); - encoder = JPEGCodec.createJPEGEncoder(out); - param = encoder.getDefaultJPEGEncodeParam(img); - param.setQuality(quality, false); - encoder.setJPEGEncodeParam(param); - encoder.encode(img); - out.close(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - flippedImage = CreateObject("java", "java.awt.image.BufferedImage"); - at = CreateObject("java", "java.awt.geom.AffineTransform"); - op = CreateObject("java", "java.awt.image.AffineTransformOp"); - - flippedImage.init(img.getWidth(), img.getHeight(), img.getType()); - - if (direction eq "horizontal") { - at = at.getScaleInstance(-1, 1); - at.translate(-img.getWidth(), 0); - } else { - at = at.getScaleInstance(1,-1); - at.translate(0, -img.getHeight()); - } - op.init(at, rh); - op.filter(img, flippedImage); - - if (outputFile eq "") - { - retVal.img = flippedImage; - return retVal; - } else { - saveImage = writeImage(outputFile, flippedImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // initialize the blur filter - variables.blurFilter.init(arguments.blurAmount); - // move the source image into the destination image - // so we can repeatedly blur it. - destImage = srcImage; - - for (i=1; i lte iterations; i=i+1) - { - // do the blur i times - destImage = variables.blurFilter.filter(destImage); - } - - - if (outputFile eq "") - { - // return the image object - retVal.img = destImage; - return retVal; - } else { - // write the image object to the specified file. - saveImage = writeImage(outputFile, destImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // initialize the sharpen filter - variables.sharpenFilter.init(); - - destImage = variables.sharpenFilter.filter(srcImage); - - - if (outputFile eq "") - { - // return the image object - retVal.img = destImage; - return retVal; - } else { - // write the image object to the specified file. - saveImage = writeImage(outputFile, destImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // initialize the posterize filter - variables.posterizeFilter.init(arguments.amount); - - destImage = variables.posterizeFilter.filter(srcImage); - - - if (outputFile eq "") - { - // return the image object - retVal.img = destImage; - return retVal; - } else { - // write the image object to the specified file. - saveImage = writeImage(outputFile, destImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // load objects - bgImage = CreateObject("java", "java.awt.image.BufferedImage"); - fontImage = CreateObject("java", "java.awt.image.BufferedImage"); - overlayImage = CreateObject("java", "java.awt.image.BufferedImage"); - Color = CreateObject("java","java.awt.Color"); - font = createObject("java","java.awt.Font"); - font_stream = createObject("java","java.io.FileInputStream"); - ac = CreateObject("Java", "java.awt.AlphaComposite"); - - // set up basic needs - fontColor = Color.init(javacast("int", rgb.red), javacast("int", rgb.green), javacast("int", rgb.blue)); - - if (fontDetails.fontFile neq "") - { - font_stream.init(arguments.fontDetails.fontFile); - font = font.createFont(font.TRUETYPE_FONT, font_stream); - font = font.deriveFont(javacast("float",arguments.fontDetails.size)); - } else { - font.init(fontDetails.fontName, evaluate(fontDetails.style), fontDetails.size); - } - // get font metrics using a 1x1 bufferedImage - fontImage.init(1,1,img.getType()); - g2 = fontImage.createGraphics(); - g2.setRenderingHints(getRenderingHints()); - fc = g2.getFontRenderContext(); - bounds = font.getStringBounds(content,fc); - - g2 = img.createGraphics(); - g2.setRenderingHints(getRenderingHints()); - g2.setFont(font); - g2.setColor(fontColor); - // in case you want to change the alpha - // g2.setComposite(ac.getInstance(ac.SRC_OVER, 0.50)); - - // the location (arguments.fontDetails.size+y) doesn't really work - // the way I want it to. - g2.drawString(content,javacast("int",x),javacast("int",arguments.fontDetails.size+y)); - - if (outputFile eq "") - { - retVal.img = img; - return retVal; - } else { - saveImage = writeImage(outputFile, img, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - at = CreateObject("java", "java.awt.geom.AffineTransform"); - op = CreateObject("java", "java.awt.image.AffineTransformOp"); - ac = CreateObject("Java", "java.awt.AlphaComposite"); - gfx = originalImage.getGraphics(); - gfx.setComposite(ac.getInstance(ac.SRC_OVER, alpha)); - - at.init(); - // op.init(at,op.TYPE_BILINEAR); - op.init(at, rh); - - gfx.drawImage(wmImage, op, javaCast("int",arguments.placeAtX), javacast("int", arguments.placeAtY)); - - gfx.dispose(); - - if (outputFile eq "") - { - retVal.img = originalImage; - return retVal; - } else { - saveImage = writeImage(outputFile, originalImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // convert the image to a specified BufferedImage type and return it - - var width = bImage.getWidth(); - var height = bImage.getHeight(); - var newImage = createObject("java","java.awt.image.BufferedImage").init(javacast("int",width), javacast("int",height), javacast("int",type)); - // int[] rgbArray = new int[width*height]; - var rgbArray = variables.arrObj.newInstance(variables.intClass, javacast("int",width*height)); - - bImage.getRGB( - javacast("int",0), - javacast("int",0), - javacast("int",width), - javacast("int",height), - rgbArray, - javacast("int",0), - javacast("int",width) - ); - newImage.setRGB( - javacast("int",0), - javacast("int",0), - javacast("int",width), - javacast("int",height), - rgbArray, - javacast("int",0), - javacast("int",width) - ); - return newImage; - - - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/upload.cfm b/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/upload.cfm deleted file mode 100644 index 72fac0db1cb..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/cfm/upload.cfm +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/lasso/config.lasso b/htdocs/includes/fckeditor/editor/filemanager/connectors/lasso/config.lasso deleted file mode 100644 index d558dfa5dc6..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/lasso/config.lasso +++ /dev/null @@ -1,65 +0,0 @@ -[//lasso -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2010 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Configuration file for the File Manager Connector for Lasso. - */ - - /*..................................................................... - The connector uses the file tags, which require authentication. Enter a - valid username and password from Lasso admin for a group with file tags - permissions for uploads and the path you define in UserFilesPath below. - */ - - var('connection') = array( - -username='xxxxxxxx', - -password='xxxxxxxx' - ); - - - /*..................................................................... - Set the base path for files that users can upload and browse (relative - to server root). - - Set which file extensions are allowed and/or denied for each file type. - */ - var('config') = map( - 'Enabled' = false, - 'UserFilesPath' = '/userfiles/', - 'Subdirectories' = map( - 'File' = 'File/', - 'Image' = 'Image/', - 'Flash' = 'Flash/', - 'Media' = 'Media/' - ), - 'AllowedExtensions' = map( - 'File' = array('7z','aiff','asf','avi','bmp','csv','doc','fla','flv','gif','gz','gzip','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','ods','odt','pdf','png','ppt','pxd','qt','ram','rar','rm','rmi','rmvb','rtf','sdc','sitd','swf','sxc','sxw','tar','tgz','tif','tiff','txt','vsd','wav','wma','wmv','xls','xml','zip'), - 'Image' = array('bmp','gif','jpeg','jpg','png'), - 'Flash' = array('swf','flv'), - 'Media' = array('aiff','asf','avi','bmp','fla','flv','gif','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','png','qt','ram','rm','rmi','rmvb','swf','tif','tiff','wav','wma','wmv') - ), - 'DeniedExtensions' = map( - 'File' = array(), - 'Image' = array(), - 'Flash' = array(), - 'Media' = array() - ) - ); -] diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/lasso/connector.lasso b/htdocs/includes/fckeditor/editor/filemanager/connectors/lasso/connector.lasso deleted file mode 100644 index 98e3e4f89ab..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/lasso/connector.lasso +++ /dev/null @@ -1,330 +0,0 @@ -[//lasso -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2010 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This is the File Manager Connector for Lasso. - */ - - /*..................................................................... - Include global configuration. See config.lasso for details. - */ - include('config.lasso'); - - - /*..................................................................... - Translate current date/time to GMT for custom header. - */ - var('headerDate') = date_localtogmt(date)->format('%a, %d %b %Y %T GMT'); - - - /*..................................................................... - Convert query string parameters to variables and initialize output. - */ - var( - 'Command' = (Encode_HTML: action_param('Command')), - 'Type' = (Encode_HTML: action_param('Type')), - 'CurrentFolder' = action_param('CurrentFolder'), - 'ServerPath' = action_param('ServerPath'), - 'NewFolderName' = action_param('NewFolderName'), - 'NewFile' = null, - 'NewFileName' = string, - 'OrigFilePath' = string, - 'NewFilePath' = string, - 'commandData' = string, - 'folders' = '\t\n', - 'files' = '\t\n', - 'errorNumber' = integer, - 'responseType' = 'xml', - 'uploadResult' = '0' - ); - - /*..................................................................... - Custom tag sets the HTML response. - */ - - define_tag( - 'htmlreply', - -namespace='fck_', - -priority='replace', - -required='uploadResult', - -optional='NewFilePath', - -type='string', - -description='Sets the HTML response for the FCKEditor File Upload feature.' - ); - $__html_reply__ = '\ - - '; - else; - $__html_reply__ = $__html_reply__ + '\ - window.parent.OnUploadCompleted(' + $uploadResult + ',"",""); - - '; - /if; - /define_tag; - - - /*..................................................................... - Calculate the path to the current folder. - */ - $ServerPath == '' ? $ServerPath = $config->find('UserFilesPath'); - - var('currentFolderURL' = $ServerPath - + $config->find('Subdirectories')->find(action_param('Type')) - + $CurrentFolder - ); - - $currentFolderURL = string_replace($currentFolderURL, -find='//', -replace='/'); - - if (!$config->find('Subdirectories')->find(action_param('Type'))); - if($Command == 'FileUpload'); - $responseType = 'html'; - $uploadResult = '1'; - fck_htmlreply( - -uploadResult=$uploadResult - ); - else; - $errorNumber = 1; - $commandData += '\n'; - /if; - else if($CurrentFolder->(Find: '..') || (String_FindRegExp: $CurrentFolder, -Find='(/\\.)|(//)|[\\\\:\\*\\?\\""\\<\\>\\|]|\\000|[\u007F]|[\u0001-\u001F]')); - if($Command == 'FileUpload'); - $responseType = 'html'; - $uploadResult = '102'; - fck_htmlreply( - -uploadResult=$uploadResult - ); - else; - $errorNumber = 102; - $commandData += '\n'; - /if; - else; - - /*..................................................................... - Build the appropriate response per the 'Command' parameter. Wrap the - entire process in an inline for file tag permissions. - */ - if($config->find('Enabled')); - inline($connection); - select($Command); - /*............................................................. - List all subdirectories in the 'Current Folder' directory. - */ - case('GetFolders'); - $commandData += '\t\n'; - - iterate(file_listdirectory($currentFolderURL), local('this')); - #this->endswith('/') ? $commandData += '\t\t\n'; - /iterate; - - $commandData += '\t\n'; - - - /*............................................................. - List both files and folders in the 'Current Folder' directory. - Include the file sizes in kilobytes. - */ - case('GetFoldersAndFiles'); - iterate(file_listdirectory($currentFolderURL), local('this')); - if(#this->endswith('/')); - $folders += '\t\t\n'; - else; - local('size') = file_getsize($currentFolderURL + #this); - if($size>0); - $size = $size/1024; - if ($size==0); - $size = 1; - /if; - /if; - $files += '\t\t\n'; - /if; - /iterate; - - $folders += '\t\n'; - $files += '\t\n'; - - $commandData += $folders + $files; - - - /*............................................................. - Create a directory 'NewFolderName' within the 'Current Folder.' - */ - case('CreateFolder'); - $NewFolderName = (String_ReplaceRegExp: $NewFolderName, -find='\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|\\000|[\u007F]|[\u0001-\u001F]', -replace='_'); - var('newFolder' = $currentFolderURL + $NewFolderName + '/'); - file_create($newFolder); - - - /*......................................................... - Map Lasso's file error codes to FCKEditor's error codes. - */ - select(file_currenterror( -errorcode)); - case(0); - $errorNumber = 0; - case( -9983); - $errorNumber = 101; - case( -9976); - $errorNumber = 102; - case( -9977); - $errorNumber = 102; - case( -9961); - $errorNumber = 103; - case; - $errorNumber = 110; - /select; - - $commandData += '\n'; - - - /*............................................................. - Process an uploaded file. - */ - case('FileUpload'); - /*......................................................... - This is the only command that returns an HTML response. - */ - $responseType = 'html'; - - - /*......................................................... - Was a file actually uploaded? - */ - if(file_uploads->size); - $NewFile = file_uploads->get(1); - else; - $uploadResult = '202'; - /if; - - if($uploadResult == '0'); - /*..................................................... - Split the file's extension from the filename in order - to follow the API's naming convention for duplicate - files. (Test.txt, Test(1).txt, Test(2).txt, etc.) - */ - $NewFileName = $NewFile->find('OrigName'); - $NewFileName = (String_ReplaceRegExp: $NewFileName, -find='\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|\\000|[\u007F]|[\u0001-\u001F]', -replace='_'); - $NewFileName = (String_ReplaceRegExp: $NewFileName, -find='\\.(?![^.]*$)', -replace='_'); - $OrigFilePath = $currentFolderURL + $NewFileName; - $NewFilePath = $OrigFilePath; - local('fileExtension') = '.' + $NewFile->find('OrigExtension'); - #fileExtension = (String_ReplaceRegExp: #fileExtension, -find='\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|\\000|[\u007F]|[\u0001-\u001F]', -replace='_'); - local('shortFileName') = $NewFileName->removetrailing(#fileExtension)&; - - - /*..................................................... - Make sure the file extension is allowed. - */ - local('allowedExt') = $config->find('AllowedExtensions')->find($Type); - local('deniedExt') = $config->find('DeniedExtensions')->find($Type); - if($allowedExt->Size > 0 && $allowedExt !>> $NewFile->find('OrigExtension')); - $uploadResult = '202'; - else($deniedExt->Size > 0 && $deniedExt >> $NewFile->find('OrigExtension')); - $uploadResult = '202'; - else; - /*................................................. - Rename the target path until it is unique. - */ - while(file_exists($NewFilePath)); - $NewFilePath = $currentFolderURL + #shortFileName + '(' + loop_count + ')' + #fileExtension; - /while; - - - /*................................................. - Copy the uploaded file to its final location. - */ - file_copy($NewFile->find('path'), $NewFilePath); - - - /*................................................. - Set the error code for the response. Note whether - the file had to be renamed. - */ - select(file_currenterror( -errorcode)); - case(0); - $OrigFilePath != $NewFilePath ? $uploadResult = 201; - case; - $uploadResult = file_currenterror( -errorcode); - /select; - /if; - /if; - fck_htmlreply( - -uploadResult=$uploadResult, - -NewFilePath=$NewFilePath - ); - case; - $errorNumber = 1; - $commandData += '\n'; - /select; - /inline; - else; - $errorNumber = 1; - $commandData += '\n'; - /if; - /if; - - /*..................................................................... - Send a custom header for xml responses. - */ - if($responseType == 'xml'); - header; -] -HTTP/1.0 200 OK -Date: [$headerDate] -Server: Lasso Professional [lasso_version( -lassoversion)] -Expires: Mon, 26 Jul 1997 05:00:00 GMT -Last-Modified: [$headerDate] -Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 -Pragma: no-cache -Keep-Alive: timeout=15, max=98 -Connection: Keep-Alive -Content-Type: text/xml; charset=utf-8 -[//lasso -/header; - - /* - Set the content type encoding for Lasso. - */ - content_type('text/xml; charset=utf-8'); - - /* - Wrap the response as XML and output. - */ - $__html_reply__ = '\ -'; - - if($errorNumber != '102'); - $__html_reply__ += ''; - else; - $__html_reply__ += ''; - /if; - - if($errorNumber != '102'); - $__html_reply__ += ''; - /if; - - $__html_reply__ += $commandData + ' -'; - /if; -] diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/lasso/upload.lasso b/htdocs/includes/fckeditor/editor/filemanager/connectors/lasso/upload.lasso deleted file mode 100644 index 66d563fdc1e..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/lasso/upload.lasso +++ /dev/null @@ -1,178 +0,0 @@ -[//lasso -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2010 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This is the "File Uploader" for Lasso. - */ - - /*..................................................................... - Include global configuration. See config.lasso for details. - */ - include('config.lasso'); - - - /*..................................................................... - Convert query string parameters to variables and initialize output. - */ - var( - 'Type' = (Encode_HTML: action_param('Type')), - 'CurrentFolder' = "/", - 'ServerPath' = action_param('ServerPath'), - 'NewFile' = null, - 'NewFileName' = string, - 'OrigFilePath' = string, - 'NewFilePath' = string, - 'errorNumber' = 0, - 'customMsg' = '' - ); - - $Type == '' ? $Type = 'File'; - - - /*..................................................................... - Calculate the path to the current folder. - */ - $ServerPath == '' ? $ServerPath = $config->find('UserFilesPath'); - - var('currentFolderURL' = $ServerPath - + $config->find('Subdirectories')->find(action_param('Type')) - + $CurrentFolder - ); - - $currentFolderURL = string_replace($currentFolderURL, -find='//', -replace='/'); - - /*..................................................................... - Custom tag sets the HTML response. - */ - - define_tag( - 'sendresults', - -namespace='fck_', - -priority='replace', - -required='errorNumber', - -type='integer', - -optional='fileUrl', - -type='string', - -optional='fileName', - -type='string', - -optional='customMsg', - -type='string', - -description='Sets the HTML response for the FCKEditor Quick Upload feature.' - ); - - $__html_reply__ = ' - '; - /define_tag; - - if($CurrentFolder->(Find: '..') || (String_FindRegExp: $CurrentFolder, -Find='(/\\.)|(//)|[\\\\:\\*\\?\\""\\<\\>\\|]|\\000|[\u007F]|[\u0001-\u001F]')); - $errorNumber = 102; - /if; - - if($config->find('Enabled')); - /*................................................................. - Process an uploaded file. - */ - inline($connection); - /*............................................................. - Was a file actually uploaded? - */ - if($errorNumber != '102'); - file_uploads->size ? $NewFile = file_uploads->get(1) | $errorNumber = 202; - /if; - - if($errorNumber == 0); - /*......................................................... - Split the file's extension from the filename in order - to follow the API's naming convention for duplicate - files. (Test.txt, Test(1).txt, Test(2).txt, etc.) - */ - $NewFileName = $NewFile->find('OrigName'); - $NewFileName = (String_ReplaceRegExp: $NewFileName, -find='\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|\\000|[\u007F]|[\u0001-\u001F]', -replace='_'); - $NewFileName = (String_ReplaceRegExp: $NewFileName, -find='\\.(?![^.]*$)', -replace='_'); - $OrigFilePath = $currentFolderURL + $NewFileName; - $NewFilePath = $OrigFilePath; - local('fileExtension') = '.' + $NewFile->find('OrigExtension'); - local('shortFileName') = $NewFileName->removetrailing(#fileExtension)&; - - - /*......................................................... - Make sure the file extension is allowed. - */ - - local('allowedExt') = $config->find('AllowedExtensions')->find($Type); - local('deniedExt') = $config->find('DeniedExtensions')->find($Type); - if($allowedExt->Size > 0 && $allowedExt !>> $NewFile->find('OrigExtension')); - $errorNumber = 202; - else($deniedExt->Size > 0 && $deniedExt >> $NewFile->find('OrigExtension')); - $errorNumber = 202; - else; - /*..................................................... - Rename the target path until it is unique. - */ - while(file_exists($NewFilePath)); - $NewFileName = #shortFileName + '(' + loop_count + ')' + #fileExtension; - $NewFilePath = $currentFolderURL + $NewFileName; - /while; - - - /*..................................................... - Copy the uploaded file to its final location. - */ - file_copy($NewFile->find('path'), $NewFilePath); - - - /*..................................................... - Set the error code for the response. - */ - select(file_currenterror( -errorcode)); - case(0); - $OrigFilePath != $NewFilePath ? $errorNumber = 201; - case; - $errorNumber = 202; - /select; - /if; - /if; - if ($errorNumber != 0 && $errorNumber != 201); - $NewFilePath = ""; - /if; - /inline; - else; - $errorNumber = 1; - $customMsg = 'This file uploader is disabled. Please check the "editor/filemanager/upload/lasso/config.lasso" file.'; - /if; - - fck_sendresults( - -errorNumber=$errorNumber, - -fileUrl=$NewFilePath, - -customMsg=$customMsg - ); -] diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/basexml.pl b/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/basexml.pl deleted file mode 100644 index e0835c3dd90..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/basexml.pl +++ /dev/null @@ -1,68 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2010 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -sub CreateXmlHeader -{ - local($command,$resourceType,$currentFolder) = @_; - - # Create the XML document header. - print ''; - - # Create the main "Connector" node. - print ''; - - # Add the current folder node. - print ''; -} - -sub CreateXmlFooter -{ - print ''; -} - -sub SendError -{ - local( $number, $text ) = @_; - - print << "_HTML_HEAD_"; -Content-Type:text/xml; charset=utf-8 -Pragma: no-cache -Cache-Control: no-cache -Expires: Thu, 01 Dec 1994 16:00:00 GMT - -_HTML_HEAD_ - - # Create the XML document header - print '' ; - - if ($text) { - print '' ; - } - else { - print '' ; - } - - exit ; -} - -1; diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/commands.pl b/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/commands.pl deleted file mode 100644 index 66b4d6da0a7..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/commands.pl +++ /dev/null @@ -1,200 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2010 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -sub GetFolders -{ - - local($resourceType, $currentFolder) = @_; - - # Map the virtual path to the local server path. - $sServerDir = &ServerMapFolder($resourceType, $currentFolder); - print ""; # Open the "Folders" node. - - opendir(DIR,"$sServerDir"); - @files = grep(!/^\.\.?$/,readdir(DIR)); - closedir(DIR); - - foreach $sFile (@files) { - if($sFile != '.' && $sFile != '..' && (-d "$sServerDir$sFile")) { - $cnv_filename = &ConvertToXmlAttribute($sFile); - print ''; - } - } - print ""; # Close the "Folders" node. -} - -sub GetFoldersAndFiles -{ - - local($resourceType, $currentFolder) = @_; - # Map the virtual path to the local server path. - $sServerDir = &ServerMapFolder($resourceType,$currentFolder); - - # Initialize the output buffers for "Folders" and "Files". - $sFolders = ''; - $sFiles = ''; - - opendir(DIR,"$sServerDir"); - @files = grep(!/^\.\.?$/,readdir(DIR)); - closedir(DIR); - - foreach $sFile (@files) { - if($sFile ne '.' && $sFile ne '..') { - if(-d "$sServerDir$sFile") { - $cnv_filename = &ConvertToXmlAttribute($sFile); - $sFolders .= '' ; - } else { - ($iFileSize,$refdate,$filedate,$fileperm) = (stat("$sServerDir$sFile"))[7,8,9,2]; - if($iFileSize > 0) { - $iFileSize = int($iFileSize / 1024); - if($iFileSize < 1) { - $iFileSize = 1; - } - } - $cnv_filename = &ConvertToXmlAttribute($sFile); - $sFiles .= '' ; - } - } - } - print $sFolders ; - print ''; # Close the "Folders" node. - print $sFiles ; - print ''; # Close the "Files" node. -} - -sub CreateFolder -{ - - local($resourceType, $currentFolder) = @_; - $sErrorNumber = '0' ; - $sErrorMsg = '' ; - - if($FORM{'NewFolderName'} ne "") { - $sNewFolderName = $FORM{'NewFolderName'}; - $sNewFolderName =~ s/\.|\\|\/|\||\:|\?|\*|\"|<|>|[[:cntrl:]]/_/g; - # Map the virtual path to the local server path of the current folder. - $sServerDir = &ServerMapFolder($resourceType, $currentFolder); - if(-w $sServerDir) { - $sServerDir .= $sNewFolderName; - $sErrorMsg = &CreateServerFolder($sServerDir); - if($sErrorMsg == 0) { - $sErrorNumber = '0'; - } elsif($sErrorMsg eq 'Invalid argument' || $sErrorMsg eq 'No such file or directory') { - $sErrorNumber = '102'; #// Path too long. - } else { - $sErrorNumber = '110'; - } - } else { - $sErrorNumber = '103'; - } - } else { - $sErrorNumber = '102' ; - } - # Create the "Error" node. - $cnv_errmsg = &ConvertToXmlAttribute($sErrorMsg); - print ''; -} - -sub FileUpload -{ -eval("use File::Copy;"); - - local($resourceType, $currentFolder) = @_; - $allowedExtensions = $allowedExtensions{$resourceType}; - - $sErrorNumber = '0' ; - $sFileName = '' ; - if($new_fname) { - # Map the virtual path to the local server path. - $sServerDir = &ServerMapFolder($resourceType,$currentFolder); - - # Get the uploaded file name. - $sFileName = $new_fname; - $sFileName =~ s/\\|\/|\||\:|\?|\*|\"|<|>|[[:cntrl:]]/_/g; - $sFileName =~ s/\.(?![^.]*$)/_/g; - - $ext = ''; - if($sFileName =~ /([^\\\/]*)\.(.*)$/) { - $ext = $2; - } - - $allowedRegex = qr/^($allowedExtensions)$/i; - if (!($ext =~ $allowedRegex)) { - SendUploadResults('202', '', '', ''); - } - - $sOriginalFileName = $sFileName; - - $iCounter = 0; - while(1) { - $sFilePath = $sServerDir . $sFileName; - if(-e $sFilePath) { - $iCounter++ ; - ($path,$BaseName,$ext) = &RemoveExtension($sOriginalFileName); - $sFileName = $BaseName . '(' . $iCounter . ').' . $ext; - $sErrorNumber = '201'; - } else { - copy("$img_dir/$new_fname","$sFilePath"); - if (defined $CHMOD_ON_UPLOAD) { - if ($CHMOD_ON_UPLOAD) { - umask(000); - chmod($CHMOD_ON_UPLOAD,$sFilePath); - } - } - else { - umask(000); - chmod(0777,$sFilePath); - } - unlink("$img_dir/$new_fname"); - last; - } - } - } else { - $sErrorNumber = '202' ; - } - $sFileName =~ s/"/\\"/g; - - SendUploadResults($sErrorNumber, $GLOBALS{'UserFilesPath'}.$resourceType.$currentFolder.$sFileName, $sFileName, ''); -} - -sub SendUploadResults -{ - - local($sErrorNumber, $sFileUrl, $sFileName, $customMsg) = @_; - - # Minified version of the document.domain automatic fix script (#1919). - # The original script can be found at _dev/domain_fix_template.js - # Note: in Perl replace \ with \\ and $ with \$ - print < -(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|\$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); - -EOF - print 'window.parent.OnUploadCompleted(' . $sErrorNumber . ',"' . JS_cnv($sFileUrl) . '","' . JS_cnv($sFileName) . '","' . JS_cnv($customMsg) . '") ;'; - print ''; - exit ; -} - -1; diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/config.pl b/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/config.pl deleted file mode 100644 index de85c7957d6..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/config.pl +++ /dev/null @@ -1,39 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2010 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -## -# SECURITY: REMOVE/COMMENT THE FOLLOWING LINE TO ENABLE THIS CONNECTOR. -## -&SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/perl/config.cgi" file' ) ; - -$GLOBALS{'UserFilesPath'} = '/userfiles/'; - -# Map the "UserFiles" path to a local directory. -$rootpath = &GetRootPath(); -$GLOBALS{'UserFilesDirectory'} = $rootpath . $GLOBALS{'UserFilesPath'}; - -%allowedExtensions = ("File", "7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip", -"Image", "bmp|gif|jpeg|jpg|png", -"Flash", "swf|flv", -"Media", "aiff|asf|avi|bmp|fla|flv|gif|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|png|qt|ram|rm|rmi|rmvb|swf|tif|tiff|wav|wma|wmv" -); diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/connector.cgi b/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/connector.cgi deleted file mode 100644 index 990a92e6385..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/connector.cgi +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/env perl - -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2010 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -## -# ATTENTION: To enable this connector, look for the "SECURITY" comment in config.pl. -## - -## START: Hack for Windows (Not important to understand the editor code... Perl specific). -if(Windows_check()) { - chdir(GetScriptPath($0)); -} - -sub Windows_check -{ - # IIS,PWS(NT/95) - $www_server_os = $^O; - # Win98 & NT(SP4) - if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } - # AnHTTPd/Omni/IIS - if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } - # Win Apache - if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } - if($www_server_os=~ /win/i) { return(1); } - return(0); -} - -sub GetScriptPath { - local($path) = @_; - if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } - $path; -} -## END: Hack for IIS - -require 'util.pl'; -require 'io.pl'; -require 'basexml.pl'; -require 'commands.pl'; -require 'upload_fck.pl'; -require 'config.pl'; - -&read_input(); -&DoResponse(); - -sub DoResponse -{ - - if($FORM{'Command'} eq "" || $FORM{'Type'} eq "" || $FORM{'CurrentFolder'} eq "") { - return ; - } - # Get the main request informaiton. - $sCommand = &specialchar_cnv($FORM{'Command'}); - $sResourceType = &specialchar_cnv($FORM{'Type'}); - $sCurrentFolder = $FORM{'CurrentFolder'}; - - if ( !($sCommand =~ /^(FileUpload|GetFolders|GetFoldersAndFiles|CreateFolder)$/) ) { - SendError( 1, "Command not allowed" ) ; - } - - if ( !($sResourceType =~ /^(File|Image|Flash|Media)$/) ) { - SendError( 1, "Invalid type specified" ) ; - } - - # Check the current folder syntax (must begin and start with a slash). - if(!($sCurrentFolder =~ /\/$/)) { - $sCurrentFolder .= '/'; - } - if(!($sCurrentFolder =~ /^\//)) { - $sCurrentFolder = '/' . $sCurrentFolder; - } - - # Check for invalid folder paths (..) - if ( $sCurrentFolder =~ /(?:\.\.|\\)/ ) { - SendError( 102, "" ) ; - } - if ( $sCurrentFolder =~ /(\/\.)|[[:cntrl:]]|(\/\/)|(\\\\)|([\:\*\?\"\<\>\|])/ ) { - SendError( 102, "" ) ; - } - - # File Upload doesn't have to Return XML, so it must be intercepted before anything. - if($sCommand eq 'FileUpload') { - FileUpload($sResourceType,$sCurrentFolder); - return ; - } - - print << "_HTML_HEAD_"; -Content-Type:text/xml; charset=utf-8 -Pragma: no-cache -Cache-Control: no-cache -Expires: Thu, 01 Dec 1994 16:00:00 GMT - -_HTML_HEAD_ - - &CreateXmlHeader($sCommand,$sResourceType,$sCurrentFolder); - - # Execute the required command. - if($sCommand eq 'GetFolders') { - &GetFolders($sResourceType,$sCurrentFolder); - } elsif($sCommand eq 'GetFoldersAndFiles') { - &GetFoldersAndFiles($sResourceType,$sCurrentFolder); - } elsif($sCommand eq 'CreateFolder') { - &CreateFolder($sResourceType,$sCurrentFolder); - } - - &CreateXmlFooter(); - - exit ; -} diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/io.pl b/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/io.pl deleted file mode 100644 index 56e54812b1c..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/io.pl +++ /dev/null @@ -1,141 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2010 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -sub GetUrlFromPath -{ - local($resourceType, $folderPath) = @_; - - if($resourceType eq '') { - $rmpath = &RemoveFromEnd($GLOBALS{'UserFilesPath'},'/'); - return("$rmpath$folderPath"); - } else { - return("$GLOBALS{'UserFilesPath'}$resourceType$folderPath"); - } -} - -sub RemoveExtension -{ - local($fileName) = @_; - local($path, $base, $ext); - if($fileName !~ /\./) { - $fileName .= '.'; - } - if($fileName =~ /([^\\\/]*)\.(.*)$/) { - $base = $1; - $ext = $2; - if($fileName =~ /(.*)$base\.$ext$/) { - $path = $1; - } - } - return($path,$base,$ext); - -} - -sub ServerMapFolder -{ - local($resourceType,$folderPath) = @_; - - # Get the resource type directory. - $sResourceTypePath = $GLOBALS{'UserFilesDirectory'} . $resourceType . '/'; - - # Ensure that the directory exists. - &CreateServerFolder($sResourceTypePath); - - # Return the resource type directory combined with the required path. - $rmpath = &RemoveFromStart($folderPath,'/'); - return("$sResourceTypePath$rmpath"); -} - -sub GetParentFolder -{ - local($folderPath) = @_; - - $folderPath =~ s/[\/][^\/]+[\/]?$//g; - return $folderPath; -} - -sub CreateServerFolder -{ - local($folderPath) = @_; - - $sParent = &GetParentFolder($folderPath); - # Check if the parent exists, or create it. - if(!(-e $sParent)) { - $sErrorMsg = &CreateServerFolder($sParent); - if($sErrorMsg == 1) { - return(1); - } - } - if(!(-e $folderPath)) { - if (defined $CHMOD_ON_FOLDER_CREATE && !$CHMOD_ON_FOLDER_CREATE) { - mkdir("$folderPath"); - } - else { - umask(000); - if (defined $CHMOD_ON_FOLDER_CREATE) { - mkdir("$folderPath",$CHMOD_ON_FOLDER_CREATE); - } - else { - mkdir("$folderPath",0777); - } - } - - return(0); - } else { - return(1); - } -} - -sub GetRootPath -{ -#use Cwd; - -# my $dir = getcwd; -# print $dir; -# $dir =~ s/$ENV{'DOCUMENT_ROOT'}//g; -# print $dir; -# return($dir); - -# $wk = $0; -# $wk =~ s/\/connector\.cgi//g; -# if($wk) { -# $current_dir = $wk; -# } else { -# $current_dir = `pwd`; -# } -# return($current_dir); -use Cwd; - - if($ENV{'DOCUMENT_ROOT'}) { - $dir = $ENV{'DOCUMENT_ROOT'}; - } else { - my $dir = getcwd; - $workdir =~ s/\/connector\.cgi//g; - $dir =~ s/$workdir//g; - } - return($dir); - - - -} -1; diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/upload.cgi b/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/upload.cgi deleted file mode 100644 index 38c5ea55092..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/upload.cgi +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env perl - -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2010 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -## -# ATTENTION: To enable this connector, look for the "SECURITY" comment in config.pl. -## - -## START: Hack for Windows (Not important to understand the editor code... Perl specific). -if(Windows_check()) { - chdir(GetScriptPath($0)); -} - -sub Windows_check -{ - # IIS,PWS(NT/95) - $www_server_os = $^O; - # Win98 & NT(SP4) - if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } - # AnHTTPd/Omni/IIS - if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } - # Win Apache - if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } - if($www_server_os=~ /win/i) { return(1); } - return(0); -} - -sub GetScriptPath { - local($path) = @_; - if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } - $path; -} -## END: Hack for IIS - -require 'util.pl'; -require 'io.pl'; -require 'basexml.pl'; -require 'commands.pl'; -require 'upload_fck.pl'; -require 'config.pl'; - -&read_input(); -&DoResponse(); - -sub DoResponse -{ - # Get the main request information. - $sCommand = 'FileUpload'; - $sResourceType = &specialchar_cnv($FORM{'Type'}); - $sCurrentFolder = "/"; - - if ($sResourceType eq '') { - $sResourceType = 'File' ; - } - - if ( !($sResourceType =~ /^(File|Image|Flash|Media)$/) ) { - SendError( 1, "Invalid type specified" ) ; - } - - # File Upload doesn't have to Return XML, so it must be intercepted before anything. - if($sCommand eq 'FileUpload') { - FileUpload($sResourceType,$sCurrentFolder); - return ; - } - -} diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl b/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl deleted file mode 100644 index debdad639ef..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl +++ /dev/null @@ -1,686 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2010 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -# image data save dir -$img_dir = './temp/'; - - -# File size max(unit KB) -$MAX_CONTENT_SIZE = 30000; - -# After file is uploaded, sometimes it is required to change its permissions -# so that it was possible to access it at the later time. -# If possible, it is recommended to set more restrictive permissions, like 0755. -# Set to 0 to disable this feature. -$CHMOD_ON_UPLOAD = 0777; - -# See comments above. -# Used when creating folders that does not exist. -$CHMOD_ON_FOLDER_CREATE = 0755; - -# Filelock (1=use,0=not use) -$PM{'flock'} = '1'; - - -# upload Content-Type list -my %UPLOAD_CONTENT_TYPE_LIST = ( - 'image/(x-)?png' => 'png', # PNG image - 'image/p?jpe?g' => 'jpg', # JPEG image - 'image/gif' => 'gif', # GIF image - 'image/x-xbitmap' => 'xbm', # XBM image - - 'image/(x-(MS-)?)?bmp' => 'bmp', # Windows BMP image - 'image/pict' => 'pict', # Macintosh PICT image - 'image/tiff' => 'tif', # TIFF image - 'application/pdf' => 'pdf', # PDF image - 'application/x-shockwave-flash' => 'swf', # Shockwave Flash - - 'video/(x-)?msvideo' => 'avi', # Microsoft Video - 'video/quicktime' => 'mov', # QuickTime Video - 'video/mpeg' => 'mpeg', # MPEG Video - 'video/x-mpeg2' => 'mpv2', # MPEG2 Video - - 'audio/(x-)?midi?' => 'mid', # MIDI Audio - 'audio/(x-)?wav' => 'wav', # WAV Audio - 'audio/basic' => 'au', # ULAW Audio - 'audio/mpeg' => 'mpga', # MPEG Audio - - 'application/(x-)?zip(-compressed)?' => 'zip', # ZIP Compress - - 'text/html' => 'html', # HTML - 'text/plain' => 'txt', # TEXT - '(?:application|text)/(?:rtf|richtext)' => 'rtf', # RichText - - 'application/msword' => 'doc', # Microsoft Word - 'application/vnd.ms-excel' => 'xls', # Microsoft Excel - - '' -); - -# Upload is permitted. -# A regular expression is possible. -my %UPLOAD_EXT_LIST = ( - 'png' => 'PNG image', - 'p?jpe?g|jpe|jfif|pjp' => 'JPEG image', - 'gif' => 'GIF image', - 'xbm' => 'XBM image', - - 'bmp|dib|rle' => 'Windows BMP image', - 'pi?ct' => 'Macintosh PICT image', - 'tiff?' => 'TIFF image', - 'pdf' => 'PDF image', - 'swf' => 'Shockwave Flash', - - 'avi' => 'Microsoft Video', - 'moo?v|qt' => 'QuickTime Video', - 'm(p(e?gv?|e|v)|1v)' => 'MPEG Video', - 'mp(v2|2v)' => 'MPEG2 Video', - - 'midi?|kar|smf|rmi|mff' => 'MIDI Audio', - 'wav' => 'WAVE Audio', - 'au|snd' => 'ULAW Audio', - 'mp(e?ga|2|a|3)|abs' => 'MPEG Audio', - - 'zip' => 'ZIP Compress', - 'lzh' => 'LZH Compress', - 'cab' => 'CAB Compress', - - 'd?html?' => 'HTML', - 'rtf|rtx' => 'RichText', - 'txt|text' => 'Text', - - '' -); - - -# sjis or euc -my $CHARCODE = 'sjis'; - -$TRANS_2BYTE_CODE = 0; - -############################################################################## -# Summary -# -# Form Read input -# -# Parameters -# Returns -# Memo -############################################################################## -sub read_input -{ -eval("use File::Copy;"); -eval("use File::Path;"); - - my ($FORM) = @_; - - if (defined $CHMOD_ON_FOLDER_CREATE && !$CHMOD_ON_FOLDER_CREATE) { - mkdir("$img_dir"); - } - else { - umask(000); - if (defined $CHMOD_ON_FOLDER_CREATE) { - mkdir("$img_dir",$CHMOD_ON_FOLDER_CREATE); - } - else { - mkdir("$img_dir",0777); - } - } - - undef $img_data_exists; - undef @NEWFNAMES; - undef @NEWFNAME_DATA; - - if($ENV{'CONTENT_LENGTH'} > 10000000 || $ENV{'CONTENT_LENGTH'} > $MAX_CONTENT_SIZE * 1024) { - &upload_error( - 'Size Error', - sprintf( - "Transmitting size is too large.MAX %d KB Now Size %d KB(%d bytes Over)", - $MAX_CONTENT_SIZE, - int($ENV{'CONTENT_LENGTH'} / 1024), - $ENV{'CONTENT_LENGTH'} - $MAX_CONTENT_SIZE * 1024 - ) - ); - } - - my $Buffer; - if($ENV{'CONTENT_TYPE'} =~ /multipart\/form-data/) { - # METHOD POST only - return unless($ENV{'CONTENT_LENGTH'}); - - binmode(STDIN); - # STDIN A pause character is detected.'(MacIE3.0 boundary of $ENV{'CONTENT_TYPE'} cannot be trusted.) - my $Boundary = ; - $Boundary =~ s/\x0D\x0A//; - $Boundary = quotemeta($Boundary); - while() { - if(/^\s*Content-Disposition:/i) { - my($name,$ContentType,$FileName); - # form data get - if(/\bname="([^"]+)"/i || /\bname=([^\s:;]+)/i) { - $name = $1; - $name =~ tr/+/ /; - $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; - &Encode(\$name); - } - if(/\bfilename="([^"]*)"/i || /\bfilename=([^\s:;]*)/i) { - $FileName = $1 || 'unknown'; - } - # head read - while() { - last if(! /\w/); - if(/^\s*Content-Type:\s*"([^"]+)"/i || /^\s*Content-Type:\s*([^\s:;]+)/i) { - $ContentType = $1; - } - } - # body read - $value = ""; - while() { - last if(/^$Boundary/o); - $value .= $_; - }; - $lastline = $_; - $value =~s /\x0D\x0A$//; - if($value ne '') { - if($FileName || $ContentType) { - $img_data_exists = 1; - ( - $FileName, # - $Ext, # - $Length, # - $ImageWidth, # - $ImageHeight, # - $ContentName # - ) = &CheckContentType(\$value,$FileName,$ContentType); - - $FORM{$name} = $FileName; - $new_fname = $FileName; - push(@NEWFNAME_DATA,"$FileName\t$Ext\t$Length\t$ImageWidth\t$ImageHeight\t$ContentName"); - - # Multi-upload correspondence - push(@NEWFNAMES,$new_fname); - open(OUT,">$img_dir/$new_fname"); - binmode(OUT); - eval "flock(OUT,2);" if($PM{'flock'} == 1); - print OUT $value; - eval "flock(OUT,8);" if($PM{'flock'} == 1); - close(OUT); - - } elsif($name) { - $value =~ tr/+/ /; - $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; - &Encode(\$value,'trans'); - $FORM{$name} .= "\0" if(defined($FORM{$name})); - $FORM{$name} .= $value; - } - } - }; - last if($lastline =~ /^$Boundary\-\-/o); - } - } elsif($ENV{'CONTENT_LENGTH'}) { - read(STDIN,$Buffer,$ENV{'CONTENT_LENGTH'}); - } - foreach(split(/&/,$Buffer),split(/&/,$ENV{'QUERY_STRING'})) { - my($name, $value) = split(/=/); - $name =~ tr/+/ /; - $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; - $value =~ tr/+/ /; - $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; - - &Encode(\$name); - &Encode(\$value,'trans'); - $FORM{$name} .= "\0" if(defined($FORM{$name})); - $FORM{$name} .= $value; - - } - -} - -############################################################################## -# Summary -# -# CheckContentType -# -# Parameters -# Returns -# Memo -############################################################################## -sub CheckContentType -{ - - my($DATA,$FileName,$ContentType) = @_; - my($Ext,$ImageWidth,$ImageHeight,$ContentName,$Infomation); - my $DataLength = length($$DATA); - - # An unknown file type - - $_ = $ContentType; - my $UnknownType = ( - !$_ - || /^application\/(x-)?macbinary$/i - || /^application\/applefile$/i - || /^application\/octet-stream$/i - || /^text\/plane$/i - || /^x-unknown-content-type/i - ); - - # MacBinary(Mac Unnecessary data are deleted.) - if($UnknownType || $ENV{'HTTP_USER_AGENT'} =~ /Macintosh|Mac_/) { - if($DataLength > 128 && !unpack("C",substr($$DATA,0,1)) && !unpack("C",substr($$DATA,74,1)) && !unpack("C",substr($$DATA,82,1)) ) { - my $MacBinary_ForkLength = unpack("N", substr($$DATA, 83, 4)); # ForkLength Get - my $MacBinary_FileName = quotemeta(substr($$DATA, 2, unpack("C",substr($$DATA, 1, 1)))); - if($MacBinary_FileName && $MacBinary_ForkLength && $DataLength >= $MacBinary_ForkLength + 128 - && ($FileName =~ /$MacBinary_FileName/i || substr($$DATA,102,4) eq 'mBIN')) { # DATA TOP 128byte MacBinary!! - $$DATA = substr($$DATA,128,$MacBinary_ForkLength); - my $ResourceLength = $DataLength - $MacBinary_ForkLength - 128; - $DataLength = $MacBinary_ForkLength; - } - } - } - - # A file name is changed into EUC. -# &jcode::convert(\$FileName,'euc',$FormCodeDefault); -# &jcode::h2z_euc(\$FileName); - $FileName =~ s/^.*\\//; # Windows, Mac - $FileName =~ s/^.*\///; # UNIX - $FileName =~ s/&/&/g; - $FileName =~ s/"/"/g; - $FileName =~ s//>/g; -# -# if($CHARCODE ne 'euc') { -# &jcode::convert(\$FileName,$CHARCODE,'euc'); -# } - - # An extension is extracted and it changes into a small letter. - my $FileExt; - if($FileName =~ /\.(\w+)$/) { - $FileExt = $1; - $FileExt =~ tr/A-Z/a-z/; - } - - # Executable file detection (ban on upload) - if($$DATA =~ /^MZ/) { - $Ext = 'exe'; - } - # text - if(!$Ext && ($UnknownType || $ContentType =~ /^text\//i || $ContentType =~ /^application\/(?:rtf|richtext)$/i || $ContentType =~ /^image\/x-xbitmap$/i) - && ! $$DATA =~ /[\000-\006\177\377]/) { -# $$DATA =~ s/\x0D\x0A/\n/g; -# $$DATA =~ tr/\x0D\x0A/\n\n/; -# -# if( -# $$DATA =~ /<\s*SCRIPT(?:.|\n)*?>/i -# || $$DATA =~ /<\s*(?:.|\n)*?\bONLOAD\s*=(?:.|\n)*?>/i -# || $$DATA =~ /<\s*(?:.|\n)*?\bONCLICK\s*=(?:.|\n)*?>/i -# ) { -# $Infomation = '(JavaScript contains)'; -# } -# if($$DATA =~ /<\s*TABLE(?:.|\n)*?>/i -# || $$DATA =~ /<\s*BLINK(?:.|\n)*?>/i -# || $$DATA =~ /<\s*MARQUEE(?:.|\n)*?>/i -# || $$DATA =~ /<\s*OBJECT(?:.|\n)*?>/i -# || $$DATA =~ /<\s*EMBED(?:.|\n)*?>/i -# || $$DATA =~ /<\s*FRAME(?:.|\n)*?>/i -# || $$DATA =~ /<\s*APPLET(?:.|\n)*?>/i -# || $$DATA =~ /<\s*FORM(?:.|\n)*?>/i -# || $$DATA =~ /<\s*(?:.|\n)*?\bSRC\s*=(?:.|\n)*?>/i -# || $$DATA =~ /<\s*(?:.|\n)*?\bDYNSRC\s*=(?:.|\n)*?>/i -# ) { -# $Infomation = '(the HTML tag which is not safe is included)'; -# } - - if($FileExt =~ /^txt$/i || $FileExt =~ /^cgi$/i || $FileExt =~ /^pl$/i) { # Text File - $Ext = 'txt'; - } elsif($ContentType =~ /^text\/html$/i || $FileExt =~ /html?/i || $$DATA =~ /<\s*HTML(?:.|\n)*?>/i) { # HTML File - $Ext = 'html'; - } elsif($ContentType =~ /^image\/x-xbitmap$/i || $FileExt =~ /^xbm$/i) { # XBM(x-BitMap) Image - my $XbmName = $1; - my ($XbmWidth, $XbmHeight); - if($$DATA =~ /\#define\s*$XbmName\_width\s*(\d+)/i) { - $XbmWidth = $1; - } - if($$DATA =~ /\#define\s*$XbmName\_height\s*(\d+)/i) { - $XbmHeight = $1; - } - if($XbmWidth && $XbmHeight) { - $Ext = 'xbm'; - $ImageWidth = $XbmWidth; - $ImageHeight = $XbmHeight; - } - } else { # - $Ext = 'txt'; - } - } - - # image - if(!$Ext && ($UnknownType || $ContentType =~ /^image\//i)) { - # PNG - if($$DATA =~ /^\x89PNG\x0D\x0A\x1A\x0A/) { - if(substr($$DATA, 12, 4) eq 'IHDR') { - $Ext = 'png'; - ($ImageWidth, $ImageHeight) = unpack("N2", substr($$DATA, 16, 8)); - } - } elsif($$DATA =~ /^GIF8(?:9|7)a/) { # GIF89a(modified), GIF89a, GIF87a - $Ext = 'gif'; - ($ImageWidth, $ImageHeight) = unpack("v2", substr($$DATA, 6, 4)); - } elsif($$DATA =~ /^II\x2a\x00\x08\x00\x00\x00/ || $$DATA =~ /^MM\x00\x2a\x00\x00\x00\x08/) { # TIFF - $Ext = 'tif'; - } elsif($$DATA =~ /^BM/) { # BMP - $Ext = 'bmp'; - } elsif($$DATA =~ /^\xFF\xD8\xFF/ || $$DATA =~ /JFIF/) { # JPEG - my $HeaderPoint = index($$DATA, "\xFF\xD8\xFF", 0); - my $Point = $HeaderPoint + 2; - while($Point < $DataLength) { - my($Maker, $MakerType, $MakerLength) = unpack("C2n",substr($$DATA,$Point,4)); - if($Maker != 0xFF || $MakerType == 0xd9 || $MakerType == 0xda) { - last; - } elsif($MakerType >= 0xC0 && $MakerType <= 0xC3) { - $Ext = 'jpg'; - ($ImageHeight, $ImageWidth) = unpack("n2", substr($$DATA, $Point + 5, 4)); - if($HeaderPoint > 0) { - $$DATA = substr($$DATA, $HeaderPoint); - $DataLength = length($$DATA); - } - last; - } else { - $Point += $MakerLength + 2; - } - } - } - } - - # audio - if(!$Ext && ($UnknownType || $ContentType =~ /^audio\//i)) { - # MIDI Audio - if($$DATA =~ /^MThd/) { - $Ext = 'mid'; - } elsif($$DATA =~ /^\x2esnd/) { # ULAW Audio - $Ext = 'au'; - } elsif($$DATA =~ /^RIFF/ || $$DATA =~ /^ID3/ && $$DATA =~ /RIFF/) { - my $HeaderPoint = index($$DATA, "RIFF", 0); - $_ = substr($$DATA, $HeaderPoint + 8, 8); - if(/^WAVEfmt $/) { - # WAVE - if(unpack("V",substr($$DATA, $HeaderPoint + 16, 4)) == 16) { - $Ext = 'wav'; - } else { # RIFF WAVE MP3 - $Ext = 'mp3'; - } - } elsif(/^RMIDdata$/) { # RIFF MIDI - $Ext = 'rmi'; - } elsif(/^RMP3data$/) { # RIFF MP3 - $Ext = 'rmp'; - } - if($ContentType =~ /^audio\//i) { - $Infomation .= '(RIFF '. substr($$DATA, $HeaderPoint + 8, 4). ')'; - } - } - } - - # a binary file - unless ($Ext) { - # PDF image - if($$DATA =~ /^\%PDF/) { - # Picture size is not measured. - $Ext = 'pdf'; - } elsif($$DATA =~ /^FWS/) { # Shockwave Flash - $Ext = 'swf'; - } elsif($$DATA =~ /^RIFF/ || $$DATA =~ /^ID3/ && $$DATA =~ /RIFF/) { - my $HeaderPoint = index($$DATA, "RIFF", 0); - $_ = substr($$DATA,$HeaderPoint + 8, 8); - # AVI - if(/^AVI LIST$/) { - $Ext = 'avi'; - } - if($ContentType =~ /^video\//i) { - $Infomation .= '(RIFF '. substr($$DATA, $HeaderPoint + 8, 4). ')'; - } - } elsif($$DATA =~ /^PK/) { # ZIP Compress File - $Ext = 'zip'; - } elsif($$DATA =~ /^MSCF/) { # CAB Compress File - $Ext = 'cab'; - } elsif($$DATA =~ /^Rar\!/) { # RAR Compress File - $Ext = 'rar'; - } elsif(substr($$DATA, 2, 5) =~ /^\-lh(\d+|d)\-$/) { # LHA Compress File - $Infomation .= "(lh$1)"; - $Ext = 'lzh'; - } elsif(substr($$DATA, 325, 25) eq "Apple Video Media Handler" || substr($$DATA, 325, 30) eq "Apple \x83\x72\x83\x66\x83\x49\x81\x45\x83\x81\x83\x66\x83\x42\x83\x41\x83\x6E\x83\x93\x83\x68\x83\x89") { - # QuickTime - $Ext = 'mov'; - } - } - - # Header analysis failure - unless ($Ext) { - # It will be followed if it applies for the MIME type from the browser. - foreach (keys %UPLOAD_CONTENT_TYPE_LIST) { - next unless ($_); - if($ContentType =~ /^$_$/i) { - $Ext = $UPLOAD_CONTENT_TYPE_LIST{$_}; - $ContentName = &CheckContentExt($Ext); - if( - grep {$_ eq $Ext;} ( - 'png', - 'gif', - 'jpg', - 'xbm', - 'tif', - 'bmp', - 'pdf', - 'swf', - 'mov', - 'zip', - 'cab', - 'lzh', - 'rar', - 'mid', - 'rmi', - 'au', - 'wav', - 'avi', - 'exe' - ) - ) { - $Infomation .= ' / Header analysis failure'; - } - if($Ext ne $FileExt && &CheckContentExt($FileExt) eq $ContentName) { - $Ext = $FileExt; - } - last; - } - } - # a MIME type is unknown--It judges from an extension. - unless ($Ext) { - $ContentName = &CheckContentExt($FileExt); - if($ContentName) { - $Ext = $FileExt; - $Infomation .= ' / MIME type is unknown('. $ContentType. ')'; - last; - } - } - } - -# $ContentName = &CheckContentExt($Ext) unless($ContentName); -# if($Ext && $ContentName) { -# $ContentName .= $Infomation; -# } else { -# &upload_error( -# 'Extension Error', -# "$FileName A not corresponding extension ($Ext)
The extension which can be responded ". join(',', sort values(%UPLOAD_EXT_LIST)) -# ); -# } - -# # SSI Tag Deletion -# if($Ext =~ /.?html?/ && $$DATA =~ /<\!/) { -# foreach ( -# 'config', -# 'echo', -# 'exec', -# 'flastmod', -# 'fsize', -# 'include' -# ) { -# $$DATA =~ s/\#\s*$_/\&\#35\;$_/ig -# } -# } - - return ( - $FileName, - $Ext, - int($DataLength / 1024 + 1), - $ImageWidth, - $ImageHeight, - $ContentName - ); -} - -############################################################################## -# Summary -# -# Extension discernment -# -# Parameters -# Returns -# Memo -############################################################################## - -sub CheckContentExt -{ - - my($Ext) = @_; - my $ContentName; - foreach (keys %UPLOAD_EXT_LIST) { - next unless ($_); - if($_ && $Ext =~ /^$_$/) { - $ContentName = $UPLOAD_EXT_LIST{$_}; - last; - } - } - return $ContentName; - -} - -############################################################################## -# Summary -# -# Form decode -# -# Parameters -# Returns -# Memo -############################################################################## -sub Encode -{ - - my($value,$Trans) = @_; - -# my $FormCode = &jcode::getcode($value) || $FormCodeDefault; -# $FormCodeDefault ||= $FormCode; -# -# if($Trans && $TRANS_2BYTE_CODE) { -# if($FormCode ne 'euc') { -# &jcode::convert($value, 'euc', $FormCode); -# } -# &jcode::tr( -# $value, -# "\xA3\xB0-\xA3\xB9\xA3\xC1-\xA3\xDA\xA3\xE1-\xA3\xFA", -# '0-9A-Za-z' -# ); -# if($CHARCODE ne 'euc') { -# &jcode::convert($value,$CHARCODE,'euc'); -# } -# } else { -# if($CHARCODE ne $FormCode) { -# &jcode::convert($value,$CHARCODE,$FormCode); -# } -# } -# if($CHARCODE eq 'euc') { -# &jcode::h2z_euc($value); -# } elsif($CHARCODE eq 'sjis') { -# &jcode::h2z_sjis($value); -# } - -} - -############################################################################## -# Summary -# -# Error Msg -# -# Parameters -# Returns -# Memo -############################################################################## - -sub upload_error -{ - - local($error_message) = $_[0]; - local($error_message2) = $_[1]; - - print "Content-type: text/html\n\n"; - print< - -Error Message - -
'; print $langs->trans('Source'); @@ -1975,6 +1975,6 @@ else } $db->close(); -llxFooter('$Date: 2011/07/07 21:32:22 $ - $Revision: 1.609 $'); +llxFooter('$Date: 2011/07/10 20:03:41 $ - $Revision: 1.610 $'); ?> diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 0bad431057f..e5edf12a296 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -25,7 +25,7 @@ * \file htdocs/commande/class/commande.class.php * \ingroup commande * \brief Fichier des classes de commandes - * \version $Id: commande.class.php,v 1.118 2011/07/04 10:35:49 hregis Exp $ + * \version $Id: commande.class.php,v 1.119 2011/07/12 07:17:11 eldy Exp $ */ require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"); require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php"); @@ -259,7 +259,7 @@ class Commande extends CommonObject if (! $error) { $this->oldref=''; - + // Rename directory if dir was a temporary ref if (preg_match('/^[\(]?PROV/i', $this->ref)) { @@ -276,7 +276,7 @@ class Commande extends CommonObject if (@rename($dirsource, $dirdest)) { $this->oldref = $comref; - + dol_syslog("Rename ok"); // Suppression ancien fichier PDF dans nouveau rep dol_delete_file($conf->commande->dir_output.'/'.$snum.'/'.$comref.'.*'); @@ -733,7 +733,7 @@ class Commande extends CommonObject } } } - + if (! $notrigger) { // Appel des triggers @@ -3050,6 +3050,7 @@ class OrderLine if (empty($this->tva_tx)) $this->tva_tx=0; if (empty($this->localtax1_tx)) $this->localtax1_tx=0; if (empty($this->localtax2_tx)) $this->localtax2_tx=0; + if (empty($this->qty)) $this->qty=0; if (empty($this->total_localtax1)) $this->total_localtax1=0; if (empty($this->total_localtax2)) $this->total_localtax2=0; if (empty($this->marque_tx)) $this->marque_tx=0; @@ -3065,10 +3066,10 @@ class OrderLine // Mise a jour ligne en base $sql = "UPDATE ".MAIN_DB_PREFIX."commandedet SET"; $sql.= " description='".$this->db->escape($this->desc)."'"; - $sql.= " , tva_tx='".price2num($this->tva_tx)."'"; + $sql.= " , tva_tx=".price2num($this->tva_tx); $sql.= " , localtax1_tx=".price2num($this->localtax1_tx); $sql.= " , localtax2_tx=".price2num($this->localtax2_tx); - $sql.= " , qty='".price2num($this->qty)."'"; + $sql.= " , qty=".price2num($this->qty); $sql.= " , subprice=".price2num($this->subprice).""; $sql.= " , remise_percent=".price2num($this->remise_percent).""; $sql.= " , price=".price2num($this->price).""; // TODO A virer @@ -3080,8 +3081,8 @@ class OrderLine $sql.= " , total_tva=".price2num($this->total_tva).""; $sql.= " , total_ttc=".price2num($this->total_ttc).""; } - $sql.= " , total_localtax1='".price2num($this->total_localtax1)."'"; - $sql.= " , total_localtax2='".price2num($this->total_localtax2)."'"; + $sql.= " , total_localtax1=".price2num($this->total_localtax1); + $sql.= " , total_localtax2=".price2num($this->total_localtax2); $sql.= " , info_bits=".$this->info_bits; if ($this->date_start) { $sql.= " , date_start='".$this->db->idate($this->date_start)."'"; } else { $sql.=' , date_start=null'; } diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 35d5f47a393..c1aad5fefb6 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -26,7 +26,7 @@ * \file htdocs/commande/fiche.php * \ingroup commande * \brief Page to show customer order - * \version $Id: fiche.php,v 1.524 2011/07/07 21:32:21 eldy Exp $ + * \version $Id: fiche.php,v 1.525 2011/07/10 20:03:41 eldy Exp $ */ require("../main.inc.php"); @@ -931,7 +931,7 @@ if ($action == 'remove_file') { require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php"); - $upload_dir = $conf->commande->dir_output . "/"; + $upload_dir = $conf->commande->dir_output; $file = $upload_dir . '/' . $_GET['file']; dol_delete_file($file); $mesg = '
'.$langs->trans("FileWasRemoved").'
'; @@ -947,9 +947,9 @@ if ($_POST['addfile']) // Set tmp user directory TODO Use a dedicated directory for temp mails files $vardir=$conf->user->dir_output."/".$user->id; - $upload_dir = $vardir.'/temp/'; + $upload_dir_tmp = $vardir.'/temp'; - $mesg=dol_add_file_process($upload_dir,0,0); + $mesg=dol_add_file_process($upload_dir_tmp,0,0); $action ='presend'; } @@ -963,7 +963,7 @@ if (! empty($_POST['removedfile'])) // Set tmp user directory $vardir=$conf->user->dir_output."/".$user->id; - $upload_dir = $vardir.'/temp/'; + $upload_dir_tmp = $vardir.'/temp'; $mesg=dol_remove_file_process($_POST['removedfile'],0); @@ -2134,5 +2134,5 @@ else $db->close(); -llxFooter('$Date: 2011/07/07 21:32:21 $ - $Revision: 1.524 $'); +llxFooter('$Date: 2011/07/10 20:03:41 $ - $Revision: 1.525 $'); ?> diff --git a/htdocs/compta/ajaxpayment.php b/htdocs/compta/ajaxpayment.php index fa09707e543..9b23a1bd67a 100644 --- a/htdocs/compta/ajaxpayment.php +++ b/htdocs/compta/ajaxpayment.php @@ -22,8 +22,8 @@ * \version ajaxpayment.php,v 1.0 */ -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index e22afcef693..9e80ceb78c6 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -26,7 +26,7 @@ * \file htdocs/compta/facture.php * \ingroup facture * \brief Page to create/see an invoice - * \version $Id: facture.php,v 1.847 2011/07/08 10:22:14 hregis Exp $ + * \version $Id: facture.php,v 1.848 2011/07/10 20:03:40 eldy Exp $ */ require('../main.inc.php'); @@ -1191,9 +1191,9 @@ if ($_POST['addfile']) // Set tmp user directory $vardir=$conf->user->dir_output."/".$user->id; - $upload_dir = $vardir.'/temp/'; + $upload_dir_tmp = $vardir.'/temp'; - $mesg=dol_add_file_process($upload_dir,0,0); + $mesg=dol_add_file_process($upload_dir_tmp,0,0); $action='presend'; } @@ -1207,7 +1207,7 @@ if (! empty($_POST['removedfile'])) // Set tmp user directory $vardir=$conf->user->dir_output."/".$user->id; - $upload_dir = $vardir.'/temp/'; + $upload_dir_tmp = $vardir.'/temp'; $mesg=dol_remove_file_process($_POST['removedfile'],0); @@ -3241,5 +3241,5 @@ else $db->close(); -llxFooter('$Date: 2011/07/08 10:22:14 $ - $Revision: 1.847 $'); +llxFooter('$Date: 2011/07/10 20:03:40 $ - $Revision: 1.848 $'); ?> diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 997745b1754..64eaea3a7f4 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -24,7 +24,7 @@ * \file htdocs/compta/paiement.php * \ingroup compta * \brief Page to create a payment - * \version $Id: paiement.php,v 1.109 2011/07/04 16:39:48 cdelambert Exp $ + * \version $Id: paiement.php,v 1.110 2011/07/11 09:32:35 cdelambert Exp $ */ require('../main.inc.php'); @@ -272,14 +272,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie jQuery(\'.fieldrequireddyn\').removeClass(\'fieldrequired\'); } }); - }); - '."\n"; - } - - if (! empty($conf->global->MAIN_JS_ON_PAYMENT)) - { - print "\n".''."\n"; } - print '
'; + print ''; print ''; print ''; print ''; @@ -367,18 +360,18 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '
'.$langs->trans('Comments').'
'.$langs->trans('PaymentMode').''; $html->select_types_paiements((GETPOST('paiementcode')?GETPOST('paiementcode'):$facture->mode_reglement_code),'paiementcode','',2); print "'; - print '
'.$langs->trans('AmountPayment').''; @@ -519,7 +512,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if ($action != 'add_paiement') { - if (! empty($conf->global->MAIN_JS_ON_PAYMENT)) + if ($conf->use_javascript_ajax) { print img_picto($langs->trans('AddRemind'),'rightarrow.png','id="'.$objp->facid.'" "'); } @@ -678,5 +671,5 @@ if (! GETPOST('action')) $db->close(); -llxFooter('$Date: 2011/07/04 16:39:48 $ - $Revision: 1.109 $'); +llxFooter('$Date: 2011/07/11 09:32:35 $ - $Revision: 1.110 $'); ?> diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 0243d4669b9..aa588cdb286 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -25,7 +25,7 @@ * \file htdocs/contact/class/contact.class.php * \ingroup societe * \brief File of contacts class - * \version $Id: contact.class.php,v 1.30 2011/07/04 09:36:29 eldy Exp $ + * \version $Id: contact.class.php,v 1.31 2011/07/10 16:50:40 eldy Exp $ */ require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php"); @@ -42,15 +42,16 @@ class Contact extends CommonObject var $table_element='socpeople'; var $id; - var $civilite_id; - var $name; - var $nom; + var $civilite_id; // In fact we stor civility_code + var $lastname; + var $name; // TODO deprecated + var $nom; // TODO deprecated var $firstname; - var $prenom; + var $prenom; // TODO deprecated var $address; - var $cp; // TODO deprecated + var $cp; // TODO deprecated var $zip; - var $ville; // TODO deprecated + var $ville; // TODO deprecated var $town; var $fk_departement; // Id of department diff --git a/htdocs/core/ajaxsecurity.php b/htdocs/core/ajaxsecurity.php new file mode 100644 index 00000000000..896e04bddc4 --- /dev/null +++ b/htdocs/core/ajaxsecurity.php @@ -0,0 +1,59 @@ + + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \file htdocs/core/ajaxsecurity.php + * \brief File for return security data + * \version $Id: ajaxsecurity.php,v 1.1 2011/07/09 08:05:08 hregis Exp $ + */ + +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); +if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); +if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); + +require('../main.inc.php'); +require_once(DOL_DOCUMENT_ROOT."/lib/security.lib.php"); + + +/* + * View + */ + +// Ajout directives pour resoudre bug IE +//header('Cache-Control: Public, must-revalidate'); +//header('Pragma: public'); + +//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header. +top_httphead(); + +//print ''."\n"; + +// Registering the location of boxes +if(isset($_GET['action']) && ! empty($_GET['action'])) +{ + if ($_GET['action'] == 'getrandompassword' && $user->admin) + { + $generic = $_GET['generic']; + echo getRandomPassword($generic); + } +} + +?> diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index cfe5baccb5b..e9ae1ea7e05 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -22,7 +22,7 @@ * \file htdocs/core/class/commonobject.class.php * \ingroup core * \brief File of parent class of all other business classes (invoices, contracts, proposals, orders, ...) - * \version $Id: commonobject.class.php,v 1.144 2011/07/04 09:36:29 eldy Exp $ + * \version $Id: commonobject.class.php,v 1.145 2011/07/10 16:50:40 eldy Exp $ */ @@ -264,10 +264,10 @@ class CommonObject /** * Get array of all contacts for an object - * @param statut Status of lines to get (-1=all) - * @param source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user) - * @param list 0:all, 1:just id - * @return array Array of contacts + * @param statut int Status of lines to get (-1=all) + * @param source string Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user) + * @param int list 0:Return array contains all properties, 1:Return array contains just id + * @return array Array of contacts */ function liste_contact($statut=-1,$source='external',$list=0) { @@ -278,7 +278,7 @@ class CommonObject $sql = "SELECT ec.rowid, ec.statut, ec.fk_socpeople as id"; if ($source == 'internal') $sql.=", '-1' as socid"; if ($source == 'external' || $source == 'thirdparty') $sql.=", t.fk_soc as socid"; - $sql.= ", t.name as nom, t.firstname"; + $sql.= ", t.civilite as civility, t.name as lastname, t.firstname, t.email"; $sql.= ", tc.source, tc.element, tc.code, tc.libelle"; $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact tc"; $sql.= ", ".MAIN_DB_PREFIX."element_contact ec"; @@ -307,7 +307,9 @@ class CommonObject { $transkey="TypeContact_".$obj->element."_".$obj->source."_".$obj->code; $libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle); - $tab[$i]=array('source'=>$obj->source,'socid'=>$obj->socid,'id'=>$obj->id,'nom'=>$obj->nom, 'firstname'=>$obj->firstname, + $tab[$i]=array('source'=>$obj->source,'socid'=>$obj->socid,'id'=>$obj->id, + 'nom'=>$obj->lastname, // For backward compatibility + 'civility'=>$obj->civility, 'lastname'=>$obj->lastname, 'firstname'=>$obj->firstname, 'email'=>$obj->email, 'rowid'=>$obj->rowid,'code'=>$obj->code,'libelle'=>$libelle_type,'status'=>$obj->statut); } else @@ -329,9 +331,10 @@ class CommonObject } /** - * \brief Le detail d'un contact - * \param rowid L'identifiant du contact - * \return object L'objet construit par DoliDb.fetch_object + * Return fetch cursor of a contact + * FIXME We should never return an open db cursor + * @param rowid L'identifiant du contact + * @return object L'objet construit par DoliDb.fetch_object */ function detail_contact($rowid) { diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 6cd0d6761b8..e9e0a507b7e 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -25,7 +25,7 @@ * \ingroup core * \brief Fichier de la classe de stockage de la config courante * \remarks La config est stockee dans le fichier conf/conf.php - * \version $Id: conf.class.php,v 1.59 2011/07/01 23:06:06 eldy Exp $ + * \version $Id: conf.class.php,v 1.60 2011/07/09 05:28:42 hregis Exp $ */ @@ -363,7 +363,6 @@ class Conf // Defini MAIN_GRAPH_LIBRARY if (empty($this->global->MAIN_GRAPH_LIBRARY)) $this->global->MAIN_GRAPH_LIBRARY = 'artichow'; - if (! isset($this->global->MAIN_MAIL_EMAIL_INLINE_IMAGES)) $this->global->MAIN_MAIL_EMAIL_INLINE_IMAGES=1; if (! isset($this->global->FCKEDITOR_EDITORNAME)) $this->global->FCKEDITOR_EDITORNAME='ckeditor'; // fckeditor to switch // Format for date (used by default when not found or searched in lang) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ff89055281e..7e97abed808 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -31,7 +31,7 @@ * \file htdocs/core/class/html.form.class.php * \ingroup core * \brief File of class with all html predefined components - * \version $Id: html.form.class.php,v 1.186 2011/07/04 11:33:22 eldy Exp $ + * \version $Id: html.form.class.php,v 1.188 2011/07/10 17:28:09 hregis Exp $ */ @@ -876,7 +876,7 @@ class Form $selected_input_value=$product->ref; } // mode=1 means customers products - print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajaxproducts.php', 'outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=1&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT); + print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajaxproducts.php', 'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=1&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT); if (! $hidelabel) print $langs->trans("RefOrLabel").' : '; print ''; print '
'; @@ -1117,7 +1117,7 @@ class Form if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT) { // mode=2 means suppliers products - print ajax_autocompleter('', $htmlname, DOL_URL_ROOT.'/product/ajaxproducts.php', 'outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT); + print ajax_autocompleter('', $htmlname, DOL_URL_ROOT.'/product/ajaxproducts.php', 'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT); print $langs->trans("RefOrLabel").' : '; print '
'; } @@ -3146,7 +3146,7 @@ class Form * @param key_in_label 1 pour afficher la key dans la valeur "[key] value" * @param value_as_key 1 to use value as key * @param option Valeur de l'option en fonction du type choisi - * @param translate Traduire la valeur + * @param translate Translate and encode value * @param maxlen Length maximum for labels * @param disabled Html select box is disabled * @return string HTML select string @@ -3178,13 +3178,13 @@ class Form if ($key_in_label) { $newval=($translate?$langs->trans($value):$value); - $selectOptionValue = $key.' - '.($maxlen?dol_trunc($newval,$maxlen):$newval); + $selectOptionValue = dol_htmlentitiesbr($key.' - '.($maxlen?dol_trunc($newval,$maxlen):$newval)); $out.=$selectOptionValue; } else { $newval=($translate?$langs->trans($value):$value); - $selectOptionValue = ($maxlen?dol_trunc($newval,$maxlen):$newval); + $selectOptionValue = dol_htmlentitiesbr($maxlen?dol_trunc($newval,$maxlen):$newval); if ($value == '' || $value == '-') { $selectOptionValue=' '; } $out.=$selectOptionValue; } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index e6ac2d294b9..5d928870560 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -22,7 +22,7 @@ * \file htdocs/core/class/html.formfile.class.php * \ingroup core * \brief File of class to offer components to list and upload files - * \version $Id: html.formfile.class.php,v 1.46 2011/07/06 21:12:34 eldy Exp $ + * \version $Id: html.formfile.class.php,v 1.47 2011/07/10 21:17:14 eldy Exp $ */ @@ -185,6 +185,7 @@ class FormFile global $langs,$bc,$conf; + $forname='builddoc'; $out=''; $var=true; @@ -386,7 +387,7 @@ class FormFile $buttonlabeltoshow=$buttonlabel; if (empty($buttonlabel)) $buttonlabel=$langs->trans('Generate'); - if (empty($noform)) $out.= ''; + if (empty($noform)) $out.= ''; $out.= ''; $out.= ''; @@ -436,8 +437,7 @@ class FormFile // Button $out.= '
'; - $out.= ' +/* Copyright (C) 2005-2011 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -21,7 +22,7 @@ * \file htdocs/core/class/html.formmail.class.php * \ingroup core * \brief Fichier de la classe permettant la generation du formulaire html d'envoi de mail unitaire - * \version $Id: html.formmail.class.php,v 1.28 2011/07/07 15:54:03 simnandez Exp $ + * \version $Id: html.formmail.class.php,v 1.31 2011/07/10 20:03:41 eldy Exp $ */ require_once(DOL_DOCUMENT_ROOT ."/core/class/html.form.class.php"); @@ -123,9 +124,9 @@ class FormMail /** * Add a file into the list of attached files (stored in SECTION array) * - * @param $path - * @param $file - * @param $type + * @param string $path Full absolute path on filesystem of file, including file name + * @param string $file Only filename + * @param string $type Mime type */ function add_attached_files($path,$file,$type) { @@ -309,17 +310,18 @@ class FormMail if ($this->witherrorsto) { //if (! $this->errorstomail) $this->errorstomail=$this->frommail; + $errorstomail = (! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? $conf->global->MAIN_MAIL_ERRORS_TO : $this->errorstomail); if ($this->witherrorstoreadonly) { - $out.= ''; + $out.= ''; $out.= '
'.$langs->trans("MailErrorsTo").''; - $out.= $this->errorstomail; + $out.= $errorstomail; $out.= "
'.$langs->trans("MailErrorsTo").''; - $out.= ''; + $out.= ''; $out.= "
'.$langs->trans("MailFile").''; - //print '
'; + // FIXME Trick to have param removedfile containing nb of image to delete. But this does not works without javascript + $out.= ''."\n"; + $out.= ''."\n"; if (sizeof($listofpaths)) { foreach($listofpaths as $key => $val) { - $out.= img_mime($listofnames[$key]).' '.$listofnames[$key]; - if (! $this->withfilereadonly) $out.= ' '; - $out.= '
'; + $out.= '
'; + $out.= img_mime($listofnames[$key]).' '.$listofnames[$key]; + if (! $this->withfilereadonly) + { + $out.= ' '; + //$out.= ' '.img_delete($langs->trans("Delete").''; + } + $out.= '
'; } } else @@ -519,11 +534,9 @@ class FormMail } if ($this->withfile == 2) // Can add other files { - //print '
'; $out.= ''; $out.= ' '; $out.= ''; - //print '
'; } $out.= "
- - - -
Error Message
-
    -

    $error_message

    -$error_message2
    -
- - -EOF - &rm_tmp_uploaded_files; # Image Temporary deletion - exit; -} - -############################################################################## -# Summary -# -# Image Temporary deletion -# -# Parameters -# Returns -# Memo -############################################################################## - -sub rm_tmp_uploaded_files -{ - if($img_data_exists == 1){ - sleep 1; - foreach $fname_list(@NEWFNAMES) { - if(-e "$img_dir/$fname_list") { - unlink("$img_dir/$fname_list"); - } - } - } - -} -1; diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/util.pl b/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/util.pl deleted file mode 100644 index c245a040231..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/perl/util.pl +++ /dev/null @@ -1,66 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2010 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -sub RemoveFromStart -{ - local($sourceString, $charToRemove) = @_; - $sPattern = '^' . $charToRemove . '+' ; - $sourceString =~ s/^$charToRemove+//g; - return $sourceString; -} - -sub RemoveFromEnd -{ - local($sourceString, $charToRemove) = @_; - $sPattern = $charToRemove . '+$' ; - $sourceString =~ s/$charToRemove+$//g; - return $sourceString; -} - -sub ConvertToXmlAttribute -{ - local($value) = @_; - return(&specialchar_cnv($value)); -} - -sub specialchar_cnv -{ - local($ch) = @_; - - $ch =~ s/&/&/g; # & - $ch =~ s/\"/"/g; #" - $ch =~ s/\'/'/g; # ' - $ch =~ s//>/g; # > - return($ch); -} - -sub JS_cnv -{ - local($ch) = @_; - - $ch =~ s/\"/\\\"/g; #" - return($ch); -} - -1; diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/config.py b/htdocs/includes/fckeditor/editor/filemanager/connectors/py/config.py deleted file mode 100644 index 6ad1643395c..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/config.py +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env python -""" - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2010 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Configuration file for the File Manager Connector for Python -""" - -# INSTALLATION NOTE: You must set up your server environment accordingly to run -# python scripts. This connector requires Python 2.4 or greater. -# -# Supported operation modes: -# * WSGI (recommended): You'll need apache + mod_python + modpython_gateway -# or any web server capable of the WSGI python standard -# * Plain Old CGI: Any server capable of running standard python scripts -# (although mod_python is recommended for performance) -# This was the previous connector version operation mode -# -# If you're using Apache web server, replace the htaccess.txt to to .htaccess, -# and set the proper options and paths. -# For WSGI and mod_python, you may need to download modpython_gateway from: -# http://projects.amor.org/misc/svn/modpython_gateway.py and copy it in this -# directory. - - -# SECURITY: You must explicitly enable this "connector". (Set it to "True"). -# WARNING: don't just set "ConfigIsEnabled = True", you must be sure that only -# authenticated users can access this file or use some kind of session checking. -Enabled = False - -# Path to user files relative to the document root. -UserFilesPath = '/userfiles/' - -# Fill the following value it you prefer to specify the absolute path for the -# user files directory. Useful if you are using a virtual directory, symbolic -# link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -# Attention: The above 'UserFilesPath' must point to the same directory. -# WARNING: GetRootPath may not work in virtual or mod_python configurations, and -# may not be thread safe. Use this configuration parameter instead. -UserFilesAbsolutePath = '' - -# Due to security issues with Apache modules, it is recommended to leave the -# following setting enabled. -ForceSingleExtension = True - -# What the user can do with this connector -ConfigAllowedCommands = [ 'QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder' ] - -# Allowed Resource Types -ConfigAllowedTypes = ['File', 'Image', 'Flash', 'Media'] - -# After file is uploaded, sometimes it is required to change its permissions -# so that it was possible to access it at the later time. -# If possible, it is recommended to set more restrictive permissions, like 0755. -# Set to 0 to disable this feature. -# Note: not needed on Windows-based servers. -ChmodOnUpload = 0755 - -# See comments above. -# Used when creating folders that does not exist. -ChmodOnFolderCreate = 0755 - -# Do not touch this 3 lines, see "Configuration settings for each Resource Type" -AllowedExtensions = {}; DeniedExtensions = {}; -FileTypesPath = {}; FileTypesAbsolutePath = {}; -QuickUploadPath = {}; QuickUploadAbsolutePath = {}; - -# Configuration settings for each Resource Type -# -# - AllowedExtensions: the possible extensions that can be allowed. -# If it is empty then any file type can be uploaded. -# - DeniedExtensions: The extensions that won't be allowed. -# If it is empty then no restrictions are done here. -# -# For a file to be uploaded it has to fulfill both the AllowedExtensions -# and DeniedExtensions (that's it: not being denied) conditions. -# -# - FileTypesPath: the virtual folder relative to the document root where -# these resources will be located. -# Attention: It must start and end with a slash: '/' -# -# - FileTypesAbsolutePath: the physical path to the above folder. It must be -# an absolute path. -# If it's an empty string then it will be autocalculated. -# Useful if you are using a virtual directory, symbolic link or alias. -# Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -# Attention: The above 'FileTypesPath' must point to the same directory. -# Attention: It must end with a slash: '/' -# -# -# - QuickUploadPath: the virtual folder relative to the document root where -# these resources will be uploaded using the Upload tab in the resources -# dialogs. -# Attention: It must start and end with a slash: '/' -# -# - QuickUploadAbsolutePath: the physical path to the above folder. It must be -# an absolute path. -# If it's an empty string then it will be autocalculated. -# Useful if you are using a virtual directory, symbolic link or alias. -# Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -# Attention: The above 'QuickUploadPath' must point to the same directory. -# Attention: It must end with a slash: '/' - -AllowedExtensions['File'] = ['7z','aiff','asf','avi','bmp','csv','doc','fla','flv','gif','gz','gzip','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','ods','odt','pdf','png','ppt','pxd','qt','ram','rar','rm','rmi','rmvb','rtf','sdc','sitd','swf','sxc','sxw','tar','tgz','tif','tiff','txt','vsd','wav','wma','wmv','xls','xml','zip'] -DeniedExtensions['File'] = [] -FileTypesPath['File'] = UserFilesPath + 'file/' -FileTypesAbsolutePath['File'] = (not UserFilesAbsolutePath == '') and (UserFilesAbsolutePath + 'file/') or '' -QuickUploadPath['File'] = FileTypesPath['File'] -QuickUploadAbsolutePath['File'] = FileTypesAbsolutePath['File'] - -AllowedExtensions['Image'] = ['bmp','gif','jpeg','jpg','png'] -DeniedExtensions['Image'] = [] -FileTypesPath['Image'] = UserFilesPath + 'image/' -FileTypesAbsolutePath['Image'] = (not UserFilesAbsolutePath == '') and UserFilesAbsolutePath + 'image/' or '' -QuickUploadPath['Image'] = FileTypesPath['Image'] -QuickUploadAbsolutePath['Image']= FileTypesAbsolutePath['Image'] - -AllowedExtensions['Flash'] = ['swf','flv'] -DeniedExtensions['Flash'] = [] -FileTypesPath['Flash'] = UserFilesPath + 'flash/' -FileTypesAbsolutePath['Flash'] = ( not UserFilesAbsolutePath == '') and UserFilesAbsolutePath + 'flash/' or '' -QuickUploadPath['Flash'] = FileTypesPath['Flash'] -QuickUploadAbsolutePath['Flash']= FileTypesAbsolutePath['Flash'] - -AllowedExtensions['Media'] = ['aiff','asf','avi','bmp','fla', 'flv','gif','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','png','qt','ram','rm','rmi','rmvb','swf','tif','tiff','wav','wma','wmv'] -DeniedExtensions['Media'] = [] -FileTypesPath['Media'] = UserFilesPath + 'media/' -FileTypesAbsolutePath['Media'] = ( not UserFilesAbsolutePath == '') and UserFilesAbsolutePath + 'media/' or '' -QuickUploadPath['Media'] = FileTypesPath['Media'] -QuickUploadAbsolutePath['Media']= FileTypesAbsolutePath['Media'] diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/connector.py b/htdocs/includes/fckeditor/editor/filemanager/connectors/py/connector.py deleted file mode 100644 index fe989b90d83..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/connector.py +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2010 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - - - GNU General Public License Version 2 or later (the "GPL") - http://www.gnu.org/licenses/gpl.html - - - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - http://www.gnu.org/licenses/lgpl.html - - - Mozilla Public License Version 1.1 or later (the "MPL") - http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Connector for Python (CGI and WSGI). - -See config.py for configuration settings - -""" -import os - -from fckutil import * -from fckcommands import * # default command's implementation -from fckoutput import * # base http, xml and html output mixins -from fckconnector import FCKeditorConnectorBase # import base connector -import config as Config - -class FCKeditorConnector( FCKeditorConnectorBase, - GetFoldersCommandMixin, - GetFoldersAndFilesCommandMixin, - CreateFolderCommandMixin, - UploadFileCommandMixin, - BaseHttpMixin, BaseXmlMixin, BaseHtmlMixin ): - "The Standard connector class." - def doResponse(self): - "Main function. Process the request, set headers and return a string as response." - s = "" - # Check if this connector is disabled - if not(Config.Enabled): - return self.sendError(1, "This connector is disabled. Please check the connector configurations in \"editor/filemanager/connectors/py/config.py\" and try again.") - # Make sure we have valid inputs - for key in ("Command","Type","CurrentFolder"): - if not self.request.has_key (key): - return - # Get command, resource type and current folder - command = self.request.get("Command") - resourceType = self.request.get("Type") - currentFolder = getCurrentFolder(self.request.get("CurrentFolder")) - # Check for invalid paths - if currentFolder is None: - if (command == "FileUpload"): - return self.sendUploadResults( errorNo = 102, customMsg = "" ) - else: - return self.sendError(102, "") - - # Check if it is an allowed command - if ( not command in Config.ConfigAllowedCommands ): - return self.sendError( 1, 'The %s command isn\'t allowed' % command ) - - if ( not resourceType in Config.ConfigAllowedTypes ): - return self.sendError( 1, 'Invalid type specified' ) - - # Setup paths - if command == "QuickUpload": - self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType] - self.webUserFilesFolder = Config.QuickUploadPath[resourceType] - else: - self.userFilesFolder = Config.FileTypesAbsolutePath[resourceType] - self.webUserFilesFolder = Config.FileTypesPath[resourceType] - - if not self.userFilesFolder: # no absolute path given (dangerous...) - self.userFilesFolder = mapServerPath(self.environ, - self.webUserFilesFolder) - # Ensure that the directory exists. - if not os.path.exists(self.userFilesFolder): - try: - self.createServerFolder( self.userFilesFolder ) - except: - return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ") - - # File upload doesn't have to return XML, so intercept here - if (command == "FileUpload"): - return self.uploadFile(resourceType, currentFolder) - - # Create Url - url = combinePaths( self.webUserFilesFolder, currentFolder ) - - # Begin XML - s += self.createXmlHeader(command, resourceType, currentFolder, url) - # Execute the command - selector = {"GetFolders": self.getFolders, - "GetFoldersAndFiles": self.getFoldersAndFiles, - "CreateFolder": self.createFolder, - } - s += selector[command](resourceType, currentFolder) - s += self.createXmlFooter() - return s - -# Running from command line (plain old CGI) -if __name__ == '__main__': - try: - # Create a Connector Instance - conn = FCKeditorConnector() - data = conn.doResponse() - for header in conn.headers: - print '%s: %s' % header - print - print data - except: - print "Content-Type: text/plain" - print - import cgi - cgi.print_exception() diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckcommands.py b/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckcommands.py deleted file mode 100644 index f9e7b824b65..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckcommands.py +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2010 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Connector for Python (CGI and WSGI). - -""" - -import os -try: # Windows needs stdio set for binary mode for file upload to work. - import msvcrt - msvcrt.setmode (0, os.O_BINARY) # stdin = 0 - msvcrt.setmode (1, os.O_BINARY) # stdout = 1 -except ImportError: - pass - -from fckutil import * -from fckoutput import * -import config as Config - -class GetFoldersCommandMixin (object): - def getFolders(self, resourceType, currentFolder): - """ - Purpose: command to recieve a list of folders - """ - # Map the virtual path to our local server - serverPath = mapServerFolder(self.userFilesFolder,currentFolder) - s = """""" # Open the folders node - for someObject in os.listdir(serverPath): - someObjectPath = mapServerFolder(serverPath, someObject) - if os.path.isdir(someObjectPath): - s += """""" % ( - convertToXmlAttribute(someObject) - ) - s += """""" # Close the folders node - return s - -class GetFoldersAndFilesCommandMixin (object): - def getFoldersAndFiles(self, resourceType, currentFolder): - """ - Purpose: command to recieve a list of folders and files - """ - # Map the virtual path to our local server - serverPath = mapServerFolder(self.userFilesFolder,currentFolder) - # Open the folders / files node - folders = """""" - files = """""" - for someObject in os.listdir(serverPath): - someObjectPath = mapServerFolder(serverPath, someObject) - if os.path.isdir(someObjectPath): - folders += """""" % ( - convertToXmlAttribute(someObject) - ) - elif os.path.isfile(someObjectPath): - size = os.path.getsize(someObjectPath) - if size > 0: - size = round(size/1024) - if size < 1: - size = 1 - files += """""" % ( - convertToXmlAttribute(someObject), - size - ) - # Close the folders / files node - folders += """""" - files += """""" - return folders + files - -class CreateFolderCommandMixin (object): - def createFolder(self, resourceType, currentFolder): - """ - Purpose: command to create a new folder - """ - errorNo = 0; errorMsg =''; - if self.request.has_key("NewFolderName"): - newFolder = self.request.get("NewFolderName", None) - newFolder = sanitizeFolderName (newFolder) - try: - newFolderPath = mapServerFolder(self.userFilesFolder, combinePaths(currentFolder, newFolder)) - self.createServerFolder(newFolderPath) - except Exception, e: - errorMsg = str(e).decode('iso-8859-1').encode('utf-8') # warning with encodigns!!! - if hasattr(e,'errno'): - if e.errno==17: #file already exists - errorNo=0 - elif e.errno==13: # permission denied - errorNo = 103 - elif e.errno==36 or e.errno==2 or e.errno==22: # filename too long / no such file / invalid name - errorNo = 102 - else: - errorNo = 110 - else: - errorNo = 102 - return self.sendErrorNode ( errorNo, errorMsg ) - - def createServerFolder(self, folderPath): - "Purpose: physically creates a folder on the server" - # No need to check if the parent exists, just create all hierachy - - try: - permissions = Config.ChmodOnFolderCreate - if not permissions: - os.makedirs(folderPath) - except AttributeError: #ChmodOnFolderCreate undefined - permissions = 0755 - - if permissions: - oldumask = os.umask(0) - os.makedirs(folderPath,mode=0755) - os.umask( oldumask ) - -class UploadFileCommandMixin (object): - def uploadFile(self, resourceType, currentFolder): - """ - Purpose: command to upload files to server (same as FileUpload) - """ - errorNo = 0 - if self.request.has_key("NewFile"): - # newFile has all the contents we need - newFile = self.request.get("NewFile", "") - # Get the file name - newFileName = newFile.filename - newFileName = sanitizeFileName( newFileName ) - newFileNameOnly = removeExtension(newFileName) - newFileExtension = getExtension(newFileName).lower() - allowedExtensions = Config.AllowedExtensions[resourceType] - deniedExtensions = Config.DeniedExtensions[resourceType] - - if (allowedExtensions): - # Check for allowed - isAllowed = False - if (newFileExtension in allowedExtensions): - isAllowed = True - elif (deniedExtensions): - # Check for denied - isAllowed = True - if (newFileExtension in deniedExtensions): - isAllowed = False - else: - # No extension limitations - isAllowed = True - - if (isAllowed): - # Upload to operating system - # Map the virtual path to the local server path - currentFolderPath = mapServerFolder(self.userFilesFolder, currentFolder) - i = 0 - while (True): - newFilePath = os.path.join (currentFolderPath,newFileName) - if os.path.exists(newFilePath): - i += 1 - newFileName = "%s(%d).%s" % ( - newFileNameOnly, i, newFileExtension - ) - errorNo= 201 # file renamed - else: - # Read file contents and write to the desired path (similar to php's move_uploaded_file) - fout = file(newFilePath, 'wb') - while (True): - chunk = newFile.file.read(100000) - if not chunk: break - fout.write (chunk) - fout.close() - - if os.path.exists ( newFilePath ): - doChmod = False - try: - doChmod = Config.ChmodOnUpload - permissions = Config.ChmodOnUpload - except AttributeError: #ChmodOnUpload undefined - doChmod = True - permissions = 0755 - if ( doChmod ): - oldumask = os.umask(0) - os.chmod( newFilePath, permissions ) - os.umask( oldumask ) - - newFileUrl = combinePaths(self.webUserFilesFolder, currentFolder) + newFileName - - return self.sendUploadResults( errorNo , newFileUrl, newFileName ) - else: - return self.sendUploadResults( errorNo = 202, customMsg = "" ) - else: - return self.sendUploadResults( errorNo = 202, customMsg = "No File" ) diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckconnector.py b/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckconnector.py deleted file mode 100644 index c439939d8dd..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckconnector.py +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2010 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Base Connector for Python (CGI and WSGI). - -See config.py for configuration settings - -""" -import cgi, os - -from fckutil import * -from fckcommands import * # default command's implementation -from fckoutput import * # base http, xml and html output mixins -import config as Config - -class FCKeditorConnectorBase( object ): - "The base connector class. Subclass it to extend functionality (see Zope example)" - - def __init__(self, environ=None): - "Constructor: Here you should parse request fields, initialize variables, etc." - self.request = FCKeditorRequest(environ) # Parse request - self.headers = [] # Clean Headers - if environ: - self.environ = environ - else: - self.environ = os.environ - - # local functions - - def setHeader(self, key, value): - self.headers.append ((key, value)) - return - -class FCKeditorRequest(object): - "A wrapper around the request object" - def __init__(self, environ): - if environ: # WSGI - self.request = cgi.FieldStorage(fp=environ['wsgi.input'], - environ=environ, - keep_blank_values=1) - self.environ = environ - else: # plain old cgi - self.environ = os.environ - self.request = cgi.FieldStorage() - if 'REQUEST_METHOD' in self.environ and 'QUERY_STRING' in self.environ: - if self.environ['REQUEST_METHOD'].upper()=='POST': - # we are in a POST, but GET query_string exists - # cgi parses by default POST data, so parse GET QUERY_STRING too - self.get_request = cgi.FieldStorage(fp=None, - environ={ - 'REQUEST_METHOD':'GET', - 'QUERY_STRING':self.environ['QUERY_STRING'], - }, - ) - else: - self.get_request={} - - def has_key(self, key): - return self.request.has_key(key) or self.get_request.has_key(key) - - def get(self, key, default=None): - if key in self.request.keys(): - field = self.request[key] - elif key in self.get_request.keys(): - field = self.get_request[key] - else: - return default - if hasattr(field,"filename") and field.filename: #file upload, do not convert return value - return field - else: - return field.value diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckoutput.py b/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckoutput.py deleted file mode 100644 index 3740a015540..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckoutput.py +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2010 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Connector for Python (CGI and WSGI). - -""" - -from time import gmtime, strftime -import string - -def escape(text, replace=string.replace): - """ - Converts the special characters '<', '>', and '&'. - - RFC 1866 specifies that these characters be represented - in HTML as < > and & respectively. In Python - 1.5 we use the new string.replace() function for speed. - """ - text = replace(text, '&', '&') # must be done 1st - text = replace(text, '<', '<') - text = replace(text, '>', '>') - text = replace(text, '"', '"') - return text - -def convertToXmlAttribute(value): - if (value is None): - value = "" - return escape(value) - -class BaseHttpMixin(object): - def setHttpHeaders(self, content_type='text/xml'): - "Purpose: to prepare the headers for the xml to return" - # Prevent the browser from caching the result. - # Date in the past - self.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT') - # always modified - self.setHeader('Last-Modified',strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime())) - # HTTP/1.1 - self.setHeader('Cache-Control','no-store, no-cache, must-revalidate') - self.setHeader('Cache-Control','post-check=0, pre-check=0') - # HTTP/1.0 - self.setHeader('Pragma','no-cache') - - # Set the response format. - self.setHeader( 'Content-Type', content_type + '; charset=utf-8' ) - return - -class BaseXmlMixin(object): - def createXmlHeader(self, command, resourceType, currentFolder, url): - "Purpose: returns the xml header" - self.setHttpHeaders() - # Create the XML document header - s = """""" - # Create the main connector node - s += """""" % ( - command, - resourceType - ) - # Add the current folder node - s += """""" % ( - convertToXmlAttribute(currentFolder), - convertToXmlAttribute(url), - ) - return s - - def createXmlFooter(self): - "Purpose: returns the xml footer" - return """""" - - def sendError(self, number, text): - "Purpose: in the event of an error, return an xml based error" - self.setHttpHeaders() - return ("""""" + - """""" + - self.sendErrorNode (number, text) + - """""" ) - - def sendErrorNode(self, number, text): - if number != 1: - return """""" % (number) - else: - return """""" % (number, convertToXmlAttribute(text)) - -class BaseHtmlMixin(object): - def sendUploadResults( self, errorNo = 0, fileUrl = '', fileName = '', customMsg = '' ): - self.setHttpHeaders("text/html") - "This is the function that sends the results of the uploading process" - - "Minified version of the document.domain automatic fix script (#1919)." - "The original script can be found at _dev/domain_fix_template.js" - return """""" % { - 'errorNumber': errorNo, - 'fileUrl': fileUrl.replace ('"', '\\"'), - 'fileName': fileName.replace ( '"', '\\"' ) , - 'customMsg': customMsg.replace ( '"', '\\"' ), - } diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckutil.py b/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckutil.py deleted file mode 100644 index b7528051400..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/fckutil.py +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2010 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Utility functions for the File Manager Connector for Python - -""" - -import string, re -import os -import config as Config - -# Generic manipulation functions - -def removeExtension(fileName): - index = fileName.rindex(".") - newFileName = fileName[0:index] - return newFileName - -def getExtension(fileName): - index = fileName.rindex(".") + 1 - fileExtension = fileName[index:] - return fileExtension - -def removeFromStart(string, char): - return string.lstrip(char) - -def removeFromEnd(string, char): - return string.rstrip(char) - -# Path functions - -def combinePaths( basePath, folder ): - return removeFromEnd( basePath, '/' ) + '/' + removeFromStart( folder, '/' ) - -def getFileName(filename): - " Purpose: helper function to extrapolate the filename " - for splitChar in ["/", "\\"]: - array = filename.split(splitChar) - if (len(array) > 1): - filename = array[-1] - return filename - -def sanitizeFolderName( newFolderName ): - "Do a cleanup of the folder name to avoid possible problems" - # Remove . \ / | : ? * " < > and control characters - return re.sub( '\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[\x00-\x1f\x7f-\x9f]', '_', newFolderName ) - -def sanitizeFileName( newFileName ): - "Do a cleanup of the file name to avoid possible problems" - # Replace dots in the name with underscores (only one dot can be there... security issue). - if ( Config.ForceSingleExtension ): # remove dots - newFileName = re.sub ( '\\.(?![^.]*$)', '_', newFileName ) ; - newFileName = newFileName.replace('\\','/') # convert windows to unix path - newFileName = os.path.basename (newFileName) # strip directories - # Remove \ / | : ? * - return re.sub ( '\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[\x00-\x1f\x7f-\x9f]/', '_', newFileName ) - -def getCurrentFolder(currentFolder): - if not currentFolder: - currentFolder = '/' - - # Check the current folder syntax (must begin and end with a slash). - if (currentFolder[-1] <> "/"): - currentFolder += "/" - if (currentFolder[0] <> "/"): - currentFolder = "/" + currentFolder - - # Ensure the folder path has no double-slashes - while '//' in currentFolder: - currentFolder = currentFolder.replace('//','/') - - # Check for invalid folder paths (..) - if '..' in currentFolder or '\\' in currentFolder: - return None - - # Check for invalid folder paths (..) - if re.search( '(/\\.)|(//)|([\\\\:\\*\\?\\""\\<\\>\\|]|[\x00-\x1F]|[\x7f-\x9f])', currentFolder ): - return None - - return currentFolder - -def mapServerPath( environ, url): - " Emulate the asp Server.mapPath function. Given an url path return the physical directory that it corresponds to " - # This isn't correct but for the moment there's no other solution - # If this script is under a virtual directory or symlink it will detect the problem and stop - return combinePaths( getRootPath(environ), url ) - -def mapServerFolder(resourceTypePath, folderPath): - return combinePaths ( resourceTypePath , folderPath ) - -def getRootPath(environ): - "Purpose: returns the root path on the server" - # WARNING: this may not be thread safe, and doesn't work w/ VirtualServer/mod_python - # Use Config.UserFilesAbsolutePath instead - - if environ.has_key('DOCUMENT_ROOT'): - return environ['DOCUMENT_ROOT'] - else: - realPath = os.path.realpath( './' ) - selfPath = environ['SCRIPT_FILENAME'] - selfPath = selfPath [ : selfPath.rfind( '/' ) ] - selfPath = selfPath.replace( '/', os.path.sep) - - position = realPath.find(selfPath) - - # This can check only that this script isn't run from a virtual dir - # But it avoids the problems that arise if it isn't checked - raise realPath - if ( position < 0 or position <> len(realPath) - len(selfPath) or realPath[ : position ]==''): - raise Exception('Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/py/config.py".') - return realPath[ : position ] diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/htaccess.txt b/htdocs/includes/fckeditor/editor/filemanager/connectors/py/htaccess.txt deleted file mode 100644 index 82374196a9d..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/htaccess.txt +++ /dev/null @@ -1,23 +0,0 @@ -# replace the name of this file to .htaccess (if using apache), -# and set the proper options and paths according your enviroment - -Allow from all - -# If using mod_python uncomment this: -PythonPath "[r'C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\fckeditor\editor\filemanager\connectors\py'] + sys.path" - - -# Recomended: WSGI application running with mod_python and modpython_gateway -SetHandler python-program -PythonHandler modpython_gateway::handler -PythonOption wsgi.application wsgi::App - - -# Emulated CGI with mod_python and cgihandler -#AddHandler mod_python .py -#PythonHandler mod_python.cgihandler - - -# Plain old CGI -#Options +ExecCGI -#AddHandler cgi-script py diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/upload.py b/htdocs/includes/fckeditor/editor/filemanager/connectors/py/upload.py deleted file mode 100644 index 1a7aa009bb7..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/upload.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2010 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -This is the "File Uploader" for Python - -""" -import os - -from fckutil import * -from fckcommands import * # default command's implementation -from fckconnector import FCKeditorConnectorBase # import base connector -import config as Config - -class FCKeditorQuickUpload( FCKeditorConnectorBase, - UploadFileCommandMixin, - BaseHttpMixin, BaseHtmlMixin): - def doResponse(self): - "Main function. Process the request, set headers and return a string as response." - # Check if this connector is disabled - if not(Config.Enabled): - return self.sendUploadResults(1, "This file uploader is disabled. Please check the \"editor/filemanager/connectors/py/config.py\"") - command = 'QuickUpload' - # The file type (from the QueryString, by default 'File'). - resourceType = self.request.get('Type','File') - currentFolder = "/" - # Check for invalid paths - if currentFolder is None: - return self.sendUploadResults(102, '', '', "") - - # Check if it is an allowed command - if ( not command in Config.ConfigAllowedCommands ): - return self.sendUploadResults( 1, '', '', 'The %s command isn\'t allowed' % command ) - - if ( not resourceType in Config.ConfigAllowedTypes ): - return self.sendUploadResults( 1, '', '', 'Invalid type specified' ) - - # Setup paths - self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType] - self.webUserFilesFolder = Config.QuickUploadPath[resourceType] - if not self.userFilesFolder: # no absolute path given (dangerous...) - self.userFilesFolder = mapServerPath(self.environ, - self.webUserFilesFolder) - - # Ensure that the directory exists. - if not os.path.exists(self.userFilesFolder): - try: - self.createServerFoldercreateServerFolder( self.userFilesFolder ) - except: - return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ") - - # File upload doesn't have to return XML, so intercept here - return self.uploadFile(resourceType, currentFolder) - -# Running from command line (plain old CGI) -if __name__ == '__main__': - try: - # Create a Connector Instance - conn = FCKeditorQuickUpload() - data = conn.doResponse() - for header in conn.headers: - if not header is None: - print '%s: %s' % header - print - print data - except: - print "Content-Type: text/plain" - print - import cgi - cgi.print_exception() diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/wsgi.py b/htdocs/includes/fckeditor/editor/filemanager/connectors/py/wsgi.py deleted file mode 100644 index 829ede6fa5e..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/wsgi.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2010 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - - - GNU General Public License Version 2 or later (the "GPL") - http://www.gnu.org/licenses/gpl.html - - - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - http://www.gnu.org/licenses/lgpl.html - - - Mozilla Public License Version 1.1 or later (the "MPL") - http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Connector/QuickUpload for Python (WSGI wrapper). - -See config.py for configuration settings - -""" - -from connector import FCKeditorConnector -from upload import FCKeditorQuickUpload - -import cgitb -from cStringIO import StringIO - -# Running from WSGI capable server (recomended) -def App(environ, start_response): - "WSGI entry point. Run the connector" - if environ['SCRIPT_NAME'].endswith("connector.py"): - conn = FCKeditorConnector(environ) - elif environ['SCRIPT_NAME'].endswith("upload.py"): - conn = FCKeditorQuickUpload(environ) - else: - start_response ("200 Ok", [('Content-Type','text/html')]) - yield "Unknown page requested: " - yield environ['SCRIPT_NAME'] - return - try: - # run the connector - data = conn.doResponse() - # Start WSGI response: - start_response ("200 Ok", conn.headers) - # Send response text - yield data - except: - start_response("500 Internal Server Error",[("Content-type","text/html")]) - file = StringIO() - cgitb.Hook(file = file).handle() - yield file.getvalue() diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/zope.py b/htdocs/includes/fckeditor/editor/filemanager/connectors/py/zope.py deleted file mode 100644 index 0b9a2bf2d1c..00000000000 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/py/zope.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2010 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Connector for Python and Zope. - -This code was not tested at all. -It just was ported from pre 2.5 release, so for further reference see -\editor\filemanager\browser\default\connectors\py\connector.py in previous -releases. - -""" - -from fckutil import * -from connector import * -import config as Config - -class FCKeditorConnectorZope(FCKeditorConnector): - """ - Zope versiof FCKeditorConnector - """ - # Allow access (Zope) - __allow_access_to_unprotected_subobjects__ = 1 - - def __init__(self, context=None): - """ - Constructor - """ - FCKeditorConnector.__init__(self, environ=None) # call superclass constructor - # Instance Attributes - self.context = context - self.request = FCKeditorRequest(context) - - def getZopeRootContext(self): - if self.zopeRootContext is None: - self.zopeRootContext = self.context.getPhysicalRoot() - return self.zopeRootContext - - def getZopeUploadContext(self): - if self.zopeUploadContext is None: - folderNames = self.userFilesFolder.split("/") - c = self.getZopeRootContext() - for folderName in folderNames: - if (folderName <> ""): - c = c[folderName] - self.zopeUploadContext = c - return self.zopeUploadContext - - def setHeader(self, key, value): - self.context.REQUEST.RESPONSE.setHeader(key, value) - - def getFolders(self, resourceType, currentFolder): - # Open the folders node - s = "" - s += """""" - zopeFolder = self.findZopeFolder(resourceType, currentFolder) - for (name, o) in zopeFolder.objectItems(["Folder"]): - s += """""" % ( - convertToXmlAttribute(name) - ) - # Close the folders node - s += """""" - return s - - def getZopeFoldersAndFiles(self, resourceType, currentFolder): - folders = self.getZopeFolders(resourceType, currentFolder) - files = self.getZopeFiles(resourceType, currentFolder) - s = folders + files - return s - - def getZopeFiles(self, resourceType, currentFolder): - # Open the files node - s = "" - s += """""" - zopeFolder = self.findZopeFolder(resourceType, currentFolder) - for (name, o) in zopeFolder.objectItems(["File","Image"]): - s += """""" % ( - convertToXmlAttribute(name), - ((o.get_size() / 1024) + 1) - ) - # Close the files node - s += """""" - return s - - def findZopeFolder(self, resourceType, folderName): - # returns the context of the resource / folder - zopeFolder = self.getZopeUploadContext() - folderName = self.removeFromStart(folderName, "/") - folderName = self.removeFromEnd(folderName, "/") - if (resourceType <> ""): - try: - zopeFolder = zopeFolder[resourceType] - except: - zopeFolder.manage_addProduct["OFSP"].manage_addFolder(id=resourceType, title=resourceType) - zopeFolder = zopeFolder[resourceType] - if (folderName <> ""): - folderNames = folderName.split("/") - for folderName in folderNames: - zopeFolder = zopeFolder[folderName] - return zopeFolder - - def createFolder(self, resourceType, currentFolder): - # Find out where we are - zopeFolder = self.findZopeFolder(resourceType, currentFolder) - errorNo = 0 - errorMsg = "" - if self.request.has_key("NewFolderName"): - newFolder = self.request.get("NewFolderName", None) - zopeFolder.manage_addProduct["OFSP"].manage_addFolder(id=newFolder, title=newFolder) - else: - errorNo = 102 - return self.sendErrorNode ( errorNo, errorMsg ) - - def uploadFile(self, resourceType, currentFolder, count=None): - zopeFolder = self.findZopeFolder(resourceType, currentFolder) - file = self.request.get("NewFile", None) - fileName = self.getFileName(file.filename) - fileNameOnly = self.removeExtension(fileName) - fileExtension = self.getExtension(fileName).lower() - if (count): - nid = "%s.%s.%s" % (fileNameOnly, count, fileExtension) - else: - nid = fileName - title = nid - try: - zopeFolder.manage_addProduct['OFSP'].manage_addFile( - id=nid, - title=title, - file=file.read() - ) - except: - if (count): - count += 1 - else: - count = 1 - return self.zopeFileUpload(resourceType, currentFolder, count) - return self.sendUploadResults( 0 ) - -class FCKeditorRequest(object): - "A wrapper around the request object" - def __init__(self, context=None): - r = context.REQUEST - self.request = r - - def has_key(self, key): - return self.request.has_key(key) - - def get(self, key, default=None): - return self.request.get(key, default) - -""" -Running from zope, you will need to modify this connector. -If you have uploaded the FCKeditor into Zope (like me), you need to -move this connector out of Zope, and replace the "connector" with an -alias as below. The key to it is to pass the Zope context in, as -we then have a like to the Zope context. - -## Script (Python) "connector.py" -##bind container=container -##bind context=context -##bind namespace= -##bind script=script -##bind subpath=traverse_subpath -##parameters=*args, **kws -##title=ALIAS -## - -import Products.zope as connector -return connector.FCKeditorConnectorZope(context=context).doResponse() -""" diff --git a/htdocs/includes/jquery/plugins/jstree/jquery.jstree.min.jgz b/htdocs/includes/jquery/plugins/jstree/jquery.jstree.min.jgz index 2fbed408bc1..8ba61f32afc 100644 Binary files a/htdocs/includes/jquery/plugins/jstree/jquery.jstree.min.jgz and b/htdocs/includes/jquery/plugins/jstree/jquery.jstree.min.jgz differ diff --git a/htdocs/includes/jquery/plugins/jstree/jquery.jstree.min.js b/htdocs/includes/jquery/plugins/jstree/jquery.jstree.min.js index 84fc5d24d04..321ce99e990 100644 --- a/htdocs/includes/jquery/plugins/jstree/jquery.jstree.min.js +++ b/htdocs/includes/jquery/plugins/jstree/jquery.jstree.min.js @@ -15,15 +15,15 @@ else{tmp.appendChild(document.createTextNode(opts.str));document.getElementsByTa return tmp.sheet||tmp.styleSheet;} if(opts.url){if(document.createStyleSheet){try{tmp=document.createStyleSheet(opts.url);}catch(e){}} else{tmp=document.createElement('link');tmp.rel='stylesheet';tmp.type='text/css';tmp.media="all";tmp.href=opts.url;document.getElementsByTagName("head")[0].appendChild(tmp);return tmp.styleSheet;}}}};var instances=[],focused_instance=-1,plugins={},prepared_move={};$.fn.jstree=function(settings){var isMethodCall=(typeof settings=='string'),args=Array.prototype.slice.call(arguments,1),returnValue=this;if(isMethodCall){if(settings.substring(0,1)=='_'){return returnValue;} -this.each(function(){var instance=instances[$.data(this,"jstree-instance-id")],methodValue=(instance&&$.isFunction(instance[settings]))?instance[settings].apply(instance,args):instance;if(typeof methodValue!=="undefined"&&(settings.indexOf("is_")===0||(methodValue!==true&&methodValue!==false))){returnValue=methodValue;return false;}});} -else{this.each(function(){var instance_id=$.data(this,"jstree-instance-id"),a=[],b=settings?$.extend({},true,settings):{},c=$(this),s=false,t=[];a=a.concat(args);if(c.data("jstree")){a.push(c.data("jstree"));} +this.each(function(){var instance=instances[$.data(this,"jstree_instance_id")],methodValue=(instance&&$.isFunction(instance[settings]))?instance[settings].apply(instance,args):instance;if(typeof methodValue!=="undefined"&&(settings.indexOf("is_")===0||(methodValue!==true&&methodValue!==false))){returnValue=methodValue;return false;}});} +else{this.each(function(){var instance_id=$.data(this,"jstree_instance_id"),a=[],b=settings?$.extend({},true,settings):{},c=$(this),s=false,t=[];a=a.concat(args);if(c.data("jstree")){a.push(c.data("jstree"));} b=a.length?$.extend.apply(null,[true,b].concat(a)):b;if(typeof instance_id!=="undefined"&&instances[instance_id]){instances[instance_id].destroy();} -instance_id=parseInt(instances.push({}),10)-1;$.data(this,"jstree-instance-id",instance_id);b.plugins=$.isArray(b.plugins)?b.plugins:$.jstree.defaults.plugins.slice();b.plugins.unshift("core");b.plugins=b.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");s=$.extend(true,{},$.jstree.defaults,b);s.plugins=b.plugins;$.each(plugins,function(i,val){if($.inArray(i,s.plugins)===-1){s[i]=null;delete s[i];} -else{t.push(i);}});s.plugins=t;instances[instance_id]=new $.jstree._instance(instance_id,$(this).addClass("jstree jstree-"+instance_id),s);$.each(instances[instance_id]._get_settings().plugins,function(i,val){instances[instance_id].data[val]={};});$.each(instances[instance_id]._get_settings().plugins,function(i,val){if(plugins[val]){plugins[val].__init.apply(instances[instance_id]);}});setTimeout(function(){instances[instance_id].init();},0);});} +instance_id=parseInt(instances.push({}),10)-1;$.data(this,"jstree_instance_id",instance_id);b.plugins=$.isArray(b.plugins)?b.plugins:$.jstree.defaults.plugins.slice();b.plugins.unshift("core");b.plugins=b.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");s=$.extend(true,{},$.jstree.defaults,b);s.plugins=b.plugins;$.each(plugins,function(i,val){if($.inArray(i,s.plugins)===-1){s[i]=null;delete s[i];} +else{t.push(i);}});s.plugins=t;instances[instance_id]=new $.jstree._instance(instance_id,$(this).addClass("jstree jstree-"+instance_id),s);$.each(instances[instance_id]._get_settings().plugins,function(i,val){instances[instance_id].data[val]={};});$.each(instances[instance_id]._get_settings().plugins,function(i,val){if(plugins[val]){plugins[val].__init.apply(instances[instance_id]);}});setTimeout(function(){if(instances[instance_id]){instances[instance_id].init();}},0);});} return returnValue;};$.jstree={defaults:{plugins:[]},_focused:function(){return instances[focused_instance]||null;},_reference:function(needle){if(instances[needle]){return instances[needle];} var o=$(needle);if(!o.length&&typeof needle==="string"){o=$("#"+needle);} if(!o.length){return null;} -return instances[o.closest(".jstree").data("jstree-instance-id")]||null;},_instance:function(index,container,settings){this.data={core:{}};this.get_settings=function(){return $.extend(true,{},settings);};this._get_settings=function(){return settings;};this.get_index=function(){return index;};this.get_container=function(){return container;};this.get_container_ul=function(){return container.children("ul:eq(0)");};this._set_settings=function(s){settings=$.extend(true,{},settings,s);};},_fn:{},plugin:function(pname,pdata){pdata=$.extend({},{__init:$.noop,__destroy:$.noop,_fn:{},defaults:false},pdata);plugins[pname]=pdata;$.jstree.defaults[pname]=pdata.defaults;$.each(pdata._fn,function(i,val){val.plugin=pname;val.old=$.jstree._fn[i];$.jstree._fn[i]=function(){var rslt,func=val,args=Array.prototype.slice.call(arguments),evnt=new $.Event("before.jstree"),rlbk=false;if(this.data.core.locked===true&&i!=="unlock"&&i!=="is_locked"){return;} +return instances[o.closest(".jstree").data("jstree_instance_id")]||null;},_instance:function(index,container,settings){this.data={core:{}};this.get_settings=function(){return $.extend(true,{},settings);};this._get_settings=function(){return settings;};this.get_index=function(){return index;};this.get_container=function(){return container;};this.get_container_ul=function(){return container.children("ul:eq(0)");};this._set_settings=function(s){settings=$.extend(true,{},settings,s);};},_fn:{},plugin:function(pname,pdata){pdata=$.extend({},{__init:$.noop,__destroy:$.noop,_fn:{},defaults:false},pdata);plugins[pname]=pdata;$.jstree.defaults[pname]=pdata.defaults;$.each(pdata._fn,function(i,val){val.plugin=pname;val.old=$.jstree._fn[i];$.jstree._fn[i]=function(){var rslt,func=val,args=Array.prototype.slice.call(arguments),evnt=new $.Event("before.jstree"),rlbk=false;if(this.data.core.locked===true&&i!=="unlock"&&i!=="is_locked"){return;} do{if(func&&func.plugin&&$.inArray(func.plugin,this._get_settings().plugins)!==-1){break;} func=func.old;}while(func);if(!func){return;} if(i.indexOf("_")===0){rslt=func.apply(this,args);} @@ -36,7 +36,7 @@ css_string+=''+'.jstree li { height:18px; margin-left:0; margin-right:0; } '+'.j if(/msie/.test(u)&&parseInt(v,10)==7){is_ie7=true;css_string+='.jstree li a { border-width:0 !important; padding:0px 2px !important; } ';} if(!/compatible/.test(u)&&/mozilla/.test(u)&&parseFloat(v,10)<1.9){is_ff2=true;css_string+=''+'.jstree ins { display:-moz-inline-box; } '+'.jstree li { line-height:12px; } '+'.jstree a { display:-moz-inline-box; } '+'.jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } ';} $.vakata.css.add_sheet({str:css_string,title:"jstree"});});$.jstree.plugin("core",{__init:function(){this.data.core.locked=false;this.data.core.to_open=this.get_settings().core.initially_open;this.data.core.to_load=this.get_settings().core.initially_load;},defaults:{html_titles:false,animation:500,initially_open:[],initially_load:[],open_parents:true,notify_plugins:true,rtl:false,load_open:false,strings:{loading:"Loading ...",new_node:"New node",multiple_selection:"Multiple selection"}},_fn:{init:function(){this.set_focus();if(this._get_settings().core.rtl){this.get_container().addClass("jstree-rtl").css("direction","rtl");} -this.get_container().html("");this.data.core.li_height=this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height()||18;this.get_container().delegate("li > ins","click.jstree",$.proxy(function(event){var trgt=$(event.target);if(trgt.is("ins")&&event.pageY-trgt.offset().top
  •   "+this._get_string("loading")+"
  • ");this.data.core.li_height=this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height()||18;this.get_container().delegate("li > ins","click.jstree",$.proxy(function(event){var trgt=$(event.target);this.toggle_node(trgt);},this)).bind("mousedown.jstree",$.proxy(function(){this.set_focus();},this)).bind("dblclick.jstree",function(event){var sel;if(document.selection&&document.selection.empty){document.selection.empty();} else{if(window.getSelection){sel=window.getSelection();try{sel.removeAllRanges();sel.collapse();}catch(err){}}}});if(this._get_settings().core.notify_plugins){this.get_container().bind("load_node.jstree",$.proxy(function(e,data){var o=this._get_node(data.rslt.obj),t=this;if(o===-1){o=this.get_container_ul();} if(!o.length){return;} o.find("li").each(function(){var th=$(this);if(th.data("jstree")){$.each(th.data("jstree"),function(plugin,values){if(t.data[plugin]&&$.isFunction(t["_"+plugin+"_notify"])){t["_"+plugin+"_notify"].call(t,th,values);}});}});},this));} @@ -45,7 +45,7 @@ if(!o.length){return;} o.find("li.jstree-open:not(:has(ul))").each(function(){t.load_node(this,$.noop,$.noop);});},this));} this.__callback();this.load_node(-1,function(){this.loaded();this.reload_nodes();});},destroy:function(){var i,n=this.get_index(),s=this._get_settings(),_this=this;$.each(s.plugins,function(i,val){try{plugins[val].__destroy.apply(_this);}catch(err){}});this.__callback();if(this.is_focused()){for(i in instances){if(instances.hasOwnProperty(i)&&i!=n){instances[i].set_focus();break;}}} if(n===focused_instance){focused_instance=-1;} -this.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree-instance-id").find("[class^='jstree']").andSelf().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/ig,'');});$(document).unbind(".jstree-"+n).undelegate(".jstree-"+n);instances[n]=null;delete instances[n];},_core_notify:function(n,data){if(data.opened){this.open_node(n,false,true);}},lock:function(){this.data.core.locked=true;this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7");this.__callback({});},unlock:function(){this.data.core.locked=false;this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1");this.__callback({});},is_locked:function(){return this.data.core.locked;},save_opened:function(){var _this=this;this.data.core.to_open=[];this.get_container_ul().find("li.jstree-open").each(function(){if(this.id){_this.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"));}});this.__callback(_this.data.core.to_open);},save_loaded:function(){},reload_nodes:function(is_callback){var _this=this,done=true,current=[],remaining=[];if(!is_callback){this.data.core.reopen=false;this.data.core.refreshing=true;this.data.core.to_open=$.map($.makeArray(this.data.core.to_open),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});this.data.core.to_load=$.map($.makeArray(this.data.core.to_load),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});if(this.data.core.to_open.length){this.data.core.to_load=this.data.core.to_load.concat(this.data.core.to_open);}} +this.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree_instance_id").find("[class^='jstree']").andSelf().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/ig,'');});$(document).unbind(".jstree-"+n).undelegate(".jstree-"+n);instances[n]=null;delete instances[n];},_core_notify:function(n,data){if(data.opened){this.open_node(n,false,true);}},lock:function(){this.data.core.locked=true;this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7");this.__callback({});},unlock:function(){this.data.core.locked=false;this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1");this.__callback({});},is_locked:function(){return this.data.core.locked;},save_opened:function(){var _this=this;this.data.core.to_open=[];this.get_container_ul().find("li.jstree-open").each(function(){if(this.id){_this.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"));}});this.__callback(_this.data.core.to_open);},save_loaded:function(){},reload_nodes:function(is_callback){var _this=this,done=true,current=[],remaining=[];if(!is_callback){this.data.core.reopen=false;this.data.core.refreshing=true;this.data.core.to_open=$.map($.makeArray(this.data.core.to_open),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});this.data.core.to_load=$.map($.makeArray(this.data.core.to_load),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});if(this.data.core.to_open.length){this.data.core.to_load=this.data.core.to_load.concat(this.data.core.to_open);}} if(this.data.core.to_load.length){$.each(this.data.core.to_load,function(i,val){if(val=="#"){return true;} if($(val).length){current.push(val);} else{remaining.push(val);}});if(current.length){this.data.core.to_load=remaining;$.each(current,function(i,val){if(!_this._is_loaded(val)){_this.load_node(val,function(){_this.reload_nodes(true);},function(){_this.reload_nodes(true);});done=false;}});}} @@ -107,7 +107,8 @@ if(typeof m=="string"){tmp.attr('href','#')[s.html_titles?"html":"text"](m);} else{if(!m.attr){m.attr={};} if(!m.attr.href){m.attr.href='#';} tmp.attr(m.attr)[s.html_titles?"html":"text"](m.title);if(m.language){tmp.addClass(m.language);}} -tmp.prepend(" ");if(m.icon){if(m.icon.indexOf("/")===-1){tmp.children("ins").addClass(m.icon);} +tmp.prepend(" ");if(!m.icon&&js.icon){m.icon=js.icon;} +if(m.icon){if(m.icon.indexOf("/")===-1){tmp.children("ins").addClass(m.icon);} else{tmp.children("ins").css("background","url('"+m.icon+"') center center no-repeat");}} d.append(tmp);});d.prepend(" ");if(obj===-1){obj=this.get_container();if(position==="before"){position="first";} if(position==="after"){position="last";}} @@ -217,34 +218,34 @@ else{this.hover_node(this._get_next(o));}} return false;},"space":function(){if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").click();} return false;},"ctrl+space":function(event){event.type="click";if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").trigger(event);} return false;},"shift+space":function(event){event.type="click";if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").trigger(event);} -return false;},"f2":function(){this.rename(this.data.ui.hovered||this.data.ui.last_selected);},"del":function(){this.remove(this.data.ui.hovered||this._get_node(null));}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=true;},disable_hotkeys:function(){this.data.hotkeys.enabled=false;}}});})(jQuery);(function($){$.jstree.plugin("json_data",{__init:function(){var s=this._get_settings().json_data;if(s.progressive_unload){this.get_container().bind("after_close.jstree",function(e,data){data.rslt.obj.children("ul").remove();});}},defaults:{data:false,ajax:false,correct_state:true,progressive_render:false,progressive_unload:false},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_json(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){var s=this._get_settings().json_data;obj=this._get_node(obj);return obj==-1||!obj||(!s.ajax&&!s.progressive_render&&!$.isFunction(s.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").length>0;},refresh:function(obj){obj=this._get_node(obj);var s=this._get_settings().json_data;if(obj&&obj!==-1&&s.progressive_unload&&($.isFunction(s.data)||!!s.ajax)){obj.removeData("jstree-children");} -return this.__call_old();},load_node_json:function(obj,s_call,e_call){var s=this.get_settings().json_data,d,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1&&(s.progressive_render||s.progressive_unload)&&!obj.is(".jstree-open, .jstree-leaf")&&obj.children("ul").children("li").length===0&&obj.data("jstree-children")){d=this._parse_json(obj.data("jstree-children"),obj);if(d){obj.append(d);if(!s.progressive_unload){obj.removeData("jstree-children");}} +return false;},"f2":function(){this.rename(this.data.ui.hovered||this.data.ui.last_selected);},"del":function(){this.remove(this.data.ui.hovered||this._get_node(null));}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=true;},disable_hotkeys:function(){this.data.hotkeys.enabled=false;}}});})(jQuery);(function($){$.jstree.plugin("json_data",{__init:function(){var s=this._get_settings().json_data;if(s.progressive_unload){this.get_container().bind("after_close.jstree",function(e,data){data.rslt.obj.children("ul").remove();});}},defaults:{data:false,ajax:false,correct_state:true,progressive_render:false,progressive_unload:false},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_json(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){var s=this._get_settings().json_data;obj=this._get_node(obj);return obj==-1||!obj||(!s.ajax&&!s.progressive_render&&!$.isFunction(s.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").length>0;},refresh:function(obj){obj=this._get_node(obj);var s=this._get_settings().json_data;if(obj&&obj!==-1&&s.progressive_unload&&($.isFunction(s.data)||!!s.ajax)){obj.removeData("jstree_children");} +return this.__call_old();},load_node_json:function(obj,s_call,e_call){var s=this.get_settings().json_data,d,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1&&(s.progressive_render||s.progressive_unload)&&!obj.is(".jstree-open, .jstree-leaf")&&obj.children("ul").children("li").length===0&&obj.data("jstree_children")){d=this._parse_json(obj.data("jstree_children"),obj);if(d){obj.append(d);if(!s.progressive_unload){obj.removeData("jstree_children");}} this.clean_node(obj);if(s_call){s_call.call(this);} return;} -if(obj&&obj!==-1){if(obj.data("jstree-is-loading")){return;} -else{obj.data("jstree-is-loading",true);}} +if(obj&&obj!==-1){if(obj.data("jstree_is_loading")){return;} +else{obj.data("jstree_is_loading",true);}} switch(!0){case(!s.data&&!s.ajax):throw"Neither data nor ajax settings supplied.";case($.isFunction(s.data)):s.data.call(this,obj,$.proxy(function(d){d=this._parse_json(d,obj);if(!d){if(obj===-1||!obj){if(s.correct_state){this.get_container().children("ul").empty();}} -else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(s.correct_state){this.correct_state(obj);}} +else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);}} if(e_call){e_call.call(this);}} else{if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());} -else{obj.append(d).children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");} +else{obj.append(d).children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");} this.clean_node(obj);if(s_call){s_call.call(this);}}},this));break;case(!!s.data&&!s.ajax)||(!!s.data&&!!s.ajax&&(!obj||obj===-1)):if(!obj||obj==-1){d=this._parse_json(s.data,obj);if(d){this.get_container().children("ul").empty().append(d.children());this.clean_node();} else{if(s.correct_state){this.get_container().children("ul").empty();}}} if(s_call){s_call.call(this);} break;case(!s.data&&!!s.ajax)||(!!s.data&&!!s.ajax&&obj&&obj!==-1):error_func=function(x,t,e){var ef=this.get_settings().json_data.ajax.error;if(ef){ef.call(this,x,t,e);} -if(obj!=-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(t==="success"&&s.correct_state){this.correct_state(obj);}} +if(obj!=-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(t==="success"&&s.correct_state){this.correct_state(obj);}} else{if(t==="success"&&s.correct_state){this.get_container().children("ul").empty();}} if(e_call){e_call.call(this);}};success_func=function(d,t,x){var sf=this.get_settings().json_data.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;} if(d===""||(d&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")==="")||(!$.isArray(d)&&!$.isPlainObject(d))){return error_func.call(this,x,t,"");} d=this._parse_json(d,obj);if(d){if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());} -else{obj.append(d).children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");} +else{obj.append(d).children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");} this.clean_node(obj);if(s_call){s_call.call(this);}} else{if(obj===-1||!obj){if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}} -else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}}};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if(!s.ajax.dataType){s.ajax.dataType="json";} +else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}}};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if(!s.ajax.dataType){s.ajax.dataType="json";} if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,obj);} if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,obj);} $.ajax(s.ajax);break;}},_parse_json:function(js,obj,is_callback){var d=false,p=this._get_settings(),s=p.json_data,t=p.core.html_titles,tmp,i,j,ul1,ul2;if(!js){return d;} -if(s.progressive_unload&&obj&&obj!==-1){obj.data("jstree-children",d);} +if(s.progressive_unload&&obj&&obj!==-1){obj.data("jstree_children",d);} if($.isArray(js)){d=$();if(!js.length){return false;} for(i=0,j=js.length;i ");if(!m.icon&&js.icon){m.icon=js.icon;} if(m.icon){if(m.icon.indexOf("/")===-1){tmp.children("ins").addClass(m.icon);} else{tmp.children("ins").css("background","url('"+m.icon+"') center center no-repeat");}} -d.append(tmp);});d.prepend(" ");if(js.children){if(s.progressive_render&&js.state!=="open"){d.addClass("jstree-closed").data("jstree-children",js.children);} -else{if(s.progressive_unload){d.data("jstree-children",js.children);} +d.append(tmp);});d.prepend(" ");if(js.children){if(s.progressive_render&&js.state!=="open"){d.addClass("jstree-closed").data("jstree_children",js.children);} +else{if(s.progressive_unload){d.data("jstree_children",js.children);} if($.isArray(js.children)&&js.children.length){tmp=this._parse_json(js.children,obj,true);if(tmp.length){ul2=$("
      ");ul2.append(tmp);d.append(ul2);}}}}} if(!is_callback){ul1=$("
        ");ul1.append(d);d=ul1;} return d;},get_json:function(obj,li_attr,a_attr,is_callback){var result=[],s=this._get_settings(),_this=this,tmp1,tmp2,li,a,t,lang;obj=this._get_node(obj);if(!obj||obj===-1){obj=this.get_container().find("> ul > li");} @@ -399,58 +400,56 @@ else{this.check_node(e.target);} if(this.data.ui&&this.data.checkbox.noui){this.save_selected();if(this.data.cookies){this.save_cookie("select_node");}} else{e.stopImmediatePropagation();return false;}},this));},defaults:{override_ui:false,two_state:false,real_checkboxes:false,checked_parent_open:true,real_checkboxes_names:function(n){return[("check_"+(n[0].id||Math.ceil(Math.random()*10000))),1];}},__destroy:function(){this.get_container().find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end().find("ins.jstree-checkbox").remove();},_fn:{_checkbox_notify:function(n,data){if(data.checked){this.check_node(n,false);}},_prepare_checkboxes:function(obj){obj=!obj||obj==-1?this.get_container().find("> ul > li"):this._get_node(obj);if(obj===false){return;} var c,_this=this,t,ts=this._get_settings().checkbox.two_state,rc=this._get_settings().checkbox.real_checkboxes,rcn=this._get_settings().checkbox.real_checkboxes_names;obj.each(function(){t=$(this);c=t.is("li")&&(t.hasClass("jstree-checked")||(rc&&t.children(":checked").length))?"jstree-checked":"jstree-unchecked";t.find("li").andSelf().each(function(){var $t=$(this),nm;$t.children("a"+(_this.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend(" ").parent().not(".jstree-checked, .jstree-unchecked").addClass(ts?"jstree-unchecked":c);if(rc){if(!$t.children(":checkbox").length){nm=rcn.call(_this,$t);$t.prepend("");} -else{$t.children(":checkbox").addClass("jstree-real-checkbox");} -if(c==="jstree-checked"){$t.children(":checkbox").attr("checked","checked");}} -if(c==="jstree-checked"&&!ts){$t.find("li").addClass("jstree-checked");}});});if(!ts){if(obj.length===1&&obj.is("li")){this._repair_state(obj);} -if(obj.is("li")){obj.each(function(){_this._repair_state(this);});} -else{obj.find("> ul > li").each(function(){_this._repair_state(this);});} -obj.find(".jstree-checked").parent().parent().each(function(){_this._repair_state(this);});}},change_state:function(obj,state){obj=this._get_node(obj);var coll=false,rc=this._get_settings().checkbox.real_checkboxes;if(!obj||obj===-1){return false;} -state=(state===false||state===true)?state:obj.hasClass("jstree-checked");if(this._get_settings().checkbox.two_state){if(state){obj.removeClass("jstree-checked").addClass("jstree-unchecked");if(rc){obj.children(":checkbox").removeAttr("checked");}} -else{obj.removeClass("jstree-unchecked").addClass("jstree-checked");if(rc){obj.children(":checkbox").attr("checked","checked");}}} +else{$t.children(":checkbox").addClass("jstree-real-checkbox");}} +if(!ts){if(c==="jstree-checked"||$t.hasClass("jstree-checked")||$t.children(':checked').length){$t.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked",true);}} +else{if($t.hasClass("jstree-checked")||$t.children(':checked').length){$t.addClass("jstree-checked").children(":checkbox").prop("checked",true);}}});});if(!ts){obj.find(".jstree-checked").parent().parent().each(function(){_this._repair_state(this);});}},change_state:function(obj,state){obj=this._get_node(obj);var coll=false,rc=this._get_settings().checkbox.real_checkboxes;if(!obj||obj===-1){return false;} +state=(state===false||state===true)?state:obj.hasClass("jstree-checked");if(this._get_settings().checkbox.two_state){if(state){obj.removeClass("jstree-checked").addClass("jstree-unchecked");if(rc){obj.children(":checkbox").prop("checked",false);}} +else{obj.removeClass("jstree-unchecked").addClass("jstree-checked");if(rc){obj.children(":checkbox").prop("checked",true);}}} else{if(state){coll=obj.find("li").andSelf();if(!coll.filter(".jstree-checked, .jstree-undetermined").length){return false;} -coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(rc){coll.children(":checkbox").removeAttr("checked");}} +coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(rc){coll.children(":checkbox").prop("checked",false);}} else{coll=obj.find("li").andSelf();if(!coll.filter(".jstree-unchecked, .jstree-undetermined").length){return false;} -coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(rc){coll.children(":checkbox").attr("checked","checked");} +coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(rc){coll.children(":checkbox").prop("checked",true);} if(this.data.ui){this.data.ui.last_selected=obj;} this.data.checkbox.last_selected=obj;} -obj.parentsUntil(".jstree","li").each(function(){var $this=$(this);if(state){if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length){$this.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){$this.parentsUntil(".jstree","li").andSelf().children(":checkbox").removeAttr("checked");} +obj.parentsUntil(".jstree","li").each(function(){var $this=$(this);if(state){if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length){$this.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){$this.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",false);} return false;} -else{$this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(rc){$this.children(":checkbox").removeAttr("checked");}}} -else{if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length){$this.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){$this.parentsUntil(".jstree","li").andSelf().children(":checkbox").removeAttr("checked");} +else{$this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(rc){$this.children(":checkbox").prop("checked",false);}}} +else{if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length){$this.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){$this.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",false);} return false;} -else{$this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(rc){$this.children(":checkbox").attr("checked","checked");}}}});} +else{$this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(rc){$this.children(":checkbox").prop("checked",true);}}}});} if(this.data.ui&&this.data.checkbox.noui){this.data.ui.selected=this.get_checked();} this.__callback(obj);return true;},check_node:function(obj){if(this.change_state(obj,false)){obj=this._get_node(obj);if(this._get_settings().checkbox.checked_parent_open){var t=this;obj.parents(".jstree-closed").each(function(){t.open_node(this,false,true);});} this.__callback({"obj":obj});}},uncheck_node:function(obj){if(this.change_state(obj,true)){this.__callback({"obj":this._get_node(obj)});}},check_all:function(){var _this=this,coll=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");coll.each(function(){_this.change_state(this,false);});this.__callback();},uncheck_all:function(){var _this=this,coll=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");coll.each(function(){_this.change_state(this,true);});this.__callback();},is_checked:function(obj){obj=this._get_node(obj);return obj.length?obj.is(".jstree-checked"):false;},get_checked:function(obj,get_all){obj=!obj||obj===-1?this.get_container():this._get_node(obj);return get_all||this._get_settings().checkbox.two_state?obj.find(".jstree-checked"):obj.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked");},get_unchecked:function(obj,get_all){obj=!obj||obj===-1?this.get_container():this._get_node(obj);return get_all||this._get_settings().checkbox.two_state?obj.find(".jstree-unchecked"):obj.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked");},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes");},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes");},_repair_state:function(obj){obj=this._get_node(obj);if(!obj.length){return;} +if(this._get_settings().checkbox.two_state){obj.find('li').andSelf().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children(':checkbox').prop('checked',true);return;} var rc=this._get_settings().checkbox.real_checkboxes,a=obj.find("> ul > .jstree-checked").length,b=obj.find("> ul > .jstree-undetermined").length,c=obj.find("> ul > li").length;if(c===0){if(obj.hasClass("jstree-undetermined")){this.change_state(obj,false);}} else if(a===0&&b===0){this.change_state(obj,true);} else if(a===c){this.change_state(obj,false);} -else{obj.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){obj.parentsUntil(".jstree","li").andSelf().children(":checkbox").removeAttr("checked");}}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var _this=this,s=this.data.ui.to_select;s=$.map($.makeArray(s),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});this.deselect_all();$.each(s,function(i,val){_this.check_node(val);});this.__callback();} +else{obj.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){obj.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",false);}}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var _this=this,s=this.data.ui.to_select;s=$.map($.makeArray(s),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});this.deselect_all();$.each(s,function(i,val){_this.check_node(val);});this.__callback();} else{this.__call_old();}},save_loaded:function(){var _this=this;this.data.core.to_load=[];this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){if(this.id){_this.data.core.to_load.push("#"+this.id);}});}}});$(function(){var css_string='.jstree .jstree-real-checkbox { display:none; } ';$.vakata.css.add_sheet({str:css_string,title:"jstree"});});})(jQuery);(function($){$.vakata.xslt=function(xml,xsl,callback){var rs="",xm,xs,processor,support;if(document.recalc){xm=document.createElement('xml');xs=document.createElement('xml');xm.innerHTML=xml;xs.innerHTML=xsl;$("body").append(xm).append(xs);setTimeout((function(xm,xs,callback){return function(){callback.call(null,xm.transformNode(xs.XMLDocument));setTimeout((function(xm,xs){return function(){$(xm).remove();$(xs).remove();};})(xm,xs),200);};})(xm,xs,callback),100);return true;} if(typeof window.DOMParser!=="undefined"&&typeof window.XMLHttpRequest!=="undefined"&&typeof window.XSLTProcessor==="undefined"){xml=new DOMParser().parseFromString(xml,"text/xml");xsl=new DOMParser().parseFromString(xsl,"text/xml");} if(typeof window.DOMParser!=="undefined"&&typeof window.XMLHttpRequest!=="undefined"&&typeof window.XSLTProcessor!=="undefined"){processor=new XSLTProcessor();support=$.isFunction(processor.transformDocument)?(typeof window.XMLSerializer!=="undefined"):true;if(!support){return false;} xml=new DOMParser().parseFromString(xml,"text/xml");xsl=new DOMParser().parseFromString(xsl,"text/xml");if($.isFunction(processor.transformDocument)){rs=document.implementation.createDocument("","",null);processor.transformDocument(xml,xsl,rs,null);callback.call(null,new XMLSerializer().serializeToString(rs));return true;} else{processor.importStylesheet(xsl);rs=processor.transformToFragment(xml,document);callback.call(null,$("
        ").append(rs).html());return true;}} -return false;};var xsl={'nest':'<'+'?xml version="1.0" encoding="utf-8" ?>'+''+''+''+' '+' '+' '+''+''+' '+' '+''+'','flat':'<'+'?xml version="1.0" encoding="utf-8" ?>'+''+''+''+'
          '+' '+' '+' '+' '+' '+' '+'
        '+'
        '+''+' '+' '+' '+'
      • '+' '+' jstree-last '+' '+' jstree-open '+' jstree-closed '+' jstree-leaf '+' '+' '+' '+' '+' '+' '+' '+' '+'  '+' '+' '+' '+' '+' '+' #'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' jstree-icon '+' '+' '+' background:url() center center no-repeat;'+'  '+' '+' '+' '+' '+' '+'
          '+' '+' '+' '+' '+' '+' '+'
        '+'
        '+'
      • '+'
        '+'
        '},escape_xml=function(string){return string.toString().replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,''');};$.jstree.plugin("xml_data",{defaults:{data:false,ajax:false,xsl:"flat",clean_node:false,correct_state:true,get_skip_empty:false,get_include_preamble:true},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_xml(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){var s=this._get_settings().xml_data;obj=this._get_node(obj);return obj==-1||!obj||(!s.ajax&&!$.isFunction(s.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").size()>0;},load_node_xml:function(obj,s_call,e_call){var s=this.get_settings().xml_data,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1){if(obj.data("jstree-is-loading")){return;} -else{obj.data("jstree-is-loading",true);}} +return false;};var xsl={'nest':'<'+'?xml version="1.0" encoding="utf-8" ?>'+''+''+''+' '+' '+' '+''+''+' '+' '+''+'','flat':'<'+'?xml version="1.0" encoding="utf-8" ?>'+''+''+''+'
          '+' '+' '+' '+' '+' '+' '+'
        '+'
        '+''+' '+' '+' '+'
      • '+' '+' jstree-last '+' '+' jstree-open '+' jstree-closed '+' jstree-leaf '+' '+' '+' '+' '+' '+' '+' '+' '+'  '+' '+' '+' '+' '+' '+' #'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' jstree-icon '+' '+' '+' background:url() center center no-repeat;'+'  '+' '+' '+' '+' '+' '+'
          '+' '+' '+' '+' '+' '+' '+'
        '+'
        '+'
      • '+'
        '+'
        '},escape_xml=function(string){return string.toString().replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,''');};$.jstree.plugin("xml_data",{defaults:{data:false,ajax:false,xsl:"flat",clean_node:false,correct_state:true,get_skip_empty:false,get_include_preamble:true},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_xml(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){var s=this._get_settings().xml_data;obj=this._get_node(obj);return obj==-1||!obj||(!s.ajax&&!$.isFunction(s.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").size()>0;},load_node_xml:function(obj,s_call,e_call){var s=this.get_settings().xml_data,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1){if(obj.data("jstree_is_loading")){return;} +else{obj.data("jstree_is_loading",true);}} switch(!0){case(!s.data&&!s.ajax):throw"Neither data nor ajax settings supplied.";case($.isFunction(s.data)):s.data.call(this,obj,$.proxy(function(d){this.parse_xml(d,$.proxy(function(d){if(d){d=d.replace(/ ?xmlns="[^"]*"/ig,"");if(d.length>10){d=$(d);if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());} -else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d);obj.removeData("jstree-is-loading");} +else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d);obj.removeData("jstree_is_loading");} if(s.clean_node){this.clean_node(obj);} if(s_call){s_call.call(this);}} -else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}} +else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}} else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}}},this));},this));break;case(!!s.data&&!s.ajax)||(!!s.data&&!!s.ajax&&(!obj||obj===-1)):if(!obj||obj==-1){this.parse_xml(s.data,$.proxy(function(d){if(d){d=d.replace(/ ?xmlns="[^"]*"/ig,"");if(d.length>10){d=$(d);this.get_container().children("ul").empty().append(d.children());if(s.clean_node){this.clean_node(obj);} if(s_call){s_call.call(this);}}} else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}},this));} break;case(!s.data&&!!s.ajax)||(!!s.data&&!!s.ajax&&obj&&obj!==-1):error_func=function(x,t,e){var ef=this.get_settings().xml_data.ajax.error;if(ef){ef.call(this,x,t,e);} -if(obj!==-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(t==="success"&&s.correct_state){this.correct_state(obj);}} +if(obj!==-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(t==="success"&&s.correct_state){this.correct_state(obj);}} else{if(t==="success"&&s.correct_state){this.get_container().children("ul").empty();}} if(e_call){e_call.call(this);}};success_func=function(d,t,x){d=x.responseText;var sf=this.get_settings().xml_data.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;} if(d===""||(d&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")==="")){return error_func.call(this,x,t,"");} this.parse_xml(d,$.proxy(function(d){if(d){d=d.replace(/ ?xmlns="[^"]*"/ig,"");if(d.length>10){d=$(d);if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());} -else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d);obj.removeData("jstree-is-loading");} +else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d);obj.removeData("jstree_is_loading");} if(s.clean_node){this.clean_node(obj);} if(s_call){s_call.call(this);}} -else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}} +else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}} else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}}},this));};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if(!s.ajax.dataType){s.ajax.dataType="xml";} if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,obj);} if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,obj);} @@ -539,28 +538,28 @@ js.attr[s.type_attr]=vc[0];} else{if($.inArray(js.attr[s.type_attr],vc)===-1){return false;}}} if(s.max_children!==-2&&mc!==-1){ch=p===-1?this.get_container().find("> ul > li").length:p.find("> ul > li").length;if(ch+1>mc){return false;}} if(s.max_depth!==-2&&md!==-1&&(md-1)<0){return false;}} -return this.__call_old(true,obj,position,js,callback,is_loaded,skip_check);}}});})(jQuery);(function($){$.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(true);this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return this.nodeType==3;}).remove();},defaults:{data:false,ajax:false,correct_state:true},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_html(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){obj=this._get_node(obj);return obj==-1||!obj||(!this._get_settings().html_data.ajax&&!$.isFunction(this._get_settings().html_data.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").size()>0;},load_node_html:function(obj,s_call,e_call){var d,s=this.get_settings().html_data,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1){if(obj.data("jstree-is-loading")){return;} -else{obj.data("jstree-is-loading",true);}} +return this.__call_old(true,obj,position,js,callback,is_loaded,skip_check);}}});})(jQuery);(function($){$.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(true);this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return this.nodeType==3;}).remove();},defaults:{data:false,ajax:false,correct_state:true},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_html(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){obj=this._get_node(obj);return obj==-1||!obj||(!this._get_settings().html_data.ajax&&!$.isFunction(this._get_settings().html_data.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").size()>0;},load_node_html:function(obj,s_call,e_call){var d,s=this.get_settings().html_data,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1){if(obj.data("jstree_is_loading")){return;} +else{obj.data("jstree_is_loading",true);}} switch(!0){case($.isFunction(s.data)):s.data.call(this,obj,$.proxy(function(d){if(d&&d!==""&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")!==""){d=$(d);if(!d.is("ul")){d=$("
          ").append(d);} if(obj==-1||!obj){this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");} -else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");obj.removeData("jstree-is-loading");} +else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");obj.removeData("jstree_is_loading");} this.clean_node(obj);if(s_call){s_call.call(this);}} -else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}} +else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}} else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}},this));break;case(!s.data&&!s.ajax):if(!obj||obj==-1){this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node();} if(s_call){s_call.call(this);} break;case(!!s.data&&!s.ajax)||(!!s.data&&!!s.ajax&&(!obj||obj===-1)):if(!obj||obj==-1){d=$(s.data);if(!d.is("ul")){d=$("
            ").append(d);} this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node();} if(s_call){s_call.call(this);} break;case(!s.data&&!!s.ajax)||(!!s.data&&!!s.ajax&&obj&&obj!==-1):obj=this._get_node(obj);error_func=function(x,t,e){var ef=this.get_settings().html_data.ajax.error;if(ef){ef.call(this,x,t,e);} -if(obj!=-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(t==="success"&&s.correct_state){this.correct_state(obj);}} +if(obj!=-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(t==="success"&&s.correct_state){this.correct_state(obj);}} else{if(t==="success"&&s.correct_state){this.get_container().children("ul").empty();}} if(e_call){e_call.call(this);}};success_func=function(d,t,x){var sf=this.get_settings().html_data.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;} if(d===""||(d&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")==="")){return error_func.call(this,x,t,"");} if(d){d=$(d);if(!d.is("ul")){d=$("
              ").append(d);} if(obj==-1||!obj){this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");} -else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");obj.removeData("jstree-is-loading");} +else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");obj.removeData("jstree_is_loading");} this.clean_node(obj);if(s_call){s_call.call(this);}} -else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}} +else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}} else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if(!s.ajax.dataType){s.ajax.dataType="html";} if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,obj);} if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,obj);} diff --git a/htdocs/includes/modules/fichinter/modules_fichinter.php b/htdocs/includes/modules/fichinter/modules_fichinter.php index 785c7636d2c..d99dfabba9c 100644 --- a/htdocs/includes/modules/fichinter/modules_fichinter.php +++ b/htdocs/includes/modules/fichinter/modules_fichinter.php @@ -24,7 +24,7 @@ * \ingroup ficheinter * \brief Fichier contenant la classe mere de generation des fiches interventions en PDF * et la classe mere de numerotation des fiches interventions - * \version $Id$ + * \version $Id: modules_fichinter.php,v 1.41 2011/07/10 13:48:25 eldy Exp $ */ require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php'); @@ -172,10 +172,10 @@ function fichinter_create($db, $object, $modele='', $outputlangs='') // Charge le modele $file = "pdf_".$modele.".modules.php"; - + // On verifie l'emplacement du modele $file = dol_buildpath($dir.$file); - + if (file_exists($file)) { $classname = "pdf_".$modele; @@ -220,7 +220,7 @@ function fichinter_delete_preview($db, $fichinterid, $fichinterref='') if (!$fichinterref) { - $fichinter = new Fichinter($db,"",$fichinterid); + $fichinter = new Fichinter($db); $fichinter->fetch($fichinterid); $fichinterref = $fichinter->ref; } diff --git a/htdocs/includes/smtps/SMTPs.php b/htdocs/includes/smtps/SMTPs.php index f9767191c1a..ba174acec0a 100644 --- a/htdocs/includes/smtps/SMTPs.php +++ b/htdocs/includes/smtps/SMTPs.php @@ -32,11 +32,11 @@ * * @author Walter Torres [with a *lot* of help!] * - * @version $Revision$ + * @version $Revision: 1.15 $ * @copyright copyright information * @license GNU General Public Licence * - * $Id$ + * $Id: SMTPs.php,v 1.15 2011/07/12 22:19:02 eldy Exp $ * **/ @@ -1918,8 +1918,8 @@ class SMTPs */ function setBodyContent ( $strContent, $strType = 'plain' ) { - if ( $strContent ) - { + //if ( $strContent ) + //{ if ( $strType == 'html' ) $strMimeType = 'text/html'; else @@ -1937,7 +1937,7 @@ class SMTPs if ( $this->getMD5flag() ) $this->_msgContent[$strType]['md5'] = md5($strContent); - } + //} } /** @@ -2520,7 +2520,10 @@ class SMTPs // ** CSV Version Control Info /** - * $Log$ + * $Log: SMTPs.php,v $ + * Revision 1.15 2011/07/12 22:19:02 eldy + * Fix: Attachment fails if content was empty + * * Revision 1.14 2011/06/20 23:17:50 hregis * Fix: use best structure of mail * diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 2daa2f0285f..9de8cdf662d 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -23,7 +23,7 @@ * \file htdocs/install/check.php * \ingroup install * \brief Test if file conf can be modified and if does not exists, test if install process can create it - * \version $Id$ + * \version $Id: check.php,v 1.84 2011/07/12 20:52:41 eldy Exp $ */ include_once("./inc.php"); @@ -385,10 +385,15 @@ else foreach ($migrationscript as $migarray) { $count++; - $versionfrom=$migarray['from']; - $versionto=$migarray['to']; - $newversionfrom=preg_replace('/(\.[0-9]+)$/i','.*',$versionfrom); - $newversionto=preg_replace('/(\.[0-9]+)$/i','.*',$versionto); + $versionfrom=$migarray['from']; + $versionto=$migarray['to']; + $newversionfrom=preg_replace('/(\.[0-9]+)$/i','.*',$versionfrom); + $newversionto=preg_replace('/(\.[0-9]+)$/i','.*',$versionto); + $dolibarrversionfromarray=preg_split('/[\.-]/',$versionfrom); + $dolibarrversiontoarray=preg_split('/[\.-]/',$versionto); + $version=preg_split('/[\.-]/',DOL_VERSION); + $newversionfrombis=''; + if (versioncompare($dolibarrversiontoarray,$version) < -2) $newversionfrombis='/'.$versionto; print ''.$langs->trans("Upgrade").'
              '.$newversionfrom.' -> '.$newversionto.'
              '; print ''; print $langs->trans("UpgradeDesc"); @@ -396,8 +401,6 @@ else { if (sizeof($dolibarrlastupgradeversionarray) >= 2) // If a database access is available and a version x.y already available { - $dolibarrversionfromarray=preg_split('/[\.-]/',$versionfrom); - $dolibarrversiontoarray=preg_split('/[\.-]/',$versionto); // Now we check if this is the first qualified choice if ($allowupgrade && empty($foundrecommandedchoice) && versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0) { diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index dcf9df92821..1fd1774d185 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -22,7 +22,7 @@ /** \file htdocs/install/inc.php * \ingroup core * \brief File that define environment for install pages - * \version $Id$ + * \version $Id: inc.php,v 1.134 2011/07/11 10:53:37 eldy Exp $ */ define('DOL_VERSION','3.1.0-alpha'); // Also defined in htdocs/master.inc.php (Ex: x.y.z-alpha, x.y.z) @@ -159,18 +159,31 @@ if (! empty($dolibarr_main_document_root_alt)) // Security check if (preg_match('/install.lock/i',$_SERVER["SCRIPT_FILENAME"])) { - print 'Install pages have been disabled for security reason (directory renamed with .lock).'; - print ''; - print 'Click here to go to Dolibarr'; - print ''; + print 'Install pages have been disabled for security reason (directory renamed with .lock suffix).'; + if (! empty($dolibarr_main_url_root)) + { + print 'Click on following link. '; + print ''; + print 'Click here to go to Dolibarr'; + print ''; + } exit; } if (file_exists('../../install.lock')) { - print 'Install pages have been disabled for security reason (by lock file install.lock in dolibarr root directory. Remove it manually if following link loops to this page).
              '; - print ''; - print 'Click here to go to Dolibarr'; - print ''; + print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr root directory).
              '; + if (! empty($dolibarr_main_url_root)) + { + print 'Click on following link. '; + print 'If you always reach this page, you must remove install.lock file manually.
              '; + print ''; + print 'Click here to go to Dolibarr'; + print ''; + } + else + { + print 'If you always reach this page, you must remove install.lock file manually.
              '; + } exit; } diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql index d345126600d..bad27534494 100755 --- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql +++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql @@ -1,5 +1,5 @@ -- --- $Id: 3.0.0-3.1.0.sql,v 1.78 2011/06/29 17:55:32 eldy Exp $ +-- $Id: 3.0.0-3.1.0.sql,v 1.79 2011/07/12 22:12:12 eldy Exp $ -- -- Be carefull to requests order. -- This file must be loaded by calling /install/index.php page @@ -440,3 +440,5 @@ ALTER TABLE llx_user ADD signature text DEFAULT NULL AFTER email; ALTER TABLE llx_don ADD phone_mobile varchar(24) after email; ALTER TABLE llx_don ADD phone varchar(24) after email; + +ALTER TABLE llx_user ADD civilite varchar(6) after entity; diff --git a/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.sql b/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.sql index ee7314a82a0..b9ba378d81f 100644 --- a/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.sql +++ b/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.sql @@ -17,7 +17,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_paiementfourn_facturefourn.sql,v 1.5 2011/07/12 21:07:24 eldy Exp $ -- =========================================================================== create table llx_paiementfourn_facturefourn @@ -25,5 +25,5 @@ create table llx_paiementfourn_facturefourn rowid integer AUTO_INCREMENT PRIMARY KEY, fk_paiementfourn INTEGER DEFAULT NULL, fk_facturefourn INTEGER DEFAULT NULL, - amount DOUBLE DEFAULT '0' + amount double(24,8) DEFAULT 0 )ENGINE=innodb; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 307b3e136e5..28b28aeb762 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -17,7 +17,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id: llx_user.sql,v 1.8 2011/06/29 10:23:33 eldy Exp $ +-- $Id: llx_user.sql,v 1.9 2011/07/12 22:03:44 eldy Exp $ -- =========================================================================== create table llx_user @@ -33,6 +33,7 @@ create table llx_user pass varchar(32), pass_crypted varchar(128), pass_temp varchar(32), -- temporary password when asked for forget password + civilite varchar(6), name varchar(50), firstname varchar(50), office_phone varchar(20), diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index 69698125f47..b79ba3f2c77 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -230,13 +230,13 @@ MAIN_MAIL_SMTP_SERVER=Nom host o ip del servidor SMTP (Per defecte en php.ini: < MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=Port del servidor SMTP (No definit en PHP en sistemes de tipus Unix) MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=Nom servidor o ip del servidor SMTP (No definit en PHP en sistemes de tipus Unix) MAIN_MAIL_EMAIL_FROM=Correu electrònic de l'emissor per trameses e automàtics (Per defecte en php.ini: %s) +MAIN_MAIL_ERRORS_TO=E-Mail usat per als retorns d'error dels e-mails enviats MAIN_MAIL_AUTOCOPY_TO=Enviar automàticament còpia oculta dels e-mails enviats a MAIN_DISABLE_ALL_MAILS=Desactivar globalment tot enviament de correus electrònics (per mode de proves) MAIN_MAIL_SENDMODE=Mètode d'enviament d'e-mails MAIN_MAIL_SMTPS_ID=ID d'autenticació SMTP si es requereix autenticació SMTP MAIN_MAIL_SMTPS_PW=Contrasenya autentificació SMTP si es requereix autenticació SMTP MAIN_MAIL_EMAIL_TLS=Ús d'encriptació TLS (SSL) -MAIN_MAIL_EMAIL_INLINE_IMAGES=Possibilitat d'integrar les imatges en els correus electrònics MAIN_DISABLE_ALL_SMS=Desactivar globalment tot enviament de SMS (per mode de proves o demo) MAIN_SMS_SENDMODE=Mètode d'enviament de SMS MAIN_MAIL_SMS_FROM=Número de telèfon per defecte per als enviaments SMS diff --git a/htdocs/langs/ca_ES/compta.lang b/htdocs/langs/ca_ES/compta.lang index 8e77514697c..6af465d52a6 100644 --- a/htdocs/langs/ca_ES/compta.lang +++ b/htdocs/langs/ca_ES/compta.lang @@ -113,7 +113,9 @@ RulesVATDue=- Per als serveis, l'informe inclou l'IVA de les factures degudes, p OptionVatInfoModuleComptabilite=Nota: Per als béns materials, caldria utilitzar la data de lliurament per per ser més just. PercentOfInvoice=%%/factura NotUsedForGoods=No utilitzat per als béns +ProposalStats=Estadístiques de pressupostos OrderStats=Estadístiques de comandes +InvoiceStats=Estadístiques de factures Dispatch=Desglossament Dispatched=Desglossats ToDispatch=A desglossar diff --git a/htdocs/langs/ca_ES/paypal.lang b/htdocs/langs/ca_ES/paypal.lang index cf81b6a25d0..140c0c23e5a 100644 --- a/htdocs/langs/ca_ES/paypal.lang +++ b/htdocs/langs/ca_ES/paypal.lang @@ -13,5 +13,6 @@ PAYPAL_API_INTEGRAL_OR_PAYPALONLY=Proposar pagament integral (Targeta+Paypal) o PAYPAL_CSS_URL=Url opcional del full d'estil CSS de la pàgina de pagament ThisIsTransactionId=Identificador de la transacció: %s PAYPAL_ADD_PAYMENT_URL=Afegir la url del pagament Paypal en enviar un document per e-mail +PAYPAL_IPN_MAIL_ADDRESS=Adreça e-mail per les notificacions instantànies de pagament (IPN) PredefinedMailContentSendOrderWithPaypalLink=Us adjuntem la comanda __ORDERREF__\n\nPodeu fer clic a l'enllaç assegurança de sota per realitzar el seu pagament a través de PayPal\n\n%s\n\nCordialment\n\n -PredefinedMailContentSendInvoiceWithPaypalLink=Us adjuntem la factura __FACREF__\n\nPodeu fer clic a l'enllaç assegurança de sota per realitzar el seu pagament a través de PayPal\n\n%s\n\nCordialment\n\n \ No newline at end of file +PredefinedMailContentSendInvoiceWithPaypalLink=Us adjuntem la factura __FACREF__\n\nPodeu fer clic a l'enllaç assegurança de sota per realitzar el seu pagament a través de PayPal\n\n%s\n\nCordialment\n\n diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang index 3836ec79775..a9fe2695958 100755 --- a/htdocs/langs/el_GR/admin.lang +++ b/htdocs/langs/el_GR/admin.lang @@ -1234,7 +1234,6 @@ RunCommandSummaryToLaunch=Backup μπορεί να ξεκινήσει με τη ImportPostgreSqlDesc=Για την εισαγωγή ενός αντιγράφου ασφαλείας, πρέπει να χρησιμοποιήσετε pg_restore εντολή από την γραμμή εντολών: ImportPostgreSqlCommand=Sssss sssss mybackupfile.sql FullPathToPostgreSQLdumpCommand=Η πλήρης διαδρομή προς pg_dump εντολή -MAIN_MAIL_EMAIL_INLINE_IMAGES=Δυνατότητα για την ενσωμάτωση εικόνων σε μηνύματα ηλεκτρονικού ταχυδρομείου MAIN_DISABLE_ALL_SMS=Απενεργοποίηση όλων σας αποστολές SMS (για λόγους δοκιμής ή demos) MAIN_SMS_SENDMODE=Μέθοδος να χρησιμοποιήσετε για την αποστολή SMS MAIN_MAIL_SMS_FROM=Προεπιλογή αριθμού τηλεφώνου αποστολέα για την αποστολή SMS diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 2058244178c..0f43c1c9e82 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -229,13 +229,13 @@ MAIN_MAIL_SMTP_SERVER=SMTP/SMTPS Host (By default in php.ini: %s) MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=SMTP/SMTPS Port (Not defined into PHP on Unix like systems) MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=SMTP/SMTPS Host (Not defined into PHP on Unix like systems) MAIN_MAIL_EMAIL_FROM=Sender e-mail for automatic emails (By default in php.ini: %s) +MAIN_MAIL_ERRORS_TO=Sender e-mail used for error returns emails sent MAIN_MAIL_AUTOCOPY_TO= Send systematically a hidden carbon-copy of all sent emails to MAIN_DISABLE_ALL_MAILS=Disable all e-mails sendings (for test purposes or demos) MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt -MAIN_MAIL_EMAIL_INLINE_IMAGES= Ability to integrate images in emails MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index d664b32484f..a08d440d5ef 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -113,6 +113,9 @@ RulesVATDue=For services, the report includes VAT invoices due, paid or not, bas OptionVatInfoModuleComptabilite=Note: For material assets, it should use the date of delivery to be more fair. PercentOfInvoice=%%/invoice NotUsedForGoods=Not used on goods +ProposalStats=Statistics on proposals +OrderStats=Statistics on orders +InvoiceStats=Statistics on bills Dispatch=Dispatching Dispatched=Dispatched ToDispatch=To dispatch diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 21869c2e3d2..de8ec9133ef 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -230,13 +230,13 @@ MAIN_MAIL_SMTP_SERVER=Nombre host o ip del servidor SMTP (Por defecto en php.ini MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=Puerto del servidor SMTP (No definido en PHP en sistemas de tipo Unix) MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=Nombre servidor o ip del servidor SMTP (No definido en PHP en sistemas de tipo Unix) MAIN_MAIL_EMAIL_FROM=E-Mail del emisor para envíos E-Mail automáticos (Por defecto en php.ini: %s) +MAIN_MAIL_ERRORS_TO=E-Mail usado para los retornos de error de los e-mails enviados MAIN_MAIL_AUTOCOPY_TO=Enviar automáticamente copia oculta de los e-mails enviados a MAIN_DISABLE_ALL_MAILS=Desactivar globalmente todo envío de correos electrónicos (para modo de pruebas o demo) MAIN_MAIL_SENDMODE=Método de envío de e-mails MAIN_MAIL_SMTPS_ID=ID de autentificación SMTP si se requiere autenticación SMTP MAIN_MAIL_SMTPS_PW=Contraseña autentificación SMTP si se requiere autentificación SMTP MAIN_MAIL_EMAIL_TLS=Uso de encriptación TLS (SSL) -MAIN_MAIL_EMAIL_INLINE_IMAGES=Posibilidad de integrar las imágenes en los e-mails MAIN_DISABLE_ALL_SMS=Desactivar globalmente todo envío de SMS (para modo de pruebas o demo) MAIN_SMS_SENDMODE=Método de envío de SMS MAIN_MAIL_SMS_FROM=Número de teléfono por defecto para los envíos SMS diff --git a/htdocs/langs/es_ES/compta.lang b/htdocs/langs/es_ES/compta.lang index 5715db90057..47df458f6f0 100644 --- a/htdocs/langs/es_ES/compta.lang +++ b/htdocs/langs/es_ES/compta.lang @@ -113,7 +113,9 @@ RulesVATDue=- Para los servicios, el informe incluye el IVA de las facturas debi OptionVatInfoModuleComptabilite=Nota: Para los bienes materiales, sería necesario utilizar la fecha de entrega para para ser más justo. PercentOfInvoice=%%/factura NotUsedForGoods=No utilizado para los bienes +ProposalStats=Estadísticas de presupuestos OrderStats=Estadísticas de pedidos +InvoiceStats=Estadísticas de facturas Dispatch=Desglose Dispatched=Desglosados ToDispatch=A desglosar diff --git a/htdocs/langs/es_ES/paypal.lang b/htdocs/langs/es_ES/paypal.lang index ea4365c90dd..250c13cd1fc 100644 --- a/htdocs/langs/es_ES/paypal.lang +++ b/htdocs/langs/es_ES/paypal.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - es_ES - paypal +# Dolibarr language file - es_ES - paypal CHARSET=UTF-8 PaypalSetup=Configuración del módulo PayPal PaypalDesc=Este módulo ofrece una página de pago a través del proveedor Paypal para realizar cualquier pago o un pago en relación con un objeto Dolibarr (facturas, pedidos ...) @@ -13,5 +13,6 @@ PAYPAL_API_INTEGRAL_OR_PAYPALONLY=Proponer pago integral (Tarjeta+Paypal) o sól PAYPAL_CSS_URL=Url opcional de la hoja de estilo CSS de la página de pago ThisIsTransactionId=Identificador de la transacción: %s PAYPAL_ADD_PAYMENT_URL=Añadir la url del pago Paypal al enviar un documento por e-mail +PAYPAL_IPN_MAIL_ADDRESS=Dirección e-mail para las notificaciones instantáneas de pago (IPN) PredefinedMailContentSendOrderWithPaypalLink=Le adjuntamos el pedido __ORDERREF__\n\nPuede hacer clic en el enlace seguro de abajo para realizar su pago a través de PayPal\n\n%s\n\nCordialmente\n\n -PredefinedMailContentSendInvoiceWithPaypalLink=Le adjuntamos la factura __FACREF__\n\nPuede hacer clic en el enlace seguro de abajo para realizar su pago a través de PayPal\n\n%s\n\nCordialmente\n\n \ No newline at end of file +PredefinedMailContentSendInvoiceWithPaypalLink=Le adjuntamos la factura __FACREF__\n\nPuede hacer clic en el enlace seguro de abajo para realizar su pago a través de PayPal\n\n%s\n\nCordialmente\n\n diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index d03c568bef9..3cb19e89ba8 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -230,13 +230,13 @@ MAIN_MAIL_SMTP_SERVER= Nom host ou ip du serveur SMTP/SMTPS (Par défaut dans ph MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike= Port du serveur SMTP/SMTPS (Non défini dans le PHP sur les systèmes de type Unix) MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike= Nom host ou ip du serveur SMTP/SMTPS (Non défini dans le PHP sur les systèmes de type Unix) MAIN_MAIL_EMAIL_FROM= EMail émetteur pour envoi emails automatiques (Par défaut dans php.ini: %s) +MAIN_MAIL_ERRORS_TO=EMail utilisé pour les retours d'erreurs des mails envoyés MAIN_MAIL_AUTOCOPY_TO= Envoyer systématiquement une copie cachée des mails envoyés à MAIN_DISABLE_ALL_MAILS= Désactiver globalement tout envoi de mails (pour mode test ou démos) MAIN_MAIL_SENDMODE= Méthode d'envoi des mails MAIN_MAIL_SMTPS_ID= SMTP Authentification ID si authentification SMTP requise MAIN_MAIL_SMTPS_PW= SMTP Authentification Password si authentification SMTP requise MAIN_MAIL_EMAIL_TLS= Utilisation du cryptage TLS (SSL) -MAIN_MAIL_EMAIL_INLINE_IMAGES= Possibilité d'intégrer les images dans les mails MAIN_DISABLE_ALL_SMS=Désactiver globalement tout envoi de Sms (pour mode test ou démos) MAIN_SMS_SENDMODE=Méthode d'envoi des SMS MAIN_MAIL_SMS_FROM=Numéro de téléphone par défaut pour envoi Sms @@ -854,6 +854,7 @@ MAIN_PROXY_USER=Login pour passer le serveur proxy mandataire MAIN_PROXY_PASS=Mot de passe pour passer le serveur proxy mandataire DefineHereComplementaryAttributes=Definissez ici la liste des attributs supplémentaire, non disponible en standard, et que vous voulez voir gérez sur les %s. ExtraFields=Attributs suplémentaires +SendingMailSetup=Configuration de l'envoi par mail ##### Module password generation= undefined PasswordGenerationStandard= Renvoie un mot de passe généré selon algorithme interne Dolibarr: 8 caractères, chiffres et caractères en minuscules mélangés. diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index 499a2507cf6..143737924e3 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -113,7 +113,9 @@ RulesVATDue=- Pour les services, le rapport inclut les TVA des factures dues, pa OptionVatInfoModuleComptabilite=Remarque : Pour les biens matériels, il faudrait utiliser la date de livraison pour être plus juste. PercentOfInvoice=%%/facture NotUsedForGoods=Non utilisé pour les biens +ProposalStats=Statistiques sur les propales OrderStats=Statistiques sur les commandes +InvoiceStats=Statistiques sur les factures Dispatch=Ventilation Dispatched=Ventilés ToDispatch=A ventiler diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 26a04f20d51..53195d78899 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -53,7 +53,7 @@ PredefinedMailContentSendOrder=Veuillez trouver ci-joint la commande __ORDERREF_ PredefinedMailContentSendSupplierOrder=Veuillez trouver ci-joint notre commande __ORDERREF__\n\nCordialement\n\n PredefinedMailContentSendSupplierInvoice=Veuillez trouver ci-joint la facture __FACREF__\n\nCordialement\n\n PredefinedMailContentSendShipping=Veuillez trouver ci-joint le bon d'expédition __SHIPPINGREF__\n\nCordialement\n\n -PredefinedMailContentSendFichInter=Veuillez trouver ci-joint le intervention __FICHINTERREF__\n\nCordialement\n\n +PredefinedMailContentSendFichInter=Veuillez trouver ci-joint la fiche d'intervention __FICHINTERREF__\n\nCordialement\n\n DemoDesc=Dolibarr est un logiciel de gestion d'activité (professionnelle ou associative) composé de modules fonctionnels indépendants et optionnels. Une démonstration qui inclut tous ces modules n'a pas de sens car les modules ne sont jamais tous utilisés en même temps. Aussi, plusieurs profils type de démo sont disponibles. ChooseYourDemoProfil=Veuillez choisir le profil de démo qui correspond le mieux à votre activité... DemoFundation=Gestion des adhérents d'une association diff --git a/htdocs/langs/it_IT/admin.lang b/htdocs/langs/it_IT/admin.lang index 7293a1f5af7..776f38f948c 100644 --- a/htdocs/langs/it_IT/admin.lang +++ b/htdocs/langs/it_IT/admin.lang @@ -1250,7 +1250,6 @@ ImportPostgreSqlCommand=%s %s mybackupfile.sql FullPathToPostgreSQLdumpCommand=Percorso completo pg_dump comando CurrentMenuHandler=Menu gestore corrente CurrentSmartphoneMenuHandler=Attuale gestore menu smartphone -MAIN_MAIL_EMAIL_INLINE_IMAGES=Capacità di integrare le immagini nelle e-mail MAIN_DISABLE_ALL_SMS=Disabilitare tutti spedizioni SMS (per scopi di test o demo) MAIN_SMS_SENDMODE=Metodo da utilizzare per inviare SMS MAIN_MAIL_SMS_FROM=Predefinito numero di telefono del mittente per l'invio di Sms diff --git a/htdocs/lib/CMailFile.class.php b/htdocs/lib/CMailFile.class.php index 020c8c45aae..bc068114740 100644 --- a/htdocs/lib/CMailFile.class.php +++ b/htdocs/lib/CMailFile.class.php @@ -25,7 +25,7 @@ /** * \file htdocs/lib/CMailFile.class.php * \brief File of class to send emails (with attachments or not) - * \version $Id: CMailFile.class.php,v 1.144 2011/07/08 17:33:00 hregis Exp $ + * \version $Id: CMailFile.class.php,v 1.145 2011/07/09 06:10:04 hregis Exp $ * \author Dan Potter. * \author Eric Seigne * \author Laurent Destailleur. @@ -349,7 +349,7 @@ class CMailFile // le return-path dans les header ne fonctionne pas avec tous les MTA // Le passage par -f est donc possible si la constante MAIN_MAIL_ALLOW_SENDMAIL_F est definie. // La variable definie pose des pb avec certains sendmail securisee (option -f refusee car dangereuse) - $bounce = $this->addr_from != '' ? '-f' . $this->addr_from : ''; + $bounce = (! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? '-f' . $conf->global->MAIN_MAIL_ERRORS_TO : ($this->addr_from != '' ? '-f' . $this->addr_from : '') ); } $this->message=stripslashes($this->message); diff --git a/htdocs/lib/ajax.lib.php b/htdocs/lib/ajax.lib.php index 7c88ae4ea94..1d6c000c6a1 100644 --- a/htdocs/lib/ajax.lib.php +++ b/htdocs/lib/ajax.lib.php @@ -21,7 +21,7 @@ /** * \file htdocs/lib/ajax.lib.php * \brief Page called by Ajax request for produts - * \version $Id$ + * \version $Id: ajax.lib.php,v 1.58 2011/07/10 18:24:18 hregis Exp $ */ @@ -219,13 +219,18 @@ function ajax_combobox($htmlname) /** * On/off button for constant * @param code Name of constant + * @param input Input element + * TODO add different method for other input (show/hide, disable, ..) */ -function ajax_constantonoff($code) +function ajax_constantonoff($code,$input=array()) { global $conf, $langs; $out= ''; @@ -177,7 +187,8 @@ print ''; $var=!$var; print ''; print $langs->trans("SecurityToken").''; -print ''; +print ''; +print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); print ''; $var=!$var; @@ -262,5 +273,5 @@ print info_admin($langs->trans("YouCanAddTagOnUrl")); $db->close(); -llxFooter('$Date: 2011/07/08 18:08:27 $ - $Revision: 1.21 $'); +llxFooter('$Date: 2011/07/09 08:05:08 $ - $Revision: 1.22 $'); ?> diff --git a/htdocs/product/ajaxproducts.php b/htdocs/product/ajaxproducts.php index 829e470ac2d..dc92b76134c 100644 --- a/htdocs/product/ajaxproducts.php +++ b/htdocs/product/ajaxproducts.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2007-2011 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -21,7 +21,7 @@ /** * \file htdocs/product/ajaxproducts.php * \brief File to return Ajax response on product list request - * \version $Id$ + * \version $Id: ajaxproducts.php,v 1.36 2011/07/10 17:28:10 hregis Exp $ */ if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); // Disables token renewal @@ -55,34 +55,34 @@ top_httphead(); //print ''."\n"; dol_syslog(join(',',$_GET)); +//print_r($_GET); -$match = preg_grep('/(idprod[0-9]+)/',array_keys($_GET)); +if (! isset($_GET['htmlname'])) return; + +$htmlname = $_GET['htmlname']; +$match = preg_grep('/('.$htmlname.'[0-9]+)/',array_keys($_GET)); sort($match); $idprod = $match[0]; -//print $_GET[$idprod]; -if (! isset($_GET['idprod']) && ! isset($_GET[$idprod]) && ! isset($_GET['idprodfournprice'])) return; +if (! isset($_GET[$htmlname]) && ! isset($_GET[$idprod])) return; // When used from jQuery, the search term is added as GET param "term". $searchkey=$_GET[$idprod]; -if (empty($searchkey)) $searchkey=$_GET['idprod']; -if (empty($searchkey)) $searchkey=$_GET['idprodfournprice']; +if (empty($searchkey)) $searchkey=$_GET[$htmlname]; $outjson=isset($_GET['outjson'])?$_GET['outjson']:0; // Get list of product. -//var_dump($_GET); exit; -//print $_GET["price_level"]; exit; $status=-1; if (isset($_GET['status'])) $status=$_GET['status']; $form = new Form($db); if (empty($_GET['mode']) || $_GET['mode'] == 1) { - $arrayresult=$form->select_produits_do("",$_GET["htmlname"],$_GET["type"],"",$_GET["price_level"],$searchkey,$status,2,$outjson); + $arrayresult=$form->select_produits_do("",$htmlname,$_GET["type"],"",$_GET["price_level"],$searchkey,$status,2,$outjson); } if ($_GET['mode'] == 2) { - $arrayresult=$form->select_produits_fournisseurs_do($_GET["socid"],"",$_GET["htmlname"],$_GET["type"],"",$searchkey,$status,$outjson); + $arrayresult=$form->select_produits_fournisseurs_do($_GET["socid"],"",$htmlname,$_GET["type"],"",$searchkey,$status,$outjson); } $db->close(); diff --git a/htdocs/product/canvas/default/product.default.class.php b/htdocs/product/canvas/default/product.default.class.php index 41e9b68fc61..9153bb34cb8 100644 --- a/htdocs/product/canvas/default/product.default.class.php +++ b/htdocs/product/canvas/default/product.default.class.php @@ -20,8 +20,9 @@ * \file htdocs/product/canvas/default/product.default.class.php * \ingroup produit * \brief Fichier de la classe des produits par defaut - * \version $Id$ + * \version $Id: product.default.class.php,v 1.40 2011/07/08 21:52:07 eldy Exp $ */ +include_once(DOL_DOCUMENT_ROOT.'/product/class/product.class.php'); /** * \class ProductDefault diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 2a4dd7b2b92..488efb23137 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -23,7 +23,7 @@ * \file htdocs/viewimage.php * \brief Wrapper to show images into Dolibarr screens * \remarks Call to wrapper is '' - * \version $Id: viewimage.php,v 1.94 2011/07/06 16:56:01 eldy Exp $ + * \version $Id: viewimage.php,v 1.95 2011/07/09 00:15:16 eldy Exp $ */ // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). @@ -44,7 +44,11 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Pour autre que companylogo, on charge environnement + info issus de logon comme le user if (($modulepart == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1'); -// C'est un wrapper, donc header vierge +/** + * Wrapper, donc header vierge + * + * @return null + */ function llxHeader() { } diff --git a/scripts/banks/build-graph-sold-example.php b/scripts/banks/build-graph-sold-example.php index de00b5c1c04..08cf68fd6bb 100644 --- a/scripts/banks/build-graph-sold-example.php +++ b/scripts/banks/build-graph-sold-example.php @@ -1,5 +1,5 @@ #!/usr/bin/php - * Copyright (C) 2006-2009 Laurent Destailleur @@ -24,7 +24,7 @@ * \ingroup banque * \brief Script to build graph of sold for each bank account * \deprecated Ce script n'est plus utilise car les graphiques sont generes dynamiquement maintenant. - * \version $Id: build-graph-sold-example.php,v 1.9 2011/07/08 14:54:35 eldy Exp $ + * \version $Id: build-graph-sold-example.php,v 1.10 2011/07/09 14:11:41 eldy Exp $ */ $sapi_type = php_sapi_name(); diff --git a/scripts/company/export-contacts-xls-example.php b/scripts/company/export-contacts-xls-example.php index 24c07fe61c9..009f7d6b482 100644 --- a/scripts/company/export-contacts-xls-example.php +++ b/scripts/company/export-contacts-xls-example.php @@ -1,4 +1,5 @@ - * Copyright (C) 2009 Laurent Destailleur @@ -22,7 +23,7 @@ * \file scripts/company/export-contacts-xls-example.php * \ingroup company * \brief Export third parties' contacts with emails - * \version $Id$ + * \version $Id: export-contacts-xls-example.php,v 1.7 2011/07/09 14:11:42 eldy Exp $ */ $sapi_type = php_sapi_name(); @@ -42,7 +43,7 @@ if (! isset($argv[1]) || ! $argv[1]) { $now=$argv[1]; // Recupere env dolibarr -$version='$Revision$'; +$version='$Revision: 1.7 $'; require_once("../../htdocs/master.inc.php"); require_once(PHP_WRITEEXCEL_PATH."/class.writeexcel_workbook.inc.php"); diff --git a/scripts/company/sync_contacts_dolibarr2ldap.php b/scripts/company/sync_contacts_dolibarr2ldap.php index 7d7c2f84ec7..2dd446eb842 100644 --- a/scripts/company/sync_contacts_dolibarr2ldap.php +++ b/scripts/company/sync_contacts_dolibarr2ldap.php @@ -1,4 +1,5 @@ - * Copyright (C) 2006-2009 Laurent Destailleur @@ -22,7 +23,7 @@ * \file scripts/company/sync_contacts_dolibarr2ldap.php * \ingroup ldap company * \brief Script to update all contacts from Dolibarr into a LDAP database - * \version $Id$ + * \version $Id: sync_contacts_dolibarr2ldap.php,v 1.23 2011/07/09 14:11:42 eldy Exp $ */ $sapi_type = php_sapi_name(); @@ -42,7 +43,7 @@ if (! isset($argv[1]) || ! $argv[1]) { $now=$argv[1]; // Recupere env dolibarr -$version='$Revision$'; +$version='$Revision: 1.23 $'; require_once($path."../../htdocs/master.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php"); diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index 6dc9046bfc5..8ee631df756 100644 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -1,5 +1,5 @@ #!/usr/bin/php - * Copyright (C) 2005-2009 Laurent Destailleur @@ -23,7 +23,7 @@ * \file scripts/invoices/email_unpaid_invoices_to_representatives.php * \ingroup facture * \brief Script to send a mail to dolibarr users linked to companies with unpaid invoices - * \version $Id$ + * \version $Id: email_unpaid_invoices_to_representatives.php,v 1.9 2011/07/09 14:11:41 eldy Exp $ */ $sapi_type = php_sapi_name(); diff --git a/scripts/invoices/rebuild_merge_pdf.php b/scripts/invoices/rebuild_merge_pdf.php index edfa13ac705..631f4475be6 100644 --- a/scripts/invoices/rebuild_merge_pdf.php +++ b/scripts/invoices/rebuild_merge_pdf.php @@ -1,5 +1,5 @@ #!/usr/bin/php - * @@ -22,7 +22,7 @@ * \file scripts/invoices/rebuild_merge_pdf.php * \ingroup facture * \brief Script to rebuild PDF and merge PDF files into one - * \version $Id$ + * \version $Id: rebuild_merge_pdf.php,v 1.20 2011/07/09 14:11:41 eldy Exp $ */ $sapi_type = php_sapi_name(); @@ -49,7 +49,7 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php'); $langs->load("main"); // Global variables -$version='$Revision$'; +$version='$Revision: 1.20 $'; $error=0; diff --git a/scripts/members/sync_members_dolibarr2ldap.php b/scripts/members/sync_members_dolibarr2ldap.php index 42ee711fc3f..3481510fdd3 100644 --- a/scripts/members/sync_members_dolibarr2ldap.php +++ b/scripts/members/sync_members_dolibarr2ldap.php @@ -1,4 +1,5 @@ - * Copyright (C) 2006-2008 Laurent Destailleur @@ -22,7 +23,7 @@ * \file scripts/members/sync_members_dolibarr2ldap.php * \ingroup ldap member * \brief Script de mise a jour des adherents dans LDAP depuis base Dolibarr - * \version $Id$ + * \version $Id: sync_members_dolibarr2ldap.php,v 1.9 2011/07/09 14:11:41 eldy Exp $ */ $sapi_type = php_sapi_name(); @@ -36,7 +37,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') { } // Main -$version='$Revision$'; +$version='$Revision: 1.9 $'; $path=str_replace($script_file,'',$_SERVER["PHP_SELF"]); @set_time_limit(0); $error=0; diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index 359ec7cd662..47aacc54898 100644 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -1,4 +1,5 @@ - * Copyright (C) 2006-2010 Laurent Destailleur @@ -22,7 +23,7 @@ * \file scripts/members/sync_members_ldap2dolibarr.php * \ingroup ldap member * \brief Script de mise a jour des adherents dans Dolibarr depuis LDAP - * \version $Id$ + * \version $Id: sync_members_ldap2dolibarr.php,v 1.12 2011/07/09 14:11:41 eldy Exp $ */ $sapi_type = php_sapi_name(); @@ -36,7 +37,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') { } // Main -$version='$Revision$'; +$version='$Revision: 1.12 $'; @set_time_limit(0); $error=0; $forcecommit=0; diff --git a/scripts/user/sync_groups_dolibarr2ldap.php b/scripts/user/sync_groups_dolibarr2ldap.php index 046225bcf8f..c98720713c3 100644 --- a/scripts/user/sync_groups_dolibarr2ldap.php +++ b/scripts/user/sync_groups_dolibarr2ldap.php @@ -1,4 +1,5 @@ - * Copyright (C) 2006 Laurent Destailleur @@ -22,7 +23,7 @@ * \file scripts/user/sync_groups_dolibarr2ldap.php * \ingroup ldap core * \brief Script de mise a jour des groupes dans LDAP depuis base Dolibarr - * \version $Id$ + * \version $Id: sync_groups_dolibarr2ldap.php,v 1.8 2011/07/09 14:11:42 eldy Exp $ */ $sapi_type = php_sapi_name(); @@ -42,7 +43,7 @@ if (! isset($argv[1]) || ! $argv[1]) { $now=$argv[1]; // Recupere env dolibarr -$version='$Revision$'; +$version='$Revision: 1.8 $'; require_once($path."../../htdocs/master.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php"); diff --git a/scripts/user/sync_users_dolibarr2ldap.php b/scripts/user/sync_users_dolibarr2ldap.php index 56d3ed149f2..cb18a18979a 100644 --- a/scripts/user/sync_users_dolibarr2ldap.php +++ b/scripts/user/sync_users_dolibarr2ldap.php @@ -1,4 +1,5 @@ - * Copyright (C) 2006 Laurent Destailleur @@ -22,7 +23,7 @@ * \file scripts/user/sync_users_dolibarr2ldap.php * \ingroup ldap core * \brief Script de mise a jour des users dans LDAP depuis base Dolibarr - * \version $Id$ + * \version $Id: sync_users_dolibarr2ldap.php,v 1.11 2011/07/09 14:11:42 eldy Exp $ */ $sapi_type = php_sapi_name(); @@ -42,7 +43,7 @@ if (! isset($argv[1]) || ! $argv[1]) { $now=$argv[1]; // Recupere env dolibarr -$version='$Revision$'; +$version='$Revision: 1.11 $'; require_once($path."../../htdocs/master.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php"); diff --git a/scripts/withdrawals/build_withdrawal_file.php b/scripts/withdrawals/build_withdrawal_file.php index b5bbf50eab5..d5853858189 100644 --- a/scripts/withdrawals/build_withdrawal_file.php +++ b/scripts/withdrawals/build_withdrawal_file.php @@ -1,4 +1,5 @@ - * Copyright (C) 2005-2010 Laurent Destailleur @@ -22,7 +23,7 @@ * \file scripts/withdrawals/build_withdrawal_file.php * \ingroup prelevement * \brief Script de prelevement - * \version $Id$ + * \version $Id: build_withdrawal_file.php,v 1.4 2011/07/09 14:11:41 eldy Exp $ */ $sapi_type = php_sapi_name(); @@ -36,7 +37,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') { } // Recupere env dolibarr -$version='$Revision$'; +$version='$Revision: 1.4 $'; require_once($path."../../htdocs/master.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/bon-prelevement.class.php"); diff --git a/test/README b/test/README index 75f248986b8..79a4cba739b 100644 --- a/test/README +++ b/test/README @@ -30,16 +30,31 @@ Note that xdebug must be installed for this feature to work. * Generate a report of Unit tests code coverage among all Dolibarr classes: Increase your PHP memory (memory_limit in php.ini) to 512MB. -Check that you use the "mysqli" driver in your conf.php file (otherwise -edit the file phpunittest.xml). +Check that you use the "mysqli" driver in your conf.php file (otherwise edit the file phpunittest.xml). +Remove all files into dolibarr root found with "find . | grep CVS\/Base\/ | grep \.php" > cd test -> phpunit -d memory_limit=-1 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml phpunit/AllTests.php +> phpunit -d memory_limit=-1 -d max_execution_time=0 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml phpunit/AllTests.php + +If there is a timeout before end, try this: +> cd test +> php -d max_input_time=0 -d max_execution_time=0 /usr/bin/phpunit -d memory_limit=-1 -d max_input_time=0 -d max_execution_time=0 --configuration ./phpunit/phpunittest.xml --coverage-html ./report phpunit/AllTests.php +puis renice -10 du process php + + + +PHP-CODESNIFFER +--------------- +* Install phpcs + +* Launch PHP-Codesniffer: +> cd test +> /usr/bin/php5 -c ./codesniffer/php.ini /usr/bin/phpcs --report=xml --standard=./codesniffer ../htdocs/test.php PHPDEPEND --------- -* Install PDepend +* Install pdepend * Launch PDepend analysis: > cd test diff --git a/test/codesniffer/php.ini b/test/codesniffer/php.ini new file mode 100755 index 00000000000..6f374340edd --- /dev/null +++ b/test/codesniffer/php.ini @@ -0,0 +1,1858 @@ +[PHP] + +; ************************ +: Need a special php.ini to allow usage of +; ************************ + +;;;;;;;;;;;;;;;;;;; +; About php.ini ; +;;;;;;;;;;;;;;;;;;; +; PHP's initialization file, generally called php.ini, is responsible for +; configuring many of the aspects of PHP's behavior. + +; PHP attempts to find and load this configuration from a number of locations. +; The following is a summary of its search order: +; 1. SAPI module specific location. +; 2. The PHPRC environment variable. (As of PHP 5.2.0) +; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) +; 4. Current working directory (except CLI) +; 5. The web server's directory (for SAPI modules), or directory of PHP +; (otherwise in Windows) +; 6. The directory from the --with-config-file-path compile time option, or the +; Windows directory (C:\windows or C:\winnt) +; See the PHP docs for more specific information. +; http://php.net/configuration.file + +; The syntax of the file is extremely simple. Whitespace and Lines +; beginning with a semicolon are silently ignored (as you probably guessed). +; Section headers (e.g. [Foo]) are also silently ignored, even though +; they might mean something in the future. + +; Directives following the section heading [PATH=/www/mysite] only +; apply to PHP files in the /www/mysite directory. Directives +; following the section heading [HOST=www.example.com] only apply to +; PHP files served from www.example.com. Directives set in these +; special sections cannot be overridden by user-defined INI files or +; at runtime. Currently, [PATH=] and [HOST=] sections only work under +; CGI/FastCGI. +; http://php.net/ini.sections + +; Directives are specified using the following syntax: +; directive = value +; Directive names are *case sensitive* - foo=bar is different from FOO=bar. +; Directives are variables used to configure PHP or PHP extensions. +; There is no name validation. If PHP can't find an expected +; directive because it is not set or is mistyped, a default value will be used. + +; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one +; of the INI constants (On, Off, True, False, Yes, No and None) or an expression +; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a +; previously set variable or directive (e.g. ${foo}) + +; Expressions in the INI file are limited to bitwise operators and parentheses: +; | bitwise OR +; ^ bitwise XOR +; & bitwise AND +; ~ bitwise NOT +; ! boolean NOT + +; Boolean flags can be turned on using the values 1, On, True or Yes. +; They can be turned off using the values 0, Off, False or No. + +; An empty string can be denoted by simply not writing anything after the equal +; sign, or by using the None keyword: + +; foo = ; sets foo to an empty string +; foo = None ; sets foo to an empty string +; foo = "None" ; sets foo to the string 'None' + +; If you use constants in your value, and these constants belong to a +; dynamically loaded extension (either a PHP extension or a Zend extension), +; you may only use these constants *after* the line that loads the extension. + +;;;;;;;;;;;;;;;;;;; +; About this file ; +;;;;;;;;;;;;;;;;;;; +; PHP comes packaged with two INI files. One that is recommended to be used +; in production environments and one that is recommended to be used in +; development environments. + +; php.ini-production contains settings which hold security, performance and +; best practices at its core. But please be aware, these settings may break +; compatibility with older or less security conscience applications. We +; recommending using the production ini in production and testing environments. + +; php.ini-development is very similar to its production variant, except it's +; much more verbose when it comes to errors. We recommending using the +; development version only in development environments as errors shown to +; application users can inadvertently leak otherwise secure information. + +;;;;;;;;;;;;;;;;;;; +; Quick Reference ; +;;;;;;;;;;;;;;;;;;; +; The following are all the settings which are different in either the production +; or development versions of the INIs with respect to PHP's default behavior. +; Please see the actual settings later in the document for more details as to why +; we recommend these changes in PHP's behavior. + +; allow_call_time_pass_reference +; Default Value: On +; Development Value: Off +; Production Value: Off + +; display_errors +; Default Value: On +; Development Value: On +; Production Value: Off + +; display_startup_errors +; Default Value: Off +; Development Value: On +; Production Value: Off + +; error_reporting +; Default Value: E_ALL & ~E_NOTICE +; Development Value: E_ALL | E_STRICT +; Production Value: E_ALL & ~E_DEPRECATED + +; html_errors +; Default Value: On +; Development Value: On +; Production value: Off + +; log_errors +; Default Value: Off +; Development Value: On +; Production Value: On + +; magic_quotes_gpc +; Default Value: On +; Development Value: Off +; Production Value: Off + +; max_input_time +; Default Value: -1 (Unlimited) +; Development Value: 60 (60 seconds) +; Production Value: 60 (60 seconds) + +; output_buffering +; Default Value: Off +; Development Value: 4096 +; Production Value: 4096 + +; register_argc_argv +; Default Value: On +; Development Value: Off +; Production Value: Off + +; register_long_arrays +; Default Value: On +; Development Value: Off +; Production Value: Off + +; request_order +; Default Value: None +; Development Value: "GP" +; Production Value: "GP" + +; session.bug_compat_42 +; Default Value: On +; Development Value: On +; Production Value: Off + +; session.bug_compat_warn +; Default Value: On +; Development Value: On +; Production Value: Off + +; session.gc_divisor +; Default Value: 100 +; Development Value: 1000 +; Production Value: 1000 + +; session.hash_bits_per_character +; Default Value: 4 +; Development Value: 5 +; Production Value: 5 + +; short_open_tag +; Default Value: On +; Development Value: Off +; Production Value: Off + +; track_errors +; Default Value: Off +; Development Value: On +; Production Value: Off + +; url_rewriter.tags +; Default Value: "a=href,area=href,frame=src,form=,fieldset=" +; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" +; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" + +; variables_order +; Default Value: "EGPCS" +; Development Value: "GPCS" +; Production Value: "GPCS" + +;;;;;;;;;;;;;;;;;;;; +; php.ini Options ; +;;;;;;;;;;;;;;;;;;;; +; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" +;user_ini.filename = ".user.ini" + +; To disable this feature set this option to empty value +;user_ini.filename = + +; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) +;user_ini.cache_ttl = 300 + +;;;;;;;;;;;;;;;;;;;; +; Language Options ; +;;;;;;;;;;;;;;;;;;;; + +; Enable the PHP scripting language engine under Apache. +; http://php.net/engine +engine = On + +; This directive determines whether or not PHP will recognize code between +; tags as PHP source which should be processed as such. It's been +; recommended for several years that you not use the short tag "short cut" and +; instead to use the full tag combination. With the wide spread use +; of XML and use of these tags by other languages, the server can become easily +; confused and end up parsing the wrong code in the wrong context. But because +; this short cut has been a feature for such a long time, it's currently still +; supported for backwards compatibility, but we recommend you don't use them. +; Default Value: On +; Development Value: Off +; Production Value: Off +; http://php.net/short-open-tag +short_open_tag = On + +; Allow ASP-style <% %> tags. +; http://php.net/asp-tags +asp_tags = Off + +; The number of significant digits displayed in floating point numbers. +; http://php.net/precision +precision = 14 + +; Enforce year 2000 compliance (will cause problems with non-compliant browsers) +; http://php.net/y2k-compliance +y2k_compliance = On + +; Output buffering is a mechanism for controlling how much output data +; (excluding headers and cookies) PHP should keep internally before pushing that +; data to the client. If your application's output exceeds this setting, PHP +; will send that data in chunks of roughly the size you specify. +; Turning on this setting and managing its maximum buffer size can yield some +; interesting side-effects depending on your application and web server. +; You may be able to send headers and cookies after you've already sent output +; through print or echo. You also may see performance benefits if your server is +; emitting less packets due to buffered output versus PHP streaming the output +; as it gets it. On production servers, 4096 bytes is a good setting for performance +; reasons. +; Note: Output buffering can also be controlled via Output Buffering Control +; functions. +; Possible Values: +; On = Enabled and buffer is unlimited. (Use with caution) +; Off = Disabled +; Integer = Enables the buffer and sets its maximum size in bytes. +; Note: This directive is hardcoded to Off for the CLI SAPI +; Default Value: Off +; Development Value: 4096 +; Production Value: 4096 +; http://php.net/output-buffering +output_buffering = 4096 + +; You can redirect all of the output of your scripts to a function. For +; example, if you set output_handler to "mb_output_handler", character +; encoding will be transparently converted to the specified encoding. +; Setting any output handler automatically turns on output buffering. +; Note: People who wrote portable scripts should not depend on this ini +; directive. Instead, explicitly set the output handler using ob_start(). +; Using this ini directive may cause problems unless you know what script +; is doing. +; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler" +; and you cannot use both "ob_gzhandler" and "zlib.output_compression". +; Note: output_handler must be empty if this is set 'On' !!!! +; Instead you must use zlib.output_handler. +; http://php.net/output-handler +;output_handler = + +; Transparent output compression using the zlib library +; Valid values for this option are 'off', 'on', or a specific buffer size +; to be used for compression (default is 4KB) +; Note: Resulting chunk size may vary due to nature of compression. PHP +; outputs chunks that are few hundreds bytes each as a result of +; compression. If you prefer a larger chunk size for better +; performance, enable output_buffering in addition. +; Note: You need to use zlib.output_handler instead of the standard +; output_handler, or otherwise the output will be corrupted. +; http://php.net/zlib.output-compression +zlib.output_compression = Off + +; http://php.net/zlib.output-compression-level +;zlib.output_compression_level = -1 + +; You cannot specify additional output handlers if zlib.output_compression +; is activated here. This setting does the same as output_handler but in +; a different order. +; http://php.net/zlib.output-handler +;zlib.output_handler = + +; Implicit flush tells PHP to tell the output layer to flush itself +; automatically after every output block. This is equivalent to calling the +; PHP function flush() after each and every call to print() or echo() and each +; and every HTML block. Turning this option on has serious performance +; implications and is generally recommended for debugging purposes only. +; http://php.net/implicit-flush +; Note: This directive is hardcoded to On for the CLI SAPI +implicit_flush = Off + +; The unserialize callback function will be called (with the undefined class' +; name as parameter), if the unserializer finds an undefined class +; which should be instantiated. A warning appears if the specified function is +; not defined, or if the function doesn't include/implement the missing class. +; So only set this entry, if you really want to implement such a +; callback-function. +unserialize_callback_func = + +; When floats & doubles are serialized store serialize_precision significant +; digits after the floating point. The default value ensures that when floats +; are decoded with unserialize, the data will remain the same. +serialize_precision = 100 + +; This directive allows you to enable and disable warnings which PHP will issue +; if you pass a value by reference at function call time. Passing values by +; reference at function call time is a deprecated feature which will be removed +; from PHP at some point in the near future. The acceptable method for passing a +; value by reference to a function is by declaring the reference in the functions +; definition, not at call time. This directive does not disable this feature, it +; only determines whether PHP will warn you about it or not. These warnings +; should enabled in development environments only. +; Default Value: On (Suppress warnings) +; Development Value: Off (Issue warnings) +; Production Value: Off (Issue warnings) +; http://php.net/allow-call-time-pass-reference +allow_call_time_pass_reference = Off + +; Safe Mode +; http://php.net/safe-mode +safe_mode = Off + +; By default, Safe Mode does a UID compare check when +; opening files. If you want to relax this to a GID compare, +; then turn on safe_mode_gid. +; http://php.net/safe-mode-gid +safe_mode_gid = Off + +; When safe_mode is on, UID/GID checks are bypassed when +; including files from this directory and its subdirectories. +; (directory must also be in include_path or full path must +; be used when including) +; http://php.net/safe-mode-include-dir +safe_mode_include_dir = + +; When safe_mode is on, only executables located in the safe_mode_exec_dir +; will be allowed to be executed via the exec family of functions. +; http://php.net/safe-mode-exec-dir +safe_mode_exec_dir = + +; Setting certain environment variables may be a potential security breach. +; This directive contains a comma-delimited list of prefixes. In Safe Mode, +; the user may only alter environment variables whose names begin with the +; prefixes supplied here. By default, users will only be able to set +; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR). +; Note: If this directive is empty, PHP will let the user modify ANY +; environment variable! +; http://php.net/safe-mode-allowed-env-vars +safe_mode_allowed_env_vars = PHP_ + +; This directive contains a comma-delimited list of environment variables that +; the end user won't be able to change using putenv(). These variables will be +; protected even if safe_mode_allowed_env_vars is set to allow to change them. +; http://php.net/safe-mode-protected-env-vars +safe_mode_protected_env_vars = LD_LIBRARY_PATH + +; open_basedir, if set, limits all file operations to the defined directory +; and below. This directive makes most sense if used in a per-directory +; or per-virtualhost web server configuration file. This directive is +; *NOT* affected by whether Safe Mode is turned On or Off. +; http://php.net/open-basedir +;open_basedir = + +; This directive allows you to disable certain functions for security reasons. +; It receives a comma-delimited list of function names. This directive is +; *NOT* affected by whether Safe Mode is turned On or Off. +; http://php.net/disable-functions +disable_functions = + +; This directive allows you to disable certain classes for security reasons. +; It receives a comma-delimited list of class names. This directive is +; *NOT* affected by whether Safe Mode is turned On or Off. +; http://php.net/disable-classes +disable_classes = + +; Colors for Syntax Highlighting mode. Anything that's acceptable in +; would work. +; http://php.net/syntax-highlighting +;highlight.string = #DD0000 +;highlight.comment = #FF9900 +;highlight.keyword = #007700 +;highlight.bg = #FFFFFF +;highlight.default = #0000BB +;highlight.html = #000000 + +; If enabled, the request will be allowed to complete even if the user aborts +; the request. Consider enabling it if executing long requests, which may end up +; being interrupted by the user or a browser timing out. PHP's default behavior +; is to disable this feature. +; http://php.net/ignore-user-abort +;ignore_user_abort = On + +; Determines the size of the realpath cache to be used by PHP. This value should +; be increased on systems where PHP opens many files to reflect the quantity of +; the file operations performed. +; http://php.net/realpath-cache-size +;realpath_cache_size = 16k + +; Duration of time, in seconds for which to cache realpath information for a given +; file or directory. For systems with rarely changing files, consider increasing this +; value. +; http://php.net/realpath-cache-ttl +;realpath_cache_ttl = 120 + +;;;;;;;;;;;;;;;;; +; Miscellaneous ; +;;;;;;;;;;;;;;;;; + +; Decides whether PHP may expose the fact that it is installed on the server +; (e.g. by adding its signature to the Web server header). It is no security +; threat in any way, but it makes it possible to determine whether you use PHP +; on your server or not. +; http://php.net/expose-php +expose_php = On + +;;;;;;;;;;;;;;;;;;; +; Resource Limits ; +;;;;;;;;;;;;;;;;;;; + +; Maximum execution time of each script, in seconds +; http://php.net/max-execution-time +; Note: This directive is hardcoded to 0 for the CLI SAPI +max_execution_time = 300 + +; Maximum amount of time each script may spend parsing request data. It's a good +; idea to limit this time on productions servers in order to eliminate unexpectedly +; long running scripts. +; Note: This directive is hardcoded to -1 for the CLI SAPI +; Default Value: -1 (Unlimited) +; Development Value: 60 (60 seconds) +; Production Value: 60 (60 seconds) +; http://php.net/max-input-time +max_input_time = 300 + +; Maximum input variable nesting level +; http://php.net/max-input-nesting-level +;max_input_nesting_level = 64 + +; Maximum amount of memory a script may consume (128MB) +; http://php.net/memory-limit +memory_limit = -1 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Error handling and logging ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; This directive informs PHP of which errors, warnings and notices you would like +; it to take action for. The recommended way of setting values for this +; directive is through the use of the error level constants and bitwise +; operators. The error level constants are below here for convenience as well as +; some common settings and their meanings. +; By default, PHP is set to take action on all errors, notices and warnings EXCEPT +; those related to E_NOTICE and E_STRICT, which together cover best practices and +; recommended coding standards in PHP. For performance reasons, this is the +; recommend error reporting setting. Your production server shouldn't be wasting +; resources complaining about best practices and coding standards. That's what +; development servers and development settings are for. +; Note: The php.ini-development file has this setting as E_ALL | E_STRICT. This +; means it pretty much reports everything which is exactly what you want during +; development and early testing. +; +; Error Level Constants: +; E_ALL - All errors and warnings (includes E_STRICT as of PHP 6.0.0) +; E_ERROR - fatal run-time errors +; E_RECOVERABLE_ERROR - almost fatal run-time errors +; E_WARNING - run-time warnings (non-fatal errors) +; E_PARSE - compile-time parse errors +; E_NOTICE - run-time notices (these are warnings which often result +; from a bug in your code, but it's possible that it was +; intentional (e.g., using an uninitialized variable and +; relying on the fact it's automatically initialized to an +; empty string) +; E_STRICT - run-time notices, enable to have PHP suggest changes +; to your code which will ensure the best interoperability +; and forward compatibility of your code +; E_CORE_ERROR - fatal errors that occur during PHP's initial startup +; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's +; initial startup +; E_COMPILE_ERROR - fatal compile-time errors +; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) +; E_USER_ERROR - user-generated error message +; E_USER_WARNING - user-generated warning message +; E_USER_NOTICE - user-generated notice message +; E_DEPRECATED - warn about code that will not work in future versions +; of PHP +; E_USER_DEPRECATED - user-generated deprecation warnings +; +; Common Values: +; E_ALL & ~E_NOTICE (Show all errors, except for notices and coding standards warnings.) +; E_ALL & ~E_NOTICE | E_STRICT (Show all errors, except for notices) +; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) +; E_ALL | E_STRICT (Show all errors, warnings and notices including coding standards.) +; Default Value: E_ALL & ~E_NOTICE +; Development Value: E_ALL | E_STRICT +; Production Value: E_ALL & ~E_DEPRECATED +; http://php.net/error-reporting +error_reporting = E_ALL & ~E_DEPRECATED + +; This directive controls whether or not and where PHP will output errors, +; notices and warnings too. Error output is very useful during development, but +; it could be very dangerous in production environments. Depending on the code +; which is triggering the error, sensitive information could potentially leak +; out of your application such as database usernames and passwords or worse. +; It's recommended that errors be logged on production servers rather than +; having the errors sent to STDOUT. +; Possible Values: +; Off = Do not display any errors +; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) +; On or stdout = Display errors to STDOUT +; Default Value: On +; Development Value: On +; Production Value: Off +; http://php.net/display-errors +display_errors = Off + +; The display of errors which occur during PHP's startup sequence are handled +; separately from display_errors. PHP's default behavior is to suppress those +; errors from clients. Turning the display of startup errors on can be useful in +; debugging configuration problems. But, it's strongly recommended that you +; leave this setting off on production servers. +; Default Value: Off +; Development Value: On +; Production Value: Off +; http://php.net/display-startup-errors +display_startup_errors = Off + +; Besides displaying errors, PHP can also log errors to locations such as a +; server-specific log, STDERR, or a location specified by the error_log +; directive found below. While errors should not be displayed on productions +; servers they should still be monitored and logging is a great way to do that. +; Default Value: Off +; Development Value: On +; Production Value: On +; http://php.net/log-errors +log_errors = On + +; Set maximum length of log_errors. In error_log information about the source is +; added. The default is 1024 and 0 allows to not apply any maximum length at all. +; http://php.net/log-errors-max-len +log_errors_max_len = 1024 + +; Do not log repeated messages. Repeated errors must occur in same file on same +; line unless ignore_repeated_source is set true. +; http://php.net/ignore-repeated-errors +ignore_repeated_errors = Off + +; Ignore source of message when ignoring repeated messages. When this setting +; is On you will not log errors with repeated messages from different files or +; source lines. +; http://php.net/ignore-repeated-source +ignore_repeated_source = Off + +; If this parameter is set to Off, then memory leaks will not be shown (on +; stdout or in the log). This has only effect in a debug compile, and if +; error reporting includes E_WARNING in the allowed list +; http://php.net/report-memleaks +report_memleaks = On + +; This setting is on by default. +;report_zend_debug = 0 + +; Store the last error/warning message in $php_errormsg (boolean). Setting this value +; to On can assist in debugging and is appropriate for development servers. It should +; however be disabled on production servers. +; Default Value: Off +; Development Value: On +; Production Value: Off +; http://php.net/track-errors +track_errors = Off + +; Turn off normal error reporting and emit XML-RPC error XML +; http://php.net/xmlrpc-errors +;xmlrpc_errors = 0 + +; An XML-RPC faultCode +;xmlrpc_error_number = 0 + +; When PHP displays or logs an error, it has the capability of inserting html +; links to documentation related to that error. This directive controls whether +; those HTML links appear in error messages or not. For performance and security +; reasons, it's recommended you disable this on production servers. +; Note: This directive is hardcoded to Off for the CLI SAPI +; Default Value: On +; Development Value: On +; Production value: Off +; http://php.net/html-errors +html_errors = Off + +; If html_errors is set On PHP produces clickable error messages that direct +; to a page describing the error or function causing the error in detail. +; You can download a copy of the PHP manual from http://php.net/docs +; and change docref_root to the base URL of your local copy including the +; leading '/'. You must also specify the file extension being used including +; the dot. PHP's default behavior is to leave these settings empty. +; Note: Never use this feature for production boxes. +; http://php.net/docref-root +; Examples +;docref_root = "/phpmanual/" + +; http://php.net/docref-ext +;docref_ext = .html + +; String to output before an error message. PHP's default behavior is to leave +; this setting blank. +; http://php.net/error-prepend-string +; Example: +;error_prepend_string = "" + +; String to output after an error message. PHP's default behavior is to leave +; this setting blank. +; http://php.net/error-append-string +; Example: +;error_append_string = "" + +; Log errors to specified file. PHP's default behavior is to leave this value +; empty. +; http://php.net/error-log +; Example: +;error_log = php_errors.log +; Log errors to syslog (Event Log on NT, not valid in Windows 95). +;error_log = syslog + +;;;;;;;;;;;;;;;;; +; Data Handling ; +;;;;;;;;;;;;;;;;; + +; The separator used in PHP generated URLs to separate arguments. +; PHP's default setting is "&". +; http://php.net/arg-separator.output +; Example: +;arg_separator.output = "&" + +; List of separator(s) used by PHP to parse input URLs into variables. +; PHP's default setting is "&". +; NOTE: Every character in this directive is considered as separator! +; http://php.net/arg-separator.input +; Example: +;arg_separator.input = ";&" + +; This directive determines which super global arrays are registered when PHP +; starts up. If the register_globals directive is enabled, it also determines +; what order variables are populated into the global space. G,P,C,E & S are +; abbreviations for the following respective super globals: GET, POST, COOKIE, +; ENV and SERVER. There is a performance penalty paid for the registration of +; these arrays and because ENV is not as commonly used as the others, ENV is +; is not recommended on productions servers. You can still get access to +; the environment variables through getenv() should you need to. +; Default Value: "EGPCS" +; Development Value: "GPCS" +; Production Value: "GPCS"; +; http://php.net/variables-order +variables_order = "GPCS" + +; This directive determines which super global data (G,P,C,E & S) should +; be registered into the super global array REQUEST. If so, it also determines +; the order in which that data is registered. The values for this directive are +; specified in the same manner as the variables_order directive, EXCEPT one. +; Leaving this value empty will cause PHP to use the value set in the +; variables_order directive. It does not mean it will leave the super globals +; array REQUEST empty. +; Default Value: None +; Development Value: "GP" +; Production Value: "GP" +; http://php.net/request-order +request_order = "GP" + +; Whether or not to register the EGPCS variables as global variables. You may +; want to turn this off if you don't want to clutter your scripts' global scope +; with user data. +; You should do your best to write your scripts so that they do not require +; register_globals to be on; Using form variables as globals can easily lead +; to possible security problems, if the code is not very well thought of. +; http://php.net/register-globals +register_globals = Off + +; Determines whether the deprecated long $HTTP_*_VARS type predefined variables +; are registered by PHP or not. As they are deprecated, we obviously don't +; recommend you use them. They are on by default for compatibility reasons but +; they are not recommended on production servers. +; Default Value: On +; Development Value: Off +; Production Value: Off +; http://php.net/register-long-arrays +register_long_arrays = Off + +; This directive determines whether PHP registers $argv & $argc each time it +; runs. $argv contains an array of all the arguments passed to PHP when a script +; is invoked. $argc contains an integer representing the number of arguments +; that were passed when the script was invoked. These arrays are extremely +; useful when running scripts from the command line. When this directive is +; enabled, registering these variables consumes CPU cycles and memory each time +; a script is executed. For performance reasons, this feature should be disabled +; on production servers. +; Note: This directive is hardcoded to On for the CLI SAPI +; Default Value: On +; Development Value: Off +; Production Value: Off +; http://php.net/register-argc-argv +register_argc_argv = Off + +; When enabled, the SERVER and ENV variables are created when they're first +; used (Just In Time) instead of when the script starts. If these variables +; are not used within a script, having this directive on will result in a +; performance gain. The PHP directives register_globals, register_long_arrays, +; and register_argc_argv must be disabled for this directive to have any affect. +; http://php.net/auto-globals-jit +auto_globals_jit = On + +; Maximum size of POST data that PHP will accept. +; http://php.net/post-max-size +post_max_size = 8M + +; Magic quotes are a preprocessing feature of PHP where PHP will attempt to +; escape any character sequences in GET, POST, COOKIE and ENV data which might +; otherwise corrupt data being placed in resources such as databases before +; making that data available to you. Because of character encoding issues and +; non-standard SQL implementations across many databases, it's not currently +; possible for this feature to be 100% accurate. PHP's default behavior is to +; enable the feature. We strongly recommend you use the escaping mechanisms +; designed specifically for the database your using instead of relying on this +; feature. Also note, this feature has been deprecated as of PHP 5.3.0 and is +; scheduled for removal in PHP 6. +; Default Value: On +; Development Value: Off +; Production Value: Off +; http://php.net/magic-quotes-gpc +magic_quotes_gpc = Off + +; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. +; http://php.net/magic-quotes-runtime +magic_quotes_runtime = Off + +; Use Sybase-style magic quotes (escape ' with '' instead of \'). +; http://php.net/magic-quotes-sybase +magic_quotes_sybase = Off + +; Automatically add files before PHP document. +; http://php.net/auto-prepend-file +auto_prepend_file = + +; Automatically add files after PHP document. +; http://php.net/auto-append-file +auto_append_file = + +; By default, PHP will output a character encoding using +; the Content-type: header. To disable sending of the charset, simply +; set it to be empty. +; +; PHP's built-in default is text/html +; http://php.net/default-mimetype +default_mimetype = "text/html" + +; PHP's default character set is set to empty. +; http://php.net/default-charset +;default_charset = "iso-8859-1" + +; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is +; to disable this feature. +; http://php.net/always-populate-raw-post-data +;always_populate_raw_post_data = On + +;;;;;;;;;;;;;;;;;;;;;;;;; +; Paths and Directories ; +;;;;;;;;;;;;;;;;;;;;;;;;; + +; UNIX: "/path1:/path2" +;include_path = ".:/usr/share/php" +; +; Windows: "\path1;\path2" +;include_path = ".;c:\php\includes" +; +; PHP's default setting for include_path is ".;/path/to/php/pear" +; http://php.net/include-path + +; The root of the PHP pages, used only if nonempty. +; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root +; if you are running php as a CGI under any web server (other than IIS) +; see documentation for security issues. The alternate is to use the +; cgi.force_redirect configuration below +; http://php.net/doc-root +doc_root = + +; The directory under which PHP opens the script using /~username used only +; if nonempty. +; http://php.net/user-dir +user_dir = + +; Directory in which the loadable extensions (modules) reside. +; http://php.net/extension-dir +; extension_dir = "./" +; On windows: +; extension_dir = "ext" + +; Whether or not to enable the dl() function. The dl() function does NOT work +; properly in multithreaded servers, such as IIS or Zeus, and is automatically +; disabled on them. +; http://php.net/enable-dl +enable_dl = Off + +; cgi.force_redirect is necessary to provide security running PHP as a CGI under +; most web servers. Left undefined, PHP turns this on by default. You can +; turn it off here AT YOUR OWN RISK +; **You CAN safely turn this off for IIS, in fact, you MUST.** +; http://php.net/cgi.force-redirect +;cgi.force_redirect = 1 + +; if cgi.nph is enabled it will force cgi to always sent Status: 200 with +; every request. PHP's default behavior is to disable this feature. +;cgi.nph = 1 + +; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape +; (iPlanet) web servers, you MAY need to set an environment variable name that PHP +; will look for to know it is OK to continue execution. Setting this variable MAY +; cause security issues, KNOW WHAT YOU ARE DOING FIRST. +; http://php.net/cgi.redirect-status-env +;cgi.redirect_status_env = ; + +; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's +; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok +; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting +; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting +; of zero causes PHP to behave as before. Default is 1. You should fix your scripts +; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. +; http://php.net/cgi.fix-pathinfo +;cgi.fix_pathinfo=1 + +; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate +; security tokens of the calling client. This allows IIS to define the +; security context that the request runs under. mod_fastcgi under Apache +; does not currently support this feature (03/17/2002) +; Set to 1 if running under IIS. Default is zero. +; http://php.net/fastcgi.impersonate +;fastcgi.impersonate = 1; + +; Disable logging through FastCGI connection. PHP's default behavior is to enable +; this feature. +;fastcgi.logging = 0 + +; cgi.rfc2616_headers configuration option tells PHP what type of headers to +; use when sending HTTP response code. If it's set 0 PHP sends Status: header that +; is supported by Apache. When this option is set to 1 PHP will send +; RFC2616 compliant header. +; Default is zero. +; http://php.net/cgi.rfc2616-headers +;cgi.rfc2616_headers = 0 + +;;;;;;;;;;;;;;;; +; File Uploads ; +;;;;;;;;;;;;;;;; + +; Whether to allow HTTP file uploads. +; http://php.net/file-uploads +file_uploads = On + +; Temporary directory for HTTP uploaded files (will use system default if not +; specified). +; http://php.net/upload-tmp-dir +;upload_tmp_dir = + +; Maximum allowed size for uploaded files. +; http://php.net/upload-max-filesize +upload_max_filesize = 2M + +; Maximum number of files that can be uploaded via a single request +max_file_uploads = 20 + +;;;;;;;;;;;;;;;;;; +; Fopen wrappers ; +;;;;;;;;;;;;;;;;;; + +; Whether to allow the treatment of URLs (like http:// or ftp://) as files. +; http://php.net/allow-url-fopen +allow_url_fopen = On + +; Whether to allow include/require to open URLs (like http:// or ftp://) as files. +; http://php.net/allow-url-include +allow_url_include = Off + +; Define the anonymous ftp password (your email address). PHP's default setting +; for this is empty. +; http://php.net/from +;from="john@doe.com" + +; Define the User-Agent string. PHP's default setting for this is empty. +; http://php.net/user-agent +;user_agent="PHP" + +; Default timeout for socket based streams (seconds) +; http://php.net/default-socket-timeout +default_socket_timeout = 60 + +; If your scripts have to deal with files from Macintosh systems, +; or you are running on a Mac and need to deal with files from +; unix or win32 systems, setting this flag will cause PHP to +; automatically detect the EOL character in those files so that +; fgets() and file() will work regardless of the source of the file. +; http://php.net/auto-detect-line-endings +;auto_detect_line_endings = Off + +;;;;;;;;;;;;;;;;;;;;;; +; Dynamic Extensions ; +;;;;;;;;;;;;;;;;;;;;;; + +; If you wish to have an extension loaded automatically, use the following +; syntax: +; +; extension=modulename.extension +; +; For example, on Windows: +; +; extension=msql.dll +; +; ... or under UNIX: +; +; extension=msql.so +; +; ... or with a path: +; +; extension=/path/to/extension/msql.so +; +; If you only provide the name of the extension, PHP will look for it in its +; default extension directory. +; + +;;;;;;;;;;;;;;;;;;; +; Module Settings ; +;;;;;;;;;;;;;;;;;;; + +include_path="/media/DATA/Mes Developpements/dolibarr/test/codesniffer:/media/DATA/Mes Developpements/dolibarr/test:/home/ldestail/.eclipse/org.eclipse.platform_3.5.0_155965261/plugins/org.phpsrc.eclipse.pti.tools.codesniffer_1.2.6.R20100912000000/php/tools:/home/ldestail/.eclipse/org.eclipse.platform_3.5.0_155965261/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20110627000000/php/library:/home/ldestail/.eclipse/org.eclipse.platform_3.5.0_155965261/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20110627000000/php/library/PEAR" +[Date] +; Defines the default timezone used by the date functions +; http://php.net/date.timezone +;date.timezone = + +; http://php.net/date.default-latitude +;date.default_latitude = 31.7667 + +; http://php.net/date.default-longitude +;date.default_longitude = 35.2333 + +; http://php.net/date.sunrise-zenith +;date.sunrise_zenith = 90.583333 + +; http://php.net/date.sunset-zenith +;date.sunset_zenith = 90.583333 + +[filter] +; http://php.net/filter.default +;filter.default = unsafe_raw + +; http://php.net/filter.default-flags +;filter.default_flags = + +[iconv] +;iconv.input_encoding = ISO-8859-1 +;iconv.internal_encoding = ISO-8859-1 +;iconv.output_encoding = ISO-8859-1 + +[intl] +;intl.default_locale = +; This directive allows you to produce PHP errors when some error +; happens within intl functions. The value is the level of the error produced. +; Default is 0, which does not produce any errors. +;intl.error_level = E_WARNING + +[sqlite] +; http://php.net/sqlite.assoc-case +;sqlite.assoc_case = 0 + +[sqlite3] +;sqlite3.extension_dir = + +[Pcre] +;PCRE library backtracking limit. +; http://php.net/pcre.backtrack-limit +;pcre.backtrack_limit=100000 + +;PCRE library recursion limit. +;Please note that if you set this value to a high number you may consume all +;the available process stack and eventually crash PHP (due to reaching the +;stack size limit imposed by the Operating System). +; http://php.net/pcre.recursion-limit +;pcre.recursion_limit=100000 + +[Pdo] +; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" +; http://php.net/pdo-odbc.connection-pooling +;pdo_odbc.connection_pooling=strict + +;pdo_odbc.db2_instance_name + +[Pdo_mysql] +; If mysqlnd is used: Number of cache slots for the internal result set cache +; http://php.net/pdo_mysql.cache_size +pdo_mysql.cache_size = 2000 + +; Default socket name for local MySQL connects. If empty, uses the built-in +; MySQL defaults. +; http://php.net/pdo_mysql.default-socket +pdo_mysql.default_socket= + +[Phar] +; http://php.net/phar.readonly +;phar.readonly = On + +; http://php.net/phar.require-hash +;phar.require_hash = On + +;phar.cache_list = + +[Syslog] +; Whether or not to define the various syslog variables (e.g. $LOG_PID, +; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In +; runtime, you can define these variables by calling define_syslog_variables(). +; http://php.net/define-syslog-variables +define_syslog_variables = Off + +[mail function] +; For Win32 only. +; http://php.net/smtp +SMTP = localhost +; http://php.net/smtp-port +smtp_port = 25 + +; For Win32 only. +; http://php.net/sendmail-from +;sendmail_from = me@example.com + +; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). +; http://php.net/sendmail-path +;sendmail_path = + +; Force the addition of the specified parameters to be passed as extra parameters +; to the sendmail binary. These parameters will always replace the value of +; the 5th parameter to mail(), even in safe mode. +;mail.force_extra_parameters = + +; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename +mail.add_x_header = On + +; The path to a log file that will log all mail() calls. Log entries include +; the full path of the script, line number, To address and headers. +;mail.log = + +[SQL] +; http://php.net/sql.safe-mode +sql.safe_mode = Off + +[ODBC] +; http://php.net/odbc.default-db +;odbc.default_db = Not yet implemented + +; http://php.net/odbc.default-user +;odbc.default_user = Not yet implemented + +; http://php.net/odbc.default-pw +;odbc.default_pw = Not yet implemented + +; Controls the ODBC cursor model. +; Default: SQL_CURSOR_STATIC (default). +;odbc.default_cursortype + +; Allow or prevent persistent links. +; http://php.net/odbc.allow-persistent +odbc.allow_persistent = On + +; Check that a connection is still valid before reuse. +; http://php.net/odbc.check-persistent +odbc.check_persistent = On + +; Maximum number of persistent links. -1 means no limit. +; http://php.net/odbc.max-persistent +odbc.max_persistent = -1 + +; Maximum number of links (persistent + non-persistent). -1 means no limit. +; http://php.net/odbc.max-links +odbc.max_links = -1 + +; Handling of LONG fields. Returns number of bytes to variables. 0 means +; passthru. +; http://php.net/odbc.defaultlrl +odbc.defaultlrl = 4096 + +; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. +; See the documentation on odbc_binmode and odbc_longreadlen for an explanation +; of odbc.defaultlrl and odbc.defaultbinmode +; http://php.net/odbc.defaultbinmode +odbc.defaultbinmode = 1 + +;birdstep.max_links = -1 + +[Interbase] +; Allow or prevent persistent links. +ibase.allow_persistent = 1 + +; Maximum number of persistent links. -1 means no limit. +ibase.max_persistent = -1 + +; Maximum number of links (persistent + non-persistent). -1 means no limit. +ibase.max_links = -1 + +; Default database name for ibase_connect(). +;ibase.default_db = + +; Default username for ibase_connect(). +;ibase.default_user = + +; Default password for ibase_connect(). +;ibase.default_password = + +; Default charset for ibase_connect(). +;ibase.default_charset = + +; Default timestamp format. +ibase.timestampformat = "%Y-%m-%d %H:%M:%S" + +; Default date format. +ibase.dateformat = "%Y-%m-%d" + +; Default time format. +ibase.timeformat = "%H:%M:%S" + +[MySQL] +; Allow accessing, from PHP's perspective, local files with LOAD DATA statements +; http://php.net/mysql.allow_local_infile +mysql.allow_local_infile = On + +; Allow or prevent persistent links. +; http://php.net/mysql.allow-persistent +mysql.allow_persistent = On + +; If mysqlnd is used: Number of cache slots for the internal result set cache +; http://php.net/mysql.cache_size +mysql.cache_size = 2000 + +; Maximum number of persistent links. -1 means no limit. +; http://php.net/mysql.max-persistent +mysql.max_persistent = -1 + +; Maximum number of links (persistent + non-persistent). -1 means no limit. +; http://php.net/mysql.max-links +mysql.max_links = -1 + +; Default port number for mysql_connect(). If unset, mysql_connect() will use +; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the +; compile-time value defined MYSQL_PORT (in that order). Win32 will only look +; at MYSQL_PORT. +; http://php.net/mysql.default-port +mysql.default_port = + +; Default socket name for local MySQL connects. If empty, uses the built-in +; MySQL defaults. +; http://php.net/mysql.default-socket +mysql.default_socket = + +; Default host for mysql_connect() (doesn't apply in safe mode). +; http://php.net/mysql.default-host +mysql.default_host = + +; Default user for mysql_connect() (doesn't apply in safe mode). +; http://php.net/mysql.default-user +mysql.default_user = + +; Default password for mysql_connect() (doesn't apply in safe mode). +; Note that this is generally a *bad* idea to store passwords in this file. +; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password") +; and reveal this password! And of course, any users with read access to this +; file will be able to reveal the password as well. +; http://php.net/mysql.default-password +mysql.default_password = + +; Maximum time (in seconds) for connect timeout. -1 means no limit +; http://php.net/mysql.connect-timeout +mysql.connect_timeout = 60 + +; Trace mode. When trace_mode is active (=On), warnings for table/index scans and +; SQL-Errors will be displayed. +; http://php.net/mysql.trace-mode +mysql.trace_mode = Off + +[MySQLi] + +; Maximum number of persistent links. -1 means no limit. +; http://php.net/mysqli.max-persistent +mysqli.max_persistent = -1 + +; Allow accessing, from PHP's perspective, local files with LOAD DATA statements +; http://php.net/mysqli.allow_local_infile +;mysqli.allow_local_infile = On + +; Allow or prevent persistent links. +; http://php.net/mysqli.allow-persistent +mysqli.allow_persistent = On + +; Maximum number of links. -1 means no limit. +; http://php.net/mysqli.max-links +mysqli.max_links = -1 + +; If mysqlnd is used: Number of cache slots for the internal result set cache +; http://php.net/mysqli.cache_size +mysqli.cache_size = 2000 + +; Default port number for mysqli_connect(). If unset, mysqli_connect() will use +; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the +; compile-time value defined MYSQL_PORT (in that order). Win32 will only look +; at MYSQL_PORT. +; http://php.net/mysqli.default-port +mysqli.default_port = 3306 + +; Default socket name for local MySQL connects. If empty, uses the built-in +; MySQL defaults. +; http://php.net/mysqli.default-socket +mysqli.default_socket = + +; Default host for mysql_connect() (doesn't apply in safe mode). +; http://php.net/mysqli.default-host +mysqli.default_host = + +; Default user for mysql_connect() (doesn't apply in safe mode). +; http://php.net/mysqli.default-user +mysqli.default_user = + +; Default password for mysqli_connect() (doesn't apply in safe mode). +; Note that this is generally a *bad* idea to store passwords in this file. +; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") +; and reveal this password! And of course, any users with read access to this +; file will be able to reveal the password as well. +; http://php.net/mysqli.default-pw +mysqli.default_pw = + +; Allow or prevent reconnect +mysqli.reconnect = Off + +[mysqlnd] +; Enable / Disable collection of general statstics by mysqlnd which can be +; used to tune and monitor MySQL operations. +; http://php.net/mysqlnd.collect_statistics +mysqlnd.collect_statistics = On + +; Enable / Disable collection of memory usage statstics by mysqlnd which can be +; used to tune and monitor MySQL operations. +; http://php.net/mysqlnd.collect_memory_statistics +mysqlnd.collect_memory_statistics = Off + +; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. +; http://php.net/mysqlnd.net_cmd_buffer_size +;mysqlnd.net_cmd_buffer_size = 2048 + +; Size of a pre-allocated buffer used for reading data sent by the server in +; bytes. +; http://php.net/mysqlnd.net_read_buffer_size +;mysqlnd.net_read_buffer_size = 32768 + +[OCI8] + +; Connection: Enables privileged connections using external +; credentials (OCI_SYSOPER, OCI_SYSDBA) +; http://php.net/oci8.privileged-connect +;oci8.privileged_connect = Off + +; Connection: The maximum number of persistent OCI8 connections per +; process. Using -1 means no limit. +; http://php.net/oci8.max-persistent +;oci8.max_persistent = -1 + +; Connection: The maximum number of seconds a process is allowed to +; maintain an idle persistent connection. Using -1 means idle +; persistent connections will be maintained forever. +; http://php.net/oci8.persistent-timeout +;oci8.persistent_timeout = -1 + +; Connection: The number of seconds that must pass before issuing a +; ping during oci_pconnect() to check the connection validity. When +; set to 0, each oci_pconnect() will cause a ping. Using -1 disables +; pings completely. +; http://php.net/oci8.ping-interval +;oci8.ping_interval = 60 + +; Connection: Set this to a user chosen connection class to be used +; for all pooled server requests with Oracle 11g Database Resident +; Connection Pooling (DRCP). To use DRCP, this value should be set to +; the same string for all web servers running the same application, +; the database pool must be configured, and the connection string must +; specify to use a pooled server. +;oci8.connection_class = + +; High Availability: Using On lets PHP receive Fast Application +; Notification (FAN) events generated when a database node fails. The +; database must also be configured to post FAN events. +;oci8.events = Off + +; Tuning: This option enables statement caching, and specifies how +; many statements to cache. Using 0 disables statement caching. +; http://php.net/oci8.statement-cache-size +;oci8.statement_cache_size = 20 + +; Tuning: Enables statement prefetching and sets the default number of +; rows that will be fetched automatically after statement execution. +; http://php.net/oci8.default-prefetch +;oci8.default_prefetch = 100 + +; Compatibility. Using On means oci_close() will not close +; oci_connect() and oci_new_connect() connections. +; http://php.net/oci8.old-oci-close-semantics +;oci8.old_oci_close_semantics = Off + +[PostgresSQL] +; Allow or prevent persistent links. +; http://php.net/pgsql.allow-persistent +pgsql.allow_persistent = On + +; Detect broken persistent links always with pg_pconnect(). +; Auto reset feature requires a little overheads. +; http://php.net/pgsql.auto-reset-persistent +pgsql.auto_reset_persistent = Off + +; Maximum number of persistent links. -1 means no limit. +; http://php.net/pgsql.max-persistent +pgsql.max_persistent = -1 + +; Maximum number of links (persistent+non persistent). -1 means no limit. +; http://php.net/pgsql.max-links +pgsql.max_links = -1 + +; Ignore PostgreSQL backends Notice message or not. +; Notice message logging require a little overheads. +; http://php.net/pgsql.ignore-notice +pgsql.ignore_notice = 0 + +; Log PostgreSQL backends Notice message or not. +; Unless pgsql.ignore_notice=0, module cannot log notice message. +; http://php.net/pgsql.log-notice +pgsql.log_notice = 0 + +[Sybase-CT] +; Allow or prevent persistent links. +; http://php.net/sybct.allow-persistent +sybct.allow_persistent = On + +; Maximum number of persistent links. -1 means no limit. +; http://php.net/sybct.max-persistent +sybct.max_persistent = -1 + +; Maximum number of links (persistent + non-persistent). -1 means no limit. +; http://php.net/sybct.max-links +sybct.max_links = -1 + +; Minimum server message severity to display. +; http://php.net/sybct.min-server-severity +sybct.min_server_severity = 10 + +; Minimum client message severity to display. +; http://php.net/sybct.min-client-severity +sybct.min_client_severity = 10 + +; Set per-context timeout +; http://php.net/sybct.timeout +;sybct.timeout= + +;sybct.packet_size + +; The maximum time in seconds to wait for a connection attempt to succeed before returning failure. +; Default: one minute +;sybct.login_timeout= + +; The name of the host you claim to be connecting from, for display by sp_who. +; Default: none +;sybct.hostname= + +; Allows you to define how often deadlocks are to be retried. -1 means "forever". +; Default: 0 +;sybct.deadlock_retry_count= + +[bcmath] +; Number of decimal digits for all bcmath functions. +; http://php.net/bcmath.scale +bcmath.scale = 0 + +[browscap] +; http://php.net/browscap +;browscap = extra/browscap.ini + +[Session] +; Handler used to store/retrieve data. +; http://php.net/session.save-handler +session.save_handler = files + +; Argument passed to save_handler. In the case of files, this is the path +; where data files are stored. Note: Windows users have to change this +; variable in order to use PHP's session functions. +; +; The path can be defined as: +; +; session.save_path = "N;/path" +; +; where N is an integer. Instead of storing all the session files in +; /path, what this will do is use subdirectories N-levels deep, and +; store the session data in those directories. This is useful if you +; or your OS have problems with lots of files in one directory, and is +; a more efficient layout for servers that handle lots of sessions. +; +; NOTE 1: PHP will not create this directory structure automatically. +; You can use the script in the ext/session dir for that purpose. +; NOTE 2: See the section on garbage collection below if you choose to +; use subdirectories for session storage +; +; The file storage module creates files using mode 600 by default. +; You can change that by using +; +; session.save_path = "N;MODE;/path" +; +; where MODE is the octal representation of the mode. Note that this +; does not overwrite the process's umask. +; http://php.net/session.save-path +;session.save_path = "/tmp" + +; Whether to use cookies. +; http://php.net/session.use-cookies +session.use_cookies = 1 + +; http://php.net/session.cookie-secure +;session.cookie_secure = + +; This option forces PHP to fetch and use a cookie for storing and maintaining +; the session id. We encourage this operation as it's very helpful in combatting +; session hijacking when not specifying and managing your own session id. It is +; not the end all be all of session hijacking defense, but it's a good start. +; http://php.net/session.use-only-cookies +session.use_only_cookies = 1 + +; Name of the session (used as cookie name). +; http://php.net/session.name +session.name = PHPSESSID + +; Initialize session on request startup. +; http://php.net/session.auto-start +session.auto_start = 0 + +; Lifetime in seconds of cookie or, if 0, until browser is restarted. +; http://php.net/session.cookie-lifetime +session.cookie_lifetime = 0 + +; The path for which the cookie is valid. +; http://php.net/session.cookie-path +session.cookie_path = / + +; The domain for which the cookie is valid. +; http://php.net/session.cookie-domain +session.cookie_domain = + +; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript. +; http://php.net/session.cookie-httponly +session.cookie_httponly = + +; Handler used to serialize data. php is the standard serializer of PHP. +; http://php.net/session.serialize-handler +session.serialize_handler = php + +; Defines the probability that the 'garbage collection' process is started +; on every session initialization. The probability is calculated by using +; gc_probability/gc_divisor. Where session.gc_probability is the numerator +; and gc_divisor is the denominator in the equation. Setting this value to 1 +; when the session.gc_divisor value is 100 will give you approximately a 1% chance +; the gc will run on any give request. +; Default Value: 1 +; Development Value: 1 +; Production Value: 1 +; http://php.net/session.gc-probability +session.gc_probability = 1 + +; Defines the probability that the 'garbage collection' process is started on every +; session initialization. The probability is calculated by using the following equation: +; gc_probability/gc_divisor. Where session.gc_probability is the numerator and +; session.gc_divisor is the denominator in the equation. Setting this value to 1 +; when the session.gc_divisor value is 100 will give you approximately a 1% chance +; the gc will run on any give request. Increasing this value to 1000 will give you +; a 0.1% chance the gc will run on any give request. For high volume production servers, +; this is a more efficient approach. +; Default Value: 100 +; Development Value: 1000 +; Production Value: 1000 +; http://php.net/session.gc-divisor +session.gc_divisor = 1000 + +; After this number of seconds, stored data will be seen as 'garbage' and +; cleaned up by the garbage collection process. +; http://php.net/session.gc-maxlifetime +session.gc_maxlifetime = 1440 + +; NOTE: If you are using the subdirectory option for storing session files +; (see session.save_path above), then garbage collection does *not* +; happen automatically. You will need to do your own garbage +; collection through a shell script, cron entry, or some other method. +; For example, the following script would is the equivalent of +; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): +; find /path/to/sessions -cmin +24 | xargs rm + +; PHP 4.2 and less have an undocumented feature/bug that allows you to +; to initialize a session variable in the global scope, even when register_globals +; is disabled. PHP 4.3 and later will warn you, if this feature is used. +; You can disable the feature and the warning separately. At this time, +; the warning is only displayed, if bug_compat_42 is enabled. This feature +; introduces some serious security problems if not handled correctly. It's +; recommended that you do not use this feature on production servers. But you +; should enable this on development servers and enable the warning as well. If you +; do not enable the feature on development servers, you won't be warned when it's +; used and debugging errors caused by this can be difficult to track down. +; Default Value: On +; Development Value: On +; Production Value: Off +; http://php.net/session.bug-compat-42 +session.bug_compat_42 = Off + +; This setting controls whether or not you are warned by PHP when initializing a +; session value into the global space. session.bug_compat_42 must be enabled before +; these warnings can be issued by PHP. See the directive above for more information. +; Default Value: On +; Development Value: On +; Production Value: Off +; http://php.net/session.bug-compat-warn +session.bug_compat_warn = Off + +; Check HTTP Referer to invalidate externally stored URLs containing ids. +; HTTP_REFERER has to contain this substring for the session to be +; considered as valid. +; http://php.net/session.referer-check +session.referer_check = + +; How many bytes to read from the file. +; http://php.net/session.entropy-length +session.entropy_length = 0 + +; Specified here to create the session id. +; http://php.net/session.entropy-file +; On systems that don't have /dev/urandom /dev/arandom can be used +; On windows, setting the entropy_length setting will activate the +; Windows random source (using the CryptoAPI) +;session.entropy_file = /dev/urandom + +; Set to {nocache,private,public,} to determine HTTP caching aspects +; or leave this empty to avoid sending anti-caching headers. +; http://php.net/session.cache-limiter +session.cache_limiter = nocache + +; Document expires after n minutes. +; http://php.net/session.cache-expire +session.cache_expire = 180 + +; trans sid support is disabled by default. +; Use of trans sid may risk your users security. +; Use this option with caution. +; - User may send URL contains active session ID +; to other person via. email/irc/etc. +; - URL that contains active session ID may be stored +; in publically accessible computer. +; - User may access your site with the same session ID +; always using URL stored in browser's history or bookmarks. +; http://php.net/session.use-trans-sid +session.use_trans_sid = 0 + +; Select a hash function for use in generating session ids. +; Possible Values +; 0 (MD5 128 bits) +; 1 (SHA-1 160 bits) +; This option may also be set to the name of any hash function supported by +; the hash extension. A list of available hashes is returned by the hash_algos() +; function. +; http://php.net/session.hash-function +session.hash_function = 0 + +; Define how many bits are stored in each character when converting +; the binary hash data to something readable. +; Possible values: +; 4 (4 bits: 0-9, a-f) +; 5 (5 bits: 0-9, a-v) +; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") +; Default Value: 4 +; Development Value: 5 +; Production Value: 5 +; http://php.net/session.hash-bits-per-character +session.hash_bits_per_character = 5 + +; The URL rewriter will look for URLs in a defined set of HTML tags. +; form/fieldset are special; if you include them here, the rewriter will +; add a hidden field with the info which is otherwise appended +; to URLs. If you want XHTML conformity, remove the form entry. +; Note that all valid entries require a "=", even if no value follows. +; Default Value: "a=href,area=href,frame=src,form=,fieldset=" +; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" +; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" +; http://php.net/url-rewriter.tags +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" + +[MSSQL] +; Allow or prevent persistent links. +mssql.allow_persistent = On + +; Maximum number of persistent links. -1 means no limit. +mssql.max_persistent = -1 + +; Maximum number of links (persistent+non persistent). -1 means no limit. +mssql.max_links = -1 + +; Minimum error severity to display. +mssql.min_error_severity = 10 + +; Minimum message severity to display. +mssql.min_message_severity = 10 + +; Compatibility mode with old versions of PHP 3.0. +mssql.compatability_mode = Off + +; Connect timeout +;mssql.connect_timeout = 5 + +; Query timeout +;mssql.timeout = 60 + +; Valid range 0 - 2147483647. Default = 4096. +;mssql.textlimit = 4096 + +; Valid range 0 - 2147483647. Default = 4096. +;mssql.textsize = 4096 + +; Limits the number of records in each batch. 0 = all records in one batch. +;mssql.batchsize = 0 + +; Specify how datetime and datetim4 columns are returned +; On => Returns data converted to SQL server settings +; Off => Returns values as YYYY-MM-DD hh:mm:ss +;mssql.datetimeconvert = On + +; Use NT authentication when connecting to the server +mssql.secure_connection = Off + +; Specify max number of processes. -1 = library default +; msdlib defaults to 25 +; FreeTDS defaults to 4096 +;mssql.max_procs = -1 + +; Specify client character set. +; If empty or not set the client charset from freetds.comf is used +; This is only used when compiled with FreeTDS +;mssql.charset = "ISO-8859-1" + +[Assertion] +; Assert(expr); active by default. +; http://php.net/assert.active +;assert.active = On + +; Issue a PHP warning for each failed assertion. +; http://php.net/assert.warning +;assert.warning = On + +; Don't bail out by default. +; http://php.net/assert.bail +;assert.bail = Off + +; User-function to be called if an assertion fails. +; http://php.net/assert.callback +;assert.callback = 0 + +; Eval the expression with current error_reporting(). Set to true if you want +; error_reporting(0) around the eval(). +; http://php.net/assert.quiet-eval +;assert.quiet_eval = 0 + +[COM] +; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs +; http://php.net/com.typelib-file +;com.typelib_file = + +; allow Distributed-COM calls +; http://php.net/com.allow-dcom +;com.allow_dcom = true + +; autoregister constants of a components typlib on com_load() +; http://php.net/com.autoregister-typelib +;com.autoregister_typelib = true + +; register constants casesensitive +; http://php.net/com.autoregister-casesensitive +;com.autoregister_casesensitive = false + +; show warnings on duplicate constant registrations +; http://php.net/com.autoregister-verbose +;com.autoregister_verbose = true + +; The default character set code-page to use when passing strings to and from COM objects. +; Default: system ANSI code page +;com.code_page= + +[mbstring] +; language for internal character representation. +; http://php.net/mbstring.language +;mbstring.language = Japanese + +; internal/script encoding. +; Some encoding cannot work as internal encoding. +; (e.g. SJIS, BIG5, ISO-2022-*) +; http://php.net/mbstring.internal-encoding +;mbstring.internal_encoding = EUC-JP + +; http input encoding. +; http://php.net/mbstring.http-input +;mbstring.http_input = auto + +; http output encoding. mb_output_handler must be +; registered as output buffer to function +; http://php.net/mbstring.http-output +;mbstring.http_output = SJIS + +; enable automatic encoding translation according to +; mbstring.internal_encoding setting. Input chars are +; converted to internal encoding by setting this to On. +; Note: Do _not_ use automatic encoding translation for +; portable libs/applications. +; http://php.net/mbstring.encoding-translation +;mbstring.encoding_translation = Off + +; automatic encoding detection order. +; auto means +; http://php.net/mbstring.detect-order +;mbstring.detect_order = auto + +; substitute_character used when character cannot be converted +; one from another +; http://php.net/mbstring.substitute-character +;mbstring.substitute_character = none; + +; overload(replace) single byte functions by mbstring functions. +; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), +; etc. Possible values are 0,1,2,4 or combination of them. +; For example, 7 for overload everything. +; 0: No overload +; 1: Overload mail() function +; 2: Overload str*() functions +; 4: Overload ereg*() functions +; http://php.net/mbstring.func-overload +;mbstring.func_overload = 0 + +; enable strict encoding detection. +;mbstring.strict_detection = Off + +; This directive specifies the regex pattern of content types for which mb_output_handler() +; is activated. +; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) +;mbstring.http_output_conv_mimetype= + +; Allows to set script encoding. Only affects if PHP is compiled with --enable-zend-multibyte +; Default: "" +;mbstring.script_encoding= + +[gd] +; Tell the jpeg decode to ignore warnings and try to create +; a gd image. The warning will then be displayed as notices +; disabled by default +; http://php.net/gd.jpeg-ignore-warning +;gd.jpeg_ignore_warning = 0 + +[exif] +; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. +; With mbstring support this will automatically be converted into the encoding +; given by corresponding encode setting. When empty mbstring.internal_encoding +; is used. For the decode settings you can distinguish between motorola and +; intel byte order. A decode setting cannot be empty. +; http://php.net/exif.encode-unicode +;exif.encode_unicode = ISO-8859-15 + +; http://php.net/exif.decode-unicode-motorola +;exif.decode_unicode_motorola = UCS-2BE + +; http://php.net/exif.decode-unicode-intel +;exif.decode_unicode_intel = UCS-2LE + +; http://php.net/exif.encode-jis +;exif.encode_jis = + +; http://php.net/exif.decode-jis-motorola +;exif.decode_jis_motorola = JIS + +; http://php.net/exif.decode-jis-intel +;exif.decode_jis_intel = JIS + +[Tidy] +; The path to a default tidy configuration file to use when using tidy +; http://php.net/tidy.default-config +;tidy.default_config = /usr/local/lib/php/default.tcfg + +; Should tidy clean and repair output automatically? +; WARNING: Do not use this option if you are generating non-html content +; such as dynamic images +; http://php.net/tidy.clean-output +tidy.clean_output = Off + +[soap] +; Enables or disables WSDL caching feature. +; http://php.net/soap.wsdl-cache-enabled +soap.wsdl_cache_enabled=1 + +; Sets the directory name where SOAP extension will put cache files. +; http://php.net/soap.wsdl-cache-dir +soap.wsdl_cache_dir="/tmp" + +; (time to live) Sets the number of second while cached file will be used +; instead of original one. +; http://php.net/soap.wsdl-cache-ttl +soap.wsdl_cache_ttl=86400 + +; Sets the size of the cache limit. (Max. number of WSDL files to cache) +soap.wsdl_cache_limit = 5 + +[sysvshm] +; A default size of the shared memory segment +;sysvshm.init_mem = 10000 + +[ldap] +; Sets the maximum number of open links or -1 for unlimited. +ldap.max_links = -1 + +[mcrypt] +; For more information about mcrypt settings see http://php.net/mcrypt-module-open + +; Directory where to load mcrypt algorithms +; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) +;mcrypt.algorithms_dir= + +; Directory where to load mcrypt modes +; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) +;mcrypt.modes_dir= + +[dba] +;dba.default_handler= + +; Local Variables: +; tab-width: 4 +; End: diff --git a/test/phpunit/phpunittest.xml b/test/phpunit/phpunittest.xml index eee177bc1ad..d9d90bcd8a5 100644 --- a/test/phpunit/phpunittest.xml +++ b/test/phpunit/phpunittest.xml @@ -4,9 +4,16 @@ ../CVS/ + ../../build/ + ../../dev/ + ../../doc/ + ../../htdocs/CVS/ ../../test/ ../../htdocs/custom/ ../../htdocs/custom2/ + ../../htdocs/products/canvas/ + ../../htdocs/contact/canvas/ + ../../htdocs/societe/canvas/ ../../htdocs/includes/adodbtime/ ../../htdocs/includes/artichow/ ../../htdocs/includes/barcode/php-barcode/ @@ -43,9 +50,16 @@ ../../htdocs/includes/modules/fichinter/modules_fichinter.php ../CVS/ + ../../build/ + ../../dev/ + ../../doc/ + ../../htdocs/CVS/ ../../test/ ../../htdocs/custom/ ../../htdocs/custom2/ + ../../htdocs/products/canvas/ + ../../htdocs/contact/canvas/ + ../../htdocs/societe/canvas/ ../../htdocs/includes/adodbtime/ ../../htdocs/includes/artichow/ ../../htdocs/includes/barcode/php-barcode/