History log of /web-php/bin/news2html (Results 1 – 18 of 18)
Revision Date Author Comments
# acd86a16 02-Oct-2024 Tim Düsterhus

Link GHSA advisories in ChangeLog (#1082)


# 97f5bbe6 12-Apr-2024 Ben Ramsey

Announce PHP 8.1.28


# bb530230 08-Dec-2022 Christoph M. Becker

Fix news2html truncation

If there are NEWS entries referring to a certain PHP version, these are
interpreted as belonging to that PHP version. Since the lines actually
delimiting PH

Fix news2html truncation

If there are NEWS entries referring to a certain PHP version, these are
interpreted as belonging to that PHP version. Since the lines actually
delimiting PHP versions are supposed to have comma after the date, we
enforce that now.

Closes GH-730.

show more ...


# 1d73c26c 12-Jul-2022 Andreas Möller

Fix: Avoid generating code without space between comma and function argument

Closes GH-650.


# 1b83fd7a 03-Jul-2022 Ayesh Karunaratne

Multiple micro-optimizations

* Replace `ob_get_contents();ob_clean()` with `ob_get_clean()`

`ob_get_clean()` is equivalent to `ob_get_contents()` followed by `ob_clean()`.

Multiple micro-optimizations

* Replace `ob_get_contents();ob_clean()` with `ob_get_clean()`

`ob_get_clean()` is equivalent to `ob_get_contents()` followed by `ob_clean()`.

* Replace `intval()` calls with `(int)` type cast

This is a micro-optimization because `intval()` is a function call, and the type cast is about 6 times fast.

* Replace `preg_replace` call that could be done with an `rtrim()` call

In `./error.php`, there is a `preg_replace('!/+$!', '', $URI);` call that essentially is equivalent to `rtrim()`, that both calls removing trailing slash characters in `$URI`.
The `rtim()` call is more legible and faster.

* Combine consecutive `str_replace` calls to a single `str_replace` call

* Use short ternary operator where possible

Improves code readability.

* Cascade various `else` statements where possible

Cleans up the code by removing unnecessary `else` blocks and moving the code to the parent context if the previous `if` block exits the function by either terminating the script, or with a `return` statement.

* Combine multiple `isset()` calls to a single `isset()`

`isset()` accepts multiple parameters and returns `true` only if all of the parameters are `isset`. It makes sense to combine multiple individual `isset` calls to a single call for better readability.

* Replace `for` loop with a `foreach` loop

* Remove unnecessary character escapes in regular expressions

Regular expression special characters are context-sensitive. For example, special characters such as `.` are not considered special within square braces (`[]`).
This removes several of such instances that certain characters are escaped, but it is not strictly necessary within the context. This improves the readability of the expression.

See more information at [PHP.Watch: Writing better Regular Expressions in PHP](https://php.watch/articles/php-regex-readability#reduce-escape)

* Remove unnecessary break statement

* Remove unnecessary PHP close tags

* Remove redundant JSON_ERROR_NONE check

Remove unnecessary `json_last_error() == JSON_ERROR_NONE` where the decoded object is inspected already.

Closes GH-603.

show more ...


# 40028042 03-Nov-2021 Sara Golemon

Add GH-\d as a rewrite


# 8743f6c5 03-Nov-2021 Sara Golemon

Minor refactor for NEWS rewrite rules


# bdfa9643 26-Jul-2021 Mike Schinkel

Change <a name="..."> to <a id="...">

PhpStorm flagged @name as a deprecated HTML attribute, so it seemed appropriate to change then to @id. In cases where there were both a @name and @id at

Change <a name="..."> to <a id="...">

PhpStorm flagged @name as a deprecated HTML attribute, so it seemed appropriate to change then to @id. In cases where there were both a @name and @id attribute and their values were the same, this commit removes the @name attribute (there were no cases where both @name and @id attributes existed but having different values.)

Closes GH-416.

show more ...


# b8175b4c 06-May-2021 Sergey Panteleev

Changelog bug links (#403)

- Bug and feature request plain text numbers replaced by functions
- Added Implemented FR and GitHub PR replacements


# 498292a9 05-Jun-2019 Sara Golemon

Add direct writing to bin/news2html


# d8e20124 05-Jun-2019 Sara Golemon

Preserve CVE IDs when producing ChangeLog


# c5052bab 05-Jun-2019 Sara Golemon

Clean up news2html a little


# 8ad9357b 17-Sep-2015 Sobak

Add missing quotes


# 17928997 04-Sep-2015 Julien Pauli

Usage of release_date() in Changelog template


# 3310b023 19-Feb-2015 Stanislav Malyshev

5.4.38 release


# cc36ed61 19-Dec-2014 Stanislav Malyshev

5.4.36


# 3d60cd56 17-Oct-2013 Stanislav Malyshev

5.4.21


# 3f7e30e9 11-Jun-2013 Stanislav Malyshev

add script for converting NEWS into HTML