Merge branch 'develop' of git://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
671837bfcc
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#------------------------------------------------------
|
|
||||||
# Script to find files that are not Unix encoded
|
|
||||||
#
|
|
||||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
|
||||||
#------------------------------------------------------
|
|
||||||
# Usage: finddosfiles.sh
|
|
||||||
#------------------------------------------------------
|
|
||||||
|
|
||||||
# To detec
|
|
||||||
find . -type f -iname "*.php" -exec file "{}" + | grep CRLF
|
|
||||||
|
|
||||||
# To convert
|
|
||||||
#find . -type f -iname "*.php" -exec dos2unix "{}" +;
|
|
||||||
|
|
||||||
30
dev/fixdosfiles.sh
Executable file
30
dev/fixdosfiles.sh
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------
|
||||||
|
# Script to find files that are not Unix encoded
|
||||||
|
#
|
||||||
|
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||||
|
#------------------------------------------------------
|
||||||
|
# Usage: fixdosfiles.sh [list|fix]
|
||||||
|
#------------------------------------------------------
|
||||||
|
|
||||||
|
# Syntax
|
||||||
|
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||||
|
then
|
||||||
|
echo "Usage: fixdosfiles.sh [list|fix]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# To detec
|
||||||
|
if [ "x$1" = "xlist" ]
|
||||||
|
then
|
||||||
|
find . -type f -iname "*.php" -exec file "{}" + | 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 }' `
|
||||||
|
do
|
||||||
|
echo "Fix file $fic"
|
||||||
|
dos2unix $fic
|
||||||
|
done;
|
||||||
|
fi
|
||||||
@ -161,7 +161,7 @@ if ($action == 'edit')
|
|||||||
{
|
{
|
||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
|
|
||||||
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=sms_manager">DoliStore</a>').'</div>';
|
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=smsmanager">DoliStore</a>').'</div>';
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -217,7 +217,7 @@ else
|
|||||||
{
|
{
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=sms_manager">DoliStore</a>').'</div>';
|
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=smsmanager">DoliStore</a>').'</div>';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|||||||
@ -42,7 +42,7 @@ function dol_basename($pathfile)
|
|||||||
* @param string $path Starting path from which to search
|
* @param string $path Starting path from which to search
|
||||||
* @param string $types Can be "directories", "files", or "all"
|
* @param string $types Can be "directories", "files", or "all"
|
||||||
* @param int $recursive Determines whether subdirectories are searched
|
* @param int $recursive Determines whether subdirectories are searched
|
||||||
* @param string $filter Regex for include filter
|
* @param string $filter Regex filter to restrict list. This regex value must be escaped for '/', since this char is used for preg_match function
|
||||||
* @param string $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.'))
|
* @param string $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.'))
|
||||||
* @param string $sortcriteria Sort criteria ("","fullname","name","date","size")
|
* @param string $sortcriteria Sort criteria ("","fullname","name","date","size")
|
||||||
* @param string $sortorder Sort order (SORT_ASC, SORT_DESC)
|
* @param string $sortorder Sort order (SORT_ASC, SORT_DESC)
|
||||||
@ -1212,11 +1212,11 @@ function dol_uncompress($inputfile,$outputdir)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return most recent file
|
* Return file(s) into a directory (by default most recent)
|
||||||
*
|
*
|
||||||
* @param string $dir Directory to scan
|
* @param string $dir Directory to scan
|
||||||
* @param string $regexfilter Regexfilter
|
* @param string $regexfilter Regex filter to restrict list. This regex value must be escaped for '/', since this char is used for preg_match function
|
||||||
* @param string $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.'))
|
* @param string $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.')). This regex value must be escaped for '/', since this char is used for preg_match function
|
||||||
* @param int $nohook Disable all hooks
|
* @param int $nohook Disable all hooks
|
||||||
* @return string Full path to most recent file
|
* @return string Full path to most recent file
|
||||||
*/
|
*/
|
||||||
@ -1225,4 +1225,5 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('\.meta$
|
|||||||
$tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,'',$nohook);
|
$tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,'',$nohook);
|
||||||
return $tmparray[0];
|
return $tmparray[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user