Browse Source

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
tags/2018.09
Hypolite Petovan 2 years ago
parent
commit
daa1177e3a
100 changed files with 186 additions and 166 deletions
  1. +1
    -0
      bin/daemon.php
  2. +1
    -0
      include/api.php
  3. +4
    -2
      include/conversation.php
  4. +3
    -2
      include/enotify.php
  5. +1
    -0
      include/items.php
  6. +1
    -0
      include/security.php
  7. +1
    -0
      index.php
  8. +1
    -0
      mod/acl.php
  9. +2
    -1
      mod/admin.php
  10. +2
    -0
      mod/allfriends.php
  11. +2
    -0
      mod/attach.php
  12. +1
    -0
      mod/cal.php
  13. +2
    -0
      mod/common.php
  14. +1
    -0
      mod/community.php
  15. +1
    -0
      mod/contacts.php
  16. +2
    -0
      mod/crepair.php
  17. +2
    -0
      mod/delegate.php
  18. +1
    -3
      mod/dfrn_confirm.php
  19. +1
    -0
      mod/dfrn_notify.php
  20. +2
    -0
      mod/dfrn_poll.php
  21. +1
    -1
      mod/dfrn_request.php
  22. +2
    -0
      mod/directory.php
  23. +3
    -1
      mod/dirfind.php
  24. +1
    -0
      mod/display.php
  25. +1
    -0
      mod/feedtest.php
  26. +2
    -1
      mod/hovercard.php
  27. +2
    -1
      mod/install.php
  28. +3
    -1
      mod/item.php
  29. +2
    -0
      mod/lostpass.php
  30. +1
    -0
      mod/message.php
  31. +1
    -0
      mod/network.php
  32. +2
    -1
      mod/nodeinfo.php
  33. +2
    -0
      mod/noscrape.php
  34. +3
    -1
      mod/notes.php
  35. +2
    -0
      mod/notifications.php
  36. +1
    -0
      mod/photos.php
  37. +1
    -0
      mod/profile.php
  38. +1
    -1
      mod/profiles.php
  39. +1
    -0
      mod/proxy.php
  40. +1
    -0
      mod/pubsub.php
  41. +2
    -1
      mod/pubsubhubbub.php
  42. +1
    -0
      mod/receive.php
  43. +1
    -0
      mod/redir.php
  44. +1
    -0
      mod/regmod.php
  45. +1
    -0
      mod/removeme.php
  46. +2
    -0
      mod/search.php
  47. +1
    -0
      mod/settings.php
  48. +2
    -1
      mod/suggest.php
  49. +2
    -0
      mod/unfollow.php
  50. +1
    -0
      mod/wall_attach.php
  51. +1
    -0
      mod/worker.php
  52. +2
    -0
      mod/xrd.php
  53. +7
    -9
      src/App.php
  54. +1
    -2
      src/Content/ContactSelector.php
  55. +2
    -3
      src/Content/ForumManager.php
  56. +1
    -1
      src/Content/Nav.php
  57. +6
    -6
      src/Content/OEmbed.php
  58. +1
    -1
      src/Content/Widget.php
  59. +1
    -1
      src/Content/Widget/TagCloud.php
  60. +1
    -15
      src/Core/ACL.php
  61. +4
    -6
      src/Core/Addon.php
  62. +1
    -1
      src/Core/Cache/DatabaseCacheDriver.php
  63. +1
    -1
      src/Core/Config/JITConfigAdapter.php
  64. +1
    -1
      src/Core/Config/JITPConfigAdapter.php
  65. +1
    -2
      src/Core/Config/PreloadConfigAdapter.php
  66. +1
    -2
      src/Core/Config/PreloadPConfigAdapter.php
  67. +6
    -4
      src/Core/Console/ArchiveContact.php
  68. +1
    -1
      src/Core/Console/AutomaticInstallation.php
  69. +5
    -4
      src/Core/Console/Config.php
  70. +4
    -2
      src/Core/Console/DatabaseStructure.php
  71. +7
    -5
      src/Core/Console/GlobalCommunitySilence.php
  72. +9
    -9
      src/Core/Console/NewPassword.php
  73. +3
    -3
      src/Core/L10n.php
  74. +1
    -1
      src/Core/Lock/DatabaseLockDriver.php
  75. +0
    -5
      src/Core/NotificationsManager.php
  76. +1
    -1
      src/Core/Session/DatabaseSessionHandler.php
  77. +1
    -6
      src/Core/UserImport.php
  78. +1
    -1
      src/Core/Worker.php
  79. +0
    -1
      src/Database/DBM.php
  80. +4
    -3
      src/Database/DBStructure.php
  81. +0
    -2
      src/Database/PostUpdate.php
  82. +2
    -5
      src/Model/Contact.php
  83. +1
    -1
      src/Model/Conversation.php
  84. +1
    -2
      src/Model/Event.php
  85. +3
    -5
      src/Model/GContact.php
  86. +1
    -1
      src/Model/Group.php
  87. +3
    -5
      src/Model/Item.php
  88. +1
    -1
      src/Model/Mail.php
  89. +6
    -6
      src/Model/OpenWebAuthToken.php
  90. +1
    -1
      src/Model/PermissionSet.php
  91. +1
    -1
      src/Model/Photo.php
  92. +1
    -1
      src/Model/Process.php
  93. +1
    -5
      src/Model/Profile.php
  94. +2
    -2
      src/Model/PushSubscriber.php
  95. +1
    -1
      src/Model/Queue.php
  96. +1
    -2
      src/Model/Term.php
  97. +2
    -5
      src/Model/User.php
  98. +1
    -1
      src/Module/Hashtag.php
  99. +2
    -2
      src/Module/Login.php
  100. +1
    -2
      src/Module/Magic.php

