Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2013-07-04 00:12:23 +02:00
commit 7cb8809669
5 changed files with 15 additions and 7 deletions

View File

@ -56,7 +56,8 @@ $contactid=GETPOST('contactid','int');
$socid = GETPOST('socid','int'); $socid = GETPOST('socid','int');
$id = GETPOST('id','int'); $id = GETPOST('id','int');
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions&allactions', '', 'id'); $result = restrictedArea($user,'societe',$id,'&societe');
//$result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions&allactions', '', 'id');
$error=GETPOST("error"); $error=GETPOST("error");
$mesg=''; $mesg='';

View File

@ -65,16 +65,21 @@ function image_format_supported($file)
* Return size of image file on disk (Supported extensions are gif, jpg, png and bmp) * Return size of image file on disk (Supported extensions are gif, jpg, png and bmp)
* *
* @param string $file Full path name of file * @param string $file Full path name of file
* @param bool $url Image with url (true or false)
* @return array array('width'=>width, 'height'=>height) * @return array array('width'=>width, 'height'=>height)
*/ */
function dol_getImageSize($file) function dol_getImageSize($file, $url = false)
{ {
$ret=array(); $ret=array();
if (image_format_supported($file) < 0) return $ret; if (image_format_supported($file) < 0) return $ret;
$fichier = $file;
if (!$url)
{
$fichier = realpath($file); // Chemin canonique absolu de l'image $fichier = realpath($file); // Chemin canonique absolu de l'image
$dir = dirname($file); // Chemin du dossier contenant l'image $dir = dirname($file); // Chemin du dossier contenant l'image
}
$infoImg = getimagesize($fichier); // Recuperation des infos de l'image $infoImg = getimagesize($fichier); // Recuperation des infos de l'image
$ret['width']=$infoImg[0]; // Largeur de l'image $ret['width']=$infoImg[0]; // Largeur de l'image

View File

@ -261,13 +261,14 @@ function pdf_getPDFFontSize($outputlangs)
* Return height to use for Logo onot PDF * Return height to use for Logo onot PDF
* *
* @param string $logo Full path to logo file to use * @param string $logo Full path to logo file to use
* @param bool $url Image with url (true or false)
* @return number * @return number
*/ */
function pdf_getHeightForLogo($logo) function pdf_getHeightForLogo($logo, $url = false)
{ {
$height=22; $maxwidth=130; $height=22; $maxwidth=130;
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
$tmp=dol_getImageSize($logo); $tmp=dol_getImageSize($logo, $url);
if ($tmp['height']) if ($tmp['height'])
{ {
$width=round($height*$tmp['width']/$tmp['height']); $width=round($height*$tmp['width']/$tmp['height']);

View File

@ -106,6 +106,7 @@ print "</table>\n";
$langs->load("commercial"); $langs->load("commercial");
$langs->load("bills"); $langs->load("bills");
$langs->load("orders"); $langs->load("orders");
$langs->load("contracts");
//print memory_get_usage(); //print memory_get_usage();
if ($user->societe_id == 0) if ($user->societe_id == 0)

View File

@ -957,7 +957,7 @@ a.tabTitle img {
} }
a.tab { a.tab {
padding: 5px 12px 5px; padding: 5px 12px 2px;
margin: 0em 0.2em; margin: 0em 0.2em;
background-color:rgba(0,0,0,.2); background-color:rgba(0,0,0,.2);
color:#666666; color:#666666;