mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-07 01:23:00 +01:00
Debug
This commit is contained in:
@@ -2735,8 +2735,10 @@ if ($module == 'initmodule') {
|
||||
|
||||
if (empty($forceddirread) && empty($dirread)) {
|
||||
$result = dol_include_once($pathtoclass);
|
||||
$stringofinclude = "dol_include_once(".$pathtoclass.")";
|
||||
} else {
|
||||
$result = @include_once $dirread.'/'.$pathtoclass;
|
||||
$stringofinclude = "@include_once ".$dirread.'/'.$pathtoclass;
|
||||
}
|
||||
if (class_exists($tabobj)) {
|
||||
try {
|
||||
@@ -2744,6 +2746,8 @@ if ($module == 'initmodule') {
|
||||
} catch (Exception $e) {
|
||||
dol_syslog('Failed to load Constructor of class: '.$e->getMessage(), LOG_WARNING);
|
||||
}
|
||||
} else {
|
||||
print '<span class="warning">'.$langs->trans('Failed to find the class '.$tabobj.' despite the '.$stringofinclude).'</warning><br>';
|
||||
}
|
||||
|
||||
if (!empty($tmpobjet)) {
|
||||
@@ -3078,7 +3082,7 @@ if ($module == 'initmodule') {
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
print '<tr><td><span class="warning">'.$langs->trans('Failed to init the object with the new.').'</warning></td></tr>';
|
||||
print '<span class="warning">'.$langs->trans('Failed to init the object with the new '.$tabobj.'($db)').'</warning>';
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
print $e->getMessage();
|
||||
|
||||
@@ -44,6 +44,7 @@ MyModuleAboutPage = MyModule about page
|
||||
#
|
||||
# Sample page
|
||||
#
|
||||
MyModuleArea = Home MyModule
|
||||
MyPageName = My page name
|
||||
|
||||
#
|
||||
|
||||
@@ -83,8 +83,8 @@ $managedfor = getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty');
|
||||
|
||||
if (empty($conf->partnership->enabled)) accessforbidden();
|
||||
if (empty($permissiontoread)) accessforbidden();
|
||||
if ($object->id > 0 && $object->fk_member > 0 && $managedfor != 'member') accessforbidden();
|
||||
if ($object->id > 0 && $object->fk_soc > 0 && $managedfor != 'thirdparty') accessforbidden();
|
||||
if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden();
|
||||
if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden();
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user