1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00
Commit Graph

368 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
cdf59074d3 Replace languages.inc globals with I18n\Languages consts (#1121)
The include/languages.inc file was not removed as it's used in other
repositories. It should be removed after migration.

Tests were added to ensure that the global variables and the constants
are in sync with each other.

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-11-14 11:37:00 +03:00
Luffy
67fa1d01ec Remove useless repo parameter (#1095) 2024-10-17 08:14:28 +08:00
haszi
83705efdd0 Add function for translation of UI elements (#1057)
Co-authored-by: haszi <haszika80@gmail.com>
2024-10-14 11:41:38 +01:00
Jim Winstead
b585014d1f Link to GH issues instead of bugs.php.net for documentation issues (#1078) 2024-09-20 10:43:41 +08:00
Maurício Meneghini Fauth
f252981e5b Replace MYPHPNET global var with the UserPreferences class (#1071) 2024-09-17 15:55:10 +08:00
haszi
739e1f575e Add last modification info and contributor list (#977)
Co-authored-by: haszi <haszika80@gmail.com>
2024-04-20 17:40:32 +01:00
haszi
fbe589892a Move contribution links to the bottom of the documentation pages (#973)
Co-authored-by: haszi <haszika80@gmail.com>
2024-04-17 12:48:52 +01:00
Andreas Möller
00342c402f Fix: Remove vim instruction (#880) 2023-12-07 15:01:52 +01:00
Andreas Möller
45d49c7e95 Fix: Remove emacs instruction (#876) 2023-12-07 11:44:39 +00:00
Andreas Möller
c093fb5382 Enhancement: Enable trailing_comma_in_multiline fixer (#647)
* Enhancement: Enable and configure trailing_comma_in_multiline fixer

* Fix: Run 'make coding-standards'
2023-12-06 23:16:28 +00:00
Andreas Möller
d713252582 Fix: Inline variables (#856) 2023-12-06 14:42:03 +01:00
Andreas Möller
a8c736a079 Enhancement: Enable void_return fixer (#661)
* Enhancement: Enable void_return fixer

* Fix: Run 'make coding-standards'
2023-12-05 14:06:29 +01:00
Andreas Möller
73a9969168 Enhancement: Enable new_with_braces fixer (#697) 2023-08-29 11:21:41 +01:00
Lu Fei
bf7eff4a9c Fix autoload redirect failure (#788) 2023-06-26 14:19:29 +01:00
Kamil Tekiela
9a5e56d966 Improve code for language selection (#709) 2022-09-29 10:29:51 +01:00
Kamil Tekiela
8b776fbd72 Remove unnecessary code (#708) 2022-09-29 10:28:51 +01:00
Kamil Tekiela
9752e1b90d Introduce UserNote DTO and refactor Sorter (#594) 2022-09-16 12:47:04 +01:00
Andreas Möller
1ebc2c4996 Enhancement: Enable binary_operator_spaces fixer
Closes GH-667.
2022-08-22 19:17:38 +02:00
Andreas Möller
d9bcfed482 Enhancement: Enable array_syntax fixer
Co-authored-by: MathiasReker <mathias@reker.dk>

Closes GH-659.
2022-08-22 18:59:14 +02:00
Andreas Möller
f127de5db9 Enhancement: Enable strict_param fixer
We set strict param to false to ensure current behavior,
except for two cases where it is safe to go with true.

Closes GH-658.
2022-07-15 14:48:44 +02:00
Andreas Möller
b575ebd409 Enhancement: Include *.inc files (with exceptions)
Closes GH-662.
2022-07-15 13:57:08 +02:00
Andreas Möller
a83ae2fa32 Enhancement: Use PSR-4 autoloader (#604) 2022-07-05 12:50:41 +01:00
Ayesh Karunaratne
1b83fd7ab7 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.
2022-07-03 12:24:14 +02:00
Andreas Möller
c3f9653226 Remove useless function manual_header()
Closes GH-584.
2022-07-02 11:53:37 +02:00
Kamil Tekiela
1a7521e738 Refactor manual_notes() (#592) 2022-06-29 22:36:16 +01:00
Kamil Tekiela
0b217c0271 Move ManualNotesSorter to src/ (#593) 2022-06-29 22:24:09 +01:00
Andreas Möller
98430dbeb5 Avoid variable function invocation
Closes GH-586.
2022-06-29 18:36:38 +02:00
Andreas Möller
8fbbe3bb89 Fix: Remove unused private property (#561) 2022-06-27 19:24:21 +01:00
Peter Cowburn
491af6f1d6 link to documentation source file when possible (#434)
Also direct readers to the language-specific repository to
report issues.
2021-08-13 12:12:44 +01:00
Nikita Popov
ece41d32e5 Point "Report a Bug" to github 2021-05-25 22:41:46 +02:00
Rasmus Lerdorf
1d4be620ad Remove references to master.php.net 2021-04-05 21:56:10 -07:00
Christoph M. Becker
019f279c9f Replace "Edit" with "Submit a Pull Request" link
Since the documentation has moved from SVN to Git, we replace the
"Edit" links in the manual with links to the respective GH mirrors.

Closes GH-389.
2020-12-30 15:52:22 +01:00
Peter Cowburn
15a2d2d21c Only access note array if there is a note
Fixes "Notice:  Trying to access array offset on value of type bool in ..."
2020-02-05 20:53:21 +00:00
Sara Golemon
2735e5f03f Swap uses of _SERVER[DOCUMENT_ROOT] for __DIR__
1/n - Update / and /include/ only.
2019-05-31 11:19:09 -04:00
Peter Kokot
dd8d8bf863 Sync final and leading newlines
This patch adds some missing newlines, trims some multiple redundant
final newlines into a single one, and trims few redundant leading
newlines.

According to POSIX, a line is a sequence of zero or more non-'<newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-17 12:37:26 +02:00
Peter Kokot
e235f79473 Trim trailing whitespace
This patch cleans all redundant trailing whitespace across the
repository except for the icalendar files.
2018-10-17 10:51:08 +02:00
Peter Kokot
0f95b8c709 Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-10-17 07:29:46 +02:00
Christoph M. Becker
a9aafdff2e selects "Other" in language chooser if current language should not be available (fixes #67629) 2015-03-24 19:43:30 +01:00
Hannes Magnusson
20930ba377 Fix undefined notice using older phd 2015-03-24 10:40:10 -07:00
Peter Cowburn
e79ae85efe use correct variable name 2015-03-08 14:24:15 +00:00
Hannes Magnusson
f206626aca fix warning until the genereated files have been updated 2015-03-07 14:25:48 -08:00
Sobak
920eb39277 Better handling for deprecated functions 2015-03-07 19:23:34 +01:00
Hannes Magnusson
61919c6478 Its enough to set the BASE_PAGE once 2015-02-04 09:58:58 -08:00
Jeff Welch
fa33a05da9 Removed superfluous slashes. 2014-06-21 03:18:38 -04:00
Michael
1c41366df8 Revert "Replace <small> with <span style"
This reverts commit 12f04c0d4a.
2014-06-06 23:48:35 +02:00
Michael
12f04c0d4a Replace <small> with <span style
Replace <small> with <span style="font-size:0.8em"> because the
definition of <small> is a complete other with HTML5
2014-06-05 20:35:30 +02:00
Michael
113c86286d Also remove XHTML from .inc files 2014-06-04 19:50:50 +02:00
Hannes Magnusson
cb20874745 Add support for <link hreflang> as suggested by Joost de Valk <joost@yoast.com> 2014-06-03 15:39:13 -07:00
Levi Morrison
8fb9b79ca8 Related functions now on right; some homepage fixes. 2014-04-27 23:14:11 -06:00
Levi Morrison
acf87cb5bc Some code-style improvements... I think. It also improves some HTML semantics (such as using label instead of p) so if you revert this, please bear that in mind. It probably should have been separate commits; I'm sorry. 2014-01-01 12:37:19 -07:00