forked from extern/egroupware
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:
parent
a411f728ee
commit
cf3564035a
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);
|
||||
/* ######## 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
|
||||
// password in ../header.inc.php to protect all of the setup
|
||||
// pages from unauthorized use.
|
||||
|
@ -11,24 +11,25 @@
|
||||
|
||||
/* $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"]."')");
|
||||
$reserved_directorys = array('phpgwapi' => True, 'doc' => True, 'setup' => True, '.' => True,
|
||||
'..' => True, 'CVS' => True, 'files' => True);
|
||||
|
||||
$i = 30;
|
||||
$dh = opendir(PHPGW_SERVER_ROOT);
|
||||
while ($dir = readdir($dh)) {
|
||||
if (! $reserved_directorys[$dir] && is_dir(PHPGW_SERVER_ROOT . SEP . $dir)) {
|
||||
if (is_file(PHPGW_SERVER_ROOT . SEP . $dir . SEP . 'setup' . SEP . 'setup_info.inc.php')) {
|
||||
include(PHPGW_SERVER_ROOT . SEP . $dir . SEP . 'setup' . SEP . 'setup_info.inc.php');
|
||||
} else {
|
||||
$setup_info[$dir] = array('name' => $dir, 'app_order' => $i++, 'version' => '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 ('" . $app[0] . "', '" . $app[1]["name"]
|
||||
. "',1," . $app[1]['app_order'] . ", '" . $app[1]['app_tables'] . "', '"
|
||||
. $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"]."')");
|
||||
?>
|
Loading…
Reference in New Issue
Block a user