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");
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');
}
if (Config::get('system', 'check_new_version_url', 'none') != 'none' ) {
$gitversion = Config::get('system','git_friendica_version');
if (version_compare(FRIENDICA_VERSION, $gitversion) < 0) {
- $warningtext[] = t('There is a new version of Friendica available for download.');
+ $warningtext[] = sprintf(t('There is a new version of Friendica available for download. Your current version is %1$s, upstream version is %2$s'), $FRIENDICA_VERSION, $gitversion);
$showwarning = true;
}
}
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() != "") {
}
if ($info == "") {
- del_config('config','info');
+ Config::delete('config','info');
} else {
Config::set('config','info',$info);
}
Config::set('system','theme', $theme);
if ($theme_mobile == '---') {
- del_config('system','mobile-theme');
+ Config::delete('system','mobile-theme');
} else {
Config::set('system','mobile-theme', $theme_mobile);
}
if ($singleuser == '---') {
- del_config('system','singleuser');
+ Config::delete('system','singleuser');
} else {
Config::set('system','singleuser', $singleuser);
}
if (strlen(Config::get('system','directory_submit_url')) &&
!strlen(Config::get('system','directory'))) {
Config::set('system','directory', dirname(Config::get('system','directory_submit_url')));
- del_config('system','directory_submit_url');
+ Config::delete('system','directory_submit_url');
}
/* Installed themes */
$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') {
} else {
$val = 0;
}
- Config::set('feature',$feature,$val);
+ Config::set('feature', $feature, $val);
if (x($_POST, $featurelock)) {
Config::set('feature_lock', $feature, $val);
} else {
- del_config('feature_lock', $feature);
+ Config::delete('feature_lock', $feature);
}
}
}
$arr[$fname][0] = $fdata[0];
foreach (array_slice($fdata,1) as $f) {
- $set = Config::get('feature',$f[0]);
- if ($set === false) {
- $set = $f[3];
- }
+ $set = Config::get('feature', $f[0], $f[3]);
$arr[$fname][1][] = array(
array('feature_' .$f[0],$f[1],$set,$f[2],array(t('Off'), t('On'))),
array('featurelock_' .$f[0],sprintf(t('Lock feature %s'),$f[1]),(($f[4] !== false) ? "1" : ''),'',array(t('Off'), t('On')))