Replace all functions from boot.php
This commit is contained in:
parent
5f1028a535
commit
5d8129600d
45 changed files with 577 additions and 535 deletions
|
@ -10,6 +10,7 @@ use Friendica\App;
|
|||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\DI;
|
||||
|
||||
function group_text_install() {
|
||||
|
@ -30,9 +31,9 @@ function group_text_install() {
|
|||
*/
|
||||
|
||||
function group_text_settings_post(App $a, $post) {
|
||||
if(! local_user() || empty($_POST['group_text-submit']))
|
||||
if(! Session::getLocalUser() || empty($_POST['group_text-submit']))
|
||||
return;
|
||||
DI::pConfig()->set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text']));
|
||||
DI::pConfig()->set(Session::getLocalUser(),'system','groupedit_image_limit',intval($_POST['group_text']));
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,11 +48,11 @@ function group_text_settings_post(App $a, $post) {
|
|||
|
||||
function group_text_settings(App &$a, array &$data)
|
||||
{
|
||||
if (!local_user()) {
|
||||
if (!Session::getLocalUser()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$enabled = DI::pConfig()->get(local_user(),'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