diff --git a/dev/tools/fixdosfiles.sh b/dev/tools/fixdosfiles.sh
index 5fcacd8e2fd..e4ccb1485e1 100755
--- a/dev/tools/fixdosfiles.sh
+++ b/dev/tools/fixdosfiles.sh
@@ -17,14 +17,14 @@ fi
# To detec
if [ "x$1" = "xlist" ]
then
- find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep CRLF
-# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'htdocs\/includes' | grep CRLF
+ find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'documents\/website' | grep CRLF
+# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'documents\/website' | grep -v 'htdocs\/includes' | grep CRLF
fi
# To convert
if [ "x$1" = "xfix" ]
then
- for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep CRLF | awk -F':' '{ print $1 }' `
+ for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'documents\/website' | grep CRLF | awk -F':' '{ print $1 }' `
do
echo "Fix file $fic"
dos2unix "$fic"
diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php
index e6c4010ebdd..177f173c60a 100644
--- a/htdocs/accountancy/journal/bankjournal.php
+++ b/htdocs/accountancy/journal/bankjournal.php
@@ -933,9 +933,18 @@ if (empty($action) || $action == 'view') {
print '
';
// TODO Avoid using js. We can use a direct link with $param
diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php
index 5e1f42503e0..f462662e3f6 100644
--- a/htdocs/admin/mails_templates.php
+++ b/htdocs/admin/mails_templates.php
@@ -607,10 +607,16 @@ if ($resql)
$i = 0;
$param = '&id='.$id;
+ if ($search_label) $param.= '&search_label='.urlencode($search_label);
+ if ($search_lang > 0) $param.= '&search_lang='.urlencode($search_lang);
+ if ($search_type_template > 0) $param.= '&search_type_template='.urlencode($search_type_template);
+ if ($search_fk_user > 0) $param.= '&search_fk_user='.urlencode($search_fk_user);
+ if ($search_topic) $param.= '&search_topic='.urlencode($search_topic);
+
$paramwithsearch = $param;
- if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder;
- if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield;
- if (GETPOST('from')) $paramwithsearch.= '&from='.GETPOST('from','alpha');
+ if ($sortorder) $paramwithsearch.= '&sortorder='.urlencode($sortorder);
+ if ($sortfield) $paramwithsearch.= '&sortfield='.urlencode($sortfield);
+ if (GETPOST('from','alpha')) $paramwithsearch.= '&from='.urlencode(GETPOST('from','alpha'));
// There is several pages
if ($num > $listlimit)
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index dad9f2bc404..871225012ba 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1143,8 +1143,8 @@ class Form
$sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.client, s.fournisseur, s.code_client, s.code_fournisseur";
if ($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST) {
- $sql .= " ,s.address, s.zip, s.town";
- $sql .= " , dictp.code as country_code";
+ $sql .= ", s.address, s.zip, s.town";
+ $sql .= ", dictp.code as country_code";
}
$sql.= " FROM (".MAIN_DB_PREFIX ."societe as s";
diff --git a/htdocs/includes/swiftmailer/lib/swiftmailer_generate_mimes_config.php b/htdocs/includes/swiftmailer/lib/swiftmailer_generate_mimes_config.php
old mode 100755
new mode 100644
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index e8ff47bfe8d..fcc416b9858 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -916,7 +916,7 @@ if ((! empty($conf->browser->layout) && $conf->browser->layout == 'phone')
// If we force to use jmobile, then we reenable javascript
if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
// Replace themes bugged with jmobile with eldy
-if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea','cameleo','amarok')))
+if (! empty($conf->dol_use_jmobile) && in_array($conf->theme, array('bureau2crea','cameleo','amarok')))
{
$conf->theme='eldy';
$conf->css = "/theme/".$conf->theme."/style.css.php";
diff --git a/htdocs/modulebuilder/template/scripts/myobject.php b/htdocs/modulebuilder/template/scripts/myobject.php
old mode 100755
new mode 100644