use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\Worker;
+use Friendica\Database\DBM;
+use Friendica\Model\User;
-require_once("include/enotify.php");
-require_once("include/text.php");
-require_once('include/items.php');
+require_once 'include/enotify.php';
+require_once 'include/text.php';
+require_once 'include/items.php';
/**
* @brief Process send data from the admin panels subpages
dbesc(dba::database_name()));
$showwarning = false;
$warningtext = array();
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$showwarning = true;
$warningtext[] = sprintf(t('Your DB still runs with MyISAM tables. You should change the engine type to InnoDB. As Friendica will use InnoDB only features in the future, you should change this! See <a href="%s">here</a> for a guide that may be helpful converting the table engines. You may also use the command <tt>php include/dbstructure.php toinnodb</tt> of your Friendica installation for an automatic conversion.<br />'), 'https://dev.mysql.com/doc/refman/5.7/en/converting-tables-to-innodb.html');
}
check_form_security_token_redirectOnErr('/admin/site', 'admin_site');
if (!empty($_POST['republish_directory'])) {
- Worker::add(PRIORITY_LOW, 'directory');
+ Worker::add(PRIORITY_LOW, 'Directory');
return;
}
$users = q("SELECT `uid` FROM `user` WHERE `account_removed` = 0 AND `account_expired` = 0");
foreach ($users as $user) {
- Worker::add(PRIORITY_HIGH, 'notifier', 'relocate', $user['uid']);
+ Worker::add(PRIORITY_HIGH, 'Notifier', 'relocate', $user['uid']);
}
info("Relocation started. Could take a while to complete.");
// Has the directory url changed? If yes, then resubmit the existing profiles there
if ($global_directory != Config::get('system', 'directory') && ($global_directory != '')) {
Config::set('system', 'directory', $global_directory);
- Worker::add(PRIORITY_LOW, 'directory');
+ Worker::add(PRIORITY_LOW, 'Directory');
}
if ($a->get_path() != "") {
$failed = array();
$r = q("SELECT `k`, `v` FROM `config` WHERE `cat` = 'database' ");
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
foreach ($r as $rr) {
$upd = intval(substr($rr['k'],7));
if ($upd < 1139 || $rr['v'] === 'success') {
notice(sprintf(tt("%s user blocked/unblocked", "%s users blocked/unblocked", count($users)), count($users)));
}
if (x($_POST,'page_users_delete')) {
- require_once("include/Contact.php");
foreach ($users as $uid) {
- user_remove($uid);
+ User::remove($uid);
}
notice(sprintf(tt("%s user deleted", "%s users deleted", count($users)), count($users)));
}
case "delete":
check_form_security_token_redirectOnErr('/admin/users', 'admin_users', 't');
// delete user
- require_once("include/Contact.php");
- user_remove($uid);
+ User::remove($uid);
notice(sprintf(t("User '%s' deleted"), $user[0]['username']).EOL);
break;