Skip to content

Commit

Permalink
Fix : warnings in resource module
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-maxime committed May 31, 2019
1 parent 912e29a commit 0372276
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 4 additions & 2 deletions htdocs/resource/class/dolresource.class.php
Expand Up @@ -530,13 +530,13 @@ function fetch_all($sortorder, $sortfield, $limit, $offset, $filter='')
if ($limit) $sql.= $this->db->plimit($limit, $offset);
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);

$this->lines=array();
$resql=$this->db->query($sql);
if ($resql)
{
$num = $this->db->num_rows($resql);
if ($num)
{
$this->lines=array();
while ($obj = $this->db->fetch_object($resql))
{
$line = new Dolresource($this->db);
Expand Down Expand Up @@ -829,6 +829,8 @@ function getElementResources($element,$element_id,$resource_type='')
$sql .= ' ORDER BY resource_type';

dol_syslog(get_class($this)."::getElementResources", LOG_DEBUG);

$resources = array();
$resql = $this->db->query($sql);
if ($resql)
{
Expand Down Expand Up @@ -879,7 +881,7 @@ function load_cache_code_type_resource()
{
global $langs;

if (count($this->cache_code_type_resource)) return 0; // Cache deja charge
if (!empty($this->cache_code_type_resource) && count($this->cache_code_type_resource)) return 0; // Cache deja charge

$sql = "SELECT rowid, code, label, active";
$sql.= " FROM ".MAIN_DB_PREFIX."c_type_resource";
Expand Down
2 changes: 0 additions & 2 deletions htdocs/resource/class/html.formresource.class.php
Expand Up @@ -85,8 +85,6 @@ function select_resource_list($selected='',$htmlname='fk_resource',$filter='',$s
$out = '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
$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)
{
Expand Down

0 comments on commit 0372276

Please sign in to comment.