X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=diaspora%2Fdiaspora.php;h=96314d883c5ce5d7c3ec5cd3bb055d9b02070c60;hb=09bb49eef5acf3b12ab6fae4687f7eec06c40eee;hp=06b5439952b34aedbc910261461bdaf26bfef3f3;hpb=335fcf670f35f577eacf1050b223641b60bbb35c;p=friendica-addons.git
diff --git a/diaspora/diaspora.php b/diaspora/diaspora.php
index 06b54399..96314d88 100644
--- a/diaspora/diaspora.php
+++ b/diaspora/diaspora.php
@@ -12,10 +12,7 @@ require_once 'addon/diaspora/Diaspora_Connection.php';
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
-use Friendica\Core\PConfig;
-use Friendica\Core\Protocol;
use Friendica\Database\DBA;
use Friendica\Core\Worker;
use Friendica\DI;
@@ -46,13 +43,13 @@ function diaspora_jot_nets(App $a, array &$jotnets_fields)
return;
}
- if (PConfig::get(local_user(), 'diaspora', 'post')) {
+ if (DI::pConfig()->get(local_user(), 'diaspora', 'post')) {
$jotnets_fields[] = [
'type' => 'checkbox',
'field' => [
'diaspora_enable',
- L10n::t('Post to Diaspora'),
- PConfig::get(local_user(), 'diaspora', 'post_by_default')
+ DI::l10n()->t('Post to Diaspora'),
+ DI::pConfig()->get(local_user(), 'diaspora', 'post_by_default')
]
];
}
@@ -66,30 +63,30 @@ function diaspora_settings(App $a, &$s)
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '' . "\r\n";
+ DI::page()['htmlhead'] .= '' . "\r\n";
/* Get the current state of our config variables */
- $enabled = PConfig::get(local_user(),'diaspora','post');
+ $enabled = DI::pConfig()->get(local_user(),'diaspora','post');
$checked = (($enabled) ? ' checked="checked" ' : '');
$css = (($enabled) ? '' : '-disabled');
- $def_enabled = PConfig::get(local_user(),'diaspora','post_by_default');
+ $def_enabled = DI::pConfig()->get(local_user(),'diaspora','post_by_default');
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
- $handle = PConfig::get(local_user(), 'diaspora', 'handle');
- $password = PConfig::get(local_user(), 'diaspora', 'password');
- $aspect = PConfig::get(local_user(),'diaspora','aspect');
+ $handle = DI::pConfig()->get(local_user(), 'diaspora', 'handle');
+ $password = DI::pConfig()->get(local_user(), 'diaspora', 'password');
+ $aspect = DI::pConfig()->get(local_user(),'diaspora','aspect');
$status = "";
$r = q("SELECT `addr` FROM `contact` WHERE `self` AND `uid` = %d", intval(local_user()));
if (DBA::isResult($r)) {
- $status = L10n::t("Please remember: You can always be reached from Diaspora with your Friendica handle %s. ", $r[0]['addr']);
- $status .= L10n::t('This connector is only meant if you still want to use your old Diaspora account for some time. ');
- $status .= L10n::t('However, it is preferred that you tell your Diaspora contacts the new handle %s instead.', $r[0]['addr']);
+ $status = DI::l10n()->t("Please remember: You can always be reached from Diaspora with your Friendica handle %s. ", $r[0]['addr']);
+ $status .= DI::l10n()->t('This connector is only meant if you still want to use your old Diaspora account for some time. ');
+ $status .= DI::l10n()->t('However, it is preferred that you tell your Diaspora contacts the new handle %s instead.', $r[0]['addr']);
}
$aspects = false;
@@ -100,18 +97,18 @@ function diaspora_settings(App $a, &$s)
$aspects = $conn->getAspects();
if (!$aspects) {
- $status = L10n::t("Can't login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.");
+ $status = DI::l10n()->t("Can't login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.");
}
}
/* Add some HTML to the existing form */
$s .= '';
- $s .= ''. L10n::t('Diaspora Export').'
';
+ $s .= ''. DI::l10n()->t('Diaspora Export').'
';
$s .= '';
$s .= '