Skip to content

Commit edbcbbe

Browse files
authored
Merge pull request #104 from amnuts/103-doc-links
Fixes #103
2 parents db9df06 + e6113e6 commit edbcbbe

File tree

7 files changed

+34
-8
lines changed

7 files changed

+34
-8
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ So to get started with a new language, copy the `example.json` to the language y
231231

232232
## Releases
233233

234+
**Version 3.5.3**\
235+
Worked around some inconsistencies with links in the opcache documentation on php.net.
236+
234237
**Version 3.5.2**\
235238
Removed some warnings for PHP 8.2 by dropping the `namespace` and `use` statements in the bundled `index.php` file.
236239

build/_frontend/interface.jsx

+16-1
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,25 @@ function Directives(props) {
383383
vShow = directive.v;
384384
}
385385
}
386+
let directiveLink = (name) => {
387+
if (name === 'opcache.jit_max_recursive_returns') {
388+
return 'opcache.jit-max-recursive-return';
389+
}
390+
return (
391+
[
392+
'opcache.file_update_protection',
393+
'opcache.huge_code_pages',
394+
'opcache.lockfile_path',
395+
'opcache.opt_debug_level',
396+
].includes(name)
397+
? name
398+
: name.replace(/_/g,'-')
399+
);
400+
}
386401
return (
387402
<tr key={directive.k}>
388403
<td title={props.txt('View {0} manual entry', directive.k)}><a href={'https://php.net/manual/en/opcache.configuration.php#ini.'
389-
+ (directive.k).replace(/_/g,'-')} target="_blank">{dShow}</a></td>
404+
+ directiveLink(directive.k)} target="_blank">{dShow}</a></td>
390405
<td>{vShow}</td>
391406
</tr>
392407
);

build/build.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* OPcache GUI - build script
55
*
66
* @author Andrew Collington, andy@amnuts.com
7-
* @version 3.5.2
7+
* @version 3.5.3
88
* @link https://github.com/amnuts/opcache-gui
99
* @license MIT, https://acollington.mit-license.org/
1010
*/

build/template.phps

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* A simple but effective single-file GUI for the OPcache PHP extension.
77
*
88
* @author Andrew Collington, andy@amnuts.com
9-
* @version 3.5.2
9+
* @version 3.5.3
1010
* @link https://github.com/amnuts/opcache-gui
1111
* @license MIT, https://acollington.mit-license.org/
1212
*/

index.php

+11-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* A simple but effective single-file GUI for the OPcache PHP extension.
77
*
88
* @author Andrew Collington, andy@amnuts.com
9-
* @version 3.5.2
9+
* @version 3.5.3
1010
* @link https://github.com/amnuts/opcache-gui
1111
* @license MIT, https://acollington.mit-license.org/
1212
*/
@@ -59,7 +59,7 @@
5959

6060
class Service
6161
{
62-
public const VERSION = '3.5.2';
62+
public const VERSION = '3.5.3';
6363

6464
protected $tz;
6565
protected $data;
@@ -936,12 +936,20 @@ className: "directive-list"
936936
}
937937
}
938938

939+
let directiveLink = name => {
940+
if (name === 'opcache.jit_max_recursive_returns') {
941+
return 'opcache.jit-max-recursive-return';
942+
}
943+
944+
return ['opcache.file_update_protection', 'opcache.huge_code_pages', 'opcache.lockfile_path', 'opcache.opt_debug_level'].includes(name) ? name : name.replace(/_/g, '-');
945+
};
946+
939947
return /*#__PURE__*/React.createElement("tr", {
940948
key: directive.k
941949
}, /*#__PURE__*/React.createElement("td", {
942950
title: props.txt('View {0} manual entry', directive.k)
943951
}, /*#__PURE__*/React.createElement("a", {
944-
href: 'https://php.net/manual/en/opcache.configuration.php#ini.' + directive.k.replace(/_/g, '-'),
952+
href: 'https://php.net/manual/en/opcache.configuration.php#ini.' + directiveLink(directive.k),
945953
target: "_blank"
946954
}, dShow)), /*#__PURE__*/React.createElement("td", null, vShow));
947955
});

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "opcache-gui",
33
"description": "A clean and responsive interface for Zend OPcache information, showing statistics, settings and cached files, and providing a real-time update for the information (using jQuery and React).",
4-
"version": "3.5.2",
4+
"version": "3.5.3",
55
"main": "index.js",
66
"devDependencies": {
77
"@babel/cli": "^7.12.8",

src/Opcache/Service.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class Service
1010
{
11-
public const VERSION = '3.5.2';
11+
public const VERSION = '3.5.3';
1212

1313
protected $tz;
1414
protected $data;

0 commit comments

Comments
 (0)