hopefully settled the directory structure once and for all

This commit is contained in:
seek3r 2000-12-21 09:16:30 +00:00
parent 84286356ea
commit f795023f8f
51 changed files with 101 additions and 75 deletions

View File

@ -98,5 +98,5 @@
</table>
</form>
<?php
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
include($phpgw_info["server"]["api_inc"] . "/footer.inc.php");
?>

View File

@ -28,5 +28,5 @@ The instructions are as follows:
echo $phpgw_info["apps"][$key]["title"]."</A><BR>";
}
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
include($phpgw_info["server"]["api_inc"] . "/footer.inc.php");
?>

View File

@ -152,4 +152,4 @@
</table>
</form>
<?php include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); ?>
<?php include($phpgw_info["server"]["api_inc"] . "/footer.inc.php"); ?>

View File

@ -1,21 +1,11 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
<!ENTITY introduction SYSTEM "introduction.sgml">
<!ENTITY installation SYSTEM "installation.sgml">
<!ENTITY installing SYSTEM "install.sgml">
<!ENTITY using SYSTEM "using.sgml">
<!ENTITY admins SYSTEM "admins.sgml">
<!ENTITY about SYSTEM "about.sgml">
<!ENTITY installing SYSTEM "install.sgml">
<!ENTITY trobshoot SYSTEM "trouble.sgml">
<!ENTITY devdocs SYSTEM "devdocs.sgml">
<!ENTITY devintro SYSTEM "devintro.sgml">
<!ENTITY devguid SYSTEM "devguid.sgml">
<!ENTITY devinst SYSTEM "devinst.sgml">
<!ENTITY devinfra SYSTEM "devinfra.sgml">
<!ENTITY devapi SYSTEM "devapi.sgml">
<!ENTITY devconfvar SYSTEM "devconfvar.sgml">
<!ENTITY devlangsup SYSTEM "devlangsup.sgml">
<!ENTITY devtemp SYSTEM "devtemp.sgml">
<!ENTITY devabout SYSTEM "devabout.sgml">
<!ENTITY troubleshoot SYSTEM "trouble.sgml">
]>
<book>
<title>phpGroupWare Docs V0.05</title>
@ -33,7 +23,7 @@
<authorblurb>
<para>&lt;dan@kuykendall.org&gt</para>
</authorblurb>
<contrib><comment>the active developer of phpGroupWare</comment></contrib>
<contrib><comment>the phpGroupWare project leader</comment></contrib>
</author>
</authorgroup>
</bookinfo>
@ -48,7 +38,6 @@
&installation;
&using;
&admins;
&devdocs;
$troubleshoot;
&about;
</book>

View File

@ -1,4 +1,4 @@
<chapter id="trobleshooting">
<chapter id="troubleshoot">
<title>Trouble Shooting</title>
<warning>
<para>

View File

