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

135 Commits

Author SHA1 Message Date
Derick Rethans
7e2d16d545 Revert "Create UserNoteService class"
This reverts commit b31ec1c7f1.
2026-01-21 15:02:14 +00:00
Kamil Tekiela
b31ec1c7f1 Create UserNoteService class 2026-01-13 14:00:36 +01:00
Luffy
2d4419cfd5 Set repository language from query parameter (#1257) 2025-04-15 09:38:31 +08: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
Christoph M. Becker
7b11b960e4 Client side validation of form-user (#695)
Co-authored-by: Sergey Panteleev <sergey@php.net>
2024-07-09 10:33:09 +03: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
a528e6e91b Enhancement: Enable no_mixed_echo_print fixer (#864) 2023-12-06 15:19:57 +01:00
Tim Düsterhus
2a5e5a44ab Use white-space: pre-wrap for code formatting (#810)
* Use `white-space: pre-wrap` for code formatting

Apparently code formatting is used for the entire user comments. Use
`white-space: pre-wrap` to avoid horizontal scrolling of the plaintext
description.


see 7d4038829e

* Unify `highlight_php()` with PhD

see php/phd@01d6beb366

* Fix markup for notes in add-note.php
2023-08-30 18:40:00 +01:00
Christoph M. Becker
5dc614b2c5 Fix GH-712: link to mirrors is broken on confirmation page
The mirror program has been retired, so it makes no sense to mention
it.  Still, user notes may take a while to be shown.
2022-10-13 12:27:39 +02: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
57f505ed58 Enhancement: Enable and configure concat_space fixer
Closes GH-657.
2022-08-22 19:04:47 +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
d7e1b8159c Enhancement: Enable constant_case fixer
Co-authored-by: MathiasReker <mathias@reker.dk>

Closes GH-660.
2022-07-15 13:50:13 +02:00
Andreas Möller
4bca56f307 Enhancement: Enable trim_array_spaces fixer
Closes GH-644.
2022-07-12 13:26:23 +02:00
Andreas Möller
c68e5a9e4a Enhancement: Enable single_space_after_construct fixer
Closes GH-640.
2022-07-12 11:44:23 +02:00
Ayesh Karunaratne
746d3d71ef HTML A11y improvements in add-note.php, my.php and vote-note.php
Also use strict comparison in pages that are changed.

Closes GH-610.
2022-07-04 13:25:36 +02: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
65254462c6 Fix: Remove extra closing tag
Closes GH-589.
2022-06-29 11:43:33 +02:00
Mathias Reker ⚡️
546b144fe3 Use elseif instead of else if
Closes GH-534.
2022-06-17 19:19:12 +02:00
Mathias Reker ⚡️
ede0cad42f Ternary to null coalescing
Use null coalescing operator ?? where possible.

Closes GH-528.
2022-06-17 18:43:40 +02:00
Nikita Popov
16f4045cf0 Replace master -> main in more places 2021-04-06 15:42:28 +02:00
Sara Golemon
cfc6b38ec8 Goodbye Magic Quotes 2019-07-10 13:45:01 -04:00
Sara Golemon
c0afd74bf7 Swap uses of _SERVER[DOCUMENT_ROOT] for __DIR__
2/4 - Update remaining except archives/ and release/.
2019-05-31 12:31:21 -04: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
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
62ce7fd1b9 Replace <tt> with <code>
The <tt>-tag doesn't exists anymore in HTML5
2014-06-05 20:04:40 +02:00
Michael
5bfef25e70 Kill off XHTML
Long live HTML5! =)
2014-06-04 19:39:27 +02:00
Pascal Borreli
42497c72fb Fixed typos 2014-05-21 22:57:36 +01:00
Levi Morrison
26f94757ff Minor add-note.php adjustments 2014-05-07 21:02:52 -06:00
Levi Morrison
0a38599a5d 'add a note' now shows up (was accidentally hidden); also fixed add-note.php layout 2014-05-07 20:57:42 -06:00
Dejan Marjanovic
61a729a55c Update add-note.php and user notes animation 2013-12-15 05:26:14 +01:00
Levi Morrison
e505d3062b Improved the landing page when adding notes. Also improved legibility of headers. Separated em and strong styles. 2013-12-10 16:06:40 -07:00
Levi Morrison
dc643c1822 This needs to be id for the anchor to work 2013-12-10 15:13:13 -07:00
Ferenc Kovacs
3866e9ed7e Revert "now that posttohost() supports ssl, we should use https here" as there could be mirrors without ssl support.
This reverts commit 1511842d06.
2012-08-06 00:12:13 +02:00
Ferenc Kovacs
1511842d06 now that posttohost() supports ssl, we should use https here 2012-08-05 21:52:37 +02:00
Hannes Magnusson
4d209397a9 Fixed bug#61296 (Minor html error breaking link) 2012-03-05 23:17:10 -08:00
Rasmus Lerdorf
eb81c4b5e3 Gah! posttohost() doesn't speak ssl 2012-01-22 07:32:24 +00:00
Rasmus Lerdorf
52af0c2fe2 Remove transitional master2 hostname 2012-01-22 02:46:15 +00:00
Rasmus Lerdorf
44a352047a use master2 2012-01-20 05:15:17 +00:00
Daniel P. Brown
a8f142e959 Two quick fixes to last night's update. 2011-08-26 16:21:37 +00:00
Daniel P. Brown
dbfa4d35dd Call a bit more attention to the 'What not to enter' section, which seems to escape a vast number of folks. 2011-08-25 22:38:22 +00:00
Philip Olson
86b7eb76e8 Removed the old kill_spammer() tool. The world is now spam free! 2011-08-01 04:25:30 +00:00
Daniel P. Brown
95c8b27da9 Adding two new lines, primarily because there was nothing noting that we'd remove non-English notes before. 2011-06-23 20:22:04 +00:00
Daniel P. Brown
3c8f5f673f Missed a slash. 2011-05-25 15:10:03 +00:00
Daniel P. Brown
85a6ab2e5d Increase the length of the maximum note chunk size from a paltry 70 to a more-usable 120. Fixes #51361 and about a dozen other monthly complaints in the user notes. 2011-05-17 16:44:03 +00:00
Daniel P. Brown
930f7de948 Update list of things we generally remove so that folks aren't blindsided by the removal of a note. 2011-05-16 15:49:06 +00:00
Philip Olson
057281b7c1 Fixed minor logic issues, as per E_NOTICE errors found within the logs. 2010-06-12 02:41:10 +00:00