<?php
-
/**
* @file mod/admin.php
*
* @brief Friendica admin
*/
use Friendica\App;
+use Friendica\Content\Feature;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
+use Friendica\Model\Contact;
use Friendica\Model\User;
-use Friendica\Network\Probe;
-use Friendica\Object\Contact;
require_once 'include/enotify.php';
require_once 'include/text.php';
*/
function admin_post(App $a)
{
-
-
if (!is_site_admin()) {
return;
}
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
'$shortcut_icon' => array('shortcut_icon', t("Shortcut icon"), Config::get('system','shortcut_icon'), t("Link to an icon that will be used for browsers.")),
'$touch_icon' => array('touch_icon', t("Touch icon"), Config::get('system','touch_icon'), t("Link to an icon that will be used for tablets and mobiles.")),
- '$info' => array('info', t('Additional Info'), $info, sprintf(t('For public servers: you can add additional information here that will be listed at %s/siteinfo.'), get_server())),
+ '$info' => array('info', t('Additional Info'), $info, sprintf(t('For public servers: you can add additional information here that will be listed at %s/servers.'), get_server())),
'$language' => array('language', t("System language"), Config::get('system','language'), "", $lang_choices),
'$theme' => array('theme', t("System theme"), Config::get('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices),
'$theme_mobile' => array('theme_mobile', t("Mobile system theme"), Config::get('system', 'mobile-theme', '---'), t("Theme for mobile devices"), $theme_choices_mobile),
check_form_security_token_redirectOnErr('/admin/users', 'admin_users');
if (!($nu_name === "") && !($nu_email === "") && !($nu_nickname === "")) {
- require_once 'include/user.php';
-
- $result = create_user(array('username' => $nu_name, 'email' => $nu_email,
+ $result = User::create(array('username' => $nu_name, 'email' => $nu_email,
'nickname' => $nu_nickname, 'verified' => 1, 'language' => $nu_language));
if (!$result['success']) {
notice($result['message']);
logger('postvars: ' . print_r($_POST, true), LOGGER_DATA);
$arr = array();
- $features = get_features(false);
+ $features = Feature::get(false);
foreach ($features as $fname => $fdata) {
foreach (array_slice($fdata, 1) as $f) {
{
if ((argc() > 1) && (argv(1) === 'features')) {
$arr = array();
- $features = get_features(false);
+ $features = Feature::get(false);
foreach ($features as $fname => $fdata) {
$arr[$fname] = array();