Skip to content

Commit

Permalink
Release phpwcms v1.9.41, the legacy release
Browse files Browse the repository at this point in the history
Merge branch 'v1.9-dev' into phpwcms-legacy
  • Loading branch information
slackero committed Aug 10, 2024
2 parents 700fe25 + 2efbf2f commit a85bf74
Show file tree
Hide file tree
Showing 496 changed files with 31,251 additions and 7,807 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ root or sub folder. Link your browser to the related URL and follow the install
Server system requirements
--------------------------

**phpwcms** version 1.9.39 requires a web server with PHP 7.4 or newer.
**phpwcms** version 1.9.41 requires a web server with PHP 7.4 or newer.
and a MySQL/MariaDB database (minimum version 5.1, recommend 5.5+).
If you already use PHP v8.x you can use the latest version of
[**phpwcms v1.10.3**](https://github.com/slackero/phpwcms/releases/tag/v1.10.3).
If you already use PHP v8.x you should use the latest version of
[**phpwcms v1.10.5**](https://github.com/slackero/phpwcms/releases/tag/v1.10.5).


Known problems
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"algo26-matthias/idna-convert": "^v3.1.1",
"enshrined/svg-sanitize": "^0.19.0",
"netcarver/textile": "v4.1.1",
"erusev/parsedown": "^v2.0.0-beta-1",
"erusev/parsedown-extra": "^v2.0.0-beta-1",
"league/commonmark": "^2.5.1",
"ezyang/htmlpurifier": "^v4.17.0",
"openpsa/universalfeedcreator": "^v1.9.0",
"phpmailer/phpmailer": "^v6.9.1",
"phpoffice/phpspreadsheet": "^1.29.0",
Expand Down
1 change: 0 additions & 1 deletion include/config/dist.conf.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
$phpwcms['enable_GDPR'] = true; // Try to handle GDPR inside of phpwcms by default (anonymize IP...)
$phpwcms['login_autocomplete'] = true; // If true the browser/user can decide to store login/password and/or autofill in credentials
$phpwcms['lazy_loading'] = 'lazy'; // Set how images or iframes should be loaded: lazy (recommend), eager (right away) or auto (let browser decide).
$phpwcms['markdown_extra'] = false; // Enable/disable Markdown Extra https://michelf.ca/projects/php-markdown/extra/
$phpwcms['disable_generator'] = false; // Disable <meta name="generator"> and header `X-phpwcms-Release`
$phpwcms['disable_processed_in'] = false; // Hide header `X-phpwcms-Page-Processed-In`
$phpwcms['session.cookie_httponly.off'] = false; // Set this to `true` if the session Cookie should also be accessible by JavaScript
Expand Down
6 changes: 2 additions & 4 deletions include/inc_front/content/cnt0.article.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@
switch($crow["acontent_form"]) {

case 'markdown':
init_markdown();
$crow['acontent_text'] = $phpwcms['parsedown_class']->text($crow['acontent_text']);
$crow['acontent_text'] = parse_markdown($crow['acontent_text']);
break;

case 'textile':
init_textile();
$crow['acontent_text'] = $phpwcms['textile_class']->parse($crow['acontent_text']);
$crow['acontent_text'] = parse_textile($crow['acontent_text']);
break;

case 'plain':
Expand Down
3 changes: 1 addition & 2 deletions include/inc_front/content/cnt14.article.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@
} elseif(isset($crow['fieldgroup'][$custom_field_key]['render']) && in_array($crow['fieldgroup'][$custom_field_key]['render'], $crow['field_render'])) {

if($crow['fieldgroup'][$custom_field_key]['render'] === 'markdown') {
init_markdown();
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], $custom_field_replacer, $phpwcms['parsedown_class']->text($custom_field_value));
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], $custom_field_replacer, parse_markdown($custom_field_value));
} elseif($crow['fieldgroup'][$custom_field_key]['render'] === 'plain') {
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], $custom_field_replacer, plaintext_htmlencode($custom_field_value));
} else {
Expand Down
13 changes: 3 additions & 10 deletions include/inc_front/content/cnt31.article.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@

if(is_array($image['tmpl_settings']) && count($image['tmpl_settings'])) {
$image = array_merge($image, $image['tmpl_settings']);

if($image['text_render'] === 'markdown') {
init_markdown();
} elseif($image['text_render'] === 'textile') {
init_textile();
}
}

$image['tmpl_header'] = get_tmpl_section('IMAGES_HEADER', $image['template']);
Expand Down Expand Up @@ -363,11 +357,11 @@
switch($image['text_render']) {

case 'markdown':
$value['freetext'] = $phpwcms['parsedown_class']->text($value['freetext']);
$value['freetext'] = parse_markdown($value['freetext']);
break;

case 'textile':
$value['freetext'] = $phpwcms['textile_class']->parse($value['freetext']);
$value['freetext'] = parse_textile($value['freetext']);
break;

case 'html':
Expand Down Expand Up @@ -479,8 +473,7 @@
} elseif(isset($image['fieldgroup'][$custom_field_key]['render']) && in_array($image['fieldgroup'][$custom_field_key]['render'], $image['field_render'])) {

if($image['fieldgroup'][$custom_field_key]['render'] === 'markdown') {
init_markdown();
$img_a = render_cnt_template($img_a, $custom_field_replacer, $phpwcms['parsedown_class']->text($custom_field_value));
$img_a = render_cnt_template($img_a, $custom_field_replacer, parse_markdown($custom_field_value));
} elseif($image['fieldgroup'][$custom_field_key]['render'] === 'plain') {
$img_a = render_cnt_template($img_a, $custom_field_replacer, plaintext_htmlencode($custom_field_value));
} else {
Expand Down
3 changes: 1 addition & 2 deletions include/inc_front/content/cnt32.article.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@
} elseif(isset($tabs['fieldgroup'][$custom_field_key]['render']) && in_array($tabs['fieldgroup'][$custom_field_key]['render'], $tabs['field_render'])) {

if($tabs['fieldgroup'][$custom_field_key]['render'] === 'markdown') {
init_markdown();
$tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], $custom_field_replacer, $phpwcms['parsedown_class']->text($custom_field_value));
$tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], $custom_field_replacer, parse_markdown($custom_field_value));
} elseif($tabs['fieldgroup'][$custom_field_key]['render'] === 'plain') {
$tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], $custom_field_replacer, plaintext_htmlencode($custom_field_value));
} else {
Expand Down
10 changes: 4 additions & 6 deletions include/inc_front/content/cnt33.article.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,11 @@
$value['cnt_teasertext'] = br_htmlencode($value['cnt_teasertext']);
$value['cnt_description'] = br_htmlencode($value['cnt_description']);
} elseif($value['cnt_object']['cnt_textformat'] === 'markdown') {
init_markdown();
$value['cnt_teasertext'] = $phpwcms['parsedown_class']->text($value['cnt_teasertext']);
$value['cnt_description'] = $phpwcms['parsedown_class']->text($value['cnt_description']);
$value['cnt_teasertext'] = parse_markdown($value['cnt_teasertext']);
$value['cnt_description'] = parse_markdown($value['cnt_description']);
} elseif($value['cnt_object']['cnt_textformat'] === 'textile') {
init_textile();
$value['cnt_teasertext'] = $phpwcms['textile_class']->parse($value['cnt_teasertext']);
$value['cnt_description'] = $phpwcms['textile_class']->parse($value['cnt_description']);
$value['cnt_teasertext'] = parse_textile($value['cnt_teasertext']);
$value['cnt_description'] = parse_textile($value['cnt_description']);
} else {
$value['cnt_teasertext'] = html($value['cnt_teasertext']);
$value['cnt_description'] = html($value['cnt_description']);
Expand Down
41 changes: 34 additions & 7 deletions include/inc_front/front.func.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4556,16 +4556,16 @@ function get_attr_data_gallery($group='', $prefix=' ', $suffix='') {
}

/**
* Init Parsedown or ParsedownExtra Class
* Init CommonMark Class
* @link https://commonmark.thephpleague.com/
*/
function init_markdown() {

if(!isset($GLOBALS['phpwcms']['parsedown_class'])) {
if (empty($GLOBALS['phpwcms']['markdown_extra'])) {
$GLOBALS['phpwcms']['parsedown_class'] = new \Erusev\Parsedown\Parsedown();
} else {
$GLOBALS['phpwcms']['parsedown_class'] = new \Erusev\ParsedownExtra\ParsedownExtra();
}
if(!isset($GLOBALS['phpwcms']['commonmark_class'])) {
$environment = new \League\CommonMark\Environment\Environment();
$environment->addExtension(new \League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension());
$environment->addExtension(new \League\CommonMark\Extension\GithubFlavoredMarkdownExtension());
$GLOBALS['phpwcms']['commonmark_class'] = new \League\CommonMark\MarkdownConverter($environment);
}

}
Expand All @@ -4580,3 +4580,30 @@ function init_textile() {
}

}

/**
* Parse content with CommonMark
* @link https://commonmark.thephpleague.com/
*
* @param string $text
*/
function parse_markdown(string $text) {
if ($text === '') {
return '';
}
init_markdown();
return $GLOBALS['phpwcms']['commonmark_class']->convert($text);
}

/**
* Parse content with Textile
*
* @param string $text
*/
function parse_textile(string $text) {
if ($text === '') {
return '';
}
init_textile();
return $GLOBALS['phpwcms']['textile_class']->textileThis($text);
}
4 changes: 2 additions & 2 deletions include/inc_lib/revision/revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
*
**/

const PHPWCMS_VERSION = '1.9.40';
const PHPWCMS_RELEASE_DATE = '2024/08/06';
const PHPWCMS_VERSION = '1.9.41';
const PHPWCMS_RELEASE_DATE = '2024/08/10';
const PHPWCMS_REVISION = '553';
6 changes: 3 additions & 3 deletions include/inc_tmpl/about.tmpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@
<a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0" target="_blank">GNU GPL</a>
</li>
<li>
<a href="http://parsedown.org/" target="_blank"><strong>Parsedown &amp; Parsedown Extra</strong></a>,
Copyright &copy; Emanuil Rusev,
<a href="http://www.opensource.org/licenses/mit-license.php" target="_blank">MIT License</a>
<a href="https://https://commonmark.thephpleague.com/2.5/" target="_blank"><strong>CommonMark</strong></a>,
Copyright &copy; Colin O'Dell,
<a href="https://github.com/thephpleague/commonmark/blob/2.5/LICENSE" target="_blank">BSD 3-Clause &quot;New&quot; or &quot;Revised&quot; License</a>
</li>
<li>
<a href="https://www.mediawiki.org" target="_blank"><strong>ConvertibleTimestamp &amp; IPTC</strong></a>,
Expand Down
56 changes: 56 additions & 0 deletions include/vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,62 @@
'JSONCreator' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/JSONCreator.php',
'KMLCreator' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/KMLCreator.php',
'MBOXCreator' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/MBOXCreator.php',
'Nette\\ArgumentOutOfRangeException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\DeprecatedException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\DirectoryNotFoundException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\FileNotFoundException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\HtmlStringable' => $vendorDir . '/nette/utils/src/HtmlStringable.php',
'Nette\\IOException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\InvalidArgumentException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\InvalidStateException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\Iterators\\CachingIterator' => $vendorDir . '/nette/utils/src/Iterators/CachingIterator.php',
'Nette\\Iterators\\Mapper' => $vendorDir . '/nette/utils/src/Iterators/Mapper.php',
'Nette\\Localization\\ITranslator' => $vendorDir . '/nette/utils/src/compatibility.php',
'Nette\\Localization\\Translator' => $vendorDir . '/nette/utils/src/Translator.php',
'Nette\\MemberAccessException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\NotImplementedException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\NotSupportedException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\OutOfRangeException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\Schema\\Context' => $vendorDir . '/nette/schema/src/Schema/Context.php',
'Nette\\Schema\\DynamicParameter' => $vendorDir . '/nette/schema/src/Schema/DynamicParameter.php',
'Nette\\Schema\\Elements\\AnyOf' => $vendorDir . '/nette/schema/src/Schema/Elements/AnyOf.php',
'Nette\\Schema\\Elements\\Base' => $vendorDir . '/nette/schema/src/Schema/Elements/Base.php',
'Nette\\Schema\\Elements\\Structure' => $vendorDir . '/nette/schema/src/Schema/Elements/Structure.php',
'Nette\\Schema\\Elements\\Type' => $vendorDir . '/nette/schema/src/Schema/Elements/Type.php',
'Nette\\Schema\\Expect' => $vendorDir . '/nette/schema/src/Schema/Expect.php',
'Nette\\Schema\\Helpers' => $vendorDir . '/nette/schema/src/Schema/Helpers.php',
'Nette\\Schema\\Message' => $vendorDir . '/nette/schema/src/Schema/Message.php',
'Nette\\Schema\\Processor' => $vendorDir . '/nette/schema/src/Schema/Processor.php',
'Nette\\Schema\\Schema' => $vendorDir . '/nette/schema/src/Schema/Schema.php',
'Nette\\Schema\\ValidationException' => $vendorDir . '/nette/schema/src/Schema/ValidationException.php',
'Nette\\SmartObject' => $vendorDir . '/nette/utils/src/SmartObject.php',
'Nette\\StaticClass' => $vendorDir . '/nette/utils/src/StaticClass.php',
'Nette\\UnexpectedValueException' => $vendorDir . '/nette/utils/src/exceptions.php',
'Nette\\Utils\\ArrayHash' => $vendorDir . '/nette/utils/src/Utils/ArrayHash.php',
'Nette\\Utils\\ArrayList' => $vendorDir . '/nette/utils/src/Utils/ArrayList.php',
'Nette\\Utils\\Arrays' => $vendorDir . '/nette/utils/src/Utils/Arrays.php',
'Nette\\Utils\\AssertionException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
'Nette\\Utils\\Callback' => $vendorDir . '/nette/utils/src/Utils/Callback.php',
'Nette\\Utils\\DateTime' => $vendorDir . '/nette/utils/src/Utils/DateTime.php',
'Nette\\Utils\\FileSystem' => $vendorDir . '/nette/utils/src/Utils/FileSystem.php',
'Nette\\Utils\\Floats' => $vendorDir . '/nette/utils/src/Utils/Floats.php',
'Nette\\Utils\\Helpers' => $vendorDir . '/nette/utils/src/Utils/Helpers.php',
'Nette\\Utils\\Html' => $vendorDir . '/nette/utils/src/Utils/Html.php',
'Nette\\Utils\\IHtmlString' => $vendorDir . '/nette/utils/src/compatibility.php',
'Nette\\Utils\\Image' => $vendorDir . '/nette/utils/src/Utils/Image.php',
'Nette\\Utils\\ImageException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
'Nette\\Utils\\Json' => $vendorDir . '/nette/utils/src/Utils/Json.php',
'Nette\\Utils\\JsonException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
'Nette\\Utils\\ObjectHelpers' => $vendorDir . '/nette/utils/src/Utils/ObjectHelpers.php',
'Nette\\Utils\\ObjectMixin' => $vendorDir . '/nette/utils/src/Utils/ObjectMixin.php',
'Nette\\Utils\\Paginator' => $vendorDir . '/nette/utils/src/Utils/Paginator.php',
'Nette\\Utils\\Random' => $vendorDir . '/nette/utils/src/Utils/Random.php',
'Nette\\Utils\\Reflection' => $vendorDir . '/nette/utils/src/Utils/Reflection.php',
'Nette\\Utils\\RegexpException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
'Nette\\Utils\\Strings' => $vendorDir . '/nette/utils/src/Utils/Strings.php',
'Nette\\Utils\\Type' => $vendorDir . '/nette/utils/src/Utils/Type.php',
'Nette\\Utils\\UnknownImageFileException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
'Nette\\Utils\\Validators' => $vendorDir . '/nette/utils/src/Utils/Validators.php',
'OPMLCreator' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/OPMLCreator.php',
'PHPCreator' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/PHPCreator.php',
'PIECreator01' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/PIECreator01.php',
Expand Down
3 changes: 2 additions & 1 deletion include/vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
'b45b351e6b6f7487d819961fef2fda77' => $vendorDir . '/jakeasmith/http_build_url/src/http_build_url.php',
'fdc0e9724ddc47859c8bf0c1ea0a623a' => $vendorDir . '/openpsa/universalfeedcreator/lib/constants.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'fdc0e9724ddc47859c8bf0c1ea0a623a' => $vendorDir . '/openpsa/universalfeedcreator/lib/constants.php',
'23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
'5897ea0ac4cccf14d323035e65887801' => $vendorDir . '/symfony/polyfill-php82/bootstrap.php',
);
6 changes: 4 additions & 2 deletions include/vendor/composer/autoload_psr4.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'),
'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'),
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),
'Netcarver\\Textile\\' => array($vendorDir . '/netcarver/textile/src/Netcarver/Textile'),
'MyCLabs\\Enum\\' => array($vendorDir . '/myclabs/php-enum/src'),
'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'),
'League\\Config\\' => array($vendorDir . '/league/config/src'),
'League\\CommonMark\\' => array($vendorDir . '/league/commonmark/src'),
'Html2Text\\' => array($vendorDir . '/html2text/html2text/src', $vendorDir . '/html2text/html2text/test'),
'Erusev\\Parsedown\\' => array($vendorDir . '/erusev/parsedown/src'),
'Erusev\\ParsedownExtra\\' => array($vendorDir . '/erusev/parsedown-extra/src'),
'Dflydev\\DotAccessData\\' => array($vendorDir . '/dflydev/dot-access-data/src'),
'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'),
'Algo26\\IdnaConvert\\' => array($vendorDir . '/algo26-matthias/idna-convert/src'),
);
Loading

0 comments on commit a85bf74

Please sign in to comment.