[geeklog-cvs] geeklog: Added a new right called htmlfilter.skip which allows u...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Thu Mar 25 14:16:59 EDT 2010
changeset 7831:6d81a99b94d7
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/6d81a99b94d7
user: Tom <websitemaster at cogeco.net>
date: Thu Mar 25 14:07:50 2010 -0400
description:
Added a new right called htmlfilter.skip which allows user groups to skip any html filtering on posts
diffstat:
public_html/docs/history | 2 ++
public_html/lib-common.php | 14 ++++++++------
sql/mssql_tableanddata.php | 1 +
sql/mysql_tableanddata.php | 1 +
sql/pgsql_tableanddata.php | 1 +
sql/updates/mssql_1.6.1_to_1.6.2.php | 3 +++
sql/updates/mysql_1.6.1_to_1.6.2.php | 3 +++
7 files changed, 19 insertions(+), 6 deletions(-)
diffs (102 lines):
diff -r dfa299c32945 -r 6d81a99b94d7 public_html/docs/history
--- a/public_html/docs/history Thu Mar 25 13:42:00 2010 -0400
+++ b/public_html/docs/history Thu Mar 25 14:07:50 2010 -0400
@@ -2,6 +2,8 @@
Apr ??, 2010 (1.6.2)
------------
+- A new right called htmlfilter.skip allows user groups to skip any html
+ filtering on posts (feature request #0000952) [Tom]
- New Plugin API PLG_getWhatsNewComment for adding comments from plugins to the
Whats New Block and the User Profile page (feature request #0000835) [Tom]
- Truncated stories in Feeds now will have any open html tags closed.
diff -r dfa299c32945 -r 6d81a99b94d7 public_html/lib-common.php
--- a/public_html/lib-common.php Thu Mar 25 13:42:00 2010 -0400
+++ b/public_html/lib-common.php Thu Mar 25 14:07:50 2010 -0400
@@ -3017,10 +3017,11 @@
}
while( $start_pos !== false );
- if( isset( $_CONF['skip_html_filter_for_root'] ) &&
+ $has_skiphtmlfilterPermissions = SEC_hasRights ('htmlfilter.skip');
+
+ if ($has_skiphtmlfilterPermissions || (isset( $_CONF['skip_html_filter_for_root'] ) &&
( $_CONF['skip_html_filter_for_root'] == 1 ) &&
- SEC_inGroup( 'Root' ))
- {
+ SEC_inGroup( 'Root' ))) {
return $str;
}
@@ -3871,10 +3872,11 @@
global $_CONF, $LANG01;
$retval = '';
-
- if (isset($_CONF['skip_html_filter_for_root']) &&
+ $has_skiphtmlfilterPermissions = SEC_hasRights ('htmlfilter.skip');
+
+ if ($has_skiphtmlfilterPermissions || (isset($_CONF['skip_html_filter_for_root']) &&
($_CONF['skip_html_filter_for_root'] == 1) &&
- SEC_inGroup('Root')) {
+ SEC_inGroup('Root'))) {
if (!$list_only) {
$retval .= '<span class="warningsmall">' . $LANG01[123]
diff -r dfa299c32945 -r 6d81a99b94d7 sql/mssql_tableanddata.php
--- a/sql/mssql_tableanddata.php Thu Mar 25 13:42:00 2010 -0400
+++ b/sql/mssql_tableanddata.php Thu Mar 25 14:07:50 2010 -0400
@@ -1323,6 +1323,7 @@
INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'group.assign','Ability to assign users to groups',1)
INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20, 'comment.moderate', 'Ability to moderate comments', 1)
INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21, 'comment.submit', 'Comments are automatically published', 1)
+INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (22, 'htmlfilter.skip', 'Skip filtering posts for HTML', 1)
set identity_insert {$_TABLES['features']} off
";
diff -r dfa299c32945 -r 6d81a99b94d7 sql/mysql_tableanddata.php
--- a/sql/mysql_tableanddata.php Thu Mar 25 13:42:00 2010 -0400
+++ b/sql/mysql_tableanddata.php Thu Mar 25 14:07:50 2010 -0400
@@ -624,6 +624,7 @@
$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'group.assign','Ability to assign users to groups',1) ";
$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20, 'comment.moderate', 'Ability to moderate comments', 1)";
$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21, 'comment.submit', 'Comments are automatically published', 1)";
+$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (22, 'htmlfilter.skip', 'Skip filtering posts for HTML', 1)";
$_DATA[] = "INSERT INTO {$_TABLES['frontpagecodes']} (code, name) VALUES (0,'Show Only in Topic') ";
$_DATA[] = "INSERT INTO {$_TABLES['frontpagecodes']} (code, name) VALUES (1,'Show on Front Page') ";
diff -r dfa299c32945 -r 6d81a99b94d7 sql/pgsql_tableanddata.php
--- a/sql/pgsql_tableanddata.php Thu Mar 25 13:42:00 2010 -0400
+++ b/sql/pgsql_tableanddata.php Thu Mar 25 14:07:50 2010 -0400
@@ -639,6 +639,7 @@
$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES ((SELECT nextval('{$_TABLES['features']}_ft_id_seq')),'group.assign','Ability to assign users to groups',1) ";
$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES ((SELECT nextval('{$_TABLES['features']}_ft_id_seq')), 'comment.moderate', 'Ability to moderate comments', 1)";
$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES ((SELECT nextval('{$_TABLES['features']}_ft_id_seq')), 'comment.submit', 'Comments are automatically published', 1)";
+$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES ((SELECT nextval('{$_TABLES['features']}_ft_id_seq')), 'htmlfilter.skip', 'Skip filtering posts for HTML', 1)";
$_DATA[] = "INSERT INTO {$_TABLES['frontpagecodes']} (code, name) VALUES (0,'Show Only in Topic') ";
$_DATA[] = "INSERT INTO {$_TABLES['frontpagecodes']} (code, name) VALUES (1,'Show on Front Page') ";
diff -r dfa299c32945 -r 6d81a99b94d7 sql/updates/mssql_1.6.1_to_1.6.2.php
--- a/sql/updates/mssql_1.6.1_to_1.6.2.php Thu Mar 25 13:42:00 2010 -0400
+++ b/sql/updates/mssql_1.6.1_to_1.6.2.php Thu Mar 25 14:07:50 2010 -0400
@@ -29,4 +29,7 @@
$_SQL[] = "ALTER TABLE {$_TABLES['userprefs']} ADD [advanced_editor] [tinyint] NOT NULL";
$_SQL[] = "UPDATE {$_TABLES['userprefs']} SET advanced_editor = 0 WHERE uid = 1";
+// Insert Group right to allow skipping of the HTML filter
+$_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('htmlfilter.skip', 'Skip filtering posts for HTML', 1)";
+
?>
diff -r dfa299c32945 -r 6d81a99b94d7 sql/updates/mysql_1.6.1_to_1.6.2.php
--- a/sql/updates/mysql_1.6.1_to_1.6.2.php Thu Mar 25 13:42:00 2010 -0400
+++ b/sql/updates/mysql_1.6.1_to_1.6.2.php Thu Mar 25 14:07:50 2010 -0400
@@ -29,6 +29,9 @@
$_SQL[] = "ALTER TABLE {$_TABLES['userprefs']} ADD advanced_editor tinyint(1) unsigned NOT NULL default '1' AFTER dfid";
$_SQL[] = "UPDATE {$_TABLES['userprefs']} SET advanced_editor = 0 WHERE uid = 1";
+// Insert Group right to allow skipping of the HTML filter
+$_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('htmlfilter.skip', 'Skip filtering posts for HTML', 1)";
+
/**
* Add new config options
*
More information about the geeklog-cvs
mailing list