mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Fixed functions.inc.php being included instead of the apps functions.inc.php file
This commit is contained in:
parent
b161971275
commit
58bb2a282f
@ -333,25 +333,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
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_INCLUDE_ROOT . "/" . $appname . "/inc";
|
||||
$incdir_default = PHPGW_SERVER_ROOT . "/" . $appname . "/inc";
|
||||
|
||||
if (is_dir ($incdir)){
|
||||
return $incdir;
|
||||
}elseif (is_dir ($incdir_default)){
|
||||
return $incdir_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_INCLUDE_ROOT . "/" . $appname . "/inc";
|
||||
$incdir_default = PHPGW_SERVER_ROOT . "/" . $appname . "/inc";
|
||||
|
||||
if (is_dir ($incdir)) {
|
||||
return $incdir;
|
||||
} elseif (is_dir ($incdir_default)) {
|
||||
return $incdir_default;
|
||||
} else {
|
||||
return False;
|
||||
}
|
||||
}
|
||||
|
||||
function list_themes()
|
||||
@ -486,7 +488,7 @@
|
||||
$phpgw_info["navbar"][$permission[0]]["title"] = $phpgw_info["apps"][$permission[0]]["title"];
|
||||
$phpgw_info["navbar"][$permission[0]]["url"] = $phpgw->link($phpgw_info["server"]["webserver_url"]
|
||||
. "/" . $permission[0] . "/index.php");
|
||||
$icon_file = $phpgw_info["server"]["server_root"]."/".$permission[0] . "/templates/". $phpgw_info["server"]["template_set"]. "/images/navbar.gif";
|
||||
$icon_file = PHPGW_SERVER_ROOT . "/".$permission[0] . "/templates/". $phpgw_info["server"]["template_set"]. "/images/navbar.gif";
|
||||
if (file_exists($icon_file)){
|
||||
$phpgw_info["navbar"][$permission[0]]["icon"] = $phpgw_info["server"]["webserver_url"] . "/"
|
||||
. $permission[0] . "/templates/" . $phpgw_info["server"]["template_set"] . "/images/navbar.gif";
|
||||
|
@ -364,13 +364,12 @@
|
||||
* Load the app include files if the exists *
|
||||
\*************************************************************************/
|
||||
/* Then the include file */
|
||||
if (!preg_match ("/phpgwapi/i", $phpgw_info["server"]["app_inc"]) && file_exists ($phpgw_info["server"]["app_inc"]."/functions.inc.php")){
|
||||
include(PHPGW_API_INC."/functions.inc.php");
|
||||
if (! preg_match ("/phpgwapi/i", PHPGW_APP_INC) && file_exists(PHPGW_APP_INC."/functions.inc.php")){
|
||||
include(PHPGW_APP_INC . "/functions.inc.php");
|
||||
}
|
||||
if (!$phpgw_info["flags"]["noheader"] &&
|
||||
!$phpgw_info["flags"]["noappheader"] &&
|
||||
file_exists ($phpgw_info["server"]["app_inc"]."/header.inc.php")) {
|
||||
include(PHPGW_API_INC."/header.inc.php");
|
||||
if (!$phpgw_info["flags"]["noheader"] && ! $phpgw_info["flags"]["noappheader"] &&
|
||||
file_exists(PHPGW_APP_INC . "/header.inc.php")) {
|
||||
include(PHPGW_APP_INC . "/header.inc.php");
|
||||
}
|
||||
}
|
||||
error_reporting(7);
|
||||
|
Loading…
Reference in New Issue
Block a user