mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02: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\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_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
|
||||
|
||||
Logger::notice("installed group_text");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,29 +28,30 @@ function group_text_install() {
|
|||
*
|
||||
*/
|
||||
|
||||
function group_text_settings_post(App $a, $post) {
|
||||
if(! Session::getLocalUser() || empty($_POST['group_text-submit']))
|
||||
function group_text_settings_post(App $a, array $post)
|
||||
{
|
||||
if (!Session::getLocalUser() || empty($post['group_text-submit'])) {
|
||||
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']));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Called from the Addon Setting form.
|
||||
* Called from the Addon Setting form.
|
||||
* Add our own settings info to the page.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function group_text_settings(App &$a, array &$data)
|
||||
{
|
||||
if (!Session::getLocalUser()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$enabled = DI::pConfig()->get(Session::getLocalUser(),'system','groupedit_image_limit');
|
||||
$enabled = DI::pConfig()->get(Session::getLocalUser(), 'system', 'groupedit_image_limit');
|
||||
|
||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/group_text/');
|
||||
$html = Renderer::replaceMacros($t, [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue