mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Debug modulebuilder
This commit is contained in:
@@ -52,22 +52,24 @@ class MyObject extends CommonObject
|
||||
* @var array Does myobject support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
*/
|
||||
protected $ismultientitymanaged = 1;
|
||||
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject
|
||||
*/
|
||||
* @var string String with name of icon for myobject
|
||||
*/
|
||||
public $picto = 'myobject';
|
||||
|
||||
/**
|
||||
* @var int Entity Id
|
||||
*/
|
||||
public $entity;
|
||||
|
||||
/* BEGIN PROPERTY FIELDS - Do not remove this comment */
|
||||
/**
|
||||
* @var array Array with all fields and their property
|
||||
*/
|
||||
public $fields;
|
||||
public $fields=array(
|
||||
'ref'=>array('type'=>'string','label'=>'Ref','position'=>10,'index'=>true,'comment'=>'Reference of object'),
|
||||
'entity'=>array('type'=>'integer','label'=>'Entity','index'=>true),
|
||||
'status'=>array('type'=>'integer','label'=>'Status','index'=>true),
|
||||
'date'=>array('type'=>'date','label'=>'Date','default'=>'__NOW__'),
|
||||
'title'=>array('type'=>'string','label'=>'Title'),
|
||||
);
|
||||
/* END PROPERTY FIELDS - Do not remove this comment */
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -68,13 +68,7 @@ $toselect = GETPOST('toselect', 'array');
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$backtopage = GETPOST('backtopage');
|
||||
$myparam = GETPOST('myparam','alpha');
|
||||
|
||||
$search_all=trim(GETPOST("sall"));
|
||||
$search_field1=GETPOST("search_field1");
|
||||
$search_field2=GETPOST("search_field2");
|
||||
$search_myfield=GETPOST('search_myfield');
|
||||
$optioncss = GETPOST('optioncss','alpha');
|
||||
$optioncss = GETPOST('optioncss','alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
@@ -85,6 +79,7 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
if (! $sortfield) $sortfield="t.rowid"; // Set here default search field
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
@@ -96,6 +91,19 @@ if ($user->societe_id > 0)
|
||||
//accessforbidden();
|
||||
}
|
||||
|
||||
// Initialize array of search criterias
|
||||
$object=new MyModule($db);
|
||||
$search_all=trim(GETPOST("search_all"));
|
||||
$search=array();
|
||||
foreach($object->fields as $key)
|
||||
{
|
||||
if (GETPOST('search_'.$key,'alpha')) $search[$key]=GETPOST('search_'.$key,'alpha');
|
||||
}
|
||||
/*$search_field1=GETPOST("search_field1");
|
||||
$search_field2=GETPOST("search_field2");
|
||||
$search_myfield=GETPOST('search_myfield');
|
||||
*/
|
||||
|
||||
// Initialize technical object to manage context to save list fields
|
||||
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'myobjectlist';
|
||||
|
||||
@@ -133,8 +141,6 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
}
|
||||
|
||||
|
||||
$object=new Skeleton_Class($db);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user