[geeklog-hg] geeklog: Merged with Upstream
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Jun 25 14:03:09 EDT 2013
changeset 9128:256ac6cd25b5
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/256ac6cd25b5
user: Tom <websitemaster at cogeco.net>
date: Tue Jun 25 14:01:58 2013 -0400
description:
Merged with Upstream
diffstat:
public_html/admin/story.php | 6 +-
public_html/layout/modern_curve/style.css.php | 2 +-
public_html/lib-common.php | 85 ++++++++++----------------
system/lib-plugins.php | 4 +-
4 files changed, 41 insertions(+), 56 deletions(-)
diffs (175 lines):
diff -r 9ff105efd6ee -r 256ac6cd25b5 public_html/admin/story.php
--- a/public_html/admin/story.php Tue Jun 25 13:59:21 2013 -0400
+++ b/public_html/admin/story.php Tue Jun 25 14:01:58 2013 -0400
@@ -685,8 +685,12 @@
}
}
$story_templates->set_var('post_options',$post_options );
+ $allowed_tags = array('code', 'raw');
+ if ($_CONF['allow_page_breaks'] == 1) {
+ $allowed_tags = array_merge($allowed_tags, array('page_break'));
+ }
$story_templates->set_var('lang_allowed_html',
- COM_allowedHTML('story.edit'));
+ COM_allowedHTML('story.edit', false, 1, $allowed_tags));
$fileinputs = '';
$saved_images = '';
if ($_CONF['maximagesperarticle'] > 0) {
diff -r 9ff105efd6ee -r 256ac6cd25b5 public_html/layout/modern_curve/style.css.php
--- a/public_html/layout/modern_curve/style.css.php Tue Jun 25 13:59:21 2013 -0400
+++ b/public_html/layout/modern_curve/style.css.php Tue Jun 25 14:01:58 2013 -0400
@@ -33,7 +33,7 @@
$theme = 'modern_curve'; // Theme Name
$default_theme = ''; // Default theme name. If nothing leave as blank string
-$path_themes = $_CONF['path'] . 'public_html/layout/'; // Assumes the default if not then change
+$path_themes = '../'; // Assumes the default if not then change
$css_path_default='';
if (!empty($default_theme)) {
diff -r 9ff105efd6ee -r 256ac6cd25b5 public_html/lib-common.php
--- a/public_html/lib-common.php Tue Jun 25 13:59:21 2013 -0400
+++ b/public_html/lib-common.php Tue Jun 25 14:01:58 2013 -0400
@@ -521,8 +521,12 @@
}
}
// See if Topic Tree has changed for users, if so rebuild tree
-if ($last_topic_update > $topic_tree_date) {
+if ($last_topic_update > $topic_tree_date || empty($last_topic_update)) {
$_TOPICS = TOPIC_buildTree(TOPIC_ROOT, true);
+ if (empty($last_topic_update)) {
+ TOPIC_updateLastTopicUpdate();
+ $last_topic_update = DB_getItem($_TABLES['vars'], 'value', "name='last_topic_update'");
+ }
// Save updated topic tree and date
if ($_CONF['cache_templates']) {
@@ -4819,15 +4823,16 @@
*
* @param string $permissions comma-separated list of rights which identify the current user as an "Admin"
* @param boolean $list_only true = return only the list of HTML tags
-* @param boolean $filter_html_flag 0 = returns allowed all html tags, 1 = returns allowed HTML tags only, 2 = returns No HTML Tags Allowed (this is used by plugins if they have a config that overrides Geeklogs filter html settings or do not have a post mode)
-* @return string HTML <div>/<span> enclosed string
+* @param int $filter_html_flag 0 = returns allowed all html tags,
+ 1 = returns allowed HTML tags only,
+ 2 = returns No HTML Tags Allowed (this is used by plugins if they have a config
+ that overrides Geeklogs filter html settings or do not have a post mode)
+* @param array $allowed_tags Array of allowed special tags ('code', 'raw', 'page_break' ...)
+* @return string HTML <div>/<span> enclosed string
* @see function COM_checkHTML
-* @todo Bugs: The list always includes the [code], [raw], and [page_break]
-* tags when story.* permissions are required, even when those tags
-* are not actually available (e.g. in comments on stories).
-*
-*/
-function COM_allowedHTML($permissions = 'story.edit', $list_only = false, $filter_html_flag = 1)
+*
+*/
+function COM_allowedHTML($permissions = 'story.edit', $list_only = false, $filter_html_flag = 1, $allowed_tags = '')
{
global $_CONF, $_PLUGINS, $LANG01;
@@ -4870,20 +4875,9 @@
}
}
- $with_story_perms = false;
- $perms = explode(',', $permissions);
- foreach ($perms as $p) {
- if (substr($p, 0, 6) == 'story.') {
- $with_story_perms = true;
- break;
- }
- }
-
- if ($with_story_perms) {
- $retval .= '[code], [raw], ';
-
- if ($_CONF['allow_page_breaks'] == 1) {
- $retval .= '[page_break], ';
+ if ($filter_html_flag !== 2 && is_array($allowed_tags)) {
+ foreach ($allowed_tags as $tag) {
+ $retval .= '[' . $tag . '], ';
}
}
@@ -4907,9 +4901,6 @@
$retval .= '</div>';
return $retval;
-
-
- return $retval;
}
/**
@@ -8678,32 +8669,22 @@
* @return string character set, e.g. 'utf-8'
*
*/
-function COM_getEncodingt() {
- global $_CONF, $LANG_CHARSET;
-
- static $encoding = null;
-
- $valid_charsets = array('iso-8859-1','iso-8859-15','utf-8','cp866','cp1251','cp1252','koi8-r','big5','gb2312','big5-hkscs','shift_jis','sjis','euc-jp');
-
- if ($encoding === null) {
- if (isset($LANG_CHARSET)) {
- $encoding = $LANG_CHARSET;
- } else if (isset($_CONF['default_charset'])) {
- $encoding = $_CONF['default_charset'];
- } else {
- $encoding = 'iso-8859-1';
- }
- }
-
- $encoding = strtolower($encoding);
-
- if ( in_array($encoding,$valid_charsets) ) {
- return $encoding;
- } else {
- return 'iso-8859-1';
- }
-
- return $encoding;
+function COM_getEncodingt()
+{
+ static $encoding;
+
+ if ($encoding === null) {
+ $encoding = strtolower(COM_getCharset());
+ $valid_charsets = array(
+ 'iso-8859-1', 'iso-8859-15', 'utf-8', 'cp866', 'cp1251',
+ 'cp1252', 'koi8-r', 'big5', 'gb2312', 'big5-hkscs',
+ 'shift_jis', 'sjis', 'euc-jp');
+ if (!in_array($encoding, $valid_charsets)) {
+ $encoding = 'iso-8859-1';
+ }
+ }
+
+ return $encoding;
}
/**
diff -r 9ff105efd6ee -r 256ac6cd25b5 system/lib-plugins.php
--- a/system/lib-plugins.php Tue Jun 25 13:59:21 2013 -0400
+++ b/system/lib-plugins.php Tue Jun 25 14:01:58 2013 -0400
@@ -2804,7 +2804,7 @@
*/
function PLG_configChange($group, $changes)
{
- global $_PLUGINS;
+ global $_CONF, $_PLUGINS;
// Treat articles like a plugin (since belong to core group)
$plugintypes[] = 'article';
@@ -2815,7 +2815,7 @@
$plugintypes = array_merge($plugintypes, $_PLUGINS);
- foreach ($plugintypes as $pi_name) {
+ foreach ($plugintypes as $pi_name) {
$args = array();
$args[1] = $group;
More information about the geeklog-cvs
mailing list