mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 19:33:54 +01:00
Various cleanups. Trying to remove some warnings when generating php errors to a file.
This commit is contained in:
parent
6880158394
commit
dc7578a39a
@ -15,7 +15,9 @@
|
||||
/* $Id$ */
|
||||
|
||||
CreateObject('calendar.calendar_item');
|
||||
if($phpgw_info['server']['calendar_type'] == 'mcal' && extension_loaded('mcal') == False)
|
||||
if(isset($phpgw_info['server']['calendar_type']) &&
|
||||
$phpgw_info['server']['calendar_type'] == 'mcal' &&
|
||||
extension_loaded('mcal') == False)
|
||||
{
|
||||
$phpgw_info['server']['calendar_type'] = 'sql';
|
||||
}
|
||||
|
@ -540,6 +540,7 @@
|
||||
else
|
||||
{
|
||||
$rights = 0;
|
||||
$apps[$db2->f('acl_appname')] = 0;
|
||||
}
|
||||
$rights |= $db2->f('acl_rights');
|
||||
$apps[$db2->f('acl_appname')] |= $rights;
|
||||
|
@ -60,7 +60,8 @@
|
||||
function read_repository()
|
||||
{
|
||||
global $phpgw, $phpgw_info;
|
||||
if (gettype($phpgw_info['apps']) != 'array')
|
||||
if (!isset($phpgw_info['apps']) ||
|
||||
gettype($phpgw_info['apps']) != 'array')
|
||||
{
|
||||
$this->read_installed_apps();
|
||||
}
|
||||
@ -71,7 +72,7 @@
|
||||
while ($app = each($phpgw_info['apps']))
|
||||
{
|
||||
// $check = $phpgw->acl->check('run',1,$app[0]);
|
||||
$check = $apps[$app[0]];
|
||||
$check = (isset($apps[$app[0]])?$apps[$app[0]]:False);
|
||||
if ($check)
|
||||
{
|
||||
$this->data[$app[0]] = array(
|
||||
|
@ -800,7 +800,10 @@
|
||||
$this->navbar(False);
|
||||
include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $phpgw_info['server']['template_set']
|
||||
. '/navbar.inc.php');
|
||||
if ((! isset($phpgw_info['flags']['nonavbar']) || ! $phpgw_info['flags']['nonavbar']) && ! $phpgw_info['flags']['navbar_target'])
|
||||
if ((!isset($phpgw_info['flags']['nonavbar']) ||
|
||||
!$phpgw_info['flags']['nonavbar']) &&
|
||||
(!isset($phpgw_info['flags']['navbar_target']) ||
|
||||
!$phpgw_info['flags']['navbar_target']))
|
||||
{
|
||||
echo parse_navbar();
|
||||
}
|
||||
@ -1165,7 +1168,8 @@
|
||||
}
|
||||
|
||||
/* This is going to be used to switch to the nntp class */
|
||||
if ($phpgw_info['flags']['newsmode'])
|
||||
if (isset($phpgw_info['flags']['newsmode']) &&
|
||||
$phpgw_info['flags']['newsmode'])
|
||||
{
|
||||
$prefs['email']['mail_server_type'] = 'nntp';
|
||||
}
|
||||
|
@ -23,16 +23,6 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$d1 = strtolower(substr($phpgw_info["server"]["api_inc"],0,3));
|
||||
$d2 = strtolower(substr($phpgw_info["server"]["server_root"],0,3));
|
||||
$d3 = strtolower(substr($phpgw_info["server"]["app_inc"],0,3));
|
||||
if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp" || $d3 == "htt" || $d3 == "ftp")
|
||||
{
|
||||
echo "Failed attempt to break in via an old Security Hole!<br>\n";
|
||||
exit;
|
||||
}
|
||||
unset($d1);unset($d2);unset($d3);
|
||||
|
||||
/*!
|
||||
@class hooks
|
||||
@abstract class which gives ability for applications to set and use hooks to communicate with each other
|
||||
@ -56,7 +46,14 @@
|
||||
$return_array[$db->f("hook_id")]["location"] = $db->f("hook_location");
|
||||
$return_array[$db->f("hook_id")]["filename"] = $db->f("hook_filename");
|
||||
}
|
||||
return $return_array;
|
||||
if(isset($return_array))
|
||||
{
|
||||
return $return_array;
|
||||
}
|
||||
else
|
||||
{
|
||||
return False;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -221,32 +221,41 @@
|
||||
$phpgw_info["user"]["preferences"] = array();
|
||||
}
|
||||
/* This takes care of new users who dont have proper default prefs setup */
|
||||
if (! $phpgw_info["flags"]["nocommon_preferences"]) {
|
||||
if (! $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]) {
|
||||
if (!isset($phpgw_info['flags']['nocommon_preferences']) ||
|
||||
!$phpgw_info["flags"]["nocommon_preferences"]) {
|
||||
$preferences_update = False;
|
||||
if (!isset($phpgw_info['user']['preferences']['common']['maxmatchs']) ||
|
||||
!$phpgw_info["user"]["preferences"]["common"]["maxmatchs"]) {
|
||||
$this->add("common","maxmatchs",15);
|
||||
$preferences_update = True;
|
||||
}
|
||||
if (! $phpgw_info["user"]["preferences"]["common"]["theme"]) {
|
||||
if (!isset($phpgw_info['user']['preferences']['common']['theme']) ||
|
||||
!$phpgw_info["user"]["preferences"]["common"]["theme"]) {
|
||||
$this->add("common","theme","default");
|
||||
$preferences_update = True;
|
||||
}
|
||||
if (! $phpgw_info["user"]["preferences"]["common"]["template_set"]) {
|
||||
if (!isset($phpgw_info['user']['preferences']['common']['template_set']) ||
|
||||
!$phpgw_info["user"]["preferences"]["common"]["template_set"]) {
|
||||
$this->add("common","template_set","default");
|
||||
$preferences_update = True;
|
||||
}
|
||||
if (! $phpgw_info["user"]["preferences"]["common"]["dateformat"]) {
|
||||
if (!isset($phpgw_info['user']['preferences']['common']['dateformat']) ||
|
||||
!$phpgw_info["user"]["preferences"]["common"]["dateformat"]) {
|
||||
$this->add("common","dateformat","m/d/Y");
|
||||
$preferences_update = True;
|
||||
}
|
||||
if (! $phpgw_info["user"]["preferences"]["common"]["timeformat"]) {
|
||||
if (!isset($phpgw_info['user']['preferences']['common']['timeformat']) ||
|
||||
!$phpgw_info["user"]["preferences"]["common"]["timeformat"]) {
|
||||
$this->add("common","timeformat",12);
|
||||
$preferences_update = True;
|
||||
}
|
||||
if (! $phpgw_info["user"]["preferences"]["common"]["lang"]) {
|
||||
if (!isset($phpgw_info['user']['preferences']['common']['lang']) ||
|
||||
!$phpgw_info["user"]["preferences"]["common"]["lang"]) {
|
||||
$this->add("common","lang",$phpgw->common->getPreferredLanguage());
|
||||
$preferences_update = True;
|
||||
}
|
||||
if ($preferences_update) {
|
||||
if ($preferences_update)
|
||||
{
|
||||
$this->save_repository();
|
||||
}
|
||||
unset($preferences_update);
|
||||
|
@ -403,7 +403,9 @@
|
||||
/*************************************************************************\
|
||||
* If they are using frames, we need to set some variables *
|
||||
\*************************************************************************/
|
||||
if (($phpgw_info["user"]["preferences"]["common"]["useframes"] && $phpgw_info["server"]["useframes"] == "allowed")
|
||||
if (((isset($phpgw_info['user']['preferences']['common']['useframes']) &&
|
||||
$phpgw_info["user"]["preferences"]["common"]["useframes"]) &&
|
||||
$phpgw_info["server"]["useframes"] == "allowed")
|
||||
|| ($phpgw_info["server"]["useframes"] == "always")) {
|
||||
$phpgw_info["flags"]["navbar_target"] = "phpgw_body";
|
||||
}
|
||||
|
@ -23,12 +23,7 @@
|
||||
|
||||
$tpl->set_var('img_root',$phpgw_info['server']['webserver_url'] . '/phpgwapi/templates/verdilak/images');
|
||||
$tpl->set_var('table_bg_color',$phpgw_info['theme']['navbar_bg']);
|
||||
|
||||
if ($phpgw_info['flags']['navbar_target'])
|
||||
{
|
||||
$target = ' target="' . $phpgw_info['flags']['navbar_target'] . '"';
|
||||
}
|
||||
|
||||
$applications = '';
|
||||
while ($app = each($phpgw_info['navbar']))
|
||||
{
|
||||
if ($app[1]['title'] != 'Home' && $app[1]['title'] != 'preferences' && ! ereg('About',$app[1]['title']) && $app[1]['title'] != 'Logout')
|
||||
@ -43,13 +38,19 @@
|
||||
{
|
||||
$title .= '<br>' . lang($app[1]['title']);
|
||||
}
|
||||
$applications .= '<br><a href="' . $app[1]['url'] . '"' . $target . '>' . $title . '</a>';
|
||||
$applications .= '<br><a href="' . $app[1]['url'] . '"';
|
||||
if (isset($phpgw_info['flags']['navbar_target']) &&
|
||||
$phpgw_info['flags']['navbar_target'])
|
||||
{
|
||||
$applications .= ' target="' . $phpgw_info['flags']['navbar_target'] . '"';
|
||||
}
|
||||
$applications .= '>' . $title . '</a>';
|
||||
unset($title);
|
||||
}
|
||||
}
|
||||
$tpl->set_var('applications',$applications);
|
||||
|
||||
if ($phpgw_info['theme']['special_logo'])
|
||||
if (isset($phpgw_info['theme']['special_logo']))
|
||||
{
|
||||
$tpl->set_var('logo',$phpgw_info['theme']['special_logo']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user