Skip to content

Commit 9de0850

Browse files
Remove workaround for PHP bug #49692
PHP bug #49692 [1] affects only PHP 5.3.0 and was fixed in PHP 5.3.1. I think it is time to remove the workaround as PHP version 5.3.0 is end-of-life for a long time now and even Debian old-stable comes with PHP 5.3.3. [1] <http://bugs.php.net/bug.php?id=49692>
1 parent 284378d commit 9de0850

File tree

5 files changed

+5
-161
lines changed

5 files changed

+5
-161
lines changed

README

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,8 @@
2424

2525
See the monobook template website for update instructions [2].
2626

27-
NOTE: If everything will be displayed unformatted, your PHP environment is
28-
probably affected by PHP bug #49692 [3]. You may find errors like
29-
"syntax error, unexpected '/' in ../../lib/tpl/monobook/style.ini on
30-
line XX" in your PHP logs when this is the case. monobook provides a
31-
workaround for this, simply delete monobook's "style.ini" to trigger
32-
the template to use it.
33-
3427
[1] <https://www.dokuwiki.org/template>
3528
[2] <https://www.dokuwiki.org/template:monobook#update>
36-
[3] <http://bugs.php.net/bug.php?id=49692>
3729

3830

3931

bug49642.php

Lines changed: 0 additions & 120 deletions
This file was deleted.

main.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@
140140
* NOTE: This function is heavily inspired by "writeMBPortlet(), context.php" of
141141
* the "Monobook for Dokuwiki" template by Terence J. Grant.
142142
*
143-
* @param array The tab data to render within the snippet. Each element
144-
* is represented through a subarray:
143+
* @param array The tab data to render within the snippet. Each element is
144+
* represented by a subarray:
145145
* $array = array("tab1" => array("text" => "hello world!",
146146
* "href" => "http://www.example.com"
147147
* "nofollow" => true),
@@ -281,7 +281,7 @@ function _monobook_renderTabs($arr)
281281
* the "Monobook for Dokuwiki" template by Terence J. Grant.
282282
*
283283
* @param array The box data to render within the snippet. Each box is
284-
* represented through a subarray:
284+
* represented by a subarray:
285285
* $array = array("box-id1" => array("headline" => "hello world!",
286286
* "xhtml" => "I am <i>here</i>."));
287287
* Available keys within the subarrays:
@@ -361,8 +361,8 @@ function _monobook_renderBoxes($arr)
361361
/**
362362
* Helper to render the footer buttons (like a dynamic XHTML snippet)
363363
*
364-
* @param array The button data to render within the snippet. Each element
365-
* is represented through a subarray:
364+
* @param array The button data to render within the snippet. Each element is
365+
* represented by a subarray:
366366
* $array = array("btn1" => array("img" => DOKU_TPL."static/img/button-monobook.png",
367367
* "href" => "https://andreashaerter.com/",
368368
* "width" => 80,
@@ -473,15 +473,6 @@ function _monobook_renderButtons($arr)
473473
tpl_metaheaders();
474474
echo "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />";
475475

476-
//manually load needed CSS? this is a workaround for PHP Bug #49642. In some
477-
//version/os combinations PHP is not able to parse INI-file entries if there
478-
//are slashes "/" used for the keynames (see bugreport for more information:
479-
//<http://bugs.php.net/bug.php?id=49692>). to trigger this workaround, simply
480-
//delete/rename monobook's style.ini.
481-
if (!file_exists(DOKU_TPLINC."style.ini")){
482-
echo "<link rel=\"stylesheet\" media=\"all\" type=\"text/css\" href=\"".DOKU_TPL."bug49642.php".((!empty($lang["direction"]) && $lang["direction"] === "rtl") ? "?langdir=rtl" : "")."\" />\n"; //var comes from DokuWiki core
483-
}
484-
485476
//include default or userdefined favicon
486477
//
487478
//note: since 2011-04-22 "Rincewind RC1", there is a core function named

mediamanager.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,6 @@
3333
tpl_metaheaders();
3434
echo "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />";
3535

36-
//manually load needed CSS? this is a workaround for PHP Bug #49642. In some
37-
//version/os combinations PHP is not able to parse INI-file entries if there
38-
//are slashes "/" used for the keynames (see bugreport for more information:
39-
//<http://bugs.php.net/bug.php?id=49692>). to trigger this workaround, simply
40-
//delete/rename monobook's style.ini.
41-
if (!file_exists(DOKU_TPLINC."style.ini")){
42-
echo "<link rel=\"stylesheet\" media=\"all\" type=\"text/css\" href=\"".DOKU_TPL."bug49642.php".((!empty($lang["direction"]) && $lang["direction"] === "rtl") ? "?langdir=rtl" : "")."\" />\n"; //var comes from DokuWiki core
43-
}
44-
4536
//include default or userdefined favicon
4637
//
4738
//note: since 2011-04-22 "Rincewind RC1", there is a core function named

style.ini

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727

2828
[stylesheets]
2929
; screen
30-
; note to myself: don't forget to respect the workaround within "bug49642.php"
31-
; when adding new screen styles.
3230
; load the DokuWiki styles. See <http://j.mp/eq8zSo> why I am doing this.
3331
static/3rd/dokuwiki/_imgdetail.css = screen
3432
static/3rd/dokuwiki/_media_popup.css = screen
@@ -60,8 +58,6 @@ user/screen.css = screen
6058
; I think this function is silly (cause therefore we got
6159
; different "media" but some people *always* searching for such
6260
; print version links). Good text about this: <http://j.mp/6r3Kgf>
63-
; note to myself: don't forget to respect the workaround within "bug49642.php"
64-
; when adding new print styles.
6561
; load the DokuWiki styles. See <http://j.mp/eq8zSo> why I am doing this.
6662
static/3rd/dokuwiki/print.css = print
6763

@@ -74,9 +70,6 @@ user/print.css = print
7470

7571

7672
; right-to-left
77-
; note to myself: don't forget to respect the workaround within "bug49642.php"
78-
; when adding new rtl styles.
79-
8073
; load the most important MediaWiki monobook styles
8174
static/3rd/monobook/rtl.css = rtl
8275

@@ -95,9 +88,6 @@ user/rtl.css = rtl
9588
;--------------------------------------------------------------------------
9689
;------ guaranteed dokuwiki color placeholders that every plugin can use
9790
; main text and background colors
98-
;
99-
;note to myself: don't forget to respect the workaround within "bug49642.php"
100-
; when changing values in here.
10191
__text__ = "#000"
10292
__background__ = "#fff"
10393
; alternative text and background colors

0 commit comments

Comments
 (0)