218 Commits

Author SHA1 Message Date
Derick Rethans
4792d12069 Fix PHP 8.2/8.3 warnings and deprecations 2024-08-01 13:59:12 +01:00
Derick Rethans
9ed00f752f Fixed line endings for setting headers
During the recent server upgrades, it seems that the MTA does no longer
'convert' this. In fact, this has always been wrong.
2023-11-20 12:43:16 +00:00
Derick Rethans
8a36df538c Remove visitor_ip from columns. The value we collected was wrong, and new MariaDB bails out on it 2023-09-17 14:12:32 +01:00
Nikita Popov
bc9db6eacf Make spam filter stricter again 2023-07-09 09:21:21 +02:00
Nikita Popov
717f16a6d9 Make spam filter stricter
Require that php.net/github.com is in the host portion.
2023-06-24 21:19:47 +02:00
Nikita Popov
d50077c254 Only allow links to php.net and github.com
Activity on bugs.php.net is pretty much down to link spam now.
Fight it by only allowing php.net and github.com links.
2022-03-05 18:16:40 +01:00
Christoph M. Becker
2255979dc8 Try to prevent further SPAM by them 2022-02-15 12:56:09 +01:00
Nikita Popov
d0b0481c1c Point people to the new issue tracker 2021-12-04 17:05:05 +01:00
Nikita Popov
4efb5c3428 Disable submission of "Documentation Problem" bugs
Instead point people to the php/doc-en repository.