+ 1
- 0
bin/daemon.php View File

@@ -10,6 +10,7 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\dba;

// Ensure that daemon.php is executed from the base path of the installation
if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {


+ 1
- 0
include/api.php View File

@@ -19,6 +19,7 @@ use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Group;


+ 4
- 2
include/conversation.php View File

@@ -12,10 +12,12 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
use Friendica\Model\Item;
use Friendica\Model\Profile;
use Friendica\Model\Term;
use Friendica\Object\Post;
use Friendica\Object\Thread;
use Friendica\Util\DateTimeFormat;
@@ -578,7 +580,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
$profile_name = $item['author-link'];
}

$tags = \Friendica\Model\Term::populateTagsFromItem($item);
$tags = Term::populateTagsFromItem($item);

$author = ['uid' => 0, 'id' => $item['author-id'],
'network' => $item['author-network'], 'url' => $item['author-link']];


+ 3
- 2
include/enotify.php View File

@@ -8,10 +8,11 @@ use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Item;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Emailer;
use Friendica\Model\Item;

/**
* @brief Creates a notification entry and possibly sends a mail
@@ -679,7 +680,7 @@ function check_user_notification($itemid) {
*
* @param int $itemid ID of the item for which the check should be done
* @param int $uid User ID
* @param str $defaulttype (Optional) Forces a notification with this type.
* @param string $defaulttype (Optional) Forces a notification with this type.
*/
function check_item_notification($itemid, $uid, $defaulttype = "") {
$notification_data = ["uid" => $uid, "profiles" => []];


+ 1
- 0
include/items.php View File

@@ -9,6 +9,7 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Item;
use Friendica\Protocol\DFRN;


+ 1
- 0
include/security.php View File

@@ -8,6 +8,7 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Group;
use Friendica\Util\DateTimeFormat;


+ 1
- 0
index.php View File

@@ -17,6 +17,7 @@ use Friendica\Core\Session;
use Friendica\Core\System;
use Friendica\Core\Theme;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Profile;
use Friendica\Module\Login;


+ 1
- 0
mod/acl.php View File

@@ -6,6 +6,7 @@ use Friendica\App;
use Friendica\Content\Widget;
use Friendica\Core\ACL;
use Friendica\Core\Addon;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Item;


+ 2
- 1
mod/admin.php View File

@@ -14,6 +14,7 @@ use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Theme;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Database\DBStructure;
use Friendica\Model\Contact;
@@ -782,7 +783,7 @@ function admin_page_workerqueue(App $a)
// get jobs from the workerqueue table
$statement = dba::select('workerqueue', ['id', 'parameter', 'created', 'priority'], ['done' => 0], ['order'=> ['priority']]);
$r = dba::inArray($statement);
for($i = 0; $i < count($r); $i++) {
$r[$i]['parameter'] = stripslashes(implode(': ', explode('","', $r[$i]['parameter'])));
$r[$i]['parameter'] = substr($r[$i]['parameter'], 2, -2);


+ 2
- 0
mod/allfriends.php View File

@@ -2,10 +2,12 @@
/**
* @file mod/allfriends.php
*/

use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;


+ 2
- 0
mod/attach.php View File

@@ -2,8 +2,10 @@
/**
* @file mod/attach.php
*/

use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Database\dba;
use Friendica\Database\DBM;

require_once 'include/dba.php';


+ 1
- 0
mod/cal.php View File

@@ -13,6 +13,7 @@ use Friendica\Content\Widget;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Event;


+ 2
- 0
mod/common.php View File

@@ -2,9 +2,11 @@
/**
* @file include/common.php
*/

use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Core\L10n;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;


+ 1
- 0
mod/community.php View File

@@ -9,6 +9,7 @@ use Friendica\Core\ACL;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Database\dba;
use Friendica\Database\DBM;

function community_init(App $a)


+ 1
- 0
mod/contacts.php View File

@@ -12,6 +12,7 @@ use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;


+ 2
- 0
mod/crepair.php View File

@@ -2,9 +2,11 @@
/**
* @file mod/crepair.php
*/

use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;


+ 2
- 0
mod/delegate.php View File

@@ -2,9 +2,11 @@
/**
* @file mod/delegate.php
*/

use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\User;



+ 1
- 3
mod/dfrn_confirm.php View File

@@ -20,13 +20,11 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Group;
use Friendica\Model\Item;
use Friendica\Model\User;
use Friendica\Network\Probe;
use Friendica\Protocol\Diaspora;


+ 1
- 0
mod/dfrn_notify.php View File

@@ -9,6 +9,7 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Protocol\DFRN;


+ 2
- 0
mod/dfrn_poll.php View File

@@ -3,10 +3,12 @@
/**
* @file mod/dfrn_poll.php
*/

use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Module\Login;
use Friendica\Protocol\DFRN;


+ 1
- 1
mod/dfrn_request.php View File

@@ -15,8 +15,8 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Group;


+ 2
- 0
mod/directory.php View File

@@ -2,12 +2,14 @@
/**
* @file mod/directory.php
*/

use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Content\Widget;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;


+ 3
- 1
mod/dirfind.php View File

@@ -2,6 +2,7 @@
/**
* @file mod/dirfind.php
*/

use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Widget;
@@ -9,12 +10,13 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Network\Probe;
use Friendica\Protocol\PortableContact;
use Friendica\Util\Network;
use Friendica\Database\DBM;

require_once 'mod/contacts.php';



+ 1
- 0
mod/display.php View File

@@ -11,6 +11,7 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Group;


+ 1
- 0
mod/feedtest.php View File

@@ -6,6 +6,7 @@

use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Database\dba;
use Friendica\Model\Contact;
use Friendica\Protocol\Feed;
use Friendica\Util\Network;


+ 2
- 1
mod/hovercard.php View File

@@ -7,12 +7,13 @@
* Author: Rabuzarus <https://github.com/rabuzarus>
* License: GNU AFFERO GENERAL PUBLIC LICENSE (Version 3)
*/

use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\Profile;

function hovercard_init(App $a)
{


+ 2
- 1
mod/install.php View File

@@ -4,9 +4,10 @@
*/

use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\Install;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Util\Temporal;



+ 3
- 1
mod/item.php View File

@@ -17,11 +17,13 @@

use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Item;
@@ -812,7 +814,7 @@ function item_post(App $a) {
'replyTo' => $a->user['email'],
'messageSubject' => $subject,
'htmlVersion' => $message,
'textVersion' => Friendica\Content\Text\HTML::toPlaintext($html.$disclaimer)
'textVersion' => HTML::toPlaintext($html.$disclaimer)
];
Emailer::send($params);
}


+ 2
- 0
mod/lostpass.php View File

@@ -4,8 +4,10 @@
*/

use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\User;
use Friendica\Util\DateTimeFormat;


+ 1
- 0
mod/message.php View File

@@ -10,6 +10,7 @@ use Friendica\Content\Text\BBCode;
use Friendica\Core\ACL;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Mail;


+ 1
- 0
mod/network.php View File

@@ -15,6 +15,7 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Group;


+ 2
- 1
mod/nodeinfo.php View File

@@ -7,8 +7,9 @@

use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Util\Network;
require_once 'include/dba.php';



+ 2
- 0
mod/noscrape.php View File

@@ -2,8 +2,10 @@
/**
* @file mod/noscrape.php
*/

use Friendica\App;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Profile;



+ 3
- 1
mod/notes.php View File

@@ -2,12 +2,14 @@
/**
* @file mod/notes.php
*/

use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Core\L10n;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Profile;
use Friendica\Model\Item;
use Friendica\Model\Profile;

function notes_init(App $a)
{


+ 2
- 0
mod/notifications.php View File

@@ -3,12 +3,14 @@
* @file mod/notifications.php
* @brief The notifications module
*/

use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Nav;
use Friendica\Core\L10n;
use Friendica\Core\NotificationsManager;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;

function notifications_post(App $a)


+ 1
- 0
mod/photos.php View File

@@ -13,6 +13,7 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Group;


+ 1
- 0
mod/profile.php View File

@@ -12,6 +12,7 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Group;
use Friendica\Model\Item;


+ 1
- 1
mod/profiles.php View File

@@ -13,10 +13,10 @@ use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\Item;
use Friendica\Model\Profile;
use Friendica\Network\Probe;
use Friendica\Util\DateTimeFormat;


+ 1
- 0
mod/proxy.php View File

@@ -7,6 +7,7 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Photo;
use Friendica\Object\Image;


+ 1
- 0
mod/pubsub.php View File

@@ -1,6 +1,7 @@
<?php

use Friendica\App;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Protocol\OStatus;



+ 2
- 1
mod/pubsubhubbub.php View File

@@ -3,9 +3,10 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Util\Network;
use Friendica\Model\PushSubscriber;
use Friendica\Util\Network;

function post_var($name) {
return (x($_POST, $name)) ? notags(trim($_POST[$name])) : '';


+ 1
- 0
mod/receive.php View File

@@ -7,6 +7,7 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Protocol\Diaspora;



+ 1
- 0
mod/redir.php View File

@@ -3,6 +3,7 @@
use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;


+ 1
- 0
mod/regmod.php View File

@@ -8,6 +8,7 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\User;
use Friendica\Module\Login;


+ 1
- 0
mod/removeme.php View File

@@ -7,6 +7,7 @@ use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\User;



+ 2
- 0
mod/search.php View File

@@ -2,6 +2,7 @@
/**
* @file mod/search.php
*/

use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Content\Nav;
@@ -9,6 +10,7 @@ use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Item;



+ 1
- 0
mod/settings.php View File

@@ -14,6 +14,7 @@ use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Theme;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;


+ 2
- 1
mod/suggest.php View File

@@ -2,15 +2,16 @@
/**
* @file mod/suggest.php
*/

use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Widget;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\Profile;

function suggest_init(App $a) {
if (! local_user()) {


+ 2
- 0
mod/unfollow.php View File

@@ -2,9 +2,11 @@
/**
* @file mod/unfollow.php
*/

use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;


+ 1
- 0
mod/wall_attach.php View File

@@ -7,6 +7,7 @@ use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Mimetype;


+ 1
- 0
mod/worker.php View File

@@ -6,6 +6,7 @@

use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Util\DateTimeFormat;

function worker_init()


+ 2
- 0
mod/xrd.php View File

@@ -2,9 +2,11 @@
/**
* @file mod/xrd.php
*/

use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Protocol\Salmon;



+ 7
- 9
src/App.php View File

@@ -4,16 +4,14 @@
*/
namespace Friendica;

use Detection\MobileDetect;
use Exception;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use dba;

use Detection\MobileDetect;

use Exception;

require_once 'boot.php';
require_once 'include/dba.php';
@@ -492,13 +490,13 @@ class App

$this->mode |= App::MODE_LOCALCONFIGPRESENT;

if (!\dba::connected()) {
if (!dba::connected()) {
return;
}

$this->mode |= App::MODE_DBAVAILABLE;

if (\dba::fetch_first("SHOW TABLES LIKE 'config'") === false) {
if (dba::fetch_first("SHOW TABLES LIKE 'config'") === false) {
return;
}

@@ -513,7 +511,7 @@ class App

public function loadDatabase()
{
if (\dba::connected()) {
if (dba::connected()) {
return;
}

@@ -544,7 +542,7 @@ class App

$stamp1 = microtime(true);

\dba::connect($db_host, $db_user, $db_pass, $db_data, $charset);
dba::connect($db_host, $db_user, $db_pass, $db_data, $charset);
unset($db_host, $db_user, $db_pass, $db_data, $charset);

$this->save_timestamp($stamp1, 'network');


+ 1
- 2
src/Content/ContactSelector.php View File

@@ -6,9 +6,8 @@ namespace Friendica\Content;

use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Protocol\Diaspora;
use dba;

/**
* @brief ContactSelector class


+ 2
- 3
src/Content/ForumManager.php View File

@@ -5,13 +5,12 @@
*/
namespace Friendica\Content;

use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Model\Contact;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use dba;
use Friendica\Model\Contact;

require_once 'include/dba.php';



+ 1
- 1
src/Content/Nav.php View File

@@ -10,9 +10,9 @@ use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Profile;
use dba;

require_once 'boot.php';
require_once 'dba.php';


+ 6
- 6
src/Content/OEmbed.php View File

@@ -5,21 +5,21 @@
*/
namespace Friendica\Content;

use DOMDocument;
use DOMNode;
use DOMText;
use DOMXPath;
use Exception;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\ParseUrl;
use dba;
use DOMDocument;
use DOMNode;
use DOMText;
use DOMXPath;
use Exception;
use stdClass;

require_once 'include/dba.php';


+ 1
- 1
src/Content/Widget.php View File

@@ -11,11 +11,11 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\Profile;
use dba;

require_once 'boot.php';
require_once 'include/dba.php';


+ 1
- 1
src/Content/Widget/TagCloud.php View File

@@ -6,9 +6,9 @@

namespace Friendica\Content\Widget;

use dba;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;

require_once 'include/dba.php';


+ 1
- 15
src/Core/ACL.php View File

@@ -6,27 +6,13 @@

namespace Friendica\Core;

use dba;
use Friendica\BaseObject;
use Friendica\Content\Feature;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Util\Network;
use const CONTACT_IS_FRIEND;
use const NETWORK_DFRN;
use const NETWORK_DIASPORA;
use const NETWORK_FACEBOOK;
use const NETWORK_MAIL;
use const NETWORK_OSTATUS;
use const PHP_EOL;
use function dbesc;
use function defaults;
use function get_markup_template;
use function get_server;
use function local_user;
use function remote_user;
use function replace_macros;

/**
* Handle ACL management and display


+ 4
- 6
src/Core/Addon.php View File

@@ -4,11 +4,9 @@
*/
namespace Friendica\Core;

use Friendica\Core\Config;
use Friendica\App;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Core\Worker;

use dba;

require_once 'include/dba.php';

@@ -228,12 +226,12 @@ class Addon
/**
* @brief Calls a single hook.
*
* @param \Friendica\App $a
* @param App $a
* @param string $name of the hook to call
* @param array $hook Hook data
* @param string|array &$data to transmit to the callback handler
*/
public static function callSingleHook(\Friendica\App $a, $name, $hook, &$data = null)
public static function callSingleHook(App $a, $name, $hook, &$data = null)
{
// Don't run a theme's hook if the user isn't using the theme
if (strpos($hook[0], 'view/theme/') !== false && strpos($hook[0], 'view/theme/' . $a->getCurrentTheme()) === false) {


+ 1
- 1
src/Core/Cache/DatabaseCacheDriver.php View File

@@ -2,8 +2,8 @@

namespace Friendica\Core\Cache;

use dba;
use Friendica\Core\Cache;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Util\DateTimeFormat;



+ 1
- 1
src/Core/Config/JITConfigAdapter.php View File

@@ -1,8 +1,8 @@
<?php
namespace Friendica\Core\Config;

use dba;
use Friendica\BaseObject;
use Friendica\Database\dba;
use Friendica\Database\DBM;

require_once 'include/dba.php';


+ 1
- 1
src/Core/Config/JITPConfigAdapter.php View File

@@ -1,8 +1,8 @@
<?php
namespace Friendica\Core\Config;

use dba;
use Friendica\BaseObject;
use Friendica\Database\dba;
use Friendica\Database\DBM;

require_once 'include/dba.php';


+ 1
- 2
src/Core/Config/PreloadConfigAdapter.php View File

@@ -2,10 +2,9 @@

namespace Friendica\Core\Config;

use dba;
use Exception;
use Friendica\App;
use Friendica\BaseObject;
use Friendica\Database\dba;
use Friendica\Database\DBM;

require_once 'include/dba.php';


+ 1
- 2
src/Core/Config/PreloadPConfigAdapter.php View File

@@ -2,10 +2,9 @@

namespace Friendica\Core\Config;

use dba;
use Exception;
use Friendica\App;
use Friendica\BaseObject;
use Friendica\Database\dba;
use Friendica\Database\DBM;

require_once 'include/dba.php';


+ 6
- 4
src/Core/Console/ArchiveContact.php View File

@@ -2,8 +2,10 @@

namespace Friendica\Core\Console;

use Friendica\App;
use Friendica\Core\L10n;
use dba;
use Friendica\Database\dba;
use RuntimeException;

/**
* @brief tool to archive a contact on the server
@@ -55,19 +57,19 @@ HELP;
}

if ($a->mode === App::MODE_INSTALL) {
throw new \RuntimeException('Friendica isn\'t properly installed yet.');
throw new RuntimeException('Friendica isn\'t properly installed yet.');
}

$nurl = normalise_link($this->getArgument(0));
if (!dba::exists('contact', ['nurl' => $nurl, 'archive' => false])) {
throw new \RuntimeException(L10n::t('Could not find any unarchived contact entry for this URL (%s)', $nurl));
throw new RuntimeException(L10n::t('Could not find any unarchived contact entry for this URL (%s)', $nurl));
}
if (dba::update('contact', ['archive' => true], ['nurl' => $nurl])) {
$condition = ["`cid` IN (SELECT `id` FROM `contact` WHERE `archive`)"];
dba::delete('queue', $condition);
$this->out(L10n::t('The contact entries have been archived'));
} else {
throw new \RuntimeException('The contact archival failed.');
throw new RuntimeException('The contact archival failed.');
}

return 0;


+ 1
- 1
src/Core/Console/AutomaticInstallation.php View File

@@ -3,11 +3,11 @@
namespace Friendica\Core\Console;

use Asika\SimpleConsole\Console;
use dba;
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\Install;
use Friendica\Core\Theme;
use Friendica\Database\dba;
use RuntimeException;

require_once 'mod/install.php';


+ 5
- 4
src/Core/Console/Config.php View File

@@ -9,8 +9,9 @@
namespace Friendica\Core\Console;

use Asika\SimpleConsole\CommandArgsException;
use dba;
use Friendica\App;
use Friendica\Core;
use RuntimeException;

require_once 'include/dba.php';
require_once 'include/text.php';
@@ -92,7 +93,7 @@ HELP;
throw new CommandArgsException('Too many arguments');
}

if (!($a->mode & \Friendica\App::MODE_DBCONFIGAVAILABLE)) {
if (!($a->mode & App::MODE_DBCONFIGAVAILABLE)) {
$this->out('Database isn\'t ready or populated yet, showing file config only');
}

@@ -102,7 +103,7 @@ HELP;
$value = $this->getArgument(2);

if (is_array(Core\Config::get($cat, $key))) {
throw new \RuntimeException("$cat.$key is an array and can't be set using this command.");
throw new RuntimeException("$cat.$key is an array and can't be set using this command.");
}

$result = Core\Config::set($cat, $key, $value);
@@ -151,7 +152,7 @@ HELP;
if (count($this->args) == 0) {
Core\Config::load();

if (Core\Config::get('system', 'config_adapter') == 'jit' && $a->mode & \Friendica\App::MODE_DBCONFIGAVAILABLE) {
if (Core\Config::get('system', 'config_adapter') == 'jit' && $a->mode & App::MODE_DBCONFIGAVAILABLE) {
$this->out('Warning: The JIT (Just In Time) Config adapter doesn\'t support loading the entire configuration, showing file config only');
}



+ 4
- 2
src/Core/Console/DatabaseStructure.php View File

@@ -3,7 +3,9 @@
namespace Friendica\Core\Console;

use Friendica\Core;
use Friendica\Database\dba;
use Friendica\Database\DBStructure;
use RuntimeException;

require_once 'boot.php';
require_once 'include/dba.php';
@@ -56,8 +58,8 @@ HELP;
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
}

if (!\dba::connected()) {
throw new \RuntimeException('Unable to connect to database');
if (!dba::connected()) {
throw new RuntimeException('Unable to connect to database');
}

Core\Config::load();


+ 7
- 5
src/Core/Console/GlobalCommunitySilence.php View File

@@ -3,8 +3,10 @@
namespace Friendica\Core\Console;

use Friendica\Core\Protocol;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Network\Probe;
use RuntimeException;

require_once 'include/text.php';

@@ -65,7 +67,7 @@ HELP;
}

if ($a->isInstallMode()) {
throw new \RuntimeException('Database isn\'t ready or populated yet');
throw new RuntimeException('Database isn\'t ready or populated yet');
}

/**
@@ -75,16 +77,16 @@ HELP;
* */
$net = Probe::uri($this->getArgument(0));
if (in_array($net['network'], [Protocol::PHANTOM, Protocol::MAIL])) {
throw new \RuntimeException('This account seems not to exist.');
throw new RuntimeException('This account seems not to exist.');
}

$nurl = normalise_link($net['url']);
$contact = \dba::selectFirst("contact", ["id"], ["nurl" => $nurl, "uid" => 0]);
$contact = dba::selectFirst("contact", ["id"], ["nurl" => $nurl, "uid" => 0]);
if (DBM::is_result($contact)) {
\dba::update("contact", ["hidden" => true], ["id" => $contact["id"]]);
dba::update("contact", ["hidden" => true], ["id" => $contact["id"]]);
$this->out('NOTICE: The account should be silenced from the global community page');
} else {
throw new \RuntimeException('NOTICE: Could not find any entry for this URL (' . $nurl . ')');
throw new RuntimeException('NOTICE: Could not find any entry for this URL (' . $nurl . ')');
}

return 0;


+ 9
- 9
src/Core/Console/NewPassword.php View File

@@ -2,12 +2,12 @@

namespace Friendica\Core\Console;

use Friendica\Core\L10n;
use Friendica\Model\Contact;
use Friendica\Model\User;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use dba;
use Friendica\Model\User;
use RuntimeException;

/**
* @brief tool to set a new password for a user
@@ -59,14 +59,14 @@ HELP;
}

if ($a->isInstallMode()) {
throw new \RuntimeException('Database isn\'t ready or populated yet');
throw new RuntimeException('Database isn\'t ready or populated yet');
}

$nick = $this->getArgument(0);

$user = dba::selectFirst('user', ['uid'], ['nickname' => $nick]);
if (!DBM::is_result($user)) {
throw new \RuntimeException(L10n::t('User not found'));
throw new RuntimeException(L10n::t('User not found'));
}

$password = $this->getArgument(1);
@@ -76,15 +76,15 @@ HELP;
}

if (!$password) {
throw new \RuntimeException(L10n::t('Password can\'t be empty'));
throw new RuntimeException(L10n::t('Password can\'t be empty'));
}

if (!Config::get('system', 'disable_password_exposed', false) && User::isPasswordExposed($password)) {
throw new \RuntimeException(L10n::t('The new password has been exposed in a public data dump, please choose another.'));
throw new RuntimeException(L10n::t('The new password has been exposed in a public data dump, please choose another.'));
}

if (!User::updatePassword($user['uid'], $password)) {
throw new \RuntimeException(L10n::t('Password update failed. Please try again.'));
throw new RuntimeException(L10n::t('Password update failed. Please try again.'));
}

$this->out(L10n::t('Password changed.'));


+ 3
- 3
src/Core/L10n.php View File

@@ -4,8 +4,8 @@
*/
namespace Friendica\Core;

use Friendica\Core\Config;
use dba;
use Friendica\BaseObject;
use Friendica\Database\dba;

require_once 'boot.php';
require_once 'include/dba.php';
@@ -14,7 +14,7 @@ require_once 'include/dba.php';
* Provide Languange, Translation, and Localisation functions to the application
* Localisation can be referred to by the numeronym L10N (as in: "L", followed by ten more letters, and then "N").
*/
class L10n extends \Friendica\BaseObject
class L10n extends BaseObject
{
/**
* @brief get the prefered language from the HTTP_ACCEPT_LANGUAGE header


+ 1
- 1
src/Core/Lock/DatabaseLockDriver.php View File

@@ -2,8 +2,8 @@

namespace Friendica\Core\Lock;

use dba;
use Friendica\Core\Cache;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Util\DateTimeFormat;



+ 0
- 5
src/Core/NotificationsManager.php View File

@@ -9,17 +9,12 @@ namespace Friendica\Core;
use Friendica\BaseObject;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
use Friendica\Model\Item;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Temporal;
use Friendica\Util\XML;
use dba;

require_once 'include/dba.php';



+ 1
- 1
src/Core/Session/DatabaseSessionHandler.php View File

@@ -4,9 +4,9 @@ namespace Friendica\Core\Session;

use Friendica\BaseObject;
use Friendica\Core\Session;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use SessionHandlerInterface;
use dba;

require_once 'boot.php';
require_once 'include/dba.php';


+ 1
- 6
src/Core/UserImport.php View File

@@ -5,14 +5,9 @@
namespace Friendica\Core;

use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Database\dba;
use Friendica\Model\Photo;
use Friendica\Object\Image;
use dba;

require_once "include/dba.php";



+ 1
- 1
src/Core/Worker.php View File

@@ -4,7 +4,7 @@
*/
namespace Friendica\Core;

use dba;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Process;
use Friendica\Util\DateTimeFormat;


+ 0
- 1
src/Database/DBM.php View File

@@ -4,7 +4,6 @@
*/
namespace Friendica\Database;

use dba;
use Friendica\Util\DateTimeFormat;

require_once 'include/dba.php';


+ 4
- 3
src/Database/DBStructure.php View File

@@ -4,7 +4,8 @@
*/
namespace Friendica\Database;

use dba;
use Exception;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;

@@ -629,7 +630,7 @@ class DBStructure
private static function createIndex($indexname, $fieldnames, $method = "ADD") {
$method = strtoupper(trim($method));
if ($method!="" && $method!="ADD") {
throw new \Exception("Invalid parameter 'method' in self::createIndex(): '$method'");
throw new Exception("Invalid parameter 'method' in self::createIndex(): '$method'");
}

if ($fieldnames[0] == "UNIQUE") {
@@ -1941,7 +1942,7 @@ class DBStructure
]
];

\Friendica\Core\Addon::callHooks('dbstructure_definition', $database);
Addon::callHooks('dbstructure_definition', $database);

return $database;
}


+ 0
- 2
src/Database/PostUpdate.php View File

@@ -5,11 +5,9 @@
namespace Friendica\Database;

use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Item;
use Friendica\Model\PermissionSet;
use dba;

require_once 'include/dba.php';



+ 2
- 5
src/Model/Contact.php View File

@@ -11,19 +11,16 @@ use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Photo;
use Friendica\Model\Profile;
use Friendica\Network\Probe;
use Friendica\Protocol\DFRN;
use Friendica\Object\Image;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\OStatus;
use Friendica\Protocol\PortableContact;
use Friendica\Protocol\Salmon;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Object\Image;
use dba;

require_once 'boot.php';
require_once 'include/dba.php';


+ 1
- 1
src/Model/Conversation.php View File

@@ -4,8 +4,8 @@
*/
namespace Friendica\Model;

use Friendica\Database\dba;
use Friendica\Database\DBM;
use dba;

require_once "include/dba.php";



+ 1
- 2
src/Model/Event.php View File

@@ -5,15 +5,14 @@

namespace Friendica\Model;

use dba;
use Friendica\BaseObject;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Item;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Map;



+ 3
- 5
src/Model/GContact.php View File

@@ -6,18 +6,16 @@
*/
namespace Friendica\Model;

use Friendica\Core\Config;
use Exception;
use Friendica\Core\Console\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
use Friendica\Network\Probe;
use Friendica\Protocol\PortableContact;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use dba;
use Exception;

require_once 'include/dba.php';



+ 1
- 1
src/Model/Group.php View File

@@ -6,8 +6,8 @@ namespace Friendica\Model;

use Friendica\BaseObject;
use Friendica\Core\L10n;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use dba;

require_once 'boot.php';
require_once 'include/dba.php';


+ 3
- 5
src/Model/Item.php View File

@@ -6,18 +6,16 @@

namespace Friendica\Model;

use dba;
use Friendica\BaseObject;
use Friendica\Content\Text;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Lock;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\PermissionSet;
use Friendica\Object\Image;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\OStatus;
@@ -2219,7 +2217,7 @@ class Item extends BaseObject
*/
private static function addLanguageToItemArray(&$item)
{
$naked_body = Text\BBCode::toPlaintext($item['body'], false);
$naked_body = BBCode::toPlaintext($item['body'], false);

$ld = new Text_LanguageDetect();
$ld->setNameMode(2);


+ 1
- 1
src/Model/Mail.php View File

@@ -8,10 +8,10 @@ namespace Friendica\Model;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Network\Probe;
use Friendica\Util\DateTimeFormat;
use dba;

require_once 'include/dba.php';



+ 6
- 6
src/Model/OpenWebAuthToken.php View File

@@ -5,9 +5,9 @@
*/
namespace Friendica\Model;

use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Util\DateTimeFormat;
use dba;

/**
* Methods to deal with entries of the 'openwebauth-token' table.
@@ -16,12 +16,12 @@ class OpenWebAuthToken
{
/**
* Create an entry in the 'openwebauth-token' table.
*
*
* @param string $type Verify type.
* @param int $uid The user ID.
* @param string $token
* @param string $meta
*
*
* @return boolean
*/
public static function create($type, $uid, $token, $meta)
@@ -38,11 +38,11 @@ class OpenWebAuthToken

/**
* Get the "meta" field of an entry in the openwebauth-token table.
*
*
* @param string $type Verify type.
* @param int $uid The user ID.
* @param string $token
*
*
* @return string|boolean The meta enry or false if not found.
*/
public static function getMeta($type, $uid, $token)
@@ -60,7 +60,7 @@ class OpenWebAuthToken

/**
* Purge entries of a verify-type older than interval.
*
*
* @param string $type Verify type.
* @param string $interval SQL compatible time interval
*/


+ 1
- 1
src/Model/PermissionSet.php View File

@@ -5,8 +5,8 @@
namespace Friendica\Model;

use Friendica\BaseObject;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use dba;

require_once 'include/dba.php';



+ 1
- 1
src/Model/Photo.php View File

@@ -10,11 +10,11 @@ use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Object\Image;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use dba;

require_once 'include/dba.php';



+ 1
- 1
src/Model/Process.php View File

@@ -5,8 +5,8 @@
namespace Friendica\Model;

use Friendica\BaseObject;
use Friendica\Database\dba;
use Friendica\Util\DateTimeFormat;
use dba;

require_once 'include/dba.php';



+ 1
- 5
src/Model/Profile.php View File

@@ -15,16 +15,12 @@ use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\OpenWebAuthToken;
use Friendica\Protocol\Diaspora;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\Temporal;
use dba;

use InvalidArgumentException;

require_once 'include/dba.php';
require_once 'mod/proxy.php';


+ 2
- 2
src/Model/PushSubscriber.php View File

@@ -5,9 +5,9 @@
namespace Friendica\Model;

use Friendica\Core\Worker;
use Friendica\Util\DateTimeFormat;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use dba;
use Friendica\Util\DateTimeFormat;

require_once 'include/dba.php';



+ 1
- 1
src/Model/Queue.php View File

@@ -5,9 +5,9 @@
namespace Friendica\Model;

use Friendica\Core\Config;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Util\DateTimeFormat;
use dba;

require_once 'include/dba.php';



+ 1
- 2
src/Model/Term.php View File

@@ -5,9 +5,8 @@
namespace Friendica\Model;

use Friendica\Core\System;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Item;
use dba;

require_once 'boot.php';
require_once 'include/conversation.php';


+ 2
- 5
src/Model/User.php View File

@@ -6,22 +6,19 @@
namespace Friendica\Model;

use DivineOmega\PasswordExposed\PasswordStatus;
use Exception;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Group;
use Friendica\Model\Photo;
use Friendica\Object\Image;
use Friendica\Util\Crypto;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use dba;
use Exception;
use LightOpenID;
use function password_exposed;



+ 1
- 1
src/Module/Hashtag.php View File

@@ -6,7 +6,7 @@ namespace Friendica\Module;

use Friendica\BaseModule;
use Friendica\Core\System;
use dba;
use Friendica\Database\dba;

require_once 'include/dba.php';
require_once 'include/text.php';


+ 2
- 2
src/Module/Login.php View File

@@ -4,16 +4,16 @@
*/
namespace Friendica\Module;

use Exception;
use Friendica\BaseModule;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Database\dba;
use Friendica\Database\DBM;
use Friendica\Model\User;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use dba;
use Exception;
use LightOpenID;

require_once 'boot.php';


+ 1
- 2
src/Module/Magic.php View File

@@ -5,12 +5,11 @@
namespace Friendica\Module;

use Friendica\BaseModule;
use Friendica\Database\dba;
use Friendica\Model\Contact;
use Friendica\Util\HTTPSignature;
use Friendica\Util\Network;

use dba;

/**
* Magic Auth (remote authentication) module.
*


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save