mirror of
https://github.com/friendica/friendica
synced 2025-04-22 11:50:11 +00:00
Split DBStructure & View to avoid DB-calls and dependencies for basic operations
- new "Definition" classes vor DB and Views - new "Writer" classes to create SQL definitions for DB and Views - DBStructure & View are responsible to execute DB-querys
This commit is contained in:
parent
a2c929d128
commit
a910fd8864
30 changed files with 898 additions and 608 deletions
|
@ -170,7 +170,7 @@ class Install extends BaseModule
|
|||
return;
|
||||
}
|
||||
|
||||
$this->installer->installDatabase($configCache->get('system', 'basepath'));
|
||||
$this->installer->installDatabase();
|
||||
|
||||
// install allowed themes to register theme hooks
|
||||
// this is same as "Reload active theme" in /admin/themes
|
||||
|
|
|
@ -124,7 +124,7 @@ class UserExport extends BaseSettings
|
|||
*/
|
||||
private static function exportMultiRow(string $query)
|
||||
{
|
||||
$dbStructure = DBStructure::definition(DI::app()->getBasePath(), false);
|
||||
$dbStructure = DI::dbaDefinition()->getAll();
|
||||
|
||||
preg_match("/\s+from\s+`?([a-z\d_]+)`?/i", $query, $match);
|
||||
$table = $match[1];
|
||||
|
@ -156,7 +156,7 @@ class UserExport extends BaseSettings
|
|||
*/
|
||||
private static function exportRow(string $query)
|
||||
{
|
||||
$dbStructure = DBStructure::definition(DI::app()->getBasePath(), false);
|
||||
$dbStructure = DI::dbaDefinition()->getAll();
|
||||
|
||||
preg_match("/\s+from\s+`?([a-z\d_]+)`?/i", $query, $match);
|
||||
$table = $match[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue