Commit Graph

24 Commits

Author SHA1 Message Date
Alexandre Alapetite
1335a0e3cf PHPStan level 5 (#4110)
* Fix most PHPDocs errors
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103
https://phpstan.org/writing-php-code/phpdoc-types

* Avoid func_get_args
Use variadic syntax instead https://php.net/manual/functions.arguments#functions.variable-arg-list
And avoid dynamic functions names when possible to more easily identify calls and unused functions.
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103

* PHPStan level 3

* PHPStand level 4

* Update default to PHPStan level 4

* Towards level 5

* Fix level 4 regression

* Towards level 5

* Pass PHPStan level 5

* Towards level 6

* Remove erronenous regression from changelog
https://github.com/FreshRSS/FreshRSS/pull/4116
2022-01-04 13:59:09 +01:00
Alexandre Alapetite
77e9877316 Add PHPStan (#4021)
* Add PHPStan
#fix https://github.com/FreshRSS/FreshRSS/issues/4016
https://phpstan.org/

```sh
composer run-script phpstan
```

* More fixes

* Fix global variables

* Add .phtml

* Fix merge
https://github.com/FreshRSS/FreshRSS/pull/4090

* Fix more warnings

* Fix view errors and enable in CI

* ReturnTypeWillChange

* Dynamic view type

* Fix Minz static/self bug
2021-12-31 17:00:51 +01:00
Alexandre Alapetite
947e918f05 Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length

* Also check whitespace in CSS files

* Fix line length ext.php

* More syntax, string templates

* Fix exclude-pattern

* Test JS files as well
2021-02-28 12:26:24 +01:00
Alexis Degrugillier
8c4d71da2e Add missing translations (#3034)
* Add missing translations

* Add a simple way to check if an i18n key exists

There is a rule in the makefile to access it directly
2020-06-05 20:16:04 +02:00
Marien Fressinaud
de26531178 tec: Provide a Minz_Mailer class (#2476)
* Add Minz_View::_path method (replace change_view)

The `_path` method is more powerful since it allows to choose the file
extension. It is also Minz_Request-agnostic, which is useful to reuse
the Minz_View class in other places.

`change_view` is now deprecated and a warning is logged if we use it.

* Provide a Minz_Mailer to send emails

It uses PHPMailer under the hood and only supports PHP >= 5.5
2019-08-15 17:19:12 +02:00
Marien Fressinaud
49e1a2c579 Allow to change the view layout (#2467)
The `_useLayout` function is marked as deprecated, replaced by a more
powerful `_layout` function.
2019-08-02 11:40:57 +02:00
Alexandre Alapetite
6a56894e94 New extension event + Tumblr GDPR (#1924)
* New extension event + Tumblr GDPR

https://github.com/FreshRSS/FreshRSS/issues/1894
simplepie_before_init event

* Refactor extension enabling + Tumblr GDPR enabled by default

Add possibility for extensions to be enabled by default, and disabled
back by users.

* Minor whitespace
2018-06-09 15:58:18 +02:00
Alexis Degrugillier
a14c160beb Update travis config (#1751)
I've enabled tests on PHP 7.2 since it's the latest stable version.
I've also installed phpcs from composer since PEAR is not available for all versions of PHP.
2018-01-11 19:18:29 +01:00
Kevin Papst
3902d3f433 Show existing extensions in admin panel (#1708)
* first draft

* display installed extension state

* fixed whitespace vs tabs

* added translation in all languages

* added error checks and log messages

* fixed tabs vs whitespace

* another try in fixing whitespaces

* another try in fixing whitespaces

* improved extension list translations

* using JSON from official extension repo

* improved version compare

* updated translations

* French translation
2017-12-06 21:04:45 +01:00
Marien Fressinaud
789d9fc6c8 Fix coding style in extension manager
Yep, same as 8968288...
2015-01-14 23:40:18 +01:00
Marien Fressinaud
2f1116818d Fix extension interface
- Seperate user and system extensions on extension/index
- extension/configure shows index page with the slider opened
  if request is done with ajax
- Reorganize some extension view files
2015-01-14 23:30:19 +01:00
Marien Fressinaud
8968288600 Fix extension API (coding style)
is_enabled() becomes isEnabled(). Sorry for this coding style mistake :s
2015-01-14 22:22:30 +01:00
Marien Fressinaud
806b4de54f Add mechanism at (un)install of an extension
Test if the install or uninstall has been successfully performed.
If these methods return true, all is ok but if a string is returned,
the string must explain the problem. This problem is stored in log file.

A feedback is given to explain to check log file.

This commit fix a problem in the english translation of
feedback.sub.feed.internal_problem.
2015-01-14 21:38:35 +01:00
Marien Fressinaud
5bd7997d41 Call handleConfigureAction() even for GET requests
See https://github.com/FreshRSS/FreshRSS/issues/252
2015-01-08 14:30:05 +01:00
Marien Fressinaud
73023bc12b Merge branch 'dev' into 252-extensions
Conflicts:
	app/FreshRSS.php
	app/Models/Configuration.php
	app/views/index/index.phtml
	app/views/index/normal.phtml
	lib/Minz/Configuration.php
	lib/Minz/Translate.php
	lib/lib_rss.php
2015-01-08 14:18:32 +01:00
Marien Fressinaud
76358846ab Implement extension deletion
See https://github.com/FreshRSS/FreshRSS/issues/252
2014-12-08 13:36:08 +01:00
Marien Fressinaud
0543f96a97 Update comments for ExtensionController
See https://github.com/FreshRSS/FreshRSS/issues/252
2014-12-08 13:22:11 +01:00
Marien Fressinaud
c6dfec3ad3 Add behaviour to configure action (extensions)
- Put extension configure view in dir_ext/configure.phtml
- Handle POST action in Extension->handleConfigureAction() method

See https://github.com/FreshRSS/FreshRSS/issues/252
2014-12-08 12:01:47 +01:00
Marien Fressinaud
bc81979a6b Add default behaviour for configure / remove ext
See https://github.com/FreshRSS/FreshRSS/issues/252
2014-12-06 17:25:01 +01:00
Marien Fressinaud
2da7c05fa6 Update i18n (extensions)
See https://github.com/FreshRSS/FreshRSS/issues/252
2014-12-06 17:15:20 +01:00
Marien Fressinaud
9d66462c1d Fix typo (extensions)
- change feedback.extension into feedback.extensions
- disable button is pushed by default

See https://github.com/FreshRSS/FreshRSS/issues/252
2014-12-06 16:48:13 +01:00
Marien Fressinaud
4c888590e6 Improve system/user types for extensions
- system extensions can only be managed by an administrator
- system extensions are loaded for all users (even if not logged)
- user extensions are loaded for logged users only
- system extensions loading is saved in global config.php file

See https://github.com/FreshRSS/FreshRSS/issues/252
2014-12-06 16:41:06 +01:00
Marien Fressinaud
2e4682ebd4 Add enable / disable extension features
See https://github.com/FreshRSS/FreshRSS/issues/252
2014-12-06 16:17:11 +01:00
Marien Fressinaud
9fc60317ee First draft for listing and manipulate extensions
See https://github.com/FreshRSS/FreshRSS/issues/252
2014-12-05 14:17:02 +01:00