From f33862b8b61cdbe8feb8b6343bce0dced52cd894 Mon Sep 17 00:00:00 2001
From: Nathan Gray <nathangray.bsc@gmail.com>
Date: Wed, 6 Nov 2013 22:51:57 +0000
Subject: [PATCH] Fix setting default/forced column preference when selected
 columns was changed at the same time.

---
 etemplate/inc/class.etemplate_widget_nextmatch.inc.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php
index c317a88d4e..1f24e728da 100644
--- a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php
+++ b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php
@@ -859,10 +859,9 @@ class etemplate_widget_nextmatch extends etemplate_widget
 			}
 
 			// Set columns + refresh as default for all users
-
-			// Columns already saved to current user's preferences, use from there
+			// Columns included in submit, preference might not be updated yet
+			$cols = $value['selectcols'];
 			$prefs = $GLOBALS['egw']->preferences->read();
-			$cols = $prefs[$app][$pref_name];
 			$GLOBALS['egw']->preferences->add($app,$pref_name,is_array($cols) ? implode(',',$cols) : $cols, $pref_level);
 
 			// Autorefresh