Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with MODX 3 #319

Open
wants to merge 35 commits into
base: 3.x
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ab4934d
v.3.0.0-beta for MODX3
sergant210 Dec 6, 2021
8e21b29
Some refactoring for 3.0.0-beta
sergant210 Dec 7, 2021
8d063ee
Rename build assets package name to follow rules and add package lock…
Dec 8, 2021
25ae665
Use new way of registering constant and small impromenets in file paths
Dec 8, 2021
b9aa527
Add MODX as dev-dependency for local development
Dec 8, 2021
7c601dc
Update readme file.
sergant210 Dec 9, 2021
4586629
Merge pull request #320 from modx-pro/feature/improvements
Dec 9, 2021
3a358ec
Merge pull request #321 from modx-pro/require-local-modx
Dec 9, 2021
80ea589
Fix makeUrl method properties
ilyautkin Dec 21, 2021
4e4968e
Update transport.plugins.php
Boshnik Jan 25, 2022
75a486d
Fix prepareTVs and processTVs = 1 not working
Qowyn Apr 7, 2022
8d36f9c
Update connector.php
halftrainedharry Apr 7, 2022
ba77f37
Fixed bugs with getting config.
Jul 16, 2022
7d8be64
Merge branch '3x-new' of https://github.com/modx-pro/pdoTools into 3x…
Jul 22, 2022
735c4c2
Merge pull request #335 from Qowyn/patch-1
sergant210 Jul 22, 2022
3744a47
Merge branch '3x-new' of https://github.com/modx-pro/pdoTools into 3x…
Jul 22, 2022
4a64938
Merge pull request #336 from halftrainedharry/patch-1
sergant210 Jul 22, 2022
a313669
Merge branch '3x-new' of https://github.com/modx-pro/pdoTools into 3x…
Jul 22, 2022
b1adfdd
Merge pull request #322 from modx-pro/fix-makeurl
sergant210 Jul 22, 2022
88fc39e
Merge pull request #326 from Boshnik/patch-1
sergant210 Jul 22, 2022
351cb63
Merge branch '3x-new' of https://github.com/modx-pro/pdoTools into 3x…
Jul 22, 2022
8162c76
Fixed fatal error caused by loop (#341).
Jul 22, 2022
e2a1039
Fixed checking TV before adding to the query (#343).
Jul 25, 2022
6965ac9
Changed $_SERVER['DOCUMENT_ROOT'] to dirname in the connector (#332).
Jul 25, 2022
0076487
v.3.0.0-pl
Jul 25, 2022
1bfd641
Fixed bug when clearing cache (#347).
Jul 27, 2022
d1ee5bd
Fixed incorrect next and prev canonical URLs (#318).
Aug 1, 2022
88c30fb
Added aliases "pdoTools" and "pdoFetch" for the service container.
Aug 1, 2022
cc39303
v.3.0.1-pl
Aug 1, 2022
559bfd9
Fixed a bug in the Fenom parser (#331).
Aug 1, 2022
40ef747
Поддержка файловых сниппетов в pdoPage
bezumkin Mar 14, 2023
1fdc34a
Merge pull request #360 from modx-pro/uncached-bindings
sergant210 Apr 11, 2023
4abcb80
Merge remote-tracking branch 'origin/3x-new' into 3x-new
Apr 11, 2023
e8c8ab0
Security fix for the pdoPage snippet.
Apr 11, 2023
613aef7
v.3.0.2-pl.
Apr 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Security fix for the pdoPage snippet.
sshlokov committed Apr 11, 2023
commit e8c8ab082c6cb359a88e3324c9986557f07dce71
10 changes: 5 additions & 5 deletions core/components/pdotools/elements/snippets/snippet.pdopage.php
Original file line number Diff line number Diff line change
@@ -131,7 +131,8 @@
}

$cache = !empty($cache) || (!$modx->user->id && !empty($cacheAnonymous));
$url = $paginator->getBaseUrl();
$charset = $modx->getOption('modx_charset', null, 'UTF-8');
$url = htmlentities($paginator->getBaseUrl(), ENT_QUOTES, $charset);
$output = $pagination = $total = $pageCount = '';

$data = $cache
@@ -238,21 +239,20 @@
}

if (!empty($setMeta)) {
$charset = $modx->getOption('modx_charset', null, 'UTF-8');
$canurl = $paginator->pdoTools->config('scheme') !== 'full'
? $paginator->getCanonicalUrl($url)
: $url;
$modx->regClientStartupHTMLBlock('<link rel="canonical" href="' . htmlentities($canurl, ENT_QUOTES, $charset) . '"/>');
$modx->regClientStartupHTMLBlock('<link rel="canonical" href="' . $canurl . '"/>');
if ($data[$pageVarKey] > 1) {
$prevUrl = $paginator->makePageLink($canurl, $data[$pageVarKey] - 1);
$modx->regClientStartupHTMLBlock(
'<link rel="prev" href="' . htmlentities($prevUrl, ENT_QUOTES, $charset) . '"/>'
'<link rel="prev" href="' . $prevUrl . '"/>'
);
}
if ($data[$pageVarKey] < $data[$pageCountVar]) {
$nextUrl = $paginator->makePageLink($canurl, $data[$pageVarKey] + 1);
$modx->regClientStartupHTMLBlock(
'<link rel="next" href="' . htmlentities($nextUrl, ENT_QUOTES, $charset) . '"/>'
'<link rel="next" href="' . $nextUrl . '"/>'
);
}
}