Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
78210d951d
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# run with
|
# Scan for new official sources and download file
|
||||||
# debian/get-orig-source.sh [x.y.z]
|
# run with debian/get-orig-source.sh [x.y.z]
|
||||||
|
|
||||||
tmpdir=$(mktemp -d)
|
tmpdir=$(mktemp -d)
|
||||||
echo "tmpdir = $tmpdir"
|
echo "tmpdir = $tmpdir"
|
||||||
@ -13,28 +13,11 @@ uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_
|
|||||||
cd $tmpdir
|
cd $tmpdir
|
||||||
|
|
||||||
tgzfile=$(echo *.tgz)
|
tgzfile=$(echo *.tgz)
|
||||||
version=$(echo "$tgzfile" | perl -pi -e 's/^dolibarr_//; s/\.zip$//; s/_/./g; s/\+nmu1//; ')
|
version=$(echo "$tgzfile" | perl -pi -e 's/^dolibarr-//; s/\.tgz$//; s/_/./g; s/\+nmu1//; ')
|
||||||
|
|
||||||
# Extract the zip file
|
|
||||||
tar -xvf $tgzfile
|
|
||||||
srcdir=$(find . -maxdepth 1 -mindepth 1 -type d | sed -e 's/\.\///')
|
|
||||||
|
|
||||||
if [ ! -d "$srcdir" ]; then
|
|
||||||
echo "ERROR: Failed to identify the extracted directory in $tmpdir (got $srcdir)" >&2
|
|
||||||
rm -rf $tmpdir
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Repack as tar.xz
|
|
||||||
tar Jcf dolibarr_${version}.orig.tar.xz $srcdir
|
|
||||||
|
|
||||||
cd - >/dev/null
|
cd - >/dev/null
|
||||||
|
|
||||||
if [ -e ../dolibarr_${version}.orig.tar.xz ]; then
|
mv $tmpdir/dolibarr-${version}.tgz ../
|
||||||
echo "Not overwriting ../dolibarr_${version}.orig.tar.xz";
|
echo "File ../dolibarr-${version}.tgz is ready for git-import"
|
||||||
else
|
|
||||||
echo "Created ../dolibarr_${version}.orig.tar.xz"
|
|
||||||
mv $tmpdir/dolibarr_${version}.orig.tar.xz ../
|
|
||||||
fi
|
|
||||||
|
|
||||||
#rm -rf $tmpdir
|
rm -rf $tmpdir
|
||||||
|
|||||||
@ -37,8 +37,6 @@ htdocs/customleave
|
|||||||
htdocs/customgoogle
|
htdocs/customgoogle
|
||||||
htdocs/document
|
htdocs/document
|
||||||
htdocs/documents
|
htdocs/documents
|
||||||
htdocs/includes/ckeditor/_source
|
|
||||||
htdocs/includes/ckeditor/*_source.js
|
|
||||||
htdocs/includes/fckeditor/_samples
|
htdocs/includes/fckeditor/_samples
|
||||||
htdocs/includes/fckeditor/_testcases
|
htdocs/includes/fckeditor/_testcases
|
||||||
htdocs/includes/nusoap/samples
|
htdocs/includes/nusoap/samples
|
||||||
|
|||||||
@ -3478,16 +3478,18 @@ function dol_html_entity_decode($a,$b,$c='UTF-8')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace htmlentities functions to manage errors
|
* Replace htmlentities functions to manage errors
|
||||||
|
* http://php.net/manual/en/function.htmlentities.php
|
||||||
*
|
*
|
||||||
* @param string $a Operand a
|
* @param string $string The input string.
|
||||||
* @param string $b Operand b
|
* @param int $flags Flags(see PHP doc above)
|
||||||
* @param string $c Operand c
|
* @param string $encoding Encoding
|
||||||
* @return string String encoded
|
* @param bool $double_encode When double_encode is turned off PHP will not encode existing html entities
|
||||||
|
* @return string $ret Encoded string
|
||||||
*/
|
*/
|
||||||
function dol_htmlentities($a,$b,$c='UTF-8')
|
function dol_htmlentities($string, $flags=null, $encoding='UTF-8', $double_encode=false)
|
||||||
{
|
{
|
||||||
// We use @ to avoid warning on PHP4 that does not support entity decoding to UTF8;
|
// We use @ to avoid warning on PHP4 that does not support entity decoding to UTF8;
|
||||||
$ret=@htmlentities($a,$b,$c);
|
$ret=@htmlentities($string, $flags, $encoding, $double_encode);
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1665,6 +1665,41 @@ class Societe extends CommonObject
|
|||||||
return $contacts;
|
return $contacts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renvoie la liste des contacts de cette societe
|
||||||
|
*
|
||||||
|
* @return array $contacts tableau des contacts
|
||||||
|
*/
|
||||||
|
function contact_array_objects()
|
||||||
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||||
|
$contacts = array();
|
||||||
|
|
||||||
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = '".$this->id."'";
|
||||||
|
$resql=$this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$nump = $this->db->num_rows($resql);
|
||||||
|
if ($nump)
|
||||||
|
{
|
||||||
|
$i = 0;
|
||||||
|
while ($i < $nump)
|
||||||
|
{
|
||||||
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
$contact = new Contact($this->db);
|
||||||
|
$contact->fetch($obj->rowid);
|
||||||
|
$contacts[] = $contact;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($this->db);
|
||||||
|
}
|
||||||
|
return $contacts;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return property of contact from its id
|
* Return property of contact from its id
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user