mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-24 06:43:41 +00:00
[various] Improve formatting
This commit is contained in:
parent
5d8129600d
commit
0f6ea75bb7
5 changed files with 38 additions and 40 deletions
|
@ -13,12 +13,10 @@ use Friendica\Core\Renderer;
|
||||||
use Friendica\Core\Session;
|
use Friendica\Core\Session;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
|
|
||||||
function group_text_install() {
|
function group_text_install()
|
||||||
|
{
|
||||||
Hook::register('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
|
Hook::register('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
|
||||||
Hook::register('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
|
Hook::register('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
|
||||||
|
|
||||||
Logger::notice("installed group_text");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,10 +28,13 @@ function group_text_install() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function group_text_settings_post(App $a, $post) {
|
function group_text_settings_post(App $a, array $post)
|
||||||
if(! Session::getLocalUser() || empty($_POST['group_text-submit']))
|
{
|
||||||
|
if (!Session::getLocalUser() || empty($post['group_text-submit'])) {
|
||||||
return;
|
return;
|
||||||
DI::pConfig()->set(Session::getLocalUser(),'system','groupedit_image_limit',intval($_POST['group_text']));
|
}
|
||||||
|
|
||||||
|
DI::pConfig()->set(Session::getLocalUser(), 'system', 'groupedit_image_limit', intval($post['group_text']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,8 +45,6 @@ function group_text_settings_post(App $a, $post) {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function group_text_settings(App &$a, array &$data)
|
function group_text_settings(App &$a, array &$data)
|
||||||
{
|
{
|
||||||
if (!Session::getLocalUser()) {
|
if (!Session::getLocalUser()) {
|
||||||
|
|
|
@ -108,7 +108,7 @@ function libertree_post_local(App $a, array &$b)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!Session::getLocalUser()) || (Session::getLocalUser() != $b['uid'])) {
|
if (!Session::getLocalUser() || (Session::getLocalUser() != $b['uid'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ function ljpost_post_local(App $a, array &$b)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!Session::getLocalUser()) || (Session::getLocalUser() != $b['uid'])) {
|
if (!Session::getLocalUser() || (Session::getLocalUser() != $b['uid'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1125,7 +1125,6 @@ function pumpio_dopost(App $a, $client, int $uid, array $self, $post, string $ow
|
||||||
$reply->generator->displayName = 'pumpio';
|
$reply->generator->displayName = 'pumpio';
|
||||||
$reply->published = $post->object->inReplyTo->published;
|
$reply->published = $post->object->inReplyTo->published;
|
||||||
$reply->received = $post->object->inReplyTo->updated;
|
$reply->received = $post->object->inReplyTo->updated;
|
||||||
$reply->url = $post->object->inReplyTo->url;
|
|
||||||
pumpio_dopost($a, $client, $uid, $self, $reply, $own_id, false);
|
pumpio_dopost($a, $client, $uid, $self, $reply, $own_id, false);
|
||||||
|
|
||||||
$postarray['thr-parent'] = $post->object->inReplyTo->id;
|
$postarray['thr-parent'] = $post->object->inReplyTo->id;
|
||||||
|
|
|
@ -73,19 +73,19 @@ function windowsphonepush_module() {}
|
||||||
* We will make sure we've got a valid user account
|
* We will make sure we've got a valid user account
|
||||||
* and if so set our configuration setting for this person.
|
* and if so set our configuration setting for this person.
|
||||||
*/
|
*/
|
||||||
function windowsphonepush_settings_post(App $a, $post)
|
function windowsphonepush_settings_post(App $a, array $post)
|
||||||
{
|
{
|
||||||
if (!Session::getLocalUser() || empty($_POST['windowsphonepush-submit'])) {
|
if (!Session::getLocalUser() || empty($post['windowsphonepush-submit'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$enable = intval($_POST['windowsphonepush']);
|
$enable = intval($post['windowsphonepush']);
|
||||||
DI::pConfig()->set(Session::getLocalUser(), 'windowsphonepush', 'enable', $enable);
|
DI::pConfig()->set(Session::getLocalUser(), 'windowsphonepush', 'enable', $enable);
|
||||||
|
|
||||||
if ($enable) {
|
if ($enable) {
|
||||||
DI::pConfig()->set(Session::getLocalUser(), 'windowsphonepush', 'counterunseen', 0);
|
DI::pConfig()->set(Session::getLocalUser(), 'windowsphonepush', 'counterunseen', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DI::pConfig()->set(Session::getLocalUser(), 'windowsphonepush', 'senditemtext', intval($_POST['windowsphonepush-senditemtext']));
|
DI::pConfig()->set(Session::getLocalUser(), 'windowsphonepush', 'senditemtext', intval($post['windowsphonepush-senditemtext']));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called from the Addon Setting form.
|
/* Called from the Addon Setting form.
|
||||||
|
|
Loading…
Reference in a new issue