[geeklog-cvs] geeklog: Make sure we keep the current status of the user's Adva...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon May 24 12:39:46 EDT 2010
changeset 7942:f81b14c4f67c
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/f81b14c4f67c
user: Dirk Haun <dirk at haun-online.de>
date: Mon May 24 17:59:32 2010 +0200
description:
Make sure we keep the current status of the user's Advanced Editor option even when Advanced Editor is disabled for the site (Thanks, Markus)
diffstat:
public_html/docs/history | 2 ++
public_html/usersettings.php | 13 ++++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 46a69918c323 -r f81b14c4f67c public_html/docs/history
--- a/public_html/docs/history Sun May 23 20:57:35 2010 +0200
+++ b/public_html/docs/history Mon May 24 17:59:32 2010 +0200
@@ -3,6 +3,8 @@
??? ?, 2010 (1.7.1)
-----------
+- Make sure we keep the current status of the user's Advanced Editor option
+ even when Advanced Editor is disabled for the site (Thanks, Markus) [Dirk]
- Comment submissions for plugins were missing the type [Dirk]
- In the Group Editor, hide the 'Apply "Default Group" change' option until the
state of the "Default Group" checkbox changes (feature request #0001116,
diff -r 46a69918c323 -r f81b14c4f67c public_html/usersettings.php
--- a/public_html/usersettings.php Sun May 23 20:57:35 2010 +0200
+++ b/public_html/usersettings.php Mon May 24 17:59:32 2010 +0200
@@ -1115,10 +1115,17 @@
} else {
$A['showonline'] = 0;
}
- if (isset($A['advanced_editor']) && ($A['advanced_editor'] == 'on')) {
- $A['advanced_editor'] = 1;
+ if ($_CONF['advanced_editor'] == 1) {
+ if (isset($A['advanced_editor']) && ($A['advanced_editor'] == 'on')) {
+ $A['advanced_editor'] = 1;
+ } else {
+ $A['advanced_editor'] = 0;
+ }
} else {
- $A['advanced_editor'] = 0;
+ // when Advanced Editor is not enabled, make sure we don't overwrite
+ // the user's current setting
+ $A['advanced_editor'] = DB_getItem($_TABLES['userprefs'],
+ 'advanced_editor', "uid = {$_USER['uid']}");
}
$A['maxstories'] = COM_applyFilter ($A['maxstories'], true);
More information about the geeklog-cvs
mailing list