Skip to content

Commit d3f65a6

Browse files
committed
textile: Fix textile_version fatal error, update syntax link
1 parent a128cf6 commit d3f65a6

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed
+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
2.0.1: One PHP 8 warning fixed
1+
2.0.1:
2+
* Fix one PHP 8 warning
3+
* Fix error when opening entries in blogs that had the prior version installed
4+
* Link to textile-lang.com to explain the syntax below the comment form, instead of defunct
5+
sites
26

37
2.0: Remove old textile parsers and switch to netcarver/textile v4.1.3
48
This will improve compatibility with current PHP version (8.x).

plugins/serendipity_event_textile/serendipity_event_textile.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ function introspect_config_item($name, &$propbag)
112112
$propbag->add('description', PLUGIN_EVENT_TEXTILE_UNESCAPE_DESC);
113113
$propbag->add('default', 'false');
114114
break;
115+
case 'textile_version':
116+
// For backwards compatibility, otherwise the constant call below will die
117+
break;
115118

116119
default:
117120
$propbag->add('type', 'boolean');
@@ -200,11 +203,8 @@ function event_hook($event, &$bag, &$eventData, $addData = null)
200203
break;
201204

202205
case 'frontend_comment':
203-
if (serendipity_db_bool($this->get_config('COMMENT', 'true'))) {
204-
$url = $this->get_config('textile_version') == 1
205-
? 'http://www.textism.com/tools/textile/'
206-
: 'http://txstyle.org/article/43/a-short-introduction';
207-
echo '<div class="serendipity_commentDirection serendipity_comment_textile">' . sprintf(PLUGIN_EVENT_TEXTILE_TRANSFORM, $url) . '</div>';
206+
if (serendipity_db_bool($this->get_config('COMMENT', 'true'))) {;
207+
echo '<div class="serendipity_commentDirection serendipity_comment_textile">' . sprintf(PLUGIN_EVENT_TEXTILE_TRANSFORM, 'https://textile-lang.com/') . '</div>';
208208
}
209209
break;
210210

0 commit comments

Comments
 (0)