Merge remote-tracking branch 'origin/3.3' into 3.4

Conflicts:
	htdocs/contact/class/contact.class.php
	htdocs/margin/agentMargins.php
	htdocs/margin/tabs/productMargins.php
This commit is contained in:
Laurent Destailleur 2013-05-07 13:08:30 +02:00
commit 8a82c8c5d5
6 changed files with 16 additions and 11 deletions

View File

@ -242,12 +242,12 @@ class Contact extends CommonObject
$sql .= ", poste='".$this->db->escape($this->poste)."'"; $sql .= ", poste='".$this->db->escape($this->poste)."'";
$sql .= ", fax='".$this->db->escape($this->fax)."'"; $sql .= ", fax='".$this->db->escape($this->fax)."'";
$sql .= ", email='".$this->db->escape($this->email)."'"; $sql .= ", email='".$this->db->escape($this->email)."'";
$sql .= ", note_private='".$this->db->escape($this->note_private)."'"; $sql .= ", note_private = ".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null");
$sql .= ", note_public='".$this->db->escape($this->note_public)."'"; $sql .= ", note_public = ".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null");
$sql .= ", phone = '".$this->db->escape($this->phone_pro)."'"; $sql .= ", phone = ".(isset($this->phone_pro)?"'".$this->db->escape($this->phone_pro)."'":"null");
$sql .= ", phone_perso = '".$this->db->escape($this->phone_perso)."'"; $sql .= ", phone_perso = ".(isset($this->phone_perso)?"'".$this->db->escape($this->phone_perso)."'":"null");
$sql .= ", phone_mobile = '".$this->db->escape($this->phone_mobile)."'"; $sql .= ", phone_mobile = ".(isset($this->phone_mobile)?"'".$this->db->escape($this->phone_mobile)."'":"null");
$sql .= ", jabberid = '".$this->db->escape($this->jabberid)."'"; $sql .= ", jabberid = ".(isset($this->jabberid)?"'".$this->db->escape($this->jabberid)."'":"null");
$sql .= ", priv = '".$this->priv."'"; $sql .= ", priv = '".$this->priv."'";
$sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"NULL"); $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"NULL");
$sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"NULL"); $sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"NULL");

View File

@ -919,7 +919,9 @@ abstract class DolibarrModules
dol_syslog(get_class($this)."::insert_permissions Add permission to user id=".$obj2->rowid); dol_syslog(get_class($this)."::insert_permissions Add permission to user id=".$obj2->rowid);
$tmpuser=new User($this->db); $tmpuser=new User($this->db);
$tmpuser->fetch($obj2->rowid); $tmpuser->fetch($obj2->rowid);
$tmpuser->addrights($r_id); if (!empty($tmpuser->id)) {
$tmpuser->addrights($r_id);
}
$i++; $i++;
} }
if (! empty($user->admin)) // Reload permission for current user if defined if (! empty($user->admin)) // Reload permission for current user if defined

View File

@ -176,7 +176,9 @@ class Fichinter extends CommonObject
// Appel des triggers // Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($this->db); $interface=new Interfaces($this->db);
$result=$interface->run_triggers('FICHINTER_CREATE',$this,$user,$langs,$conf); $tmpuser=new User($this->db);
$tmpuser->fetch($this->author);
$result=$interface->run_triggers('FICHINTER_CREATE',$this,$tmpuser,$langs,$conf);
if ($result < 0) { if ($result < 0) {
$error++; $this->errors=$interface->errors; $error++; $this->errors=$interface->errors;
} }

View File

@ -278,4 +278,4 @@ $(document).ready(function() {
$("#markRate").html("<?php echo (($markRate === '')?'n/a':price($markRate)."%"); ?>"); $("#markRate").html("<?php echo (($markRate === '')?'n/a':price($markRate)."%"); ?>");
}); });
</script> </script>

View File

@ -183,6 +183,7 @@ $sql.= " ORDER BY $sortfield $sortorder ";
// TODO: calculate total to display then restore pagination // TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset); //$sql.= $db->plimit($conf->liste_limit +1, $offset);
dol_syslog('margin::customerMargins.php sql='.$sql,LOG_DEBUG);
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
{ {
@ -303,4 +304,4 @@ $(document).ready(function() {
$("#markRate").html("<?php echo (($markRate === '')?'n/a':price($markRate)."%"); ?>"); $("#markRate").html("<?php echo (($markRate === '')?'n/a':price($markRate)."%"); ?>");
}); });
</script> </script>

View File

@ -264,4 +264,4 @@ $(document).ready(function() {
$("#marginRate").html("<?php echo (($marginRate === '')?'n/a':price($marginRate)."%"); ?>"); $("#marginRate").html("<?php echo (($marginRate === '')?'n/a':price($marginRate)."%"); ?>");
$("#markRate").html("<?php echo (($markRate === '')?'n/a':price($markRate)."%"); ?>"); $("#markRate").html("<?php echo (($markRate === '')?'n/a':price($markRate)."%"); ?>");
}); });
</script> </script>