Merge pull request #11281 from atm-maxime/fix_warning_resource
Fix : warnings in resource module
This commit is contained in:
commit
2b3c5902e6
@ -530,13 +530,13 @@ class Dolresource extends CommonObject
|
|||||||
if ($limit) $sql.= $this->db->plimit($limit, $offset);
|
if ($limit) $sql.= $this->db->plimit($limit, $offset);
|
||||||
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
||||||
|
|
||||||
|
$this->lines=array();
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$this->lines=array();
|
|
||||||
while ($obj = $this->db->fetch_object($resql))
|
while ($obj = $this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$line = new Dolresource($this->db);
|
$line = new Dolresource($this->db);
|
||||||
@ -829,6 +829,8 @@ class Dolresource extends CommonObject
|
|||||||
$sql .= ' ORDER BY resource_type';
|
$sql .= ' ORDER BY resource_type';
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::getElementResources", LOG_DEBUG);
|
dol_syslog(get_class($this)."::getElementResources", LOG_DEBUG);
|
||||||
|
|
||||||
|
$resources = array();
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@ -879,7 +881,7 @@ class Dolresource extends CommonObject
|
|||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
if (count($this->cache_code_type_resource)) return 0; // Cache deja charge
|
if (is_array($this->cache_code_type_resource) && count($this->cache_code_type_resource)) return 0; // Cache deja charge
|
||||||
|
|
||||||
$sql = "SELECT rowid, code, label, active";
|
$sql = "SELECT rowid, code, label, active";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_type_resource";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_type_resource";
|
||||||
|
|||||||
@ -85,8 +85,6 @@ class FormResource
|
|||||||
$out = '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
$out = '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
$out.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
$out.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
}
|
}
|
||||||
//$out.= '<input type="hidden" name="action" value="search">';
|
|
||||||
//$out.= '<input type="hidden" name="id" value="'.$theme->id.'">';
|
|
||||||
|
|
||||||
if ($resourcestat)
|
if ($resourcestat)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user