X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=applications%2Fapplication.php;h=291a78a256ec9a418d252eb085f9e330df791c06;hb=68dee220a91ccf1725fc3ee86c8967457b749ccb;hp=9220d14315eadd9ef10d53db4249e52e32a3790f;hpb=902f1015d874c33bd7946b17de2ad80b4f2144b6;p=fa-stable.git diff --git a/applications/application.php b/applications/application.php index 9220d143..291a78a2 100644 --- a/applications/application.php +++ b/applications/application.php @@ -93,6 +93,7 @@ { var $id; var $name; + var $help_context; var $modules; var $enabled; @@ -115,12 +116,44 @@ function add_lapp_function($level, $label,$link="",$access='SA_OPEN') { $this->modules[$level]->lappfunctions[] = new app_function($label, $link, $access); - } - + } + function add_rapp_function($level, $label,$link="",$access='SA_OPEN') { $this->modules[$level]->rappfunctions[] = new app_function($label, $link, $access); - } + } + + function add_extensions() + { + global $installed_extensions, $path_to_root; + + foreach ($installed_extensions as $mod) + { + if (@$mod['active'] && isset($mod['entries'])) + foreach($mod['entries'] as $entry) { + if ($entry['tab_id'] == $this->id) + $this->add_rapp_function( + isset($entry['section']) ? $entry['section'] : 2, + $entry['title'], $path_to_root.'/'.$mod['path'].'/'.$entry['url'], + isset($entry["access"]) ? $entry["access"] : 'SA_OPEN' ); + } + } + } + // + // Helper returning link to report class added by extension module. + // + function report_class_url($class) + { + global $installed_extensions; + + // TODO : konwencja lub ? + $classno = 7; +// if (file_exists($path_to_root.'/'.$mod['path'].'/'.$entry['url'] +// .'/'.'reporting/reports_custom.php')) + return "reporting/reports_main.php?Class=".$class; +// else +// return ''; + } }