mirror of
https://github.com/friendica/friendica
synced 2025-04-27 05:50:10 +00:00
Move PConfig::get() to DI::pConfig()->get()
This commit is contained in:
parent
6e2880c679
commit
9e9429b56d
61 changed files with 190 additions and 179 deletions
|
@ -11,6 +11,7 @@ use Friendica\Core\Logger;
|
|||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\APContact;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Event;
|
||||
|
@ -462,7 +463,7 @@ class Processor
|
|||
continue;
|
||||
}
|
||||
|
||||
if (PConfig::get($receiver, 'system', 'accept_only_sharer', false) && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT)) {
|
||||
if (DI::pConfig()->get($receiver, 'system', 'accept_only_sharer', false) && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT)) {
|
||||
$skip = !Contact::isSharingByURL($activity['author'], $receiver);
|
||||
|
||||
if ($skip && (($activity['type'] == 'as:Announce') || $isForum)) {
|
||||
|
|
|
@ -3290,7 +3290,7 @@ class Diaspora
|
|||
*/
|
||||
public static function sendAccountMigration(array $owner, array $contact, $uid)
|
||||
{
|
||||
$old_handle = PConfig::get($uid, 'system', 'previous_addr');
|
||||
$old_handle = DI::pConfig()->get($uid, 'system', 'previous_addr');
|
||||
$profile = self::createProfileData($uid);
|
||||
|
||||
$signed_text = 'AccountMigration:'.$old_handle.':'.$profile['author'];
|
||||
|
@ -3551,7 +3551,7 @@ class Diaspora
|
|||
$body = $item["body"];
|
||||
|
||||
// Fetch the title from an attached link - if there is one
|
||||
if (empty($item["title"]) && PConfig::get($owner['uid'], 'system', 'attach_link_title')) {
|
||||
if (empty($item["title"]) && DI::pConfig()->get($owner['uid'], 'system', 'attach_link_title')) {
|
||||
$page_data = BBCode::getAttachmentData($item['body']);
|
||||
if (!empty($page_data['type']) && !empty($page_data['title']) && ($page_data['type'] == 'link')) {
|
||||
$title = $page_data['title'];
|
||||
|
|
|
@ -494,7 +494,7 @@ class OStatus
|
|||
|
||||
if (!$valid) {
|
||||
// If not, then it depends on this setting
|
||||
$valid = ((self::$itemlist[0]['uid'] == 0) || !PConfig::get(self::$itemlist[0]['uid'], 'system', 'accept_only_sharer', false));
|
||||
$valid = ((self::$itemlist[0]['uid'] == 0) || !DI::pConfig()->get(self::$itemlist[0]['uid'], 'system', 'accept_only_sharer', false));
|
||||
if ($valid) {
|
||||
Logger::log("Item with uri ".self::$itemlist[0]['uri']." will be imported due to the system settings.", Logger::DEBUG);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue