Fix: Removed php warnings
This commit is contained in:
parent
32da27f003
commit
f26b94a8ac
@ -45,6 +45,7 @@ class Adherent extends CommonObject
|
||||
var $errors=array();
|
||||
var $element='member';
|
||||
var $table_element='adherent';
|
||||
var $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
|
||||
@ -572,7 +572,7 @@ class CommonObject
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update a specific field from an object
|
||||
* @param table Table element or element line
|
||||
@ -590,7 +590,7 @@ class CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$table." SET ";
|
||||
$sql.= $field." = '".$value."'";
|
||||
$sql.= " WHERE rowid = ".$id;
|
||||
|
||||
|
||||
dol_syslog("CommonObject::updateObjectField sql=".$sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) dol_print_error($this->db);
|
||||
@ -619,7 +619,7 @@ class CommonObject
|
||||
|
||||
$sql = "SELECT MAX(te.".$fieldid.")";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as te";
|
||||
if ($this->ismultientitymanaged == 2 || ($this->element != 'societe' && !$this->isnolinkedbythird && !$user->rights->societe->client->voir)) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to entity
|
||||
if ($this->ismultientitymanaged == 2 || ($this->element != 'societe' && empty($this->isnolinkedbythird) && empty($user->rights->societe->client->voir))) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to entity
|
||||
if (empty($this->isnolinkedbythird) && !$user->rights->societe->client->voir) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$alias.".rowid = sc.fk_soc";
|
||||
$sql.= " WHERE te.".$fieldid." < '".$this->db->escape($this->ref)."'";
|
||||
if (empty($this->isnolinkedbythird) && !$user->rights->societe->client->voir) $sql.= " AND sc.fk_user = " .$user->id;
|
||||
|
||||
@ -96,7 +96,7 @@ class FormSms
|
||||
|
||||
$form=new Form($this->db);
|
||||
$soc=new Societe($this->db);
|
||||
if ($this->withtosocid > 0)
|
||||
if (!empty($this->withtosocid) && $this->withtosocid > 0)
|
||||
{
|
||||
$soc->fetch($this->withtosocid);
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -42,7 +42,7 @@ function member_prepare_head($object)
|
||||
$head[$h][2] = 'general';
|
||||
$h++;
|
||||
|
||||
if ($conf->ldap->enabled && $conf->global->LDAP_MEMBER_ACTIVE)
|
||||
if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_MEMBER_ACTIVE))
|
||||
{
|
||||
$langs->load("ldap");
|
||||
|
||||
@ -52,7 +52,7 @@ function member_prepare_head($object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
if ($user->rights->adherent->cotisation->lire)
|
||||
if (! empty($user->rights->adherent->cotisation->lire))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Subscriptions");
|
||||
@ -61,7 +61,7 @@ function member_prepare_head($object)
|
||||
}
|
||||
|
||||
// Show category tab
|
||||
if ($conf->categorie->enabled && $user->rights->categorie->lire)
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type=3';
|
||||
$head[$h][1] = $langs->trans('Categories');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user