mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Fix: problem with next/preview function
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user