$old_url = $a->get_baseurl(true);
+ // Generate host names for relocation the addresses in the format user@address.tld
+ $new_host = str_replace("http://", "@", normalise_link($new_url));
+ $old_host = str_replace("http://", "@", normalise_link($old_url));
+
function update_table($table_name, $fields, $old_url, $new_url) {
global $db, $a;
}
// update tables
+ // update profile links in the format "http://server.tld"
update_table("profile", array('photo', 'thumb'), $old_url, $new_url);
update_table("term", array('url'), $old_url, $new_url);
- update_table("contact", array('photo','thumb','micro','url','nurl','request','notify','poll','confirm','poco'), $old_url, $new_url);
- update_table("gcontact", array('photo','url','nurl','server_url'), $old_url, $new_url);
- update_table("item", array('owner-link','owner-avatar','author-name','author-link','author-avatar','body','plink','tag'), $old_url, $new_url);
+ update_table("contact", array('photo','thumb','micro','url','nurl','alias','request','notify','poll','confirm','poco', 'avatar'), $old_url, $new_url);
+ update_table("gcontact", array('url','nurl','photo','server_url','notify','alias'), $old_url, $new_url);
+ update_table("item", array('owner-link','owner-avatar','author-link','author-avatar','body','plink','tag'), $old_url, $new_url);
+
+ // update profile addresses in the format "user@server.tld"
+ update_table("contact", array('addr'), $old_host, $new_host);
+ update_table("gcontact", array('connect','addr'), $old_host, $new_host);
// update config
$a->set_baseurl($new_url);
$only_tag_search = ((x($_POST,'only_tag_search')) ? True : False);
$rino = ((x($_POST,'rino')) ? intval($_POST['rino']) : 0);
$embedly = ((x($_POST,'embedly')) ? notags(trim($_POST['embedly'])) : '');
+ $worker = ((x($_POST,'worker')) ? True : False);
+ $worker_queues = ((x($_POST,'worker_queues')) ? intval($_POST['worker_queues']) : 4);
+ $worker_dont_fork = ((x($_POST,'worker_dont_fork')) ? True : False);
if($a->get_path() != "")
$diaspora_enabled = false;
set_config('system','proxy_disabled', $proxy_disabled);
set_config('system','old_pager', $old_pager);
set_config('system','only_tag_search', $only_tag_search);
-
+ set_config('system','worker', $worker);
+ set_config('system','worker_queues', $worker_queues);
+ set_config('system','worker_dont_fork', $worker_dont_fork);
if($rino==2 and !function_exists('mcrypt_create_iv')) {
notice(t("RINO2 needs mcrypt php extension to work."));
'$advanced' => t('Advanced'),
'$portable_contacts' => t('Auto Discovered Contact Directory'),
'$performance' => t('Performance'),
+ '$worker_title' => t('Worker'),
'$relocate'=> t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
'$baseurl' => $a->get_baseurl(true),
// name, label, value, help string, extra data...
'$rino' => array('rino', t("RINO Encryption"), intval(get_config('system','rino_encrypt')), t("Encryption layer between nodes."), array("Disabled", "RINO1 (deprecated)", "RINO2")),
'$embedly' => array('embedly', t("Embedly API key"), get_config('system','embedly'), t("<a href='http://embed.ly'>Embedly</a> is used to fetch additional data for web pages. This is an optional parameter.")),
+ '$worker' => array('worker', t("Enable 'worker' background processing"), get_config('system','worker'), t("The worker background processing limits the number of parallel background jobs to a maximum number and respects the system load.")),
+ '$worker_queues' => array('worker_queues', t("Maximum number of parallel workers"), get_config('system','worker_queues'), t("On shared hosters set this to 2. On larger systems, values of 10 are great. Default value is 4.")),
+ '$worker_dont_fork' => array('worker_dont_fork', t("Don't use 'proc_open' with the worker"), get_config('system','worker_dont_fork'), t("Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of poller calls in your crontab.")),
+
'$form_security_token' => get_form_security_token("admin_site")
));