It's still possible to change the bug type to "Documentation
Problem" after it has been submitted, e.g. if it turns out a bug
is really a documentation issue.
2021-10-28 21:10:04 +02:00
peterdd
010107def9 clickable labels for radio and checkboxes in bug search form (#96)
* usability: make label clickable for  radio input

* set a right padding for the label

so it is obvious the label is for the left side radio select.

* clickable labels for asc/desc radio select

* right padding also for the asc/desc labels

* make the "NOT" checkbox labels clickable
2021-10-21 14:16:19 +02:00
peterdd
2edddded73 Check if params for reporting a bug are is_string()
Closes GH-104.
2021-10-21 11:19:54 +02:00
Nikita Popov
fcfdfef2ca Add tvfun to spam list 2021-10-07 15:52:54 +02:00
peterdd
90f86d6ab9 add css classes to status select in search form (#106)
Reuses the existing CSS classes to apply the same backgorund colors as in the bug search result table rows.

I know that Chrome and Safari ignore applying a background-color to option tags of a single select. But when bugs.php.net supports also multiselect for the status select both will show the background-color in multi selects (multiple="multiple" attribute for xhtml compatible modus)
2021-10-06 12:31:50 -07:00
Sara Golemon
2f06b4d7bb Add X-Frame-Options: SAMEORIGIN 2021-09-27 14:42:13 +00:00
Nikita Popov
4bc692453d Add lildurk to spam list 2021-09-01 20:24:12 +02:00
Nikita Popov
f259231094 Count https:// URLs towards spam 2021-08-26 14:22:04 +02:00
Rasmus Lerdorf
4f2b72f626 master->main 2021-04-05 21:58:19 -07:00
Nikita Popov
860d1552b5 Add aarinkaur to spam list
Large number of spam comments posted today.
2021-03-15 09:48:24 +01:00
Peter Cowburn
997f010b1f another spam word 2021-01-04 11:33:01 +00:00
Derick Rethans
a7c206cc24 Oh please do fork off 2020-08-05 17:55:31 +01:00
Derick Rethans
ceb990c913 Still not learning 2020-07-20 10:23:22 +01:00
Nikita Popov
f27ce31a93 Add helpdeskaustralia to spam list 2020-07-06 15:16:54 +02:00
Derick Rethans
b1edeff157 They're not learning 2020-06-11 17:09:06 +01:00
Nikita Popov
0ed3f812f8 Add phpbugreports to spam mail list
Same as rhsoft.
2019-09-06 09:35:26 +02:00
Derick Rethans
f2df1a664b Two can play that game 2019-06-01 00:59:55 +02:00
Derick Rethans
def044bbda stop spammy users 2019-05-28 13:18:28 +01:00
Peter Kokot
95cdd55d51 Remove unused functions
- admin_table_static
- admin_table_dynamic
- inline_content_menu
2019-05-23 03:00:42 +02:00
Peter Kokot
49dd23a4a8 Move backtrace pages to templates 2019-05-22 04:43:45 +02:00
Peter Kokot
9d47b05f2d Convert all tabs to spaces 2019-05-22 02:41:51 +02:00
Peter Cowburn
408f4f0854 add new word to spam list 2019-03-05 19:30:46 +00:00
Peter Kokot
1c04d30518 Remove display_bug_success() function
The display_bug_success() is a simple wrapper around the echo and has
HTML embedded in it.
2018-12-19 03:44:09 +01:00
Peter Kokot
10b0ad9cbe Refactor bugs_get_bug() to repository 2018-12-17 23:46:01 +01:00
Peter Kokot
a5b6fa0704 Refactor get_resolve_reasons() to repository class 2018-12-17 23:25:17 +01:00
Peter Kokot
357ba9e051 Move fetching bug comments to a repository class
Changes:
- This moves fetching bug comments to a dedicated repository class
- It uses vanilla PDO as current direction of the database usage
  is applied in this app.
- When bug_id is set to preview types issues occur due to int type
  hint. Should be refactored more in the future commits.
2018-12-17 23:18:48 +01:00
Peter Kokot
14f8c07aec Refactor PDO wrapper
Some considerations were raised on the mailing list that this PHP
application doesn't need a PDO wrapper at all.

Changes:
- ::fetchRow() method removed in favor of the vanilla PDOStatement::fetch()
- ::fetchAll() override removed in favor of the vanilla
  PDOStatement::fetchAll()
- ::fetchCol() removed since it is not used and is only a wrapper for
  the PDOStatement::fetchColumn()
- PDO fetch_style synced accross the app. When no fetch style is passed
  the default PDO::FETCH_ASSOC is used as set when connecting to db.
- Remove Database::escape() method
  The custom ::escape() method is a wrapper around PDO::quote() which
  additionally trims leading and trailing quotes from the string. All
  this should ideally be done via prepared statements only, except where
  we can and need to use PDO::quote() this step can be done on the given
  string or variable at hand directly.
- Remove escapeSQL() function
  The escapeSQL function is a wrapper around the PDO::quote() and is
  using $dbh from the global scope which is not testable nor good practice
  further on. Removed and refactored into only PDO::quote() usages on
  required places.
- Remove ::fetchOne() method
  The fetchOne() method is a simple wrapper around the PDOStatement::fetch()
  method with very minor tweaks so the usage can be simplified even more.
  The PDOStatement::fetch(\PDO::FETCH_NUM)[0] will always return either a
  result from the database column or when row is empty a null.
- Probably this should be refactored to the database tables respected
  repositories further on.
- Remove PDO wrapper
  The app's current goal is to lean on a vanilla PDO wrapper only.
  Current set of features also don't require additional functionality
  and extending PDO to a wrapper or create a database abstraction layer
  yet.
2018-12-17 22:46:55 +01:00
Kalle Sommer Nielsen
8d01322dbf WS 2018-12-15 22:22:54 +01:00
Peter Kokot
9b248f9ed6 Refactor get_pseudo_packages() to repository class
Changes:
- get_pseudo_packages() function is moved to its own repository class.
- Database::queryAll() removed since it is not used and the method
  arguments don't match the number of used arguments anymore
- Project types configuration is moved to repository class for now.
- Some unused items removed
- Some template changes and show_project_options() helper function
  integrated in the view layer directly since it is used in a simplified
  way.
2018-12-11 02:05:22 +01:00
Peter Kokot
8ab9a1d110 Refactor patches uploading
This patch moves patches uploading functionality from the outdated
HTTP_Upload package to a dedicated service class in the app.

Additional changes in this context:
- Functionality concerning retrieving patches data from database has
  been moved to a separate repository classes.
- Some missed bugs fixed when uploading patches and no developer info
  were recorded.
- Obsoleting patches functionality is now working again.
- Added a simple unit test.
2018-12-05 19:29:10 +01:00
Peter Kokot
c8c85a57c5 Replace PEAR error handling with exceptions in pull requests 2018-12-05 03:20:01 +01:00
Peter Kokot
26f5c26454 Remove unused errors handler function handle_pear_errors()
Function handle_pear_errors() has been made obsolete via
23298a1236
2018-12-05 02:48:41 +01:00
Peter Kokot
38212625bd Refactor each() function to foreach()
The each() function has been deprecated since PHP 7.2 and shouldn't be
used anymore:
- http://php.net/manual/en/function.each.php
2018-11-24 02:25:23 +01:00
Peter Kokot
a06f85b0c3 Refactor long array() syntax to short []
Since site is using PHP 5.4+ already, the longer `array()` syntax can be
refactored to shorter `[]`. Also code is already using short array
syntax on some places.
2018-10-24 20:27:59 +02:00
Peter Kokot
8c1bedf1c0 Update http to https
Changes:
- http links updated to https (those that work so far)
- us3.php.net mirror changed to php.net for fetching PHP versions
- some outdated links refreshed
2018-10-23 17:14:42 +02:00
Peter Kokot
c2a40c6bf0 Replace PEAR MDB2 constants with PDO constants
The changed constants are more understandable using PDO constants
nor are the dedicated definition needed anymore.
2018-10-23 00:40:44 +02:00
Johannes Schlüter
5d86832595 Attemt to fix pre-selected value 2018-08-09 15:44:32 +02:00
zrhoffman
8fde831ad5 Turn categories into <optgroup>s and include the category as a package
within that category.

We still show disabled packages in a different background color
(b93c85b003).
2018-08-08 18:23:47 -05:00
zrhoffman
5b2a3b2ddf $pseudo_pkgs now has an array of children as a third element.
If parent = '0' in the database, $pseudo_pkgs[2] is an array. If it is
nonzero (refers to a valid id of another row), $pseudo_pkgs[2] is a
child and is null. We no longer need &nbsp;&nbsp;&nbsp;&nbsp; to
distinguish between parents and children. Nowhere do we count the length
of $pseudo_pkgs, so the extra element should not break anything.
2018-08-08 18:15:56 -05:00
Yanni
4d4f996b5c remove unused parameter and local variable 2018-07-24 16:36:40 +02:00
Rasmus Lerdorf
c75a11c684 Get rid of preg /e 2018-07-21 06:42:14 -04:00
Rasmus Lerdorf
c442dc96f3 get all subscribers 2018-07-21 06:34:49 -04:00