@ -29,7 +29,7 @@
\**************************************************************************/
$phpgw_info["server"]["server_root"] = "__SERVER_ROOT__";
$phpgw_info["server"]["api_dir"] = "__API_DIR__";
$phpgw_info["server"]["include_root"] = "__INCLUDE_ROOT__";
$phpgw_domain["default"] = array (
"db_host" => "__DB_HOST__",
@ -78,8 +78,9 @@
/**************************************************************************\
* Do not edit these lines *
\**************************************************************************/
$phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["include_root"]."/phpgwapi/inc";
include($phpgw_info["server"]["server_root"]."/version.inc.php");
$phpgw_info["server"]["header_version"] = "1.6";
$phpgw_info["server"]["header_version"] = "1.7";
// This is a fix for NT
if (!isset($phpgw_info["flags"]["noapi"]) ||
!$phpgw_info["flags"]["noapi"] == True){

View File

@ -169,6 +169,5 @@
<TR><TD></TD></TR>
</TABLE>
<?php
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
?>
include($phpgw_info["server"]["api_inc"] . "/footer.inc.php");
?>

View File

@ -34,7 +34,7 @@
}
*/
$phpgw_info["server"]["template_dir"] = $phpgw_info["server"]["api_dir"]."/templates/default";
$phpgw_info["server"]["template_dir"] = $phpgw_info["server"]["server_root"]."/phpgwapi/templates/default";
$tmpl = new Template($phpgw_info["server"]["template_dir"]);
if (! $deny_login && ! $phpgw_info["server"]["show_domain_selectbox"]) {

View File

@ -21,7 +21,10 @@
/**************************************************************************\
* Include the apps footer files if it exists *
\**************************************************************************/
if (file_exists ($phpgw_info["server"]["app_inc"]."/footer.inc.php")){
if (file_exists ($phpgw_info["server"]["app_inc"]."/footer.inc.php")
&& $phpgw_info["flags"]["currentapp"] != "home"
&& $phpgw_info["flags"]["currentapp"] != "login"
&& $phpgw_info["flags"]["currentapp"] != "logout"){
include($phpgw_info["server"]["app_inc"]."/footer.inc.php");
}

View File

@ -12,7 +12,7 @@
/* $Id$ */
$d1 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3));
$d1 = strtolower(substr($phpgw_info["server"]["api_inc"],0,3));
$d2 = strtolower(substr($phpgw_info["server"]["server_root"],0,3));
if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp") {
echo "Failed attempt to break in via an old Security Hole!<br>\n";
@ -31,24 +31,24 @@
/**************************************************************************\
* Load up all the base files *
\**************************************************************************/
include($phpgw_info["server"]["api_dir"] . "/phpgw_info.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_info.inc.php");
/**************************************************************************\
* Required classes *
\**************************************************************************/
/* Load selected database class */
if (empty($phpgw_info["server"]["db_type"])){$phpgw_info["server"]["db_type"] = "mysql";}
include($phpgw_info["server"]["api_dir"] . "/phpgw_db_".$phpgw_info["server"]["db_type"].".inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_db_".$phpgw_info["server"]["db_type"].".inc.php");
include($phpgw_info["server"]["api_dir"] . "/phpgw_session.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_session.inc.php");
/* Load selected translation class */
if (empty($phpgw_info["server"]["translation_system"])){$phpgw_info["server"]["translation_system"] = "sql";}
include($phpgw_info["server"]["api_dir"] . "/phpgw_lang_".$phpgw_info["server"]["translation_system"].".inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_lang_".$phpgw_info["server"]["translation_system"].".inc.php");
include($phpgw_info["server"]["api_dir"] . "/phpgw_crypto.inc.php");
include($phpgw_info["server"]["api_dir"] . "/phpgw_template.inc.php");
include($phpgw_info["server"]["api_dir"] . "/phpgw_common.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_crypto.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_template.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_common.inc.php");
/**************************************************************************\
* Optional classes, which can be disabled for performance increases *
@ -65,47 +65,47 @@
$phpgw->crypto = new crypto($phpgw->common->key,$phpgw->common->iv);
if ($phpgw_info["flags"]["enable_categories_class"]) {
include($phpgw_info["server"]["api_dir"] . "/phpgw_categories.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_categories.inc.php");
$phpgw->categories = new categories;
}
if ($phpgw_info["flags"]["enable_network_class"]) {
include($phpgw_info["server"]["api_dir"] . "/phpgw_network.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_network.inc.php");
$phpgw->network = new network;
}
if ($phpgw_info["flags"]["enable_send_class"]) {
include($phpgw_info["server"]["api_dir"] . "/phpgw_send.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_send.inc.php");
$phpgw->send = new send;
}
if ($phpgw_info["flags"]["enable_nextmatchs_class"]) {
include($phpgw_info["server"]["api_dir"] . "/phpgw_nextmatchs.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_nextmatchs.inc.php");
$phpgw->nextmatchs = new nextmatchs;
}
if ($phpgw_info["flags"]["enable_utilities_class"]) {
include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities.inc.php");
$phpgw->utilities = new utilities;
}
if ($phpgw_info["flags"]["enable_vfs_class"]) {
include($phpgw_info["server"]["api_dir"] . "/phpgw_vfs.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_vfs.inc.php");
$phpgw->vfs = new vfs;
}
if ($phpgw_info["flags"]["enable_todo_class"]) {
include($phpgw_info["server"]["api_dir"] . "/phpgw_todo.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_todo.inc.php");
$phpgw->todo = new todo;
}
if ($phpgw_info["flags"]["enable_calendar_class"]) {
include($phpgw_info["server"]["api_dir"] . "/phpgw_calendar.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_calendar.inc.php");
$phpgw->calendar = new calendar;
}
if ($phpgw_info["flags"]["enable_addressbook_class"]) {
include($phpgw_info["server"]["api_dir"] . "/phpgw_addressbook.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_addressbook.inc.php");
$phpgw->addressbook = new addressbook;
}
@ -170,12 +170,12 @@
/* Load selected authentication class */
if (empty($phpgw_info["server"]["auth_type"])){$phpgw_info["server"]["auth_type"] = "sql";}
include($phpgw_info["server"]["api_dir"] . "/phpgw_auth_".$phpgw_info["server"]["auth_type"].".inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_auth_".$phpgw_info["server"]["auth_type"].".inc.php");
/* Load selected accounts class */
if (empty($phpgw_info["server"]["account_repository"])){$phpgw_info["server"]["account_repository"] = $phpgw_info["server"]["auth_type"];}
include($phpgw_info["server"]["api_dir"] . "/phpgw_accounts_".$phpgw_info["server"]["account_repository"].".inc.php");
include($phpgw_info["server"]["api_dir"] . "/phpgw_accounts_shared.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_".$phpgw_info["server"]["account_repository"].".inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_shared.inc.php");
/**************************************************************************\
* Continue adding the classes *
@ -363,13 +363,13 @@
/**************************************************************************\
* These lines load up the themes *
\**************************************************************************/
include($phpgw_info["server"]["api_dir"] . "/themes/" .
include($phpgw_info["server"]["server_root"] . "/phpgwapi/themes/" .
$phpgw_info["user"]["preferences"]["common"]["theme"] . ".theme");
if ($phpgw_info["theme"]["bg_color"] == "") {
/* Looks like there was a problem finding that theme. Try the default */
echo "Warning: error locating selected theme";
include ($phpgw_info["server"]["api_dir"] . "/themes/default.theme");
include ($phpgw_info["server"]["server_root"] . "/phpgwapi/themes/default.theme");
if ($phpgw_info["theme"]["bg_color"] == "") {
// Hope we don't get to this point. Better then the user seeing a
// complety back screen and not know whats going on

View File

@ -11,7 +11,7 @@
/* $Id$ */
$d1 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3));
$d1 = strtolower(substr($phpgw_info["server"]["api_inc"],0,3));
$d2 = strtolower(substr($phpgw_info["server"]["server_root"],0,3));
if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp") {
echo "Failed attempt to break in via an old Security Hole!<br>\n";
@ -224,6 +224,40 @@
return $output_text;
}
function get_app_dir($appname = ""){
global $phpgw_info;
if ($appname == ""){$appname = $phpgw_info["flags"]["currentapp"];}
if ($appname == "home" || $appname == "logout" || $appname == "login"){$appname = "phpgwapi";}
$appdir = $phpgw_info["server"]["include_root"]."/".$appname;
$appdir_default = $phpgw_info["server"]["server_root"]."/".$appname;
if (is_dir ($appdir)){
return $appdir;
}elseif (is_dir ($appdir_default)){
return $appdir_default;
}else{
return False;
}
}
function get_inc_dir($appname = ""){
global $phpgw_info;
if ($appname == ""){$appname = $phpgw_info["flags"]["currentapp"];}
if ($appname == "home" || $appname == "logout" || $appname == "login"){$appname = "phpgwapi";}
$incdir = $phpgw_info["server"]["include_root"]."/".$appname."/inc";
$incdir_default = $phpgw_info["server"]["server_root"]."/".$appname."/inc";
if (is_dir ($incdir)){
return $incdir;
}elseif (is_dir ($incdir_default)){
return $incdir_default;
}else{
return False;
}
}
function get_tpl_dir($appname = ""){
global $phpgw_info;
if ($appname == ""){$appname = $phpgw_info["flags"]["currentapp"];}
@ -554,7 +588,7 @@
function phpgw_footer()
{
global $phpgw, $phpgw_info, $HTMLCOMPLAINT;
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
include($phpgw_info["server"]["api_inc"] . "/footer.inc.php");
// Clean up mcrypt
if (is_object($this->crypto)) {

View File

@ -12,7 +12,7 @@
/* $Id$ */
$d1 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3));
$d1 = strtolower(substr($phpgw_info["server"]["api_inc"],0,3));
$d2 = strtolower(substr($phpgw_info["server"]["server_root"],0,3));
if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp") {
echo "Failed attempt to break in via an old Security Hole!<br>\n";
@ -98,8 +98,8 @@
$phpgw_info["server"]["images_dir"] = $phpgw->common->get_image_path("phpgwapi");
// }
$phpgw_info["server"]["app_root"] = $phpgw_info["server"]["server_root"]."/".$phpgw_info["flags"]["currentapp"];
$phpgw_info["server"]["app_inc"] = $phpgw_info["server"]["app_root"]."/inc";
$phpgw_info["server"]["app_root"] = $phpgw->common->get_app_dir();
$phpgw_info["server"]["app_inc"] = $phpgw->common->get_inc_dir();
$phpgw_info["server"]["app_images"] = $phpgw->common->get_image_path();
$phpgw_info["server"]["app_tpl"] = $phpgw->common->get_tpl_dir();
@ -107,8 +107,6 @@
$phpgw_info["user"]["private_dir"] = $phpgw_info["server"]["files_dir"] . "/users/"
. $phpgw_info["user"]["userid"];
$phpgw_info["server"]["my_include_dir"] = $phpgw_info["server"]["app_inc"];
// This shouldn't happen, but if it does get ride of the warnings it will spit out
if (gettype($phpgw_info["user"]["preferences"]) != "array") {
$phpgw_info["user"]["preferences"] = array();

View File

@ -12,17 +12,17 @@
/* $Id$ */
$d1 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3));
$d1 = strtolower(substr($phpgw_info["server"]["api_inc"],0,3));
if($d1 == "htt" || $d1 == "ftp") {
echo "Failed attempt to break in via an old Security Hole!<br>\n";
exit;
} unset($d1);
include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities_rssparse.inc.php");
include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities_clientsniffer.inc.php");
include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities_http.inc.php");
include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities_matrixview.inc.php");
include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities_menutree.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities_rssparse.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities_clientsniffer.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities_http.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities_matrixview.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities_menutree.inc.php");
class utilities
{

View File

@ -28,7 +28,7 @@
exit;
}
$dh = opendir($phpgw_info["server"]["api_dir"] . "/themes");
$dh = opendir($phpgw_info["server"]["api_inc"] . "/themes");
while ($file = readdir($dh)) {
if (eregi("\.theme$", $file)) {
$installed_themes[] = substr($file,0,strpos($file,"."));

View File

@ -96,13 +96,15 @@
$phpgw_info["server"]["db_type"] = $phpgw_domain[$phpgw_info["server"]["default_domain"]]["db_type"];
$phpgw_info["server"]["config_passwd"] = $phpgw_domain[$phpgw_info["server"]["default_domain"]]["config_passwd"];
}
if (!isset($phpgw_info["server"]["api_dir"])) {
$phpgw_info["server"]["api_dir"] = $phpgw_info["server"]["server_root"]."/phpgwapi";
if (!isset($phpgw_info["server"]["include_root"]) && $phpgw_info["server"]["header_version"] <= 1.6) {
$phpgw_info["server"]["include_root"] = $phpgw_info["server"]["server_root"];
}elseif (!isset($phpgw_info["server"]["header_version"]) && $phpgw_info["server"]["header_version"] <= 1.6) {
$phpgw_info["server"]["include_root"] = $phpgw_info["server"]["server_root"];
}
} else {
echo "sample configuration not found. using built in defaults<br>\n";
$phpgw_info["server"]["server_root"] = "/path/to/phpgroupware";
$phpgw_info["server"]["api_dir"] = "/path/to/phpgroupware/phpgwapi";
$phpgw_info["server"]["include_root"] = "/path/to/phpgroupware";
/* This is the basic include needed on each page for phpGroupWare application compliance */
$phpgw_info["flags"]["htmlcompliant"] = True;
@ -137,7 +139,7 @@
$this_dir = dirname($SCRIPT_FILENAME);
$updir = ereg_replace("/setup","",$this_dir);
$phpgw_info["server"]["server_root"] = $updir;
$phpgw_info["server"]["api_dir"] = $updir."/phpgwapi";
$phpgw_info["server"]["include_root"] = $updir;
}
?>
</td></tr>
@ -145,7 +147,7 @@
<form action="<? echo $PHP_SELF ?>" method=post>
<input type=hidden name=write_config value=true>
<tr><td colspan=2><b>Server Root</b><br><input type=text name=server_root size=80 value="<? echo $phpgw_info["server"]["server_root"] ?>"></td></tr>
<tr><td colspan=2><b>phpGW API Dir</b><br><input type=text name=api_dir size=80 value="<? echo $phpgw_info["server"]["api_dir"] ?>"></td></tr>
<tr><td colspan=2><b>Include Root (this should be the same as Server Root unless you know what you are doing)</b><br><input type=text name=include_root size=80 value="<? echo $phpgw_info["server"]["include_root"] ?>"></td></tr>
<tr><td><b>DB Host</b><br><input type=text name=db_host value="<? echo $phpgw_info["server"]["db_host"] ?>"></td><td>Hostname/IP of Databaseserver</td></tr>
<tr><td><b>DB Name</b><br><input type=text name=db_name value="<? echo $phpgw_info["server"]["db_name"] ?>"></td><td>Name of Database</td></tr>
<tr><td><b>DB User</b><br><input type=text name=db_user value="<? echo $phpgw_info["server"]["db_user"] ?>"></td><td>Name of DB User as phpgroupware has to connect as</td></tr>

View File

@ -147,10 +147,10 @@
{
global $phpgw_info, $phpgw_domain, $SetupDomain, $db;
/* Database setup */
if (!isset($phpgw_info["server"]["api_dir"])) {
$phpgw_info["server"]["api_dir"] = $phpgw_info["server"]["server_root"]."/phpgwapi";
if (!isset($phpgw_info["server"]["api_inc"])) {
$phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["server_root"]."/phpgwapi/inc";
}
include($phpgw_info["server"]["api_dir"] . "/phpgw_db_".$phpgw_domain[$SetupDomain]["db_type"].".inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_db_".$phpgw_domain[$SetupDomain]["db_type"].".inc.php");
$db = new db;
$db->Host = $phpgw_domain[$SetupDomain]["db_host"];
$db->Type = $phpgw_domain[$SetupDomain]["db_type"];

View File

@ -19,9 +19,9 @@
// Authorize the user to use setup app and load the database
// include("./inc/setup_auth.inc.php");
// Does not return unless user is authorized
$phpgw_info["server"]["api_dir"] =
$phpgw_info["server"]["api_inc"] =
$phpgw_info["server"]["include_root"]."/phpgwapi";
include($phpgw_info["server"]["api_dir"] . "/phpgw_common.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_common.inc.php");
$common = new common;
loaddb();
@ -77,8 +77,8 @@
}
if (! $error) {
include($phpgw_info["server"]["api_dir"] . "/phpgw_accounts_ldap.inc.php");
include($phpgw_info["server"]["api_dir"] . "/phpgw_accounts_shared.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_ldap.inc.php");
include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_shared.inc.php");
$accounts = new accounts;
while ($app = each($s_apps)) {

View File

@ -12,4 +12,4 @@
/* $Id$ */
$phpgw_info["server"]["version"] = "0.9.8pre5";
$phpgw_info["server"]["current_header_version"] = "1.6";
$phpgw_info["server"]["current_header_version"] = "1.7";