The boot.php had been cleared of most functions
This commit is contained in:
parent
4989d1fa99
commit
63da4a75e9
37 changed files with 279 additions and 401 deletions
|
@ -703,9 +703,6 @@ function photos_post(App $a)
|
|||
@unlink($src);
|
||||
|
||||
$max_length = DI::config()->get('system', 'max_image_length');
|
||||
if (!$max_length) {
|
||||
$max_length = MAX_IMAGE_LENGTH;
|
||||
}
|
||||
if ($max_length > 0) {
|
||||
$image->scaleDown($max_length);
|
||||
}
|
||||
|
|
|
@ -196,7 +196,7 @@ function ping_init(App $a)
|
|||
$myurl = DI::baseUrl() . '/profile/' . $a->getLoggedInUserNickname();
|
||||
$mail_count = DBA::count('mail', ["`uid` = ? AND NOT `seen` AND `from-url` != ?", local_user(), $myurl]);
|
||||
|
||||
if (intval(DI::config()->get('config', 'register_policy')) === \Friendica\Module\Register::APPROVE && is_site_admin()) {
|
||||
if (intval(DI::config()->get('config', 'register_policy')) === \Friendica\Module\Register::APPROVE && $a->isSiteAdmin()) {
|
||||
$regs = Friendica\Model\Register::getPending();
|
||||
|
||||
if (DBA::isResult($regs)) {
|
||||
|
|
|
@ -492,7 +492,7 @@ function settings_content(App $a)
|
|||
$settings_connectors = '';
|
||||
Hook::callAll('connector_settings', $settings_connectors);
|
||||
|
||||
if (is_site_admin()) {
|
||||
if ($a->isSiteAdmin()) {
|
||||
$diasp_enabled = DI::l10n()->t('Built-in support for %s connectivity is %s', DI::l10n()->t('Diaspora (Socialhome, Hubzilla)'), ((DI::config()->get('system', 'diaspora_enabled')) ? DI::l10n()->t('enabled') : DI::l10n()->t('disabled')));
|
||||
$ostat_enabled = DI::l10n()->t('Built-in support for %s connectivity is %s', DI::l10n()->t('OStatus (GNU Social)'), ((DI::config()->get('system', 'ostatus_disabled')) ? DI::l10n()->t('disabled') : DI::l10n()->t('enabled')));
|
||||
} else {
|
||||
|
|
|
@ -29,7 +29,7 @@ use Friendica\DI;
|
|||
|
||||
function uimport_post(App $a)
|
||||
{
|
||||
if ((DI::config()->get('config', 'register_policy') != \Friendica\Module\Register::OPEN) && !is_site_admin()) {
|
||||
if ((DI::config()->get('config', 'register_policy') != \Friendica\Module\Register::OPEN) && !$a->isSiteAdmin()) {
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
return;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ function uimport_post(App $a)
|
|||
|
||||
function uimport_content(App $a)
|
||||
{
|
||||
if ((DI::config()->get('config', 'register_policy') != \Friendica\Module\Register::OPEN) && !is_site_admin()) {
|
||||
if ((DI::config()->get('config', 'register_policy') != \Friendica\Module\Register::OPEN) && !$a->isSiteAdmin()) {
|
||||
notice(DI::l10n()->t('User imports on closed servers can only be done by an administrator.'));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -177,9 +177,6 @@ function wall_upload_post(App $a, $desktopmode = true)
|
|||
@unlink($src);
|
||||
|
||||
$max_length = DI::config()->get('system', 'max_image_length');
|
||||
if (!$max_length) {
|
||||
$max_length = MAX_IMAGE_LENGTH;
|
||||
}
|
||||
if ($max_length > 0) {
|
||||
$Image->scaleDown($max_length);
|
||||
$filesize = strlen($Image->asString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue