From 936c636ffd06bfe0366008d6f89b5a93f8f25665 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 5 Feb 2010 03:34:17 +0000 Subject: [PATCH] display upload failed (because post_max_size of webserver exceeded) message from etemplate, could be nicer but way better then before --- addressbook/inc/class.addressbook_ui.inc.php | 4 +++- calendar/inc/class.calendar_uiforms.inc.php | 7 ++++++- infolog/inc/class.infolog_ui.inc.php | 4 +++- resources/inc/class.ui_resources.inc.php | 4 ++-- timesheet/inc/class.timesheet_ui.inc.php | 12 +++++++----- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index f983350289..ea99edddba 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -5,7 +5,7 @@ * @link www.egroupware.org * @author Cornelius Weiss * @author Ralf Becker - * @copyright (c) 2005-9 by Ralf Becker + * @copyright (c) 2005-10 by Ralf Becker * @copyright (c) 2005/6 by Cornelius Weiss * @package addressbook * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License @@ -1354,6 +1354,8 @@ class addressbook_ui extends addressbook_bo $content['created'] = $this->now_su; unset($state); } + if ($_GET['msg']) $content['msg'] = strip_tags($_GET['msg']); // dont allow HTML! + if($content && $_GET['makecp']) // copy the contact { $content['link_to']['to_id'] = 0; diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 8a17f9257e..c5c9364e92 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -5,7 +5,7 @@ * @link http://www.egroupware.org * @package calendar * @author Ralf Becker - * @copyright (c) 2004-9 by RalfBecker-At-outdoor-training.de + * @copyright (c) 2004-10 by RalfBecker-At-outdoor-training.de * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @version $Id$ */ @@ -27,6 +27,7 @@ class calendar_uiforms extends calendar_ui var $public_functions = array( 'freetimesearch' => True, 'edit' => true, + 'process_edit' => true, 'export' => true, 'import' => true, 'cat_acl' => true, @@ -165,6 +166,10 @@ class calendar_uiforms extends calendar_ui */ function process_edit($content) { + if (!is_array($content)) // redirect from etemplate, if POST empty + { + return $this->edit(null,null,strip_tags($_GET['msg'])); + } $referer = !empty($content['referer']) ? $content['referer'] : '/index.php?menuaction='.$this->view_menuaction; list($button) = @each($content['button']); if (!$button && $content['action']) $button = $content['action']; // action selectbox diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 277eb0b79a..e3f5c64845 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -5,7 +5,7 @@ * @link http://www.egroupware.org * @author Ralf Becker * @package infolog - * @copyright (c) 2003-9 by Ralf Becker + * @copyright (c) 2003-10 by Ralf Becker * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @version $Id$ */ @@ -1023,6 +1023,8 @@ class infolog_ui { $content['info_cat'] = $this->prefs['cat_add_default']; } + if ($_GET['msg']) $content['msg'] = strip_tags($_GET['msg']); // dont allow HTML! + switch($this->prefs['set_start']) { case 'date': default: $set_startdate = mktime(0,0,0,date('m',$this->bo->user_time_now),date('d',$this->bo->user_time_now),date('Y',$this->bo->user_time_now)); break; diff --git a/resources/inc/class.ui_resources.inc.php b/resources/inc/class.ui_resources.inc.php index fee27e74ac..675b00477f 100755 --- a/resources/inc/class.ui_resources.inc.php +++ b/resources/inc/class.ui_resources.inc.php @@ -23,7 +23,7 @@ class ui_resources 'show' => True, 'select' => True, 'writeLangFile' => True - ); + ); /** * Constructor @@ -232,7 +232,7 @@ class ui_resources 'to_app' => 'resources' ); } - + if ($_GET['msg']) $content['msg'] = strip_tags($_GET['msg']); } // some presetes $content['resource_picture'] = $this->bo->get_picture($content['res_id'],$content['picture_src'],$size=true); diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 49aa007009..cf5bb95259 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -5,7 +5,7 @@ * @link http://www.egroupware.org * @author Ralf Becker * @package timesheet - * @copyright (c) 2005-9 by Ralf Becker + * @copyright (c) 2005-10 by Ralf Becker * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @version $Id$ */ @@ -16,10 +16,10 @@ class timesheet_ui extends timesheet_bo { var $public_functions = array( - 'view' => true, - 'edit' => true, - 'index' => true, - 'editstatus' => true, + 'view' => true, + 'edit' => true, + 'index' => true, + 'editstatus' => true, ); /** * ProjectManager integration: 'none', 'full' or default null @@ -61,6 +61,8 @@ class timesheet_ui extends timesheet_bo $etpl = new etemplate('timesheet.edit'); if (!is_array($content)) { + if ($_GET['msg']) $msg = strip_tags($_GET['msg']); + if ($view || (int)$_GET['ts_id']) { if (!$this->read((int)$_GET['ts_id']))