aboutsummaryrefslogtreecommitdiff
path: root/pub/skins
diff options
context:
space:
mode:
authorpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2024-08-21 07:56:27 +0000
committerpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2024-08-21 07:56:27 +0000
commitfdbced5e5a878bbd212e32d224bec8af29f7360c (patch)
tree767a05d86fbd8f11fa91cd2892f8b6ed09795b20 /pub/skins
parente5ae6ba24de75881ac6b00e13fc143fe5f6460d3 (diff)
parent1e16c606bf5bef33e7b0cd69f96ab3935ca38c19 (diff)
downloadpmwiki.svn-latest.tar.bz2
new latest releaseHEADlatest
git-svn-id: svn://pmwiki.org/pmwiki/tags/latest@4801 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'pub/skins')
-rw-r--r--pub/skins/pmwiki-responsive/skin.php26
1 files changed, 11 insertions, 15 deletions
diff --git a/pub/skins/pmwiki-responsive/skin.php b/pub/skins/pmwiki-responsive/skin.php
index 698631be..52e6c389 100644
--- a/pub/skins/pmwiki-responsive/skin.php
+++ b/pub/skins/pmwiki-responsive/skin.php
@@ -26,20 +26,6 @@ SDV($EnableDarkThemeToggle, 3);
# For (:searchbox:), valid semantic HTML5
$SearchBoxInputType = "search";
-# remove deprecated "name=" parameter from anchor tags
-if($GLOBALS['VersionNum'] < 2002056) {
- # we want the skin to also work with older PmWiki versions
- Markup('[[#','<[[','/(?>\\[\\[#([A-Za-z][-.:\\w]*))\\]\\]/e',
- "Keep(TrackAnchors('$1') ? '' : \"<a id='$1'></a>\", 'L')");
-}
-else {
- Markup('[[#','<[[','/(?>\\[\\[#([A-Za-z][-.:\\w]*))\\]\\]/',
- "MarkupKeepTrackAnchors");
-}
-function MarkupKeepTrackAnchors($m) {
- return Keep(TrackAnchors($m[1]) ? '' : "<a id='{$m[1]}'></a>", 'L');
-}
-
# in HTML5 "clear" is a style not an attribute
Markup('[[<<]]','inline','/\\[\\[&lt;&lt;\\]\\]/',"<br class='clearboth' />");
@@ -76,9 +62,19 @@ function SkinFmt($pagename, $args) {
return; # Section was disabled by (:noheader:) or (:nofooter:)
}
+ static $pagecache = array();
foreach($args as $p) {
$pn = FmtPageName($p, $pagename);
- $elm = RetrieveAuthSection($pn, "$section{$section}end");
+ if(! isset($pagecache[$pn])) {
+ $page = RAPC($pn);
+ $pagecache[$pn] = strval(@$page['text']);
+ }
+ if($pagecache[$pn] == "") continue;
+ $rx = "/\\[\\[$section\\]\\](?: *\n+)?(.*?)\\s*\\[\\[{$section}end\\]\\]/s";
+ if(preg_match($rx, $pagecache[$pn], $m)) {
+ $elm = $m[1];
+ }
+ else continue;
if(!$elm) continue;
$html = MarkupToHTML($pagename, Qualify($pn, $elm));