From 8a24f3e4490a0090f9e3850d3c9de1883ca3ff5a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 14 May 2016 21:26:36 +0200 Subject: [PATCH] fix not loaded header / CSS, caused by missing echo before $GLOBALS['egw']->framework->(header|footer) --- addressbook/inc/class.addressbook_ui.inc.php | 18 +++++++------- admin/inc/class.admin_db_backup.inc.php | 2 +- api/src/CalDAV/IcalIterator.php | 2 +- calendar/inc/class.calendar_merge.inc.php | 4 ++-- doc/fix_api.php | 4 ++-- .../inc/class.filemanager_merge.inc.php | 4 ++-- filemanager/test.php | 2 +- index.php | 6 ++--- infolog/inc/class.infolog_merge.inc.php | 4 ++-- resources/inc/class.ui_acl.inc.php | 24 ++++++++++++------- setup/db_backup.php | 6 ++--- timesheet/inc/class.timesheet_merge.inc.php | 4 ++-- 12 files changed, 43 insertions(+), 37 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 5891034586..b57837f5fe 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -2969,8 +2969,8 @@ window.egw_LAB.wait(function() { function migrate2ldap() { $GLOBALS['egw_info']['flags']['app_header'] = lang('Addressbook').' - '.lang('Migration to LDAP'); - $GLOBALS['egw']->framework->header(); - parse_navbar(); + echo $GLOBALS['egw']->framework->header(); + echo $GLOBALS['egw']->framework->navbar(); if (!$this->is_admin()) { @@ -2981,7 +2981,7 @@ window.egw_LAB.wait(function() { parent::migrate2ldap($_GET['type']); echo '

'.lang('Migration finished')."

\n"; } - $GLOBALS['egw']->framework->footer(); + echo $GLOBALS['egw']->framework->footer(); } /** @@ -2994,8 +2994,8 @@ window.egw_LAB.wait(function() { { Api\Translation::add_app('admin'); $GLOBALS['egw_info']['flags']['app_header'] = lang('Addressbook').' - '.lang('Contact maintenance'); - $GLOBALS['egw']->framework->header(); - parse_navbar(); + echo $GLOBALS['egw']->framework->header(); + echo $GLOBALS['egw']->framework->navbar(); // check if user has admin rights AND if a valid fileas type is given (Security) if (!$this->is_admin() || $_GET['type'] != '' && !in_array($_GET['type'],$this->fileas_types)) @@ -3008,7 +3008,7 @@ window.egw_LAB.wait(function() { $updated = parent::set_all_fileas($_GET['type'],(boolean)$_GET['all'],$errors,true); // true = ignore Acl echo '

'.lang('%1 contacts updated (%2 errors).',$updated,$errors)."

\n"; } - $GLOBALS['egw']->framework->footer(); + echo $GLOBALS['egw']->framework->footer(); } /** @@ -3019,8 +3019,8 @@ window.egw_LAB.wait(function() { { Api\Translation::add_app('admin'); $GLOBALS['egw_info']['flags']['app_header'] = lang('Addressbook').' - '.lang('Contact maintenance'); - $GLOBALS['egw']->framework->header(); - parse_navbar(); + echo $GLOBALS['egw']->framework->header(); + echo $GLOBALS['egw']->framework->navbar(); // check if user has admin rights (Security) if (!$this->is_admin()) @@ -3033,7 +3033,7 @@ window.egw_LAB.wait(function() { $updated = parent::set_all_cleanup($errors,true); // true = ignore Acl echo '

'.lang('%1 contacts updated (%2 errors).',$updated,$errors)."

\n"; } - $GLOBALS['egw']->framework->footer(); + echo $GLOBALS['egw']->framework->footer(); } /** diff --git a/admin/inc/class.admin_db_backup.inc.php b/admin/inc/class.admin_db_backup.inc.php index b0763140e3..0f1c74ee89 100644 --- a/admin/inc/class.admin_db_backup.inc.php +++ b/admin/inc/class.admin_db_backup.inc.php @@ -48,6 +48,6 @@ class admin_db_backup include EGW_SERVER_ROOT.'/setup/db_backup.php'; unset($tpl_root, $self); - $GLOBALS['egw']->framework->footer(); + echo $GLOBALS['egw']->framework->footer(); } } diff --git a/api/src/CalDAV/IcalIterator.php b/api/src/CalDAV/IcalIterator.php index 4408f34cad..bd3cd187b9 100644 --- a/api/src/CalDAV/IcalIterator.php +++ b/api/src/CalDAV/IcalIterator.php @@ -436,7 +436,7 @@ X-MS-OLK-CONFTYPE:0 END:VEVENT END:VCALENDAR '; - $GLOBALS['egw']->framework->header(); + echo $GLOBALS['egw']->framework->header(); //$ical_file = fopen('/tmp/KalenderFelicitasKubala.ics'); if (!is_resource($ical_file)) echo "
$ical_file
\n"; //$calendar_ical = new calendar_ical(); diff --git a/calendar/inc/class.calendar_merge.inc.php b/calendar/inc/class.calendar_merge.inc.php index d17d55ffe3..9c32d12a5f 100644 --- a/calendar/inc/class.calendar_merge.inc.php +++ b/calendar/inc/class.calendar_merge.inc.php @@ -602,7 +602,7 @@ class calendar_merge extends Api\Storage\Merge Api\Translation::add_app('calendar'); $GLOBALS['egw_info']['flags']['app_header'] = lang('calendar').' - '.lang('Replacements for inserting events into documents'); $GLOBALS['egw_info']['flags']['nonavbar'] = true; - $GLOBALS['egw']->framework->header(); + echo $GLOBALS['egw']->framework->header(); echo "\n"; echo '"; @@ -722,6 +722,6 @@ class calendar_merge extends Api\Storage\Merge echo "

'.lang('Calendar fields:')."

\n"; - $GLOBALS['egw']->framework->footer(); + echo $GLOBALS['egw']->framework->footer(); } } diff --git a/doc/fix_api.php b/doc/fix_api.php index b09182d6de..86b6c7227a 100755 --- a/doc/fix_api.php +++ b/doc/fix_api.php @@ -81,8 +81,8 @@ foreach(array( 'common::email_address' => 'Api\\Accounts::email', 'common::next_id' => 'Api\\Accounts\\Ldap::next_id', 'common::last_id' => 'Api\\Accounts\\Ldap::last_id', - 'common::egw_header' => "\$GLOBALS['egw']->framework->header", - 'common::egw_footer' => "\$GLOBALS['egw']->framework->footer", + 'common::egw_header' => "echo \$GLOBALS['egw']->framework->header", + 'common::egw_footer' => "echo \$GLOBALS['egw']->framework->footer", 'common::show_date' => 'Api\\DateTime::server2user', 'common::get_tpl_dir' => 'Api\\Framework\\Template::get_dir', 'common::get_referer' => 'Api\\Header\\Referer::get', diff --git a/filemanager/inc/class.filemanager_merge.inc.php b/filemanager/inc/class.filemanager_merge.inc.php index 9984fc85d9..99b13491f4 100644 --- a/filemanager/inc/class.filemanager_merge.inc.php +++ b/filemanager/inc/class.filemanager_merge.inc.php @@ -229,7 +229,7 @@ class filemanager_merge extends Api\Storage\Merge { $GLOBALS['egw_info']['flags']['app_header'] = lang('filemanager').' - '.lang('Replacements for inserting entries into documents'); $GLOBALS['egw_info']['flags']['nonavbar'] = false; - $GLOBALS['egw']->framework->header(); + echo $GLOBALS['egw']->framework->header(); echo "\n"; echo '"; @@ -287,6 +287,6 @@ class filemanager_merge extends Api\Storage\Merge echo "

'.lang('Filemanager fields:')."

\n"; - $GLOBALS['egw']->framework->footer(); + echo $GLOBALS['egw']->framework->footer(); } } diff --git a/filemanager/test.php b/filemanager/test.php index 0b0e5f4181..a4eaed786f 100644 --- a/filemanager/test.php +++ b/filemanager/test.php @@ -106,4 +106,4 @@ if (isset($path) && !empty($path)) echo "

bytes(file_get_contents(Vfs::PREFIX.'$path'))=".array2string(bytes(file_get_contents(Vfs::PREFIX.$path)))."

\n"; } } -$GLOBALS['egw']->framework->footer(); +echo $GLOBALS['egw']->framework->footer(); diff --git a/index.php b/index.php index 001c9b0d78..149895255e 100755 --- a/index.php +++ b/index.php @@ -132,8 +132,8 @@ if($windowed && $_GET['cd'] == 'yes') 'nonavbar' => False, 'currentapp' => 'eGroupWare' ); - $GLOBALS['egw']->framework->header(); - $GLOBALS['egw']->framework->footer(); + echo $GLOBALS['egw']->framework->header(); + echo $GLOBALS['egw']->framework->footer(); } else { @@ -196,6 +196,6 @@ else if(!isset($GLOBALS['egw_info']['nofooter'])) { - $GLOBALS['egw']->framework->footer(); + echo $GLOBALS['egw']->framework->footer(); } } diff --git a/infolog/inc/class.infolog_merge.inc.php b/infolog/inc/class.infolog_merge.inc.php index 1833d46351..7bab6cd245 100644 --- a/infolog/inc/class.infolog_merge.inc.php +++ b/infolog/inc/class.infolog_merge.inc.php @@ -172,7 +172,7 @@ class infolog_merge extends Api\Storage\Merge { $GLOBALS['egw_info']['flags']['app_header'] = lang('infolog').' - '.lang('Replacements for inserting entries into documents'); $GLOBALS['egw_info']['flags']['nonavbar'] = false; - $GLOBALS['egw']->framework->header(); + echo $GLOBALS['egw']->framework->header(); echo "\n"; echo '"; @@ -261,6 +261,6 @@ class infolog_merge extends Api\Storage\Merge echo "

'.lang('Infolog fields:')."

\n"; - $GLOBALS['egw']->framework->footer(); + echo $GLOBALS['egw']->framework->footer(); } } diff --git a/resources/inc/class.ui_acl.inc.php b/resources/inc/class.ui_acl.inc.php index 4f945c3063..b082601ade 100755 --- a/resources/inc/class.ui_acl.inc.php +++ b/resources/inc/class.ui_acl.inc.php @@ -53,8 +53,8 @@ class ui_acl Egw::redirect_link('/admin/index.php'); } - $GLOBALS['egw']->framework->header(); - echo parse_navbar(); + echo $GLOBALS['egw']->framework->header(); + echo $GLOBALS['egw']->framework->navbar(); if ($_POST['btnSave']) { @@ -121,12 +121,13 @@ class ui_acl } } $template->pfp('out','acl',True); + echo $GLOBALS['egw']->framework->footer(); } function selectlist($right,$users_only=false) { - static $accountList; - static $groupList; + static $accountList=null; + static $groupList=null; switch($GLOBALS['egw_info']['user']['preferences']['common']['account_display']) { case 'firstname': @@ -147,13 +148,13 @@ class ui_acl 'type' => 'accounts', 'order' => $order, )); - uasort($accountList,array($this,($order=='n_given,n_family'?"sortByNGiven":($order=='n_family,n_given'?"sortByNLast":"sortByLid")))); + uasort($accountList,array($this,($order=='n_given,n_family'?"sortByNGiven":($order=='n_family,n_given'?"sortByNLast":"sortByLid")))); $resultList = $accountList; } else { $resultList = $accountList; - } + } if (is_null($groupList) && $users_only==false) { $groupList = $GLOBALS['egw']->accounts->search(array( @@ -162,9 +163,14 @@ class ui_acl )); uasort($groupList,array($this,"sortByLid")); } - if (count($groupList)>0 && $users_only==false) foreach ($groupList as $k => $val) $resultList[$k] = $val; - - foreach ($resultList as $num => $account) + if (count($groupList)>0 && $users_only==false) + { + foreach ($groupList as $k => $val) + { + $resultList[$k] = $val; + } + } + foreach ($resultList as $account) { $selectlist .= '