Commit graph

391 commits

Author SHA1 Message Date
Hypolite Petovan
af6dbc654f Rename Friendica\Database\dba to Friendica\Database\DBA 2018-07-20 08:19:26 -04:00
Hypolite Petovan
daa1177e3a Update use statement lists with new Friendica\Database\dba class
- Remove unused use statement
- Remove superfluous use statements (classes in the same namespace)
- Add missing use statements
2018-07-19 22:15:21 -04:00
Roland Häder
36c6e35c7e Misc cleanups (#5417)
* Fixed http://github to https://github

Signed-off-by: Roland Häder <roland@mxchange.org>

* reverted back

Signed-off-by: Roland Häder <roland@mxchange.org>

* Added type-hint 'array' as the method uses foreach() on it.

Signed-off-by: Roland Häder <roland@mxchange.org>

* Tpzo fixed ...

Signed-off-by: Roland Häder <roland@mxchange.org>

* Added missing new-line at end of file, will make some POSIX parsers being lesser
confused ...

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-07-19 20:52:18 -04:00
Pierre Rudloff
6e1ed0b0d3 Fix tests (#5400)
* Avoid argc side-effects

* Fix undefined array keys in JITConfigAdapter::set()

* Avoid argv side effects in ApiTest
2018-07-18 16:30:55 -04:00
Michael Vogel
2fa6cc0000
Merge pull request #5394 from MrPetovan/bug/fix-config-set-return-value
Change (P)Config::set return value to bool
2018-07-18 11:07:10 +02:00
Hypolite Petovan
0f7c7cebeb Change (P)Config::set return value to bool 2018-07-18 02:32:35 -04:00
Hypolite Petovan
050ad68b9f Improve Console/Config display for array values
- Prevent setting a config key that is an array
2018-07-17 02:15:05 -04:00
Hypolite Petovan
7b8efcc23d Fix config value type in MemcachedCacheDriver
- Remove default config values set in CacheDriverFactory
2018-07-17 02:05:06 -04:00
Hypolite Petovan
763c66dd49 Improve console/config display
- Add visual distinction between get/set value
2018-07-16 19:38:18 -04:00
Hypolite Petovan
c8d3067d0a Fix JITConfigAdapter to retrieve non-db config.* values 2018-07-16 19:38:17 -04:00
Hypolite Petovan
d0780ccf7d Replace global $lang with system.language 2018-07-16 19:38:17 -04:00
Hypolite Petovan
6b03ae92b8 Fix Memached config value format usage 2018-07-16 19:38:16 -04:00
Hypolite Petovan
762a786611 Replace direct accesses to App->config by Config::get/set calls 2018-07-16 19:38:16 -04:00
Hypolite Petovan
cd9b864045 Rework App modes
- Replace App mode constants with capability-based flags
- Add App->isInstallMode()
- Add file config fallback in (P)Config abstraction
- Removed logger disabling code
2018-07-16 19:38:15 -04:00
Hypolite Petovan
d487c399dd Standards: Rename App methods
- Rename App->max_processes_reached to App->isMaxProcessesReached
- Rename App->maxload_reached to App->isMaxLoadReached
2018-07-16 19:38:14 -04:00
Hypolite Petovan
3fc21f0d64 Fix config mentions (no doc) 2018-07-16 19:38:14 -04:00
Hypolite Petovan
0448ca3897 Update install procedure
- Fix Notice messages in Core\Install and Database\DBStructure
- Move local config file template from htconfig.tpl to local.ini.tpl
- Remove htconfig.php
2018-07-16 19:38:14 -04:00
Hypolite Petovan
e7c3d453c2 Update config console command 2018-07-16 19:38:14 -04:00
Hypolite Petovan
fd7179ee6c Prevent infinite loops with Config when App is in install mode 2018-07-16 19:38:13 -04:00
Hypolite Petovan
3985a4bc43 Remove extraneous dba::connect calls 2018-07-16 19:38:13 -04:00
Hypolite Petovan
e952d6677b Rename App->path to App->urlpath 2018-07-16 19:38:13 -04:00
Hypolite Petovan
2503660f97 Add new INI config files
- Add new local.ini.tpl template
- Change all references from .htconfig.php to config/local.ini.php
2018-07-16 19:38:13 -04:00
Michael Vogel
d3a2ed85fe Next item structure works (#5380)
* Use "LEFT JOIN" to always fetch the item. Needed for update routines.

* New conversion routine that now covers every item

* Post update is now activated

* We now use a hash based upon RIPEMD-320 for content and activity

* The hash doesn't contain the plink anymore

* Legacy item fields are now "null"able

* New hash function for a server unique item hash

* Introduction of the legacy mode (usage of old item fields)

* Code simplification

* We don't need the "uri" fields anymore in item-activity and item-content

* Use the "created" and not the "received" date for the hash

* Avoiding several notices

* Some more warnings removed

* Improved uri-hash / Likes on Diaspora are now getting a creation date

* Corrected the post update version

* Ensure an unique uri-hash

* Don't delete orhaned item data at the moment

* Partly reworked, due to strange behaviour

* Some more parts reworked

* Using the uri currently seems to be more reliable

* Using the uri here as well

* Use the hash values again

* Grouped item fields in different categories

* Notices again

* use the gravity (we always should)

* Added hint for disabled post updates

* Notices ...

* Issue #5337: Personal notes are displayed again

* Use the gravity again
2018-07-15 14:36:20 -04:00
Tobias Diekershoff
26723623f4
Merge pull request #5363 from annando/daemin
Workaround for stalling worker processes when running the daemon
2018-07-11 08:26:09 +02:00
Michael
3cb7a7606e workaround for stalling worker processes when running the daemon 2018-07-11 06:05:22 +00:00
Roland Häder
8825728fa4 "Imported" name spaces (#5361)
* Fixes for #5355:
- let's import SPL/extension classes and then just use them without name spaces
  like we do it with our own classes/interfaces, too.
- need to add namespace \ (global)

Signed-off-by: Roland Häder <roland@mxchange.org>

* Removed leading slashes from "import" lines.

Signed-off-by: Roland Häder <roland@mxchange.org>

* Completed:
- "import" other classes, then use them

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-07-10 18:55:01 -04:00
Michael Vogel
3792e2819d Use a process identifier for logging that contains the pid (#5359) 2018-07-10 18:32:47 -04:00
Philipp Holzer
a84c94e94b
bugfix isempty... 2018-07-09 22:10:35 +02:00
Philipp Holzer
d1eeaeead9
empty is not isset ... 2018-07-09 21:53:49 +02:00
Philipp Holzer
c829e43725
moved get_guid to System::createGUID 2018-07-09 21:38:16 +02:00
Hypolite Petovan
7211fc4f1a
Merge pull request #5338 from annando/warnings
Remove warnings
2018-07-08 09:55:26 -04:00
Philipp Holzer
be83696f02
Redis serialize instead of json because of objects 2018-07-08 13:35:28 +02:00
Michael
3e797547a3 Warnings fixed 2018-07-08 09:37:05 +00:00
Philipp Holzer
065b83d148
Fixed memcache & unittests 2018-07-07 20:07:07 +02:00
Philipp Holzer
80a4e6263f
Added Unittests for cache
fixed Lock & Cache bugs
2018-07-07 19:46:16 +02:00
Philipp Holzer
1dafaa69c5
bug in memcached clear function 2018-07-07 18:43:55 +02:00
Philipp Holzer
f95c420801
bug in redis delete function 2018-07-07 18:39:33 +02:00
Philipp Holzer
1ffe0cfd81
Added Lock Unittests & Bugfixings
Added Redis Lock Unittests
Added Memcached Lock Unittests

Fixed a bug in dba
Fixed a bug in RedisLock
2018-07-07 16:15:03 +02:00
Michael Vogel
3eec97aa6e
Merge pull request #5314 from MrPetovan/task/4889-fix-tests
Fix tests after enabling PHP Notices
2018-07-06 22:14:01 +02:00
Philipp Holzer
5a28ad7377
AbstractCacheDriver now working for each CacheDriver 2018-07-05 22:01:33 +02:00
Philipp Holzer
749b167fd9
AbstractCacheDriver now working for each CacheDriver 2018-07-05 21:54:20 +02:00
Philipp Holzer
34cea93a8b
Bugfixings for Cache-Lock
- used wrong cachekey in set
- therefore added an abstraction to avoid wrong key concatenation
- forgot to increase the db-version to 1275
2018-07-05 21:47:52 +02:00
Philipp Holzer
e41e7d2edd
Fixings
- fixed test for semaphore
- fixed some issues
- changed namespace in Tests back to "src/"
- changed namings
2018-07-05 20:57:31 +02:00
Philipp Holzer
906bb25972
code standards / simplifications 2018-07-05 07:59:56 +02:00
Philipp Holzer
aac94d1d74
Adding multihost - locking
Adding Unit-Tests for it
2018-07-04 23:37:22 +02:00
Hypolite Petovan
6776c4e3f9 Fix some undefined variable/index notices in tests 2018-07-02 07:44:55 -04:00
Philipp Holzer
ad5ee75159
Deleting parameter-types of methods (lack of support in PHP 5.6) 2018-06-28 23:06:14 +02:00
Philipp Holzer
4b7be15560
Deleting return-types of methods 2018-06-28 23:02:00 +02:00
Philipp Holzer
3f7e4f5bb6
redesign of locking & caching
- New Factory "CacheDriverFactory" for Cache and Locks
- Adding Redis/Memcached Locking
- Moved Lock to Core
- other improvements
2018-06-28 22:57:17 +02:00
Philipp Holzer
dd085ae592
minor changes 2018-06-26 23:42:26 +02:00
Philipp Holzer
a57e6cfa1b
Moved Lock.php back to Utils 2018-06-26 23:28:07 +02:00
Philipp Holzer
0218d16335
Lock abstraction (like the Cache)
- adding interface
- adding seperate drivers
- moving Lock to the Core package
2018-06-26 22:31:04 +02:00
Michael
b03db4643f The fetch function now centrally controls the content 2018-06-24 10:48:29 +00:00
Hypolite Petovan
a5550b4702
Merge pull request #5253 from rabuzarus/20180616_-_magic_auth_test_2
Port hubzillas OpenWebAuth - remote authentification
2018-06-20 17:46:04 -04:00
miqrogroove
12d0f4bf3c
Add Comments to Worker Exponent Implementation 2018-06-20 06:43:57 -04:00
miqrogroove
9cde4aa109
Make Load Exponent Configurable 2018-06-20 06:22:53 -04:00
miqrogroove
97cabcecf2
Unify Worker Load Formulas 2018-06-20 06:06:20 -04:00
Michael
00124f9ac0 Makes the linear load calculation optional 2018-06-20 04:38:50 +00:00
miqrogroove
0dbddb240c
Update Worker.php 2018-06-19 18:55:55 -04:00
miqrogroove
7e4d7b9aac
Fix logic errors in tooMuchWorkers()
There are probably a dozen different ways to do this, so this is not necessarily the "right" way.
2018-06-19 18:53:02 -04:00
Michael
962fbc9166 Many "fetch_first" had been replaced 2018-06-19 21:33:07 +00:00
rabuzarus
1c7f4e3c63 port hubzillas OpenWebAuth - remote authentification 2018-06-18 23:05:44 +02:00
Michael
6e10de9284 New function to fetch item data especially for users 2018-06-17 17:05:17 +00:00
Michael
bb79b8f4ac More item calls have been replaced with the new functions 2018-06-15 22:30:49 +00:00
Michael
e97a3c25e7 Multiple daemon improvements (foreground, faster spawning) 2018-06-15 18:18:20 +00:00
Tobias Diekershoff
71b017bfad
Merge pull request #5219 from annando/abstraction-2
Reworked notifications / use of Item class to fetch data
2018-06-15 09:54:50 +02:00
Michael
02fef0bcf5 Reworked notifications ("alt pager" added) / use of Item class to fetch data 2018-06-15 05:50:28 +00:00
rabuzarus
b8186ba98b Frio: provide a template for received contact suggestions 2018-06-14 17:05:23 +02:00
Michael
1304dae0d3 Bugfix: In the daemon mode we forgot to call the cron jobs 2018-06-06 03:48:04 +00:00
Hypolite Petovan
973ece09c5
Merge pull request #5157 from annando/daemon
Workers can now be started exclusively from the daemon and other workers
2018-06-03 12:18:47 -04:00
Michael
8a34895a23 Use magicLink whenever possible 2018-06-02 08:05:06 +00:00
Michael
371f511954 Respect "don't fork" 2018-06-02 05:17:32 +00:00
Michael
3034170088 DBStruxture can now create "memory" tables as well 2018-06-02 05:03:23 +00:00
Michael
28f8beebfc Workers can now be started exclusively from the daemon and other workers 2018-06-01 22:09:27 +00:00
Hypolite Petovan
93daf7883e Merge branch 'master' into develop
- Updated new develop version label
- Incremented database build number
2018-06-01 07:30:04 -04:00
Alexandre Alapetite
f980516545 Fix PoToPhp
https://github.com/friendica/friendica/pull/5072#issuecomment-389754406
2018-05-17 08:12:55 +02:00
Roland Häder
538760d9da
No direct $a->config['foo'] needed when Config::get() is around ...
Signed-off-by: Roland Häder <roland@mxchange.org>
2018-05-14 22:50:05 +02:00
Roland Häder
751394fc1d
Redis:
- added support for redis server:

// Required to actually have this cache driver active:
$a->config['system']['cache_driver'] = 'redis';

// ---- OPTIONAL/DEFAULT: ----
$a->config['system']['redis_host'] = '127.0.0.1';
$a->config['system']['redis_port'] = 6379;

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-05-14 22:50:05 +02:00
Roland Häder
fe1e7b92f2
Continued:
- system,worker_dont_fork may not be set, always set default to "false" to
  have it properly set as Config::get() may one day behave differently

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-05-14 22:50:05 +02:00
Michael
f1b5e828db Fix for the slow spawning of workers 2018-05-14 05:02:18 +00:00
Marcus Müller
64a799198a
[TASK] Automatic installation: Install theme 2018-05-13 12:50:53 +02:00
Philipp Holzer
7e28e3e5f4 using \PDO instead PDO (bugfix) 2018-05-04 19:48:01 +02:00
Philipp Holzer
559250b8b3 Updated help-text
accidentaly changed `htconfig.php` (reverted)
2018-05-01 13:21:42 +02:00
Philipp Holzer
95ef07d67b Updated help-text 2018-05-01 13:14:41 +02:00
Philipp Holzer
fa78f148c8 AutomaticInstallation - use config file
- added new parameter "-f config file" to `AutomaticInstallation.php`
2018-05-01 13:11:25 +02:00
Philipp Holzer
b4f5311e7f Add Install Mode
- merge `friendica/develop` to `nupplaphil/install_mode`
2018-04-29 20:15:12 +02:00
Philipp Holzer
da9ac7b879 Add Install Mode
- increased code quality
2018-04-29 18:13:24 +02:00
Philipp Holzer
6cb277b0bb Add Install Mode
- added PHP docBlock to methods
- increased code quality
2018-04-29 18:11:24 +02:00
Hypolite Petovan
fde3d6f870 Replace current_theme() and current_theme_url() calls 2018-04-28 18:37:25 -04:00
Hypolite Petovan
964bf3f3cc Add new methods to src
- Add App::getCurrentTheme()
- Add App::getCurrentThemeStylesheetPath()
- Add Theme::getStylesheetPath()
2018-04-28 18:30:13 -04:00
Hypolite Petovan
acbc733dce Fix formatting in Core\Theme 2018-04-28 18:28:23 -04:00
Philipp Holzer
41c6d63052 Add Install Mode
- merged `friendica/develop` to `nupplaPhil/install_mode`
- content merged `mod/install.php` to `src/Class/`
2018-04-28 15:15:54 +02:00
Philipp Holzer
1ab965c944 Add Install Mode
- merged `friendica/develop` to `nupplaPhil/install_mode`
- content merged `mod/install.php` to `src/Class/`
2018-04-28 15:11:01 +02:00
Philipp Holzer
a97ad9dc42 Add Install Mode (Part 2)
- Added constants to class `App`
- Added global App-Mode to `dba:connect()` instead parameter `$install`
2018-04-28 12:36:40 +02:00
Philipp Holzer
d5b68cd146 Add a App-Mode with defined constants
- Normal Mode = 0
- Install Mode = 1
- Maintenance Mode = 2

Moved Install-Mode check to class `App`

Replaced all maintenance and install checks with $a->mode checks
2018-04-27 21:07:04 +02:00
Philipp Holzer
6973aaefc2 Add Install Mode
- Added $install_mode in Class App instead
- Extracted the install business logic to a new Class Install
- Replaced all $a->module == 'install' with $a->install_mode
2018-04-23 22:56:59 +02:00
Michael
866fbb4d80 Added console command to manually archive contacts 2018-04-23 05:33:47 +00:00
Hypolite Petovan
18078ce7a4 Prevent infinite loop when a dbstructure_definition hook is orphan
- Add cascade option to dba::delete
- use cascade = false for orphan hook deletion
2018-04-21 20:34:07 -04:00
Tobias Diekershoff
4d4ed6fb17
Merge pull request #4863 from MrPetovan/task/4860-add-hidden-input-in-console
Add hidden input in newpassword console
2018-04-20 09:29:17 +02:00
Hypolite Petovan
f043554ab7
Merge pull request #4849 from M-arcus/installation-script
[FEATURE] Install Script: Add first version
2018-04-19 07:57:02 -04:00
Hypolite Petovan
f65a7b3130 Add hidden password input to Console\NewPassword
- Add Exception when password is empty
2018-04-19 07:51:26 -04:00
Marcus Müller
e2a58a791c
[DOCS] Auto Install: Add description 2018-04-19 10:21:41 +02:00
Hypolite Petovan
87f638bdc9 Improve CacheSessionhandler
- Replace !x() by empty()
- Add return values to read() and destroy()
2018-04-18 23:37:06 -04:00
Hypolite Petovan
ca4ca51c6a Add hostname prefix in MemcachedCacheDriver 2018-04-18 23:36:23 -04:00
Marcus Müller
457b86711d
[TASK] Auto install: Rework class 2018-04-18 14:30:42 +02:00
Marcus Müller
24626f5fd2
[TASK] Auto install: Rename script command 2018-04-18 14:21:40 +02:00
Marcus Müller
7b7ca71bf6
[TASK] Auto install: Rename script command 2018-04-18 14:20:21 +02:00
Marcus Müller
d53e64a583
[TASK] Install Script: Register installation class 2018-04-18 11:46:27 +02:00
Marcus Müller
1d552b5e66
[TASK] Install script: Add installation class 2018-04-18 11:43:23 +02:00
Michael
ce7f451196 Don't show multiple calls from the "dba" class to show the essential parts of the callstack 2018-04-13 20:09:12 +00:00
Michael
ea9b4cc523 Ignore function "call_user_func_array" in the callstack 2018-04-10 05:55:36 +00:00
Hypolite Petovan
c7ad76f9ab Prevent empty $uid from messing up the PreloadConfigAdapter 2018-04-09 21:24:22 -04:00
Michael
491db963db Changed comments 2018-03-30 19:57:14 +00:00
Michael
2eb4912dbf New functionality to set a password for a given user 2018-03-30 19:17:12 +00:00
Michael
b48df6a828 Avoid the warning of an unitialized variable in .htconfig.php 2018-03-26 20:58:34 +00:00
Hypolite Petovan
11e68b70bb Fix number constant used in Console\PoToPhp 2018-03-24 16:09:19 -04:00
Hypolite Petovan
91eb644743 Fix formatting in Console\PoToPhp 2018-03-24 16:08:56 -04:00
Michael
341499e8ca standards 2018-03-24 19:40:35 +00:00
Michael
324baa6b8b Removed test code 2018-03-24 18:48:40 +00:00
Michael
850d9b4c0b Line feeds fixed, not change in functionality 2018-03-24 18:39:13 +00:00
Michael
885d794958 Fix ACL data 2018-03-24 18:38:05 +00:00
Hypolite Petovan
27d94023ee Merge branch 'master' into develop 2018-03-23 06:15:55 -04:00
Tobias Diekershoff
4d8d5ca6a5
Merge pull request #4630 from MrPetovan/task/4629-move-executable-to-bin
Move executable scripts to bin/ (part 1)
2018-03-19 15:05:53 +01:00
Hypolite Petovan
d83491ae59 Remove util/global_community_silence
- Update wrong comment block for Console\Maintenance
2018-03-18 23:40:06 -04:00
Hypolite Petovan
3b75ea0028 Remove util/config*
- Update Console\Config help text
2018-03-18 23:36:24 -04:00
Hypolite Petovan
1c2deac7e5 Move scripts/worker.php to bin/ 2018-03-18 23:25:21 -04:00
Hypolite Petovan
2f1a1debf4 Add DBStructure Console
- Refactor subConsole instantiation
2018-03-18 23:10:56 -04:00
Hypolite Petovan
02c9fd6c24 Add typo to main console help 2018-03-18 19:52:00 -04:00
Hypolite Petovan
620e9842e1 Add Typo Console 2018-03-18 19:45:35 -04:00
Hypolite Petovan
9a012ad303 Add po2php console 2018-03-18 19:28:21 -04:00
Hypolite Petovan
608b477b77 Add new commands to base console help text 2018-03-18 19:07:40 -04:00
Hypolite Petovan
c9945ad15b Improve Console\PhpToPo
- Add base option
- Use DIRECTORY_SEPARATOR
- Add error handling
- Remove superfluous display
2018-03-18 19:07:24 -04:00
Hypolite Petovan
da6635898c Add more sub consoles 2018-03-18 13:26:36 -04:00
Hypolite Petovan
52e07a9e6d Remove wrong by reference variable init in Console\DocBloxErrorChecker 2018-03-18 13:26:14 -04:00
Hypolite Petovan
bba12da167 Improve Console\GlobalCommunityBlock
- Add description comment block
- Fix usage description
- Actually use argument
2018-03-18 13:25:47 -04:00
Hypolite Petovan
9b8fb1d550 Add Console classes 2018-03-18 05:11:48 -04:00
Hypolite Petovan
30d8c73660 Add missing Cache::delete method 2018-03-16 21:57:58 -04:00
Michael
fa496d3e5f Issue 4556: Adding index hints to improve the notifications speed (hopefully) 2018-03-09 22:53:19 +00:00
Michael
c438e47827 Bugfix: Avoid "Class not found" error 2018-03-08 19:58:35 +00:00
Michael Vogel
b6b67c9044
Merge pull request #4540 from MrPetovan/task/4520-load-whole-config
[develop] Performance: Add preloading config adapter
2018-03-08 20:35:14 +01:00
Michael Vogel
26b6cbcb3b
Merge pull request #4560 from MrPetovan/task/3878-move-html2_-to-src
[develop] Move include/html2* to src/
2018-03-08 20:24:09 +01:00
Hypolite Petovan
49bd2903c7 Fix wrong SQL query syntax in Core\ACL 2018-03-08 04:42:07 -05:00
Hypolite Petovan
789561c7a2 Remove/Update references to include/html2*.php 2018-03-07 16:34:17 -05:00
Hypolite Petovan
5e806ff598 Replace html2plain calls by HTML::toPlaintext 2018-03-07 16:29:44 -05:00
Hypolite Petovan
ef0701a97a Fix wrong session expire set for custom duration 2018-03-06 21:34:00 -05:00
Hypolite Petovan
87f2d18554 Move *ConfigValue functions to App 2018-03-06 20:04:04 -05:00
Hypolite Petovan
047f949967 Remove irrelevant else case 2018-03-06 19:52:36 -05:00
Hypolite Petovan
dcd1f18611 Add refresh feature to Preload (P)Config adapters
- Add private methods to manipulat the App config variable
2018-03-06 19:52:36 -05:00
Hypolite Petovan
7afcd6d49e Update PConfig class with adapter 2018-03-06 19:52:36 -05:00
Hypolite Petovan
6fec043375 Update Config class with adapter 2018-03-06 19:52:36 -05:00