mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-26 07:45:58 +02:00
Setup will now read the directorys and figure out which applications are present, then it will insert into the phpgw_applications table depending on what was found
This commit is contained in:
2
addressbook/setup/setup_info.inc.php
Normal file
2
addressbook/setup/setup_info.inc.php
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
$setup_info["addressbook"] = array("name" => "Addressbook", "app_order" => 7, "version" => "0.0.1");
|
2
admin/setup/setup_info.inc.php
Normal file
2
admin/setup/setup_info.inc.php
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
$setup_info["admin"] = array("name" => "Administration", "app_order" => 1, "version" => "0.0.1");
|
2
calendar/setup/setup_info.inc.php
Normal file
2
calendar/setup/setup_info.inc.php
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
$setup_info["calendar"] = array("name" => "Calendar", "app_order" => 9, "version" => "0.0.1");
|
@@ -21,6 +21,17 @@
|
|||||||
} unset($d1);unset($d2);unset($d3);
|
} unset($d1);unset($d2);unset($d3);
|
||||||
/* ######## End security check ########## */
|
/* ######## End security check ########## */
|
||||||
|
|
||||||
|
// This is needed is some parts of setup, until we include the API directly
|
||||||
|
function filesystem_separator()
|
||||||
|
{
|
||||||
|
if (PHP_OS == 'Windows' || PHP_OS == 'OS/2') {
|
||||||
|
return '\\';
|
||||||
|
} else {
|
||||||
|
return '/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
define('SEP',filesystem_separator());
|
||||||
|
|
||||||
// Include to check user authorization against the
|
// Include to check user authorization against the
|
||||||
// password in ../header.inc.php to protect all of the setup
|
// password in ../header.inc.php to protect all of the setup
|
||||||
// pages from unauthorized use.
|
// pages from unauthorized use.
|
||||||
|
@@ -11,24 +11,25 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
// This is so we can enable or disable apps for the phpGroupWare and phpGroupWare Plus packges
|
$reserved_directorys = array('phpgwapi' => True, 'doc' => True, 'setup' => True, '.' => True,
|
||||||
// This is for the base apps, which should always be included
|
'..' => True, 'CVS' => True, 'files' => True);
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('admin', 'Administration', 1, 1, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('addressbook', 'Address Book', 1, 7, 'addressbook', '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
$i = 30;
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('filemanager', 'File manager', 1, 6, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
$dh = opendir(PHPGW_SERVER_ROOT);
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('calendar', 'Calendar', 1, 9, 'calendar_entry,calendar_entry_users,calendar_entry_repeats', '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
while ($dir = readdir($dh)) {
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('cron_apps', 'cron_apps', 0, 0, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
if (! $reserved_directorys[$dir] && is_dir(PHPGW_SERVER_ROOT . SEP . $dir)) {
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('email', 'Email', 1, 10,NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
if (is_file(PHPGW_SERVER_ROOT . SEP . $dir . SEP . 'setup' . SEP . 'setup_info.inc.php')) {
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('nntp', 'NNTP', 1, 11, 'newsgroups', '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
include(PHPGW_SERVER_ROOT . SEP . $dir . SEP . 'setup' . SEP . 'setup_info.inc.php');
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 14, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
} else {
|
||||||
// This is for the add-on application, which are enabled/disabled based being in the regular or plus version
|
$setup_info[$dir] = array('name' => $dir, 'app_order' => $i++, 'version' => '0.0.0');
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('todo', 'ToDo List', 1, 8, 'todo', '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
}
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 1, 13, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
}
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('tts', 'Trouble Ticket System', 1, 2, NULL, '0.0.0')");
|
}
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('inv', 'Inventory', 1, 3, NULL, '0.0.0')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('chat', 'Chat', 1, 4, NULL, '0.0.0')");
|
while ($app = each($setup_info)) {
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('headlines', 'Headlines', 1, 5, 'news_sites,news_headlines', '0.0.0')");
|
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order,"
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
. " app_tables, app_version) values ('" . $app[0] . "', '" . $app[1]["name"]
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('bookmarks', 'Book Marks', 1, 15, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
. "',1," . $app[1]['app_order'] . ", '" . $app[1]['app_tables'] . "', '"
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('manual', 'Manual', 1, 16, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
. $app[1]['version'] . "')");
|
||||||
|
}
|
||||||
?>
|
?>
|
@@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**************************************************************************\
|
|
||||||
* phpGroupWare - Setup *
|
|
||||||
* http://www.phpgroupware.org *
|
|
||||||
* -------------------------------------------- *
|
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
|
||||||
* under the terms of the GNU General Public License as published by the *
|
|
||||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
|
||||||
* option) any later version. *
|
|
||||||
\**************************************************************************/
|
|
||||||
|
|
||||||
/* $Id$ */
|
|
||||||
|
|
||||||
// This is so we can enable or disable apps for the phpGroupWare and phpGroupWare Plus packges
|
|
||||||
// This is for the base apps, which should always be included
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('admin', 'Administration', 1, 1, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('addressbook', 'Address Book', 1, 7, 'addressbook', '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('filemanager', 'File manager', 1, 6, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('calendar', 'Calendar', 1, 9, 'calendar_entry,calendar_entry_users,calendar_entry_repeats', '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('cron_apps', 'cron_apps', 0, 0, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('email', 'Email', 1, 10,NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('nntp', 'NNTP', 1, 11, 'newsgroups', '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 14, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
// This is for the add-on application, which are enabled/disabled based being in the regular or plus version
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('todo', 'ToDo List', 1, 8, 'todo', '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 1, 13, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('tts', 'Trouble Ticket System', 1, 2, NULL, '0.0.0')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('inv', 'Inventory', 1, 3, NULL, '0.0.0')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('chat', 'Chat', 1, 4, NULL, '0.0.0')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('headlines', 'Headlines', 1, 5, 'news_sites,news_headlines', '0.0.0')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('bookmarks', 'Book Marks', 1, 15, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
$phpgw_setup->db->query("insert into phpgw_applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('manual', 'Manual', 1, 16, NULL, '".$phpgw_info["setup"]["currentver"]["phpgwapi"]."')");
|
|
||||||
?>
|
|
Reference in New Issue
Block a user