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
This commit is contained in:
parent
c316c5ae30
commit
daa1177e3a
|
@ -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)) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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']];
|
||||
|
|
|
@ -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" => []];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,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,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';
|
||||
|
|
|
@ -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,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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,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,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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,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;
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Database\dba;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Protocol\OStatus;
|
||||
|
||||
|
|
|
@ -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])) : '';
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,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;
|
||||
|
||||
|
|
|
@ -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,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,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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\dba;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
function worker_init()
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
16
src/App.php
16
src/App.php
|
@ -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');
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -5,21 +5,21 @@
|
|||
*/
|
||||
namespace Friendica\Content;
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
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 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 stdClass;
|
||||
|
||||
require_once 'include/dba.php';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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,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) {
|
||||
|
|
|
@ -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,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,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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.'));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
namespace Friendica\Database;
|
||||
|
||||
use dba;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
require_once 'include/dba.php';
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*/
|
||||
namespace Friendica\Model;
|
||||
|
||||
use Friendica\Database\dba;
|
||||
use Friendica\Database\DBM;
|
||||
use dba;
|
||||
|
||||
require_once "include/dba.php";
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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 have changed in this diff Show More
Loading…
Reference in New Issue
Block a user