mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +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
|
* Load type of canvas of an object
|
||||||
* @param id element id
|
* @param id element id
|
||||||
*/
|
*/
|
||||||
function getCanvas($id)
|
function getCanvas($id=0,$ref='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
$ref = trim($ref);
|
||||||
|
|
||||||
$sql = "SELECT rowid, canvas";
|
$sql = "SELECT rowid, canvas";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element;
|
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element;
|
||||||
$sql.= " WHERE entity = ".$conf->entity;
|
$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);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
Reference in New Issue
Block a user