Skip to content

Commit

Permalink
Release phpwcms v1.10.5
Browse files Browse the repository at this point in the history
Merge branch 'v1.10-dev'
  • Loading branch information
slackero committed Aug 10, 2024
2 parents c15e9b3 + 0294407 commit 27130a1
Show file tree
Hide file tree
Showing 529 changed files with 32,404 additions and 7,914 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Never forget to backup your database and files before you start the upgrade proc
Server system requirements
--------------------------

**phpwcms** version 1.10.3 requires a web server with PHP 8.2 or newer.
**phpwcms** version 1.10.5 requires a web server with PHP 8.2 or newer.
and a MySQL/MariaDB database (minimum version 5.6+ or equivalent).


Expand All @@ -42,9 +42,8 @@ Known problems

Because of the project history there are several probable problems regarding the database.
MySQL changed the time and date related default values over the last years. Check to setup
the related config values to connect to the database in a more compatible way. MySQL Strict
is no good option. I work on this to [solve the problems](https://github.com/slackero/phpwcms/issues/275)
soon.
the related config values to connect to the database in a more compatible way. MySQL `Strict`
is no good option.


Bug tracker
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"algo26-matthias/idna-convert": "^v4.0.2",
"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",
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 @@ -152,7 +152,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 @@ -4524,16 +4524,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 @@ -4548,3 +4548,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.10.4';
const PHPWCMS_RELEASE_DATE = '2024/08/07';
const PHPWCMS_VERSION = '1.10.5';
const PHPWCMS_RELEASE_DATE = '2024/08/10';
const PHPWCMS_REVISION = '554';
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
61 changes: 61 additions & 0 deletions include/vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,67 @@
'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.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\\FileInfo' => $vendorDir . '/nette/utils/src/Utils/FileInfo.php',
'Nette\\Utils\\FileSystem' => $vendorDir . '/nette/utils/src/Utils/FileSystem.php',
'Nette\\Utils\\Finder' => $vendorDir . '/nette/utils/src/Utils/Finder.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\\ImageColor' => $vendorDir . '/nette/utils/src/Utils/ImageColor.php',
'Nette\\Utils\\ImageException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
'Nette\\Utils\\ImageType' => $vendorDir . '/nette/utils/src/Utils/ImageType.php',
'Nette\\Utils\\Iterables' => $vendorDir . '/nette/utils/src/Utils/Iterables.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\\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\\ReflectionMethod' => $vendorDir . '/nette/utils/src/Utils/ReflectionMethod.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 @@ -7,13 +7,14 @@

return array(
'b45b351e6b6f7487d819961fef2fda77' => $vendorDir . '/jakeasmith/http_build_url/src/http_build_url.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
'fdc0e9724ddc47859c8bf0c1ea0a623a' => $vendorDir . '/openpsa/universalfeedcreator/lib/constants.php',
'9e71c1459ef1226520e4b26dac3a180d' => $vendorDir . '/php81_bc/strftime/src/php-8.1-strftime.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'b686b8e46447868025a15ce5d0cb2634' => $vendorDir . '/symfony/polyfill-php74/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
'5897ea0ac4cccf14d323035e65887801' => $vendorDir . '/symfony/polyfill-php82/bootstrap.php',
);
8 changes: 5 additions & 3 deletions include/vendor/composer/autoload_psr4.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
'SimplePie\\' => array($vendorDir . '/simplepie/simplepie/src'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/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'),
'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 27130a1

Please sign in to comment.