Skip to content
Snippets Groups Projects
Commit 640e0342 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: problem with next/preview function

parent 7186d2c0
No related branches found
No related tags found
No related merge requests found
......@@ -1226,14 +1226,17 @@ class CommonObject
* Load type of canvas of an object
* @param id element id
*/
function getCanvas($id)
function getCanvas($id=0,$ref='')
{
global $conf;
$ref = trim($ref);
$sql = "SELECT rowid, canvas";
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element;
$sql.= " WHERE entity = ".$conf->entity;
$sql.= " AND rowid = ".$id;
if (!empty($id)) $sql.= " AND rowid = ".$id;
if (!empty($ref)) $sql.= " AND ref = '".$ref."'";
$resql = $this->db->query($sql);
if ($resql)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment