Commit graph

383 commits

Author SHA1 Message Date
nupplaPhil
18a3d18ba6
Move Authentication methods to class "Authentication" 2019-12-05 23:02:50 +01:00
nupplaPhil
5bb63e59e0
Move App::internalRedirect to BaseUrl::redirect 2019-12-05 23:02:50 +01:00
Hypolite Petovan
ead0defb48 Rework theme override in Profile::load and App
- Separate desktop theme from mobile theme in App
2019-10-06 12:07:06 -04:00
Hypolite Petovan
4a5dfefacc Move theme determination after full module run 2019-10-06 11:18:51 -04:00
Philipp Holzer
566889fbc0
fix alignment 2019-08-17 11:08:57 +02:00
Philipp Holzer
2c73377b39
Create Core\Process as a base for followup work 2019-08-17 09:09:13 +02:00
Philipp Holzer
90b438e082
Move mode settings to App\Mode
- Move isAjax() to App\Mode
- Move isTablet() to App\Mode
- Move isMobile() to App\Mode
- Refactor last usage of App->isBackend()
2019-08-17 09:09:13 +02:00
Philipp Holzer
eaed327c07
fix indentation 2019-08-16 09:10:05 +02:00
Philipp Holzer
30b69f1fc4
some fixings 2019-08-15 20:58:57 +02:00
Philipp Holzer
9f68e6b589
Add Page class for Frontend
- Move frontend logic (stylesheet, footerscript, content) to Page class
2019-08-15 20:52:42 +02:00
Philipp Holzer
822ba67105
Fixing https://github.com/friendica/friendica/pull/7508#issuecomment-521679624 2019-08-15 17:47:08 +02:00
Philipp Holzer
ccbb0241bf
Removed unnecessary auto-initializing 2019-08-15 17:27:05 +02:00
Philipp Holzer
956439a9f2
reverted wrong indentation 2019-08-15 17:25:03 +02:00
Philipp Holzer
734b63adba
Fixed wrong "BaseUrl" class (=> "BaseURL") 2019-08-15 17:23:35 +02:00
Philipp Holzer
08be92a862
Moved BaseURL to App namespace (because similar type as Arguments/Modules/Modes) 2019-08-15 17:23:00 +02:00
Philipp Holzer
fa1b783052
removed static Logger usage 2019-08-15 17:10:14 +02:00
Philipp Holzer
4f0ee4df27
Move $page initialization into constructor 2019-08-15 17:04:36 +02:00
Philipp Holzer
55f9dba230
Prepare App for further usage 2019-08-15 17:00:07 +02:00
Philipp Holzer
9abfd55d37
modified hint 2019-08-15 16:25:34 +02:00
Philipp Holzer
f3269bf826
Add hint for getClass 2019-08-15 16:19:23 +02:00
Philipp Holzer
cba9fa2467
Move isBackend logic to App\Mode 2019-08-15 15:51:15 +02:00
Philipp Holzer
6546bf5ad6
fix isBackend() 2019-08-13 19:05:32 +02:00
Philipp Holzer
4089e17f85
re-add App::isBackend() 2019-08-13 16:29:12 +02:00
Philipp Holzer
0af9747c6c
Add Arguments & Modules class 2019-08-13 16:29:11 +02:00
Hypolite Petovan
fcb1a78352
Revert "Introduce Arguments / Module class" 2019-08-11 18:01:11 -04:00
Philipp Holzer
2c5ba7fc15
Introduce Arguments / Module class
- move from App
- add tests for Arguments/Module class
2019-08-11 14:24:05 +02:00
Philipp Holzer
6c2cf494b5
Remove DependencyFactory
- Include all necessary classes in `dependencies.config.php`
- Add DI-reference to BaseObject (acts as a global registry)
- Refactor all static "init()" methods to use the global registry

- Refactor Logging for Worker-Logger a little bit
2019-07-27 23:54:12 +02:00
Hypolite Petovan
56afc43b21 Extend the use of exceptions in App::runFrontend
- Replace an explicit header locatiobn + exit with System::externalRedirect
2019-07-23 20:01:45 -04:00
Philipp Holzer
55999730e0
Introduce DICE
- Adding dice library
- Adding dependency config

- Removing Factories
- Refactoring App\Mode constructor
- Refactoring App\Router constructor
- Refactoring BasePath for DI usage
- Refactoring ConfigFileLoader constructor
- Refactoring Profiler constructor

- Adjust entrypoints (index, console, worker, ..)

- Adding functional test for DI
- Fix tests because of refactorings
2019-07-21 01:22:10 +02:00
Hypolite Petovan
0b97b32a59
Merge pull request #7379 from nupplaphil/task/refactor_l10n_for_test
Refactor L10n for testing
2019-07-16 16:03:42 -04:00
Philipp Holzer
92fb0a82ca
Dynamic config loading
- Move settings, defaults and dbstructure to directory 'static'
- Dynamic loading of config files (after the static loading)
- Filter out '-sample.config.php' and '-sample.ini.php' files
- Remove unnecessary ConfigFileManager
- Move ConfigFileLoader to Utils
- Add tests for multi-loading for INI, config and sample-filtering
2019-07-16 20:16:43 +02:00
Philipp Holzer
eb024a3718
Refactor L10n for testing
- Moving L10n to L10n\L10n
- Adding constructor information
- Adding to factory
- simplify/speedup tests
2019-07-16 16:44:47 +02:00
Philipp Holzer
c82127ffb7
Splitting ConfigCache & PConfigCache
- Remove IConfigCache & IPConfigCache
- Add new PConfigCache
- Add missing Logger::init() (bugfixing tests)
2019-07-12 22:53:37 +02:00
Philipp Holzer
082634adbc
Moving from DBA to Database 2019-06-24 09:36:07 +02:00
Hypolite Petovan
b9ab613777 Merge branch 'master' into develop 2019-06-23 17:40:52 -04:00
Philipp Holzer
dec5983850
Remove .well-known hardening 2019-06-02 03:19:44 +02:00
Hypolite Petovan
ed768c71ee Remove "f=&" nonsense from network module
- Fixes wrong redirect when using the sidebar filters
2019-05-27 17:45:27 -04:00
Hypolite Petovan
01e71254d9 Replace defaults() calls on $_SESSION by Core\Session calls
- Replace direct calls to $_SESSION by Core\Session calls in Module\Login
2019-05-26 21:26:59 -04:00
Philipp Holzer
076370631f
Friendica-7112 - Missing basepath fix 2019-05-13 19:30:03 +02:00
Hypolite Petovan
123c4610e7
Break redirection loop during install 2019-05-08 08:30:59 -04:00
Philipp Holzer
9fb111bca2
Rename ServiceUnavailableException & alter maintenance 2019-05-05 10:07:33 +02:00
Philipp Holzer
62fd5375dc
Move mod/maintenance to src/Module/Maintenance 2019-05-05 10:06:50 +02:00
Philipp
97f723e09e
Merge pull request #7074 from MrPetovan/task/move-display-to-src
Remove support for defunct Friendica F-Droid app
2019-05-02 23:55:54 +02:00
Hypolite Petovan
e6bf97777f Remove /display/{nick}/{id} URL structure publishing
- Remove support for defunct Friendica F-Droid app
2019-05-02 17:04:17 -04:00
Hypolite Petovan
36996dd422 Remove usage of non-existent Module\Special\HTTPException::rawContent return value 2019-05-02 16:56:34 -04:00
Philipp Holzer
bbd3071940
Remove old BaseModule routing 2019-05-02 22:05:56 +02:00
Philipp
2628da422a
Merge pull request #7068 from MrPetovan/task/7047-theme-error-page
Themed error page redux
2019-05-02 21:15:29 +02:00
Philipp
774d04cd2f
Merge pull request #7044 from MrPetovan/task/router
Move mod/admin to src/Module/Admin
2019-05-02 18:26:30 +02:00
Hypolite Petovan
358baa9f62 Add themed error pages
- Module init, post and rawContent-triggered HTTPException generate the classic bare HTTP status page
- Module content-triggered HTTPException generate themed error pages
- Trim System::httpExit to the bare minimum
2019-05-02 11:26:56 -04:00
Hypolite Petovan
9774c95b80 Remove duplicate $baseurl template variable
- Remove unused $overwriteURL parameter in Renderer::replaceMacros
2019-05-02 09:55:48 -04:00
Hypolite Petovan
7b1ea6cad6 Remove App->error 2019-05-01 21:17:03 -04:00
Michael Vogel
550291afbf AP endpoints are added to the list of backend processes 2019-04-29 17:51:38 +02:00
Philipp Holzer
58c9566c3d
code style & install-403 fix 2019-04-14 14:24:01 +02:00
Philipp Holzer
677cb205f5
fix auto install 2019-04-14 14:23:58 +02:00
Hypolite Petovan
a55efbab7a Only call page_end hooks for standalone pages (no Ajax) 2019-04-13 10:32:15 -04:00
Hypolite Petovan
900074d117 Move App->checkBackend after module determination
- Update App->checkBackend to remove dependency to App properties
2019-04-11 05:27:26 -04:00
Philipp Holzer
edd4f06ad0
Adding tests 2019-04-09 08:31:18 +02:00
Philipp Holzer
318a3ca785
Create own base URL class which holds the whole base url business logic 2019-04-09 08:31:16 +02:00
Michael
1b339547f3 Fix warning 2019-04-09 05:17:02 +00:00
Hypolite Petovan
d6d31f43a1 Add App\Router dependency injection to App
- Moved collectRoutes method from App to App\Router
2019-04-05 23:16:12 -04:00
Hypolite Petovan
42b360f479 Implement feedback changes to App\Router
- Add class PhpDoc
- Switch Router->routeCollector scope to protected
- Added getter for Router->routeCollector
- Added EOF new line
- Removed unused use statement
- Improved App->collectRoutes PhpDoc
2019-04-04 07:29:26 -04:00
Hypolite Petovan
993f4e5fcc Add sample route for /itemsource
- Fix missing item guid not displaying in Module\Itemsource
2019-04-03 23:36:37 -04:00
Hypolite Petovan
61b6ab7e3e Add Router to App
- Create new Friendica\App\Router class
- Add route_collection hook
- Add route dispatching in App->runFrontend
2019-04-03 23:35:24 -04:00
Hypolite Petovan
b529c03a20 Sanitize theme path items
- Sanitize theme style/color/scheme path items
2019-03-31 21:52:48 -04:00
Hypolite Petovan
3de1fc3097
Hotfix for App->registerStylesheet
- Wrong condition for strpos()
- Follow-up to #6953
2019-03-31 06:00:20 -04:00
Philipp
e5cc35cb45
Merge pull request #6953 from tobiasd/20190330-csspath
check if BasePath is empty to prevent mangeled up CSS path
2019-03-31 10:12:40 +02:00
Tobias Diekershoff
16f44a8237 dont check but only copy if BasePath is present 2019-03-31 08:53:25 +02:00
Philipp Holzer
e0b1f4f251
Hardening ConfigUpgrade 2019-03-30 18:54:22 +01:00
Tobias Diekershoff
bb8216cbc8 check if BasePath is empty to prevent mangeled up CSS path 2019-03-30 11:13:27 +01:00
Hypolite Petovan
34208bf966 Add manifest module to backend module list 2019-03-25 22:08:01 -04:00
Philipp Holzer
23654ce566
Added Update checks
- Logging
- Console
- Admin overview
2019-03-24 22:51:30 +01:00
Philipp Holzer
49def0dc27
Adding ConfigFileSaver and tests 2019-03-24 13:47:35 +01:00
Philipp Holzer
383a6715c3
Added first version of ConfigCacheSaver 2019-03-23 19:34:54 +01:00
Philipp Holzer
dda26a46f5
Rename Core\Conifg to $this->config 2019-03-23 19:34:54 +01:00
Philipp Holzer
0f93a467a7
Rename basepath to getBasePath() 2019-03-23 19:34:53 +01:00
Hypolite Petovan
5480c56811 Add missing ConfigCacheLoader constructor parameter in App 2019-03-23 00:19:22 -04:00
Philipp Holzer
1a2527cdba Move AppMode 2019-03-22 23:22:32 -04:00
Michael
0aab620d32 Enable remote authentication with HTTP Signatures 2019-03-19 06:44:51 +00:00
Philipp
a5d86fe787
Add default value for config.sitename in App::initHead
- Protect $this->page['title'] even more

Co-Authored-By: MrPetovan <hypolite@mrpetovan.com>
2019-03-04 07:54:51 -05:00
Hypolite Petovan
8fdf1db032 Restore module custom title display 2019-03-04 06:47:40 -05:00
Hypolite Petovan
1a0398a5b3
Merge pull request #6723 from nupplaphil/issue/6658-worker_id
Adding worker ID to log
2019-02-23 08:38:08 -05:00
Hypolite Petovan
c1896eee34
Merge pull request #6725 from nupplaphil/6691-rendertime-fix
Addon loading fix
2019-02-22 23:53:11 -05:00
Philipp Holzer
3aae84edd1
[rendertime] Timing problem during addon config read 2019-02-23 01:24:08 +01:00
Philipp Holzer
40e9bbeb88
cleanup 2019-02-23 00:53:31 +01:00
Philipp Holzer
8c3aebc376
Bugfixings in Config
- replaced usage of "!<unset>!" with null-returns
- fixed bool settings (0/1)
- fixed overriding config-values
- fixed basepath problems
2019-02-22 23:51:13 +01:00
Philipp Holzer
cec6f49023
Removed unused code 2019-02-22 20:24:10 +01:00
Michael
886da50474 Issue 6679: Quick fix 2019-02-20 21:06:52 +00:00
Philipp Holzer
a3d6062476
check if value is set
get basepath with config instead cache
2019-02-18 11:29:42 +01:00
Philipp Holzer
95deff1685
use cache for basepath 2019-02-18 01:15:55 +01:00
Philipp Holzer
218e41a818
Bugfixing index.php 2019-02-18 00:53:00 +01:00
Hypolite Petovan
256e845c5d
Merge pull request #6641 from nupplaphil/config_followup
Config FollowUp
2019-02-17 17:56:31 -05:00
Philipp Holzer
5e5c39b0e1
Refactored DependencyFactory for Profiler 2019-02-17 21:12:12 +01:00
Philipp Holzer
80f1feabe5
Refactoring Logging to use Configuration 2019-02-17 20:43:52 +01:00
Philipp Holzer
eafcf3592d
Config FollowUp
- New Configuration (Config is now only holding the instance)
- New PConfiguration (PConfig is now only holding the instance)

- Config & PConfig-Adapter don't need "ConfigCache" anymore

- DB-Connection is now outside App->reload() for better dependency-chaining
2019-02-17 20:40:27 +01:00
Philipp Holzer
0a7861da65
Dependency of callstack moved one layer up 2019-02-16 23:17:10 +01:00
Philipp Holzer
5e6e1a8025
Introducing Profiler 2019-02-16 23:11:30 +01:00
Hypolite Petovan
d7dbc632f8 Improved comment hiding interaction
- Remove global window.showMore and window.showFewer
- Improve global showHideComments function
- Remove frio-specific showHideComments function
2019-02-14 22:24:34 -05:00
Philipp Holzer
b79bd63231
move isDirectoryUsable to System 2019-02-05 22:30:18 +01:00
Philipp Holzer
6a9d73f7d9
Refactoring ConfigCacheLoader methods 2019-02-05 22:27:57 +01:00
Philipp Holzer
f3da5b3a2f
Bugfixing PConfig 2019-02-03 23:22:05 +01:00
Philipp Holzer
1e0e1674f2
4) Adding Factories to other entrypoints 2019-02-03 22:46:50 +01:00
Philipp Holzer
4af0119b73
3) Introducing ConfigFactory 2019-02-03 22:22:04 +01:00
Philipp Holzer
d43a8184f4
2) Refactor App->config[] into Core\PConfig 2019-02-03 19:04:41 +01:00
Philipp Holzer
be6b229534
1) Refactor App->config[] into Core\Config 2019-02-03 18:54:25 +01:00
rabuzarus
0993f3e6ef fix isssue if friendica is installed into a subdirectory 2019-01-30 01:00:40 +01:00
Hypolite Petovan
7f2dc40601 Fix potential bugs without expected behavior change
- Fix uninitialized variables
- Fix potentially not set variables
- Fix wrong parameter default value
- Fix method scope
- Fix missing return value
2019-01-21 11:04:19 -05:00
Hypolite Petovan
cb3f09ae4f Refactor namespaces
- Remove unused use statements
- Add required use statements
- Escape global classes
2019-01-21 10:43:42 -05:00
Hypolite Petovan
3282ce5389 Fix PHPDoc comments project-wide 2019-01-21 10:35:51 -05:00
Philipp Holzer
2e602afd3e Add Monolog 2019-01-21 10:10:40 -05:00
Hypolite Petovan
2f49c4a058 Revert "Add monolog" 2019-01-21 10:08:09 -05:00
Philipp Holzer
6e48df2163 Refactor Loglevels 2019-01-21 10:00:46 -05:00
Philipp Holzer
6150c2fa9c Bugfixing 2019-01-21 09:59:11 -05:00
Philipp Holzer
8f9c0fe149 Adding Develop and normal Logging instances 2019-01-21 09:59:08 -05:00
Philipp Holzer
fe8f0e0045 Add Monolog 2019-01-21 09:58:05 -05:00
Hypolite Petovan
55e54bb950 Replace deprecated Addon::callHooks with Hook::callAll
- Update documentation
2019-01-21 09:50:56 -05:00
fabrixxm
75daf96590 Revert "Catch HTTPExceptions in App::runFrontend()"
This reverts commit 58bd75f8f3.
2019-01-21 08:59:59 -05:00
fabrixxm
89eaf508f1 Catch HTTPExceptions in App::runFrontend()
Set correct http response header, display error message using "404.tpl"
2019-01-21 08:49:17 -05:00
Hypolite Petovan
89cb1b276d Move rawContent before theme initialization 2019-01-19 22:03:49 -05:00
Hypolite Petovan
af7b852d04 Insert theme init after module init but before post/content 2019-01-19 21:52:43 -05:00
Michael
2a0e18c7dd Bugfix: Theme functions hadn't been executed anymore 2019-01-18 20:08:35 +00:00
Hypolite Petovan
f6092ebebb Add App->mobileDetect property 2019-01-11 20:48:29 -05:00
Hypolite Petovan
979230da27 Allow theme setting in module
- Restore theme name caching
2018-12-29 15:40:04 -05:00
Hypolite Petovan
acaee626f5 Remove include/ requires that are now done directly from Composer 2018-12-24 09:56:25 -05:00
Hypolite Petovan
607f7daf51 Add PHP 5 compatible recursive dirname() 2018-12-15 02:46:08 -05:00
Michael Vogel
5a3991d4f7
Merge pull request #6219 from MrPetovan/task/remove-x
Remove x()
2018-12-01 23:40:51 +01:00
Hypolite Petovan
458981f75c Replace x() by isset(), !empty() or defaults()
- Remove extraneous parentheses around empty() calls
- Remove duplicate calls to intval(), count() or strlen() after empty()
- Replace ternary operators outputting binary value with empty() return value
- Rewrite defaults() without x()
2018-11-30 09:06:22 -05:00
Michael
4a1f9a9bdd Improved url detection for redirects 2018-11-30 11:27:17 +00:00
Hypolite Petovan
d6eb1135e5 Add support for PHP array config files
- Add new base config files
- Remove useless DIRECTORY_SEPARATOR instances
2018-11-25 01:42:05 -05:00
Jonny Tischbein
9aea59d4e3 Change Worker to use only MemFree in isMinMemoryReached 2018-11-19 23:21:40 +01:00
Hypolite Petovan
09c94dba86 Add URL encoding to toggle_mobile parameter 2018-11-10 08:55:48 -05:00
Adam Magness
ffc406d819 normalise_link calls
implement normaliseLink function
2018-11-08 11:28:29 -05:00
Adam Magness
5276c28a78 link_compare calls
implement compareLink function.
2018-11-08 10:46:50 -05:00
Hypolite Petovan
8a46c786f3
Merge pull request #6053 from zeroadam/CoreRenderer
Core Renderer Class
2018-10-31 13:57:12 -04:00
Adam Magness
70f01d6c00 Template Engine and props to Renderer
move methods and props from App to Renderer
2018-10-31 13:25:38 -04:00
Adam Magness
3f74ba88c2 Move delimiter props and functions
move left and right delimiter functions and properties to Render class.
2018-10-31 12:12:15 -04:00
Adam Magness
35abc4bb64 get markup template
implement getMarkupTemplate function
2018-10-31 10:44:06 -04:00
Adam Magness
91facd2d0a replace macros
implement new replaceMacros function
2018-10-31 10:35:50 -04:00
Philipp Holzer
f08f063a38
Replaced check_db in App 2018-10-31 14:44:24 +01:00
Adam Magness
c3ee9afa59 Bug fix
update Logger::DEBUG to Core\Logger::
2018-10-30 11:43:27 -04:00
Adam Magness
50da89d861 Logger Levels
update logger levels in calls
2018-10-30 09:58:45 -04:00
Adam Magness
14fde5dc9b Log function
implement log() function.
2018-10-30 09:57:14 -04:00
Philipp Holzer
e586e49c82
Bugfixing missing 'REQUEST_URI' for relative path installation 2018-10-30 12:58:15 +01:00
Hypolite Petovan
4bcd2d7708 Declare missing $lang for default template in App->runFrontend 2018-10-26 08:13:31 -04:00
Hypolite Petovan
14237a9599 Move $pager and $page_offset out of App
- Move infinite scroll data output in a module hook
- Use Pager instead of paginate() and alt_pager()
2018-10-25 00:07:15 -04:00
Philipp Holzer
072eeb8bec
making english sentences 2018-10-24 20:52:38 +02:00
Philipp Holzer
99a33b7335
Code standards 2018-10-24 20:44:19 +02:00
Philipp Holzer
310d49b82a
removed use Friendica\Core\System again 2018-10-24 20:24:22 +02:00
Philipp Holzer
48535c0959
Bugfixing redirects
- Adding App->redirect if both redirects are possible
2018-10-24 20:18:46 +02:00
fabrixxm
035603a516 Replace Frienica\Core\Addon::isApp() withi Friendica\Core\Hook::isAddonApp()
fix #6010
2018-10-23 17:27:53 +02:00
Philipp Holzer
3e6ea9383b
Making redirect message more informative 2018-10-23 12:17:41 +02:00