Had to move applications to main.inc
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 20 Jan 2009 16:31:00 +0000 (16:31 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 20 Jan 2009 16:31:00 +0000 (16:31 +0000)
CHANGELOG.txt
frontaccounting.php
includes/main.inc
installed_extensions.php

index 41a55000255369d0537f21b46cef724c580b01d0..5baaf151471c2550d2c727ba2d6518bbd8e8d176 100644 (file)
@@ -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)
index ccbc5755c9499db332ea8c4e989eb51b29832e39..ebc533df3fb162fa05467b6b593f162e0176b03f 100644 (file)
                        {
                                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());
index 4d6e9130c8165329aa8ccf46e98b6fd281504c3d..05c8d626fb5cc28c6827053577e9fdfc231ecded 100644 (file)
@@ -1,5 +1,14 @@
 <?php
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU Affero General Public License,
+       AGPL, as published by the Free Software Foundation, either version 
+       3 of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
     include_once($path_to_root . "/includes/db/connect_db.inc");
 
     include_once($path_to_root . "/includes/reserved.inc");
     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);
index ccf6daa5d93a40260aaf9e3dc35fecf5b50297f9..002256124b0b1a4c7a5b1afbbb5b70fc054d0235 100644 (file)
 
 $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')
        );
 */