]> git.mxchange.org Git - friendica.git/blobdiff - mod/admin.php
Move Object\Contact to Model\Contact
[friendica.git] / mod / admin.php
index fcd67aa9e1dab6258f8e4cca7e4cceaf0e2f2750..321e7b617204576a1286afa891bbbda0e9b17d01 100644 (file)
@@ -1,18 +1,17 @@
 <?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';
@@ -33,8 +32,6 @@ require_once 'include/items.php';
  */
 function admin_post(App $a)
 {
-
-
        if (!is_site_admin()) {
                return;
        }
@@ -1282,7 +1279,7 @@ function admin_page_site(App $a)
                '$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),
@@ -1469,9 +1466,7 @@ function admin_page_users_post(App $a)
        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']);
@@ -2296,7 +2291,7 @@ function admin_page_features_post(App $a)
        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) {
@@ -2341,7 +2336,7 @@ function admin_page_features(App $a)
 {
        if ((argc() > 1) && (argv(1) === 'features')) {
                $arr = array();
-               $features = get_features(false);
+               $features = Feature::get(false);
 
                foreach ($features as $fname => $fdata) {
                        $arr[$fname] = array();