diff --git a/dev/findutf8bom.sh b/dev/findutf8bom.sh deleted file mode 100755 index b7e290fec84..00000000000 --- a/dev/findutf8bom.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# -# Checks if files contains UTF-8 BOM -# in dolibarr source tree excluding -# git repository, custom modules and incuded libraries -# -# Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr -grep -rlI \ ---exclude-dir='.git' --exclude-dir='includes' --exclude-dir='custom' \ -$'\xEF\xBB\xBF' . diff --git a/dev/fixdosfiles.sh b/dev/fixdosfiles.sh index da1e1a12af5..ac4a305834c 100755 --- a/dev/fixdosfiles.sh +++ b/dev/fixdosfiles.sh @@ -16,13 +16,13 @@ fi # To detec if [ "x$1" = "xlist" ] then - find . -type f -iname "*.php" -exec file "{}" + | grep CRLF + find . -iname "*.php" -o -iname "*.sh" -o -iname "*.pl" -o -iname "*.lang" -o -iname "*.txt" -exec file "{}" + | grep -v 'htdocs\/includes' | grep CRLF fi # To convert if [ "x$1" = "xfix" ] then - for fic in `find . -type f -iname "*.php" -exec file "{}" + | grep CRLF | awk -F':' '{ print $1 }' ` + for fic in `find . -iname "*.php" -o -iname "*.sh" -o -iname "*.pl" -o -iname "*.lang" -o -iname "*.txt" -exec file "{}" + | grep -v 'htdocs\/includes' | grep CRLF | awk -F':' '{ print $1 }' ` do echo "Fix file $fic" dos2unix $fic diff --git a/dev/fixutf8bomfiles.sh b/dev/fixutf8bomfiles.sh new file mode 100755 index 00000000000..058c1c8a483 --- /dev/null +++ b/dev/fixutf8bomfiles.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Checks of fix files contains UTF-8 BOM in dolibarr source tree, +# excluding git repository, custom modules and included libraries. +# +# Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr +# Laurent Destailleur eldy@users.sourceforge.net +#------------------------------------------------------ +# Usage: fixutf8bomfiles.sh [list|fix] +#------------------------------------------------------ + +# Syntax +if [ "x$1" != "xlist" -a "x$1" != "xfix" ] +then + echo "Usage: fixutf8bomfiles.sh [list|fix]" +fi + +# To detec +if [ "x$1" = "xlist" ] +then + #find . -iname '*.php' -print0 -o -iname '*.sh' -print0 -o -iname '*.pl' -print0 -o -iname '*.lang' -print0 -o -iname '*.txt' -print0 | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}' + grep -rlIZ --include='*.php' --include='*.sh' --include='*.pl' --include='*.lang' --include='*.txt' --exclude-dir='.git' --exclude-dir='includes' --exclude-dir='custom' . . | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}' +fi + +# To convert +if [ "x$1" = "xfix" ] +then + for fic in `grep -rlIZ --include='*.php' --include='*.sh' --include='*.pl' --include='*.lang' --include='*.txt' --exclude-dir='.git' --exclude-dir='includes' --exclude-dir='custom' . . | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'` + do + echo "Fixing $fic" + sed -i '1s/^\xEF\xBB\xBF//' $fic + done; +fi diff --git a/dev/removeutf8bom.sh b/dev/removeutf8bom.sh deleted file mode 100755 index 54924c51d49..00000000000 --- a/dev/removeutf8bom.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# Removes UTF-8 BOM from a file list on STDIN -# Use by piping the output of a findutf8bom script -# -# Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr -# -# Example: -# cd dirwithfiles -# ls | /path/dev/removeutf8bom.sh - -while read f; do - echo "Fixing $f" - sed -i '1s/^\xEF\xBB\xBF//' $f -done diff --git a/htdocs/core/login/README.txt b/htdocs/core/login/README.txt index 7c00a86887f..8128dfacd57 100644 --- a/htdocs/core/login/README.txt +++ b/htdocs/core/login/README.txt @@ -1,26 +1,26 @@ -README (english) ---------------------------------------------- -Decription of htdocs/core/login directory ---------------------------------------------- - -This directory contains files that handle way to validate passwords. - -If you want to add a new password checker function, just add a file in -this directory that follow example of already existing files. -This file must be called for example : -functions_mypasschecker.php - -Edit function name to call it: -check_user_mypasschecker - -Change code of this function to return true if couple -$usertotest / $passwordtotest is ok for you. - -Then, you must edit you conf.php file to change the value of -$dolibarr_main_authentication -parameter to set it to : -mypasschecker - -Once this is done, when you log in to Dolibarr, the function -check_user_mypasschecker in this file is called. -If the function return true and login exists, login is accepted. +README (english) +--------------------------------------------- +Decription of htdocs/core/login directory +--------------------------------------------- + +This directory contains files that handle way to validate passwords. + +If you want to add a new password checker function, just add a file in +this directory that follow example of already existing files. +This file must be called for example : +functions_mypasschecker.php + +Edit function name to call it: +check_user_mypasschecker + +Change code of this function to return true if couple +$usertotest / $passwordtotest is ok for you. + +Then, you must edit you conf.php file to change the value of +$dolibarr_main_authentication +parameter to set it to : +mypasschecker + +Once this is done, when you log in to Dolibarr, the function +check_user_mypasschecker in this file is called. +If the function return true and login exists, login is accepted. diff --git a/htdocs/langs/pt_PT/admin.lang b/htdocs/langs/pt_PT/admin.lang index a3de0cb68dd..a1af76ae0c1 100644 --- a/htdocs/langs/pt_PT/admin.lang +++ b/htdocs/langs/pt_PT/admin.lang @@ -1,5 +1,5 @@ # Dolibarr language file - pt_PT - admin -CHARSET = UTF-8 +CHARSET = UTF-8 AccountCodeManager = Módulo de geração dos códigos contabilisticos (Clientes/Fornecedores) ActivateFCKeditor = Activar FCKeditor para : ActivateOn = Activar sobre