From: Joe Hunt Date: Tue, 20 Jan 2009 16:31:00 +0000 (+0000) Subject: Had to move applications to main.inc X-Git-Tag: v2.4.2~19^2~1601 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=4d5e7f226ff4816a67fe29bf5f0ed11acbcbd33b;p=fa-stable.git Had to move applications to main.inc --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 41a55000..5baaf151 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -23,6 +23,7 @@ $ -> Affected files ! Preparing for installing of extensions $ installed_extensions.php (new file) frontaccounting.php + /includes/main.inc 19-Jan-2009 Joe Hunt ! Changed direct sales document line descriptions to be editable (via edit link) diff --git a/frontaccounting.php b/frontaccounting.php index ccbc5755..ebc533df 100644 --- a/frontaccounting.php +++ b/frontaccounting.php @@ -81,10 +81,6 @@ { foreach ($installed_extensions as $ext) { - $s = $applications['system']; - array_pop($applications); - $applications[$ext['name']] = $ext['title'];; - $applications['system'] = $s; include_once("applications/".$ext['app_file']); $class = $ext['name']."_app"; $this->add_application(new $class()); diff --git a/includes/main.inc b/includes/main.inc index 4d6e9130..05c8d626 100644 --- a/includes/main.inc +++ b/includes/main.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ include_once($path_to_root . "/includes/db/connect_db.inc"); include_once($path_to_root . "/includes/reserved.inc"); @@ -14,14 +23,27 @@ include_once($path_to_root . "/admin/db/users_db.inc"); include_once($path_to_root . "/includes/ui/ui_view.inc"); include_once($path_to_root . "/includes/ui/ui_controls.inc"); + include_once($path_to_root . "/installed_extensions.php"); function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $script_only=false) { - global $path_to_root; + global $path_to_root, $installed_extensions; $hide_menu = $no_menu; + if ($no_menu==false && count($installed_extensions)) + { + global $applications; + foreach ($installed_extensions as $ext) + { + $s = $applications['system']; + array_pop($applications); + $applications[$ext['name']] = $ext['title'];; + $applications['system'] = $s; + } + } + include($path_to_root . "/includes/page/header.inc"); page_header($title, $no_menu, $is_index, $onload, $js); diff --git a/installed_extensions.php b/installed_extensions.php index ccf6daa5..00225612 100644 --- a/installed_extensions.php +++ b/installed_extensions.php @@ -12,9 +12,10 @@ $installed_extensions = array (); -/* example +// example +/* $installed_extensions = array ( - 0 => array ('app_file' => 'organizer.php', 'name' => 'organizer', 'title' => 'Organizer', 'folder' => 'organizer') + 0 => array ('app_file' => 'organizer.php', 'name' => 'organizer', 'title' => 'Organizer', 'folder' => 'organizer'), array ('app_file' => 'payroll.php', 'name' => 'payroll', 'title' => 'Payroll', 'folder' => 'payroll') ); */