Skip to content

Commit d138cde

Browse files
committed
Release phpwcms v1.9.39, the legacy release
Merge branch 'v1.9-dev' into phpwcms-legacy
2 parents cdc113f + 0c05f68 commit d138cde

68 files changed

Lines changed: 952 additions & 598 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
[![phpwcms](https://www.phpwcms.org/indeximg/phpwcms-logo.svg)](https://www.phpwcms.org)
22
=========
33

4-
**phpwcms** is a flexible, fast, robust, customer and developer friendly
4+
**phpwcms** is a very flexible, fast, robust, customer and developer friendly
55
but yet powerful web based content management system and cms framework running
66
under PHP and MySQL/MariaDB. phpwcms is created and maintained by
7-
[Oliver Georgi](http://twitter.com/slackero). None of the fancy systems but working since more
8-
than 20 years! Yeah!
9-
10-
Version 1.9.38 is the legacy version of **phpwcms** (version > 1.9.36 and < 1.10).
11-
I will try to keep this on par as long as possible to the newest version
12-
of **phpwcms** v1.10+ — if you can try to upgrade existing installations.
7+
[Oliver Georgi](http://twitter.com/slackero).
138

149
To get started, checkout [phpwcms.org](https://www.phpwcms.org) or the community driven
1510
[HowTo Wiki](https://wiki.phpwcms.org/) (snapshot). Most questions are yet
@@ -31,9 +26,10 @@ root or sub folder. Link your browser to the related URL and follow the install
3126
Server system requirements
3227
--------------------------
3328

34-
**phpwcms** version 1.9.38 requires a web server with PHP 7.4 or newer.
29+
**phpwcms** version 1.9.39 requires a web server with PHP 7.4 or newer.
3530
and a MySQL/MariaDB database (minimum version 5.1, recommend 5.5+).
36-
Always check the [supported versions of PHP](https://www.php.net/supported-versions.php).
31+
If you already use PHP v8.x you can use the latest version of
32+
[**phpwcms v1.10.3**](https://github.com/slackero/phpwcms/releases/tag/v1.10.3).
3733

3834

3935
Known problems
@@ -42,22 +38,25 @@ Known problems
4238
Because of the project history there are several probable problems regarding the database.
4339
MySQL changed the time and date related default values over the last years. Check to setup
4440
the related config values to connect to the database in a more compatible way. MySQL Strict
45-
is no good option for **phpwcms** < 1.10. But **phpwcms** has a db related
46-
[config setting](https://github.com/slackero/phpwcms/blob/master/include/config/dist.conf.inc.php#L25)
47-
to force MySQL into a more lax mode.
41+
is no good option. I work on this to [solve the problems](https://github.com/slackero/phpwcms/issues/275)
42+
soon.
4843

4944

50-
Support an issue (bug)
51-
----------------------
45+
Bug tracker
46+
-----------
5247

53-
Did you find a bug or miss something? Please create an [issue on GitHub](https://github.com/slackero/phpwcms/issues).
48+
Did you find a bug? Please create an **[issue here](https://github.com/slackero/phpwcms/issues)** on GitHub
49+
that conforms with [necolas's guidelines](https://github.com/necolas/issue-guidelines).
5450

5551

5652
Share with us
5753
-------------
5854

59-
Keep up to date on announcements and more by following **phpwcms** on
60-
[Github](https://github.com/slackero/phpwcms).
55+
Keep up to date on announcements and more by following **phpwcms** on Twitter
56+
[@phpwcms](https://twitter.com/phpwcms) or on
57+
[Facebook](https://www.facebook.com/pages/phpwcms/162275020999).
58+
*(We are no longer active there, better you stay in touch with **phpwcms** on
59+
[Github](https://github.com/slackero/phpwcms))*
6160

6261

6362
Creator
@@ -66,6 +65,7 @@ Creator
6665
**Oliver Georgi**
6766

6867
- <https://github.com/slackero>
68+
- <https://webverbund.de>
6969
- <https://www.linkedin.com/in/olivergeorgi>
7070
- <https://twitter.com/slackero>
7171

@@ -77,9 +77,8 @@ Copyright 2002-2024 [Oliver Georgi](mailto:og@phpwcms.org?subject=phpwcms)
7777

7878
Licensed under the GNU General Public License, Version 2 (the "License");
7979
you may not use this work except in compliance with the License.
80-
You may obtain a copy of the License in the LICENSE file, or at:
81-
82-
<https://opensource.org/licenses/GPL-2.0>
80+
You may obtain a copy of the License in the LICENSE file, or at:
81+
<https://opensource.org/licenses/GPL-2.0>
8382

8483
This program is free software; you can redistribute it and/or
8584
modify it under the terms of the GNU General Public License
@@ -92,7 +91,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9291
GNU General Public License for more details.
9392

9493
You should have received a copy of the GNU General Public License
95-
along with this program; if not, write to the
96-
Free Software Foundation, Inc.,
97-
51 Franklin Street, Fifth Floor, Boston,
98-
MA 02110-1301, USA.
94+
along with this program; if not, write to the
95+
Free Software Foundation, Inc.,
96+
51 Franklin Street, Fifth Floor, Boston,
97+
MA 02110-1301,
98+
USA.

composer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,23 @@
88
},
99
"require": {
1010
"php": ">=7.4",
11-
"algo26-matthias/idna-convert": "^v3.1.0",
12-
"enshrined/svg-sanitize": "^0.16.0",
13-
"netcarver/textile": "v4.0.0",
11+
"algo26-matthias/idna-convert": "^v3.1.1",
12+
"enshrined/svg-sanitize": "^0.19.0",
13+
"netcarver/textile": "v4.1.1",
1414
"erusev/parsedown": "^v2.0.0-beta-1",
1515
"erusev/parsedown-extra": "^v2.0.0-beta-1",
16-
"openpsa/universalfeedcreator": "^v1.8.5",
17-
"phpmailer/phpmailer": "^v6.8.1",
16+
"openpsa/universalfeedcreator": "^v1.9.0",
17+
"phpmailer/phpmailer": "^v6.9.1",
1818
"phpoffice/phpspreadsheet": "^1.29.0",
1919
"simplepie/simplepie": "@dev",
2020
"ext-intl": "*",
2121
"html2text/html2text": "^4.3.1",
2222
"ext-gd": "*",
2323
"ext-mysqli": "*",
2424
"ext-mbstring": "*",
25-
"symfony/polyfill-php80": "^v1.28.0",
26-
"symfony/polyfill-php81": "^v1.28.0",
27-
"symfony/polyfill-php82": "^v1.28.0"
25+
"symfony/polyfill-mbstring": "^v1.30.0",
26+
"symfony/polyfill-php80": "^v1.30.0",
27+
"symfony/polyfill-php81": "^v1.30.0",
28+
"symfony/polyfill-php82": "^v1.30.0"
2829
}
2930
}

include/config/dist.conf.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
$phpwcms['allow_remote_URL'] = 0; // 0 = no remote URL in {PHP:...} replacement tag allowed, 1 = allowed
7676
$phpwcms['jpg_quality'] = 85; // JPG Quality Range 25-100
7777
$phpwcms['webp_enable'] = 1; // Render all images as WebP if the client browser supports it
78-
$phpwcms['webp_quality'] = 85; // Set the WebP quality
78+
$phpwcms['webp_quality'] = 85; // Set the WebP quality, 0-100
7979
$phpwcms['resize_animated_gif'] = true; // Try to resize animated GIF, this can lead to bigger file sizes
8080
$phpwcms['sharpen_level'] = 1; // Sharpen Level - only ImageMagick: 0, 1, 2, 3, 4, 5 -- 0 = no, 5 = extra sharp
8181
$phpwcms['allow_ext_init'] = 1; // allow including of custom external scripts at frontend initialization

include/inc_front/content.article.inc.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -867,15 +867,15 @@
867867
}
868868

869869
// Set robots meta tag if noindex or nofollow
870-
$row['article_meta']['robots'] = array();
870+
$_article_meta_robots = array();
871871
if(!empty($row['article_meta']['noindex'])) {
872-
$row['article_meta']['robots'][] = 'noindex';
872+
$_article_meta_robots[] = 'noindex';
873873
}
874874
if(!empty($row['article_meta']['nofollow'])) {
875-
$row['article_meta']['robots'][] = 'nofollow';
875+
$_article_meta_robots[] = 'nofollow';
876876
}
877-
if($row['article_meta']['robots']) {
878-
$row['article_meta']['robots'] = implode(',', $row['article_meta']['robots']);
879-
set_meta('robots', $row['article_meta']['robots']);
880-
header('X-Robots-Tag: ' . $row['article_meta']['robots']);
877+
if(count($_article_meta_robots)) {
878+
$_article_meta_robots = implode(',', $_article_meta_robots);
879+
set_meta('robots', $_article_meta_robots);
880+
header('X-Robots-Tag: ' . $_article_meta_robots);
881881
}

include/inc_front/content/cnt21.article.inc.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,28 @@
3333
$crow['attr_class_id_close'] = '';
3434
}
3535

36-
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
37-
$content['page_file'] = @unserialize($crow["acontent_form"]);
38-
if($content["page_file"]['source']) {
39-
$CNT_TMP .= include_url($content['page_file']['pfile']);
40-
} elseif(!empty($phpwcms['enable_inline_php'])) {
41-
$content['page_file']['pfile'] = include_ext_php($content['page_file']['pfile'], 1);
42-
if(preg_match('/.*?<body[^>]*?>(.*?)<\/body>.*?/si', $content['page_file']['pfile'], $content['page_file']['match'])) {
43-
$CNT_TMP .= $content['page_file']['match'][1];
44-
} else {
45-
$CNT_TMP .= $content['page_file']['pfile'];
46-
}
36+
$CNT_TMP .= headline($crow['acontent_title'], $crow['acontent_subtitle'], $template_default['article']);
37+
$content['page_file'] = @unserialize($crow['acontent_form']);
38+
if(!empty($content['page_file']['source'])) {
39+
$CNT_TMP .= empty($content['page_file']['pfile']) ? '' : include_url($content['page_file']['pfile']);
40+
} elseif(!empty($content['page_file']['pfile'])) {
41+
if (!empty($phpwcms['enable_inline_php'])) {
42+
$content['page_file']['pfile'] = include_ext_php($content['page_file']['pfile'], 1);
43+
} elseif (is_file(PHPWCMS_ROOT .'/' . $content['page_file']['pfile'])) {
44+
$content['page_file']['pfile'] = file_get_contents(PHPWCMS_ROOT .'/' . $content['page_file']['pfile']);
45+
} else {
46+
$content['page_file']['pfile'] = '';
47+
}
48+
$content['page_file']['pfile'] = trim($content['page_file']['pfile']);
49+
if ($content['page_file']['pfile']) {
50+
if (preg_match('/.*?<body[^>]*?>(.*?)<\/body>.*?/si', $content['page_file']['pfile'], $content['page_file']['match'])) {
51+
$CNT_TMP .= $content['page_file']['match'][1];
52+
} elseif (preg_match('/<[a-z][\s\S]*>/i', $content['page_file']['pfile'])) {
53+
$CNT_TMP .= $content['page_file']['pfile'];
54+
} else {
55+
$CNT_TMP .= html($content['page_file']['pfile']);
56+
}
57+
}
4758
}
4859
$CNT_TMP .= $crow['attr_class_id_close'];
4960
unset($content['page_file']);

include/inc_front/content/cnt32.article.inc.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@
6060
$tabs['fieldgroup'] =& $template_default['settings']['tabs_custom_fields'][ $tabs['tab_fieldgroup'] ]['fields'];
6161
}
6262

63-
foreach($tabs['tabs'] as $key => $entry) {
63+
$tabs['total_entries'] = count($tabs['tabs']);
6464

65-
$tabs['entries'][$key] = str_replace('{TABID}', ($key+1), $tabs['tmpl_entry']);
65+
foreach($tabs['tabs'] as $key => $entry) {
66+
$tab_id = $key+1;
67+
$tabs['entries'][$key] = str_replace('{TABID}', $tab_id, $tabs['tmpl_entry']);
68+
$tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], 'FIRST', $tab_id > 1 ? '' : $tab_id);
69+
$tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], 'LAST', $tab_id === $tabs['total_entries'] ? $tab_id : '');
6670
$tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], 'TABTITLE', $entry['tabtitle'] === '-' ? '' : html_specialchars($entry['tabtitle']));
6771
$tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], 'TABCONTENT', trim($entry['tabheadline'].$entry['tabtext']) === '' ? '' : LF);
6872
$tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], 'TABHEADLINE', html_specialchars($entry['tabheadline']));
@@ -167,6 +171,7 @@
167171
$tabs['entries_count'] = count($tabs['entries']);
168172
$tabs['template'] = render_cnt_template($tabs['template'], 'TABS_ENTRIES', $tabs['entries_count'] ? implode('', $tabs['entries']) : '');
169173
$tabs['template'] = str_replace('{TAB_COUNT}', $tabs['entries_count'], $tabs['template']);
174+
$CNT_TMP .= str_replace('{ID}', $crow['acontent_id'], $tabs['template']);
170175

171176
} else {
172177

@@ -175,6 +180,4 @@
175180

176181
}
177182

178-
$CNT_TMP .= str_replace('{ID}', $crow['acontent_id'], $tabs['template']);
179-
180183
unset($tabs);

include/inc_front/js.inc.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,23 @@
2626
$block['js_ondomready'] = array();
2727
$block['js_inline'] = array();
2828

29-
// set default JS library
29+
// Set default JS library
3030
if(empty($block['jslib'])) {
3131
$block['jslib'] = key($phpwcms['js_lib']);
3232
}
33+
// Sanitize the JavaScript library
34+
$block['jslib'] = preg_replace('/[^a-z0-9-.]/', '', $block['jslib']);
3335

3436
// set if CDN can be used
3537
define('PHPWCMS_USE_CDN', empty($block['googleapi']) ? FALSE : TRUE);
3638

37-
// include the related JavaScript Library wrapper
38-
@include PHPWCMS_ROOT.'/include/inc_front/lib/js.'.$block['jslib'].'.inc.php';
39+
// Check if the selected JavaScript library exists
40+
if (!is_file(PHPWCMS_ROOT . '/include/inc_front/lib/js.' . $block['jslib'] . '.inc.php')) {
41+
// Set fallback to latest jQuery migrate
42+
$block['jslib'] = 'jquery-3.7-migrate-1';
43+
}
44+
// include the related JavaScript library wrapper
45+
@include PHPWCMS_ROOT . '/include/inc_front/lib/js.' . $block['jslib'] . '.inc.php';
3946

4047
// check if selected JavaScript should be loaded permanently
4148
if(!empty($block['jslibload'])) {

include/inc_front/lib/js.jquery-3.7-migrate-1.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
require_once(PHPWCMS_ROOT.'/include/inc_front/lib/js.jquery.default.php');
1313

14-
define('PHPWCMS_JSLIB', 'jquery-3.6-migrate-1');
14+
define('PHPWCMS_JSLIB', 'jquery-3.7-migrate-1');
1515

1616
/**
1717
* Init jQuery 3.7.x + jQuery Migrate 1.4.x & 3.4.x Library

include/inc_lang/backend/de/lang.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@
771771
$BL['be_cnt_pages_manually'] = 'Eigene Pfad/Datei oder URL';
772772
$BL['be_cnt_pages_cust'] = 'Datei/URL';
773773
$BL['be_cnt_pages_from'] = 'Herkunft';
774+
$BL['be_cnt_pages_php_render_warning'] = 'Inline PHP <code>$phpwcms[&#39;enable_inline_php&#39;]</code> ist deaktiviert.';
774775

775776
// added: 24-05-2004
776777
$BL['be_ctype_reference'] = 'Bilderwechsel';

include/inc_lang/backend/en/lang.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@
776776
$BL['be_cnt_pages_manually'] = 'custom path/file or URL';
777777
$BL['be_cnt_pages_cust'] = 'file/URL';
778778
$BL['be_cnt_pages_from'] = 'source';
779+
$BL['be_cnt_pages_php_render_warning'] = 'inline PHP <code>$phpwcms[&#39;enable_inline_php&#39;]</code> is disabled';
779780

780781
// added: 24-05-2004
781782
$BL['be_ctype_reference'] = 'rollover images';

0 commit comments

Comments
 (0)