Skip to content

Commit

Permalink
Merge pull request #104 from amnuts/103-doc-links
Browse files Browse the repository at this point in the history
Fixes #103
  • Loading branch information
amnuts committed Oct 19, 2023
2 parents db9df06 + e6113e6 commit edbcbbe
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 8 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ So to get started with a new language, copy the `example.json` to the language y

## Releases

**Version 3.5.3**\
Worked around some inconsistencies with links in the opcache documentation on php.net.

**Version 3.5.2**\
Removed some warnings for PHP 8.2 by dropping the `namespace` and `use` statements in the bundled `index.php` file.

Expand Down
17 changes: 16 additions & 1 deletion build/_frontend/interface.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,25 @@ function Directives(props) {
vShow = directive.v;
}
}
let directiveLink = (name) => {
if (name === 'opcache.jit_max_recursive_returns') {
return 'opcache.jit-max-recursive-return';
}
return (
[
'opcache.file_update_protection',
'opcache.huge_code_pages',
'opcache.lockfile_path',
'opcache.opt_debug_level',
].includes(name)
? name
: name.replace(/_/g,'-')
);
}
return (
<tr key={directive.k}>
<td title={props.txt('View {0} manual entry', directive.k)}><a href={'https://php.net/manual/en/opcache.configuration.php#ini.'
+ (directive.k).replace(/_/g,'-')} target="_blank">{dShow}</a></td>
+ directiveLink(directive.k)} target="_blank">{dShow}</a></td>
<td>{vShow}</td>
</tr>
);
Expand Down
2 changes: 1 addition & 1 deletion build/build.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* OPcache GUI - build script
*
* @author Andrew Collington, andy@amnuts.com
* @version 3.5.2
* @version 3.5.3
* @link https://github.com/amnuts/opcache-gui
* @license MIT, https://acollington.mit-license.org/
*/
Expand Down
2 changes: 1 addition & 1 deletion build/template.phps
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* A simple but effective single-file GUI for the OPcache PHP extension.
*
* @author Andrew Collington, andy@amnuts.com
* @version 3.5.2
* @version 3.5.3
* @link https://github.com/amnuts/opcache-gui
* @license MIT, https://acollington.mit-license.org/
*/
Expand Down
14 changes: 11 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* A simple but effective single-file GUI for the OPcache PHP extension.
*
* @author Andrew Collington, andy@amnuts.com
* @version 3.5.2
* @version 3.5.3
* @link https://github.com/amnuts/opcache-gui
* @license MIT, https://acollington.mit-license.org/
*/
Expand Down Expand Up @@ -59,7 +59,7 @@

class Service
{
public const VERSION = '3.5.2';
public const VERSION = '3.5.3';

protected $tz;
protected $data;
Expand Down Expand Up @@ -936,12 +936,20 @@ className: "directive-list"
}
}

let directiveLink = name => {
if (name === 'opcache.jit_max_recursive_returns') {
return 'opcache.jit-max-recursive-return';
}

return ['opcache.file_update_protection', 'opcache.huge_code_pages', 'opcache.lockfile_path', 'opcache.opt_debug_level'].includes(name) ? name : name.replace(/_/g, '-');
};

return /*#__PURE__*/React.createElement("tr", {
key: directive.k
}, /*#__PURE__*/React.createElement("td", {
title: props.txt('View {0} manual entry', directive.k)
}, /*#__PURE__*/React.createElement("a", {
href: 'https://php.net/manual/en/opcache.configuration.php#ini.' + directive.k.replace(/_/g, '-'),
href: 'https://php.net/manual/en/opcache.configuration.php#ini.' + directiveLink(directive.k),
target: "_blank"
}, dShow)), /*#__PURE__*/React.createElement("td", null, vShow));
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opcache-gui",
"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).",
"version": "3.5.2",
"version": "3.5.3",
"main": "index.js",
"devDependencies": {
"@babel/cli": "^7.12.8",
Expand Down
2 changes: 1 addition & 1 deletion src/Opcache/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class Service
{
public const VERSION = '3.5.2';
public const VERSION = '3.5.3';

protected $tz;
protected $data;
Expand Down

0 comments on commit edbcbbe

Please sign in to comment.