mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 11:15:21 +01:00
Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
Conflicts: htdocs/modulebuilder/template/class/myobject.class.php htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php htdocs/modulebuilder/template/core/modules/modMyModule.class.php htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php htdocs/modulebuilder/template/myobject_agenda.php htdocs/modulebuilder/template/myobject_list.php
This commit is contained in:
@@ -85,7 +85,7 @@ class MyObject extends CommonObject
|
||||
* Note: Filter must be a Dolibarr Universal Filter syntax string. Example: "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.status:!=:0) or (t.nature:is:NULL)"
|
||||
* 'label' the translation key.
|
||||
* 'picto' is code of a picto to show before value in forms
|
||||
* 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalInt('MY_SETUP_PARAM') or 'isModEnabled("multicurrency")' ...)
|
||||
* 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalInt("MY_SETUP_PARAM")' or 'isModEnabled("multicurrency")' ...)
|
||||
* 'position' is the sort order of field.
|
||||
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
|
||||
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
|
||||
@@ -572,7 +572,7 @@ class MyObject extends CommonObject
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->myobject->write))
|
||||
/* if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','write'))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->myobject->myobject_advance->validate))))
|
||||
{
|
||||
$this->error='NotEnoughPermissions';
|
||||
@@ -690,8 +690,8 @@ class MyObject extends CommonObject
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->write))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->mymodule_advance->validate))))
|
||||
/* if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','write'))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','mymodule_advance','validate'))))
|
||||
{
|
||||
$this->error='Permission denied';
|
||||
return -1;
|
||||
@@ -714,8 +714,8 @@ class MyObject extends CommonObject
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->write))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->mymodule_advance->validate))))
|
||||
/* if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','write'))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','mymodule_advance','validate'))))
|
||||
{
|
||||
$this->error='Permission denied';
|
||||
return -1;
|
||||
@@ -738,13 +738,14 @@ class MyObject extends CommonObject
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->write))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->mymodule_advance->validate))))
|
||||
/*if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','write'))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','mymodule_advance','validate'))))
|
||||
{
|
||||
$this->error='Permission denied';
|
||||
return -1;
|
||||
}*/
|
||||
|
||||
|
||||
return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'MYOBJECT_REOPEN');
|
||||
}
|
||||
|
||||
@@ -862,7 +863,7 @@ class MyObject extends CommonObject
|
||||
$pospoint = strpos($filearray[0]['name'], '.');
|
||||
|
||||
$pathtophoto = $class.'/'.$this->ref.'/thumbs/'.substr($filename, 0, $pospoint).'_mini'.substr($filename, $pospoint);
|
||||
if (!getDolGlobalInt(strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS')) {
|
||||
if (!getDolGlobalString(strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS')) {
|
||||
$result .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.'" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div></div>';
|
||||
} else {
|
||||
$result .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div>';
|
||||
|
||||
Reference in New Issue
Block a user