From 96a9229b8cbcda886c8c7ab826ae1e1ba3bf97d0 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 19 Sep 2007 13:08:08 +0000 Subject: [PATCH] Update for __autoload() git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7331 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/TreeMenu.php | 6 +- html/main.php | 13 +- include/class_location.inc | 292 ++++++++++++++++++ include/class_pluglist.inc | 2 +- include/class_userinfo.inc | 6 - include/functions.inc | 41 ++- include/heimdal/asnencode.php | 14 - include/heimdal/deslib.php | 6 +- include/heimdal/genkey.php | 14 +- include/php_setup.inc | 2 +- include/php_writeexcel/class.excel.php | 40 --- .../class.writeexcel_workbookbig.inc.php | 54 ---- plugins/addons/godfs/class_dfsManagment.inc | 4 - plugins/addons/ldapmanager/class_ldif.inc | 1 - plugins/addons/logview/class_gosa_logview.inc | 1 - plugins/addons/logview/class_logview.inc | 1 - plugins/admin/acl/class_aclManagement.inc | 3 - .../class_applicationManagement.inc | 1 - .../class_departmentManagement.inc | 1 - plugins/admin/fai/class_faiManagement.inc | 9 - .../admin/groups/class_groupManagement.inc | 1 - .../mimetypes/class_mimetypeManagement.inc | 2 - .../admin/ogroups/class_ogroupManagement.inc | 1 - plugins/admin/ogroups/tabs_ogroups.inc | 6 - plugins/admin/systems/class_goCupsServer.inc | 2 - plugins/admin/systems/class_goFaxServer.inc | 2 - plugins/admin/systems/class_goFonServer.inc | 2 - plugins/admin/systems/class_goGlpiServer.inc | 2 - plugins/admin/systems/class_goImapServer.inc | 2 - plugins/admin/systems/class_goKrbServer.inc | 2 - plugins/admin/systems/class_goLdapServer.inc | 2 - plugins/admin/systems/class_goLogDBServer.inc | 1 - plugins/admin/systems/class_goMailServer.inc | 2 - plugins/admin/systems/class_goNtpServer.inc | 2 - plugins/admin/systems/class_goShareServer.inc | 2 - plugins/admin/systems/class_goSpamServer.inc | 2 - .../admin/systems/class_goSyslogServer.inc | 2 - .../admin/systems/class_goTerminalServer.inc | 2 - plugins/admin/systems/class_goVirusServer.inc | 2 - plugins/admin/systems/class_gosaLogServer.inc | 1 - plugins/admin/systems/class_printGeneric.inc | 1 - .../admin/systems/class_printerPPDDialog.inc | 1 - plugins/admin/systems/class_servDNS.inc | 2 - plugins/admin/systems/class_servKolab.inc | 2 - .../admin/systems/class_servRepository.inc | 2 - .../admin/systems/class_systemManagement.inc | 8 - plugins/admin/users/class_userManagement.inc | 4 - .../class_phoneConferenceManagment.inc | 1 - .../macro/class_gofonMacroManagement.inc | 1 - plugins/personal/mail/class_mailAccount.inc | 3 - update-gosa | 43 ++- 51 files changed, 379 insertions(+), 240 deletions(-) create mode 100644 include/class_location.inc delete mode 100644 include/php_writeexcel/class.excel.php delete mode 100644 include/php_writeexcel/class.writeexcel_workbookbig.inc.php diff --git a/html/TreeMenu.php b/html/TreeMenu.php index 1123a859e..ec81418a2 100755 --- a/html/TreeMenu.php +++ b/html/TreeMenu.php @@ -176,7 +176,7 @@ class HTML_TreeMenu case 'heyes_array': // Need to create a HTML_TreeMenu object ? if (!isset($params['treeMenu'])) { - $treeMenu = &new HTML_TreeMenu(); + $treeMenu = new HTML_TreeMenu(); $parentID = 0; } else { $treeMenu = &$params['treeMenu']; @@ -208,7 +208,7 @@ class HTML_TreeMenu default: // Need to create a HTML_TreeMenu object ? if (!isset($params['treeMenu'])) { - $treeMenu = &new HTML_TreeMenu(); + $treeMenu = new HTML_TreeMenu(); } else { $treeMenu = &$params['treeMenu']; } @@ -265,7 +265,7 @@ class HTML_TreeMenu // Supplied $xml is a string if (is_string($xml)) { require_once('XML/Tree.php'); - $xmlTree = &new XML_Tree(); + $xmlTree = new XML_Tree(); $xmlTree->getTreeFromString($xml); // Supplied $xml is an XML_Tree object diff --git a/html/main.php b/html/main.php index f95af8a5a..f9c2cc6e7 100644 --- a/html/main.php +++ b/html/main.php @@ -29,9 +29,6 @@ require_once ("functions_FAI.inc"); /* Set header */ header("Content-type: text/html; charset=UTF-8"); -/* Find all class files and include them */ -get_dir_list("$BASE_DIR/plugins"); - /* Set the text domain as 'messages' */ $domain = 'messages'; bindtextdomain($domain, "$BASE_DIR/locale"); @@ -153,8 +150,16 @@ textdomain($domain); /* Prepare plugin list */ if (!isset($_SESSION['plist'])){ - $_SESSION['plist']= new pluglist($config, $ui); + /* Initially load all classes */ + $class_list= get_declared_classes(); + foreach ($class_mapping as $class => $path){ + if (!in_array($class, $class_list)){ + require_once("$BASE_DIR/$path"); + } + } + $_SESSION['plist']= new pluglist($config, $ui); + /* Load ocMapping into userinfo */ $tmp= new acl($config, NULL, $ui->dn); $ui->ocMapping= $tmp->ocMapping; diff --git a/include/class_location.inc b/include/class_location.inc new file mode 100644 index 000000000..6fb05bc38 --- /dev/null +++ b/include/class_location.inc @@ -0,0 +1,292 @@ + "setup/class_setupStep_Schema.inc", + "Step_Ldap" => "setup/class_setupStep_Ldap.inc", + "Step_License" => "setup/class_setupStep_License.inc", + "Step_Config2" => "setup/class_setupStep_Config2.inc", + "Step_Config1" => "setup/class_setupStep_Config1.inc", + "Step_Welcome" => "setup/class_setupStep_Welcome.inc", + "Step_Checks" => "setup/class_setupStep_Checks.inc", + "Step_Language" => "setup/class_setupStep_Language.inc", + "Step_Finish" => "setup/class_setupStep_Finish.inc", + "Step_Migrate" => "setup/class_setupStep_Migrate.inc", + "Step_Feedback" => "setup/class_setupStep_Feedback.inc", + "setup_step" => "setup/class_setupStep.inc", + "setup" => "setup/class_setup.inc", + "Step_Config3" => "setup/class_setupStep_Config3.inc", + "tabs" => "include/class_tabs.inc", + "parseXml" => "include/functions_helpviewer.inc", + "Des" => "include/heimdal/deslib.php", + "stream" => "include/heimdal/asnencode.php", + "asnEncode" => "include/heimdal/asnencode.php", + "entry" => "include/heimdal/mkey.php", + "principal" => "include/heimdal/mkey.php", + "mkey" => "include/heimdal/mkey.php", + "genkey" => "include/heimdal/genkey.php", + "mailMethodSendmailCyrus" => "include/class_mail-methods-sendmail-cyrus.inc", + "CopyPasteHandler" => "include/class_CopyPasteHandler.inc", + "certificate" => "include/class_certificate.inc", + "sambaMungedDial" => "include/class_sambaMungedDial.inc", + "MultiSelectWindow" => "include/class_MultiSelectWindow.inc", + "mailMethodKolab" => "include/class_mail-methods-kolab.inc", + "ogw" => "include/class_opengw.inc", + "config" => "include/class_config.inc", + "passwordMethodMd5" => "include/class_password-methods-md5.inc", + "divlist" => "include/class_divlist.inc", + "My_Parser" => "include/sieve/class_My_Parser.inc", + "sieve_comment" => "include/sieve/class_sieveElement_Comment.inc", + "sieveManagement" => "include/sieve/class_sieveManagement.inc", + "sieve_block_end" => "include/sieve/class_sieveElement_Block_End.inc", + "sieve_block_start" => "include/sieve/class_sieveElement_Block_Start.inc", + "sieve_require" => "include/sieve/class_sieveElement_Require.inc", + "sieve_redirect" => "include/sieve/class_sieveElement_Redirect.inc", + "Tree" => "include/sieve/class_tree.inc", + "sieve_keep" => "include/sieve/class_sieveElement_Keep.inc", + "My_Tree" => "include/sieve/class_My_Tree.inc", + "sieve_elsif" => "include/sieve/class_sieveElement_Else_Elsif.inc", + "sieve_else" => "include/sieve/class_sieveElement_Else_Elsif.inc", + "sieve" => "include/sieve/class_sieve.inc", + "sieve_reject" => "include/sieve/class_sieveElement_Reject.inc", + "sieve_vacation" => "include/sieve/class_sieveElement_Vacation.inc", + "Semantics" => "include/sieve/class_semantics.inc", + "sieve_stop" => "include/sieve/class_sieveElement_Stop.inc", + "Scanner" => "include/sieve/class_scanner.inc", + "sieve_fileinto" => "include/sieve/class_sieveElement_Fileinto.inc", + "sieve_discard" => "include/sieve/class_sieveElement_Discard.inc", + "sieve_if" => "include/sieve/class_sieveElement_If.inc", + "My_Scanner" => "include/sieve/class_My_Scanner.inc", + "Parser" => "include/sieve/class_parser.inc", + "passwordMethodsmd5" => "include/class_password-methods-smd5.inc", + "mailMethod" => "include/class_mail-methods.inc", + "HTML_TreeMenu" => "html/TreeMenu.php", + "HTML_TreeNode" => "html/TreeMenu.php", + "HTML_TreeMenu_Presentation" => "html/TreeMenu.php", + "HTML_TreeMenu_DHTML" => "html/TreeMenu.php", + "HTML_TreeMenu_Listbox" => "html/TreeMenu.php", + "passwordMethodkerberos" => "include/class_password-methods-kerberos.inc", + "passwordMethodsasl" => "include/class_password-methods-kerberos.inc", + "passwordMethodsha" => "include/class_password-methods-sha.inc", + "Print_a_class" => "include/functions_debug.inc", + "plugin" => "include/class_plugin.inc", + "userinfo" => "include/class_userinfo.inc", + "mailMethodCyrus" => "include/class_mail-methods-cyrus.inc", + "msg_dialog" => "include/class_msg_dialog.inc", + "mailMethodGolab" => "include/class_mail-methods-golab.inc", + "gosa_cache" => "include/class_cache_handler.inc", + "SnapShotDialog" => "include/class_SnapShotDialog.inc", + "passwordMethod" => "include/class_password-methods.inc", + "passwordMethodCrypt" => "include/class_password-methods-crypt.inc", + "glpiDB" => "include/class_glpi.inc", + "ppdManager" => "include/class_ppdManager.inc", + "passwordMethodClear" => "include/class_password-methods-clear.inc", + "writeexcel_format" => "include/php_writeexcel/class.writeexcel_format.inc.php", + "writeexcel_biffwriter" => "include/php_writeexcel/class.writeexcel_biffwriter.inc.php", + "writeexcel_formula" => "include/php_writeexcel/class.writeexcel_formula.inc.php", + "writeexcel_olewriter" => "include/php_writeexcel/class.writeexcel_olewriter.inc.php", + "writeexcel_workbook" => "include/php_writeexcel/class.writeexcel_workbook.inc.php", + "writeexcel_worksheet" => "include/php_writeexcel/class.writeexcel_worksheet.inc.php", + "acl" => "include/class_acl.inc", + "divSelectBox" => "include/class_divSelectBox.inc", + "debconf" => "include/class_debconfTemplate.inc", + "passwordMethodssha" => "include/class_password-methods-ssha.inc", + "pgre_sql" => "include/class_pgsql_opengw.inc", + "pluglist" => "include/class_pluglist.inc", + "log" => "include/class_log.inc", + "LDAP" => "include/class_ldap.inc", + "dhcpPlugin" => "include/class_dhcpPlugin.inc", + "addressbook" => "plugins/addons/addressbook/class_addressbook.inc", + "csvimport" => "plugins/addons/ldapmanager/class_csvimport.inc", + "ldif" => "plugins/addons/ldapmanager/class_ldif.inc", + "ldifexport" => "plugins/addons/ldapmanager/class_export.inc", + "ldifimport" => "plugins/addons/ldapmanager/class_import.inc", + "xlsexport" => "plugins/addons/ldapmanager/class_exportxls.inc", + "ldiftab" => "plugins/addons/ldapmanager/tabs_ldif.inc", + "target_list" => "plugins/addons/gotomasses/class_target_list.inc", + "gotomasses" => "plugins/addons/gotomasses/class_gotomasses.inc", + "goto_task" => "plugins/addons/gotomasses/class_goto_task.inc", + "dfstabs" => "plugins/addons/godfs/tabs_dfs.inc", + "contains" => "plugins/addons/godfs/class_dfsManagment.inc", + "dfsManagment" => "plugins/addons/godfs/class_dfsManagment.inc", + "dfsgeneric" => "plugins/addons/godfs/class_dfsgeneric.inc", + "gosa_logview" => "plugins/addons/logview/class_gosa_logview.inc", + "logview" => "plugins/addons/logview/class_logview.inc", + "log_tabs" => "plugins/addons/logview/tabs_log.inc", + "mailqueue" => "plugins/addons/mailqueue/class_mailqueue.inc", + "parseMailQueue" => "plugins/addons/mailqueue/class_parseMailQueue.inc", + "msgplug" => "plugins/addons/notifications/class_msgplug.inc", + "blocklist" => "plugins/gofax/blocklists/class_blocklistManagement.inc", + "divListBlocklist" => "plugins/gofax/blocklists/class_divListBlocklists.inc", + "gofaxAccount" => "plugins/gofax/faxaccount/class_gofaxAccount.inc", + "faxreport" => "plugins/gofax/faxreports/class_faxreport.inc", + "fonreport" => "plugins/gofon/fonreports/class_fonreport.inc", + "macro" => "plugins/gofon/macro/class_gofonMacro.inc", + "macrotabs" => "plugins/gofon/macro/tabs_macros.inc", + "divListMacro" => "plugins/gofon/macro/class_divListMacros.inc", + "gofonMacro" => "plugins/gofon/macro/class_gofonMacroManagement.inc", + "macroParameter" => "plugins/gofon/macro/class_gofonMacroParameters.inc", + "phoneAccount" => "plugins/gofon/phoneaccount/class_phoneAccount.inc", + "conferencetabs" => "plugins/gofon/conference/tabs_conference.inc", + "phoneConferenceManagment" => "plugins/gofon/conference/class_phoneConferenceManagment.inc", + "divListConference" => "plugins/gofon/conference/class_divListConferences.inc", + "conference" => "plugins/gofon/conference/class_phoneConferenceGeneric.inc", + "password" => "plugins/personal/password/class_password.inc", + "sambaAccount" => "plugins/personal/samba/class_sambaAccount.inc", + "sambaLogonHours" => "plugins/personal/samba/class_sambaLogonHours.inc", + "posixAccount" => "plugins/personal/posix/class_posixAccount.inc", + "mailAccount" => "plugins/personal/mail/class_mailAccount.inc", + "nagiosAccount" => "plugins/personal/nagios/class_nagiosAccount.inc", + "hotplugDialog" => "plugins/personal/environment/class_hotplugDialog.inc", + "environment" => "plugins/personal/environment/class_environment.inc", + "kioskManagementDialog" => "plugins/personal/environment/class_kioskManagementDialog.inc", + "logonManagementDialog" => "plugins/personal/environment/class_logonManagementDialog.inc", + "selectPrinterDialog" => "plugins/personal/environment/class_selectPrinterDialog.inc", + "user" => "plugins/personal/generic/class_user.inc", + "scalixAccount" => "plugins/personal/scalix/class_scalixAccount.inc", + "connectivity" => "plugins/personal/connectivity/class_connectivity.inc", + "kolabAccount" => "plugins/personal/connectivity/class_kolabAccount.inc", + "oxchangeAccount" => "plugins/personal/connectivity/class_oxchangeAccount.inc", + "phpgwAccount" => "plugins/personal/connectivity/class_phpgwAccount.inc", + "opengwAccount" => "plugins/personal/connectivity/class_opengwAccount.inc", + "webdavAccount" => "plugins/personal/connectivity/class_webdavAccount.inc", + "pureftpdAccount" => "plugins/personal/connectivity/class_pureftpdAccount.inc", + "pptpAccount" => "plugins/personal/connectivity/class_pptpAccount.inc", + "proxyAccount" => "plugins/personal/connectivity/class_proxyAccount.inc", + "intranetAccount" => "plugins/personal/connectivity/class_intranetAccount.inc", + "phpscheduleitAccount" => "plugins/personal/connectivity/class_phpscheduleitAccount.inc", + "netatalk" => "plugins/personal/netatalk/class_netatalk.inc", + "reference" => "plugins/generic/references/class_reference.inc", + "dhcpAdvanced" => "plugins/admin/systems/class_dhcpAdvanced.inc", + "dhcpService" => "plugins/admin/systems/class_dhcpService.inc", + "servgeneric" => "plugins/admin/systems/class_servGeneric.inc", + "printerPPDDialog" => "plugins/admin/systems/class_printerPPDDialog.inc", + "goLogDBServer" => "plugins/admin/systems/class_goLogDBServer.inc", + "goShareServer" => "plugins/admin/systems/class_goShareServer.inc", + "servDNSeditZoneEntries" => "plugins/admin/systems/class_servDNSeditZoneEntries.inc", + "worktabs" => "plugins/admin/systems/tabs_workstation.inc", + "glpiPrinterAccount" => "plugins/admin/systems/class_glpiPrinterAccount.inc", + "termDNS" => "plugins/admin/systems/class_termDNS.inc", + "servnfs" => "plugins/admin/systems/class_servNfs.inc", + "goTerminalServer" => "plugins/admin/systems/class_goTerminalServer.inc", + "glpiManufacturer" => "plugins/admin/systems/class_glpiManufacturer.inc", + "goFonServer" => "plugins/admin/systems/class_goFonServer.inc", + "dhcpHost" => "plugins/admin/systems/class_dhcpHost.inc", + "phoneGeneric" => "plugins/admin/systems/class_phoneGeneric.inc", + "gospamserver" => "plugins/admin/systems/class_goSpamServer.inc", + "ServiceAddDialog" => "plugins/admin/systems/class_ServiceAddDialog.inc", + "goSyslogServer" => "plugins/admin/systems/class_goSyslogServer.inc", + "goService" => "plugins/admin/systems/class_goService.inc", + "servdnseditZone" => "plugins/admin/systems/class_servDNSeditZone.inc", + "govirusserver" => "plugins/admin/systems/class_goVirusServer.inc", + "dhcpSubnet" => "plugins/admin/systems/class_dhcpSubnet.inc", + "servkolab" => "plugins/admin/systems/class_servKolab.inc", + "goGlpiServer" => "plugins/admin/systems/class_goGlpiServer.inc", + "selectUserToPrinterDialog" => "plugins/admin/systems/class_selectUserToPrinterDialog.inc", + "termstartup" => "plugins/admin/systems/class_terminalStartup.inc", + "servrepository" => "plugins/admin/systems/class_servRepository.inc", + "terminfo" => "plugins/admin/systems/class_terminalInfo.inc", + "printtabs" => "plugins/admin/systems/tabs_printers.inc", + "glpiAccount" => "plugins/admin/systems/class_glpiAccount.inc", + "phonetabs" => "plugins/admin/systems/tabs_phone.inc", + "goNtpServer" => "plugins/admin/systems/class_goNtpServer.inc", + "goSpamServerRule" => "plugins/admin/systems/class_goSpamServerRule.inc", + "componenttabs" => "plugins/admin/systems/tabs_component.inc", + "systems" => "plugins/admin/systems/class_systemManagement.inc", + "dhcpNewSectionDialog" => "plugins/admin/systems/class_dhcpNewSectionDialog.inc", + "termtabs" => "plugins/admin/systems/tabs_terminal.inc", + "glpiDeviceManagement" => "plugins/admin/systems/class_glpiDeviceManagement.inc", + "dhcpNetwork" => "plugins/admin/systems/class_dhcpNetwork.inc", + "goCupsServer" => "plugins/admin/systems/class_goCupsServer.inc", + "SelectDeviceType" => "plugins/admin/systems/class_SelectDeviceType.inc", + "goImapServer" => "plugins/admin/systems/class_goImapServer.inc", + "goMailServer" => "plugins/admin/systems/class_goMailServer.inc", + "gosaLogServer" => "plugins/admin/systems/class_gosaLogServer.inc", + "workgeneric" => "plugins/admin/systems/class_workstationGeneric.inc", + "glpiSelectUser" => "plugins/admin/systems/class_glpiSelectUser.inc", + "dhcpSharedNetwork" => "plugins/admin/systems/class_dhcpSharedNetwork.inc", + "printerPPDSelectionDialog" => "plugins/admin/systems/class_printerPPDSelectionDialog.inc", + "termservice" => "plugins/admin/systems/class_terminalService.inc", + "goLdapServer" => "plugins/admin/systems/class_goLdapServer.inc", + "componentGeneric" => "plugins/admin/systems/class_componentGeneric.inc", + "baseSelectDialog" => "plugins/admin/systems/class_baseSelectDialog.inc", + "servRepositorySetup" => "plugins/admin/systems/class_servRepositorySetup.inc", + "servdhcp" => "plugins/admin/systems/class_servDHCP.inc", + "wingeneric" => "plugins/admin/systems/class_winGeneric.inc", + "dhcpGroup" => "plugins/admin/systems/class_dhcpGroup.inc", + "termgeneric" => "plugins/admin/systems/class_terminalGeneric.inc", + "printgeneric" => "plugins/admin/systems/class_printGeneric.inc", + "glpiPrinterCartridgesEdit" => "plugins/admin/systems/class_glpiPrinterCartridgesEdit.inc", + "dhcpPool" => "plugins/admin/systems/class_dhcpPool.inc", + "divListSystemService" => "plugins/admin/systems/class_divListSystemService.inc", + "ServerService" => "plugins/admin/systems/class_serverService.inc", + "divListSystem" => "plugins/admin/systems/class_divListSystem.inc", + "glpiPrinterCartridges" => "plugins/admin/systems/class_glpiPrinterCartridges.inc", + "goKrbServer" => "plugins/admin/systems/class_goKrbServer.inc", + "servtabs" => "plugins/admin/systems/tabs_server.inc", + "wintabs" => "plugins/admin/systems/tabs_winstation.inc", + "glpiAttachmentPool" => "plugins/admin/systems/class_glpiAttachmentPool.inc", + "workstartup" => "plugins/admin/systems/class_workstationStartup.inc", + "workservice" => "plugins/admin/systems/class_workstationService.inc", + "servdns" => "plugins/admin/systems/class_servDNS.inc", + "goFaxServer" => "plugins/admin/systems/class_goFaxServer.inc", + "application" => "plugins/admin/applications/class_applicationGeneric.inc", + "applicationParameters" => "plugins/admin/applications/class_applicationParameters.inc", + "applicationManagement" => "plugins/admin/applications/class_applicationManagement.inc", + "divListApplication" => "plugins/admin/applications/class_divListApplication.inc", + "apptabs" => "plugins/admin/applications/tabs_application.inc", + "aclrole" => "plugins/admin/acl/class_aclRole.inc", + "divListACL" => "plugins/admin/acl/class_divListACL.inc", + "aclManagement" => "plugins/admin/acl/class_aclManagement.inc", + "acltab" => "plugins/admin/acl/tabs_acl.inc", + "aclroletab" => "plugins/admin/acl/tabs_acl_role.inc", + "grouptabs" => "plugins/admin/groups/tabs_group.inc", + "group" => "plugins/admin/groups/class_groupGeneric.inc", + "divListGroup" => "plugins/admin/groups/class_divListGroup.inc", + "groupManagement" => "plugins/admin/groups/class_groupManagement.inc", + "appgroup" => "plugins/admin/groups/class_groupApplication.inc", + "mailgroup" => "plugins/admin/groups/class_groupMail.inc", + "faiScriptEntry" => "plugins/admin/fai/class_faiScriptEntry.inc", + "faiPackage" => "plugins/admin/fai/class_faiPackage.inc", + "faiScript" => "plugins/admin/fai/class_faiScript.inc", + "tabsPartition" => "plugins/admin/fai/tabsPartition.inc", + "faiHookEntry" => "plugins/admin/fai/class_faiHookEntry.inc", + "tabsTemplate" => "plugins/admin/fai/tabsTemplate.inc", + "faiProfileEntry" => "plugins/admin/fai/class_faiProfileEntry.inc", + "faiPackageConfiguration" => "plugins/admin/fai/class_faiPackageConfiguration.inc", + "tabsVariable" => "plugins/admin/fai/tabsVariable.inc", + "faiPackageEntry" => "plugins/admin/fai/class_faiPackageEntry.inc", + "tabsProfile" => "plugins/admin/fai/tabsProfile.inc", + "faiManagement" => "plugins/admin/fai/class_faiManagement.inc", + "faiProfile" => "plugins/admin/fai/class_faiProfile.inc", + "askClassName" => "plugins/admin/fai/class_askClassName.inc", + "faiVariable" => "plugins/admin/fai/class_faiVariable.inc", + "faiPartitionTableEntry" => "plugins/admin/fai/class_faiPartitionTableEntry.inc", + "faiTemplate" => "plugins/admin/fai/class_faiTemplate.inc", + "divListFai" => "plugins/admin/fai/class_divListFai.inc", + "tabsScript" => "plugins/admin/fai/tabsScript.inc", + "faiPartitionTable" => "plugins/admin/fai/class_faiPartitionTable.inc", + "faiSummaryTab" => "plugins/admin/fai/class_faiSummaryTab.inc", + "faiVariableEntry" => "plugins/admin/fai/class_faiVariableEntry.inc", + "tabsHook" => "plugins/admin/fai/tabsHook.inc", + "tabsPackage" => "plugins/admin/fai/tabsPackage.inc", + "faiTemplateEntry" => "plugins/admin/fai/class_faiTemplateEntry.inc", + "faiHook" => "plugins/admin/fai/class_faiHook.inc", + "usertabs" => "plugins/admin/users/tabs_user.inc", + "divListUsers" => "plugins/admin/users/class_divListUsers.inc", + "userManagement" => "plugins/admin/users/class_userManagement.inc", + "ogroupManagement" => "plugins/admin/ogroups/class_ogroupManagement.inc", + "termgroup" => "plugins/admin/ogroups/class_termgroup.inc", + "mailogroup" => "plugins/admin/ogroups/class_mailogroup.inc", + "ogroup" => "plugins/admin/ogroups/class_ogroup.inc", + "ogrouptabs" => "plugins/admin/ogroups/tabs_ogroups.inc", + "divListOGroup" => "plugins/admin/ogroups/class_divListOGroup.inc", + "phonequeue" => "plugins/admin/ogroups/class_phonequeue.inc", + "department" => "plugins/admin/departments/class_departmentGeneric.inc", + "departmentManagement" => "plugins/admin/departments/class_departmentManagement.inc", + "deptabs" => "plugins/admin/departments/tabs_department.inc", + "divListDepartment" => "plugins/admin/departments/class_divListDepartment.inc", + "mimetype" => "plugins/admin/mimetypes/class_mimetypeGeneric.inc", + "mimetabs" => "plugins/admin/mimetypes/tabs_mimetypes.inc", + "mimetypeManagement" => "plugins/admin/mimetypes/class_mimetypeManagement.inc", + "divListMimeTypes" => "plugins/admin/mimetypes/class_divListMimeTypes.inc", + ); +?> \ No newline at end of file diff --git a/include/class_pluglist.inc b/include/class_pluglist.inc index 1327a6350..50e0c0f19 100644 --- a/include/class_pluglist.inc +++ b/include/class_pluglist.inc @@ -79,7 +79,7 @@ class pluglist { function check_access($aclname) { - $deps = $this->ui->get_module_departments($aclname); + $deps= $this->ui->get_module_departments($aclname); $acls_to_check = array(); if(preg_match("/,/",$aclname)){ diff --git a/include/class_userinfo.inc b/include/class_userinfo.inc index 8ac07ad71..f2aa91d85 100644 --- a/include/class_userinfo.inc +++ b/include/class_userinfo.inc @@ -170,12 +170,6 @@ class userinfo foreach($this->ocMapping[$category] as $oc){ $acl.= $this->get_permissions($dn, $category."/".$oc); } - } else { - if (isset($this->ocMapping['all'])){ - foreach($this->ocMapping['all'] as $oc){ - $acl.= $this->get_permissions($dn, $category."/".$oc); - } - } } return ($acl); diff --git a/include/functions.inc b/include/functions.inc index 5f31e35bd..6dc1e5f86 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -30,24 +30,34 @@ define("GL_SUBSEARCH", 1); define("GL_SIZELIMIT", 2); define("GL_CONVERT" , 4); +/* Heimdal stuff */ +define('UNIVERSAL',0x00); +define('INTEGER',0x02); +define('OCTET_STRING',0x04); +define('NULL',0x05); +define('OBJECT_IDENTIFIER ',0x06); +define('SEQUENCE',0x10); +define('SEQUENCE_OF',0x10); +define('SET',0x11); +define('SET_OF',0x11); +define('DEBUG',false); +define('HDB_KU_MKEY',0x484442); +define('TWO_BIT_SHIFTS',0x7efc); +define('DES_CBC_CRC',1); +define('DES_CBC_MD4',2); +define('DES_CBC_MD5',3); +define('DES3_CBC_MD5',5); +define('DES3_CBC_SHA1',16); + /* Define globals for revision comparing */ $svn_path = '$HeadURL$'; $svn_revision = '$Revision$'; /* Include required files */ -require_once ("class_ldap.inc"); -require_once ("class_config.inc"); -require_once ("class_plugin.inc"); -require_once ("class_acl.inc"); -require_once ("class_pluglist.inc"); -require_once ("class_userinfo.inc"); -require_once ("class_tabs.inc"); -require_once ("class_mail-methods.inc"); -require_once ("class_password-methods.inc"); +require_once("class_location.inc"); require_once ("functions_debug.inc"); require_once ("functions_dns.inc"); require_once ("accept-to-gettext.inc"); -require_once ("class_MultiSelectWindow.inc"); /* Define constants for debugging */ define ("DEBUG_TRACE", 1); @@ -82,6 +92,17 @@ $REWRITE= array( "ä" => "ae", "Ñ" => "Ny" ); +/* Class autoloader */ +function __autoload($class_name) { + global $class_mapping, $BASE_DIR; + if (isset($class_mapping[$class_name])){ + require_once($BASE_DIR."/".$class_mapping[$class_name]); + } else { + echo _("Fatal: cannot load class \"$class_name\" - execution aborted"); + } +} + + /* Function to include all class_ files starting at a given directory base */ function get_dir_list($folder= ".") diff --git a/include/heimdal/asnencode.php b/include/heimdal/asnencode.php index e41443b1b..d83c169d1 100644 --- a/include/heimdal/asnencode.php +++ b/include/heimdal/asnencode.php @@ -70,20 +70,6 @@ class stream{ } }; - define('UNIVERSAL',0x00); - - define('INTEGER',0x02); - //define('INTEGER',0x80); - define('OCTET_STRING',0x04); - //define('OCTET_STRING',0x81); - define('NULL',0x05); - define('OBJECT_IDENTIFIER ',0x06); - define('SEQUENCE',0x10); - define('SEQUENCE_OF',0x10); - define('SET',0x11); - define('SET_OF',0x11); - - class asnEncode{ diff --git a/include/heimdal/deslib.php b/include/heimdal/deslib.php index 55a806ef2..9b8393877 100644 --- a/include/heimdal/deslib.php +++ b/include/heimdal/deslib.php @@ -9,9 +9,6 @@ */ -define(DEBUG,false); -define(HDB_KU_MKEY,0x484442); - class Des{ var $in; @@ -674,7 +671,6 @@ class Des{ | ($PC1_DR[($tmp >> 9) & 0x7] << 2) | ($PC1_DR[($tmp >> 1) & 0x7] << 3); - define(TWO_BIT_SHIFTS,0x7efc); $two_bit_shifts = TWO_BIT_SHIFTS; $lix=0; for ($i = 16; $i > 0; $i--) { @@ -1129,4 +1125,4 @@ class Des{ -?> \ No newline at end of file +?> diff --git a/include/heimdal/genkey.php b/include/heimdal/genkey.php index 0a6531d8a..918a96fe3 100644 --- a/include/heimdal/genkey.php +++ b/include/heimdal/genkey.php @@ -8,15 +8,9 @@ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. */ -define(DES_CBC_CRC,1); -define(DES_CBC_MD4,2); -define(DES_CBC_MD5,3); -define(DES3_CBC_MD5,5); -define(DES3_CBC_SHA1,16); - -include("deslib.php"); -include("mkey.php"); -include("asnencode.php"); +require_once("deslib.php"); +require_once("mkey.php"); +require_once("asnencode.php"); class genkey{ @@ -173,4 +167,4 @@ class genkey{ } }; -?> \ No newline at end of file +?> diff --git a/include/php_setup.inc b/include/php_setup.inc index cbc0d1f87..096518f09 100644 --- a/include/php_setup.inc +++ b/include/php_setup.inc @@ -237,7 +237,7 @@ ini_set("register_globals",0); ini_set("track_vars",1); ini_set("display_errors",1); ini_set("report_memleaks",1); -ini_set("include_path",".:$BASE_DIR/include"); +ini_set("include_path",".:$BASE_DIR/include:$BASE_DIR/include/php_writeexcel"); /* Do smarty setup */ require("smarty/Smarty.class.php"); diff --git a/include/php_writeexcel/class.excel.php b/include/php_writeexcel/class.excel.php deleted file mode 100644 index bce7356f9..000000000 --- a/include/php_writeexcel/class.excel.php +++ /dev/null @@ -1,40 +0,0 @@ -_filename = $filename; - $this->writeexcel_workbook($filename); - } - - /** - * Send HTTP headers for the Excel file. - * - * @param string $filename The filename to use for HTTP headers - * @access public - */ - function send($filename) { // attachment - global $pref_lang; - $this->_tmpfilename = $filename; -/* if ($pref_lang == "ru") { - header (''); - } else { - header (''); - } -*/ header("Content-type: application/x-msexcel"); - header("Content-Disposition: inline; filename=$filename"); - header("Expires: 0"); - header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); - header("Pragma: public"); - } -} -?> diff --git a/include/php_writeexcel/class.writeexcel_workbookbig.inc.php b/include/php_writeexcel/class.writeexcel_workbookbig.inc.php deleted file mode 100644 index 8f0c752fd..000000000 --- a/include/php_writeexcel/class.writeexcel_workbookbig.inc.php +++ /dev/null @@ -1,54 +0,0 @@ -writeexcel_workbook($filename); - } - - function _store_OLE_file() { - $file=new ole_pps_file(asc2ucs("Book")); - $file->append($this->_data); - - for ($c=0;$c_worksheets);$c++) { - $worksheet=$this->_worksheets[$c]; - while ($data=$worksheet->get_data()) { - $file->append($data); - } - } - - $ole=new ole_pps_root(false, false, array($file)); - $ole->save($this->_filename); - } - -} - -?> diff --git a/plugins/addons/godfs/class_dfsManagment.inc b/plugins/addons/godfs/class_dfsManagment.inc index f1f9b04d8..4b527643e 100644 --- a/plugins/addons/godfs/class_dfsManagment.inc +++ b/plugins/addons/godfs/class_dfsManagment.inc @@ -1,7 +1,5 @@ by_name['phonequeue']= _("Phone queue"); $this->by_object['phonequeue']= new phonequeue($this->config, $this->dn); $this->by_object['phonequeue']->parent= &$this; @@ -79,7 +78,6 @@ class ogrouptabs extends tabs if((preg_match("/U/",$objects))&&(!isset($this->by_object['mailogroup']))){ if(isset($this->config->current['MAILMETHOD'])){ if (preg_match('/kolab/i', $this->config->current['MAILMETHOD'])){ - require_once("class_mailogroup.inc"); $this->by_name['mailogroup']= _("Mail"); $this->by_object['mailogroup']= new mailogroup($this->config, $this->dn); $this->by_object['mailogroup']->parent= &$this; @@ -89,7 +87,6 @@ class ogrouptabs extends tabs /* Add Terminal tab */ if(((preg_match("/T/",$objects)) || (preg_match("/W/",$objects)))&&(!isset($this->by_object['termgroup']))){ - require_once("class_termgroup.inc"); if(!isset($this->by_object['termgroup'])){ $this->by_name['termgroup']= _("System"); $this->by_object['termgroup']= new termgroup($this->config, $this->dn); @@ -187,7 +184,6 @@ class ogrouptabs extends tabs switch ($objects[$n]){ case "T": /* Add a terminal tab */ - require_once("class_termgroup.inc"); $this->by_name['termgroup']= _("Terminals"); $this->by_object['termgroup']= new termgroup($this->config, $this->dn); $this->by_object['termgroup']->parent= &$this; @@ -210,7 +206,6 @@ class ogrouptabs extends tabs /* We found goFonAccount in users objectClasses*/ if($use){ - require_once("class_phonequeue.inc"); $this->by_name['phonequeue']= _("Phone queue"); $this->by_object['phonequeue']= new phonequeue($this->config, $this->dn); $this->by_object['phonequeue']->parent= &$this; @@ -219,7 +214,6 @@ class ogrouptabs extends tabs /* Add a user tab used for mail distribution lists */ if(isset($this->config->current['MAILMETHOD'])){ if (preg_match('/kolab/i', $this->config->current['MAILMETHOD'])){ - require_once("class_mailogroup.inc"); $this->by_name['mailogroup']= _("Mail"); $this->by_object['mailogroup']= new mailogroup($this->config, $this->dn); $this->by_object['mailogroup']->parent= &$this; diff --git a/plugins/admin/systems/class_goCupsServer.inc b/plugins/admin/systems/class_goCupsServer.inc index a21271c5b..94f6d7fa4 100644 --- a/plugins/admin/systems/class_goCupsServer.inc +++ b/plugins/admin/systems/class_goCupsServer.inc @@ -1,7 +1,5 @@ data['MAIN']['PPD_PATH']))&&(is_dir($_SESSION['config']->data['MAIN']['PPD_PATH']))){ $path = $_SESSION['config']->data['MAIN']['PPD_PATH']; diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc index ec5a99bb2..c3d503b69 100644 --- a/plugins/admin/systems/class_printerPPDDialog.inc +++ b/plugins/admin/systems/class_printerPPDDialog.inc @@ -47,7 +47,6 @@ class printerPPDDialog extends plugin if(!((!is_dir($this->pathToPPD))||(empty($this->pathToPPD)))){ /* Load all available PPD files and sort them into an array */ - require_once ("class_ppdManager.inc"); $this->ppdManager= new ppdManager($this->pathToPPD); $this->getPrinterReload (); diff --git a/plugins/admin/systems/class_servDNS.inc b/plugins/admin/systems/class_servDNS.inc index 4662a0d17..b7cb873a4 100644 --- a/plugins/admin/systems/class_servDNS.inc +++ b/plugins/admin/systems/class_servDNS.inc @@ -1,7 +1,5 @@ $value){ - echo "$key located in $value\n"; + fwrite ($handle, " \"$key\" => \"$value\",\n"); } +fwrite ($handle, " );\n?>"); + +fclose($handle); ?> -- 2.30.2