$conf->set('privacy.hide_public_links', !empty($_POST['hidePublicLinks']));
$conf->set('api.enabled', !empty($_POST['enableApi']));
$conf->set('api.secret', escape($_POST['apiSecret']));
+ $conf->set('translation.language', escape($_POST['language']));
+
try {
$conf->write(isLoggedIn());
$history->updateSettings();
$PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false));
$PAGE->assign('api_enabled', $conf->get('api.enabled', true));
$PAGE->assign('api_secret', $conf->get('api.secret'));
+ $PAGE->assign('languages', Languages::getAvailableLanguages());
+ $PAGE->assign('language', $conf->get('translation.language'));
$PAGE->renderPage('configure');
exit;
}
}
$delete = empty($_POST['totag']);
$redirect = $delete ? 'do=changetag' : 'searchtags='. urlencode(escape($_POST['totag']));
+ $count = count($alteredLinks);
$alert = $delete
- ? sprintf(t('The tag was removed from %d links.'), count($alteredLinks))
- : sprintf(t('The tag was renamed in %d links.'), count($alteredLinks));
+ ? sprintf(t('The tag was removed from %d link.', 'The tag was removed from %d links.', $count), $count)
+ : sprintf(t('The tag was renamed in %d link.', 'The tag was renamed in %d links.', $count), $count);
echo '<script>alert("'. $alert .'");document.location=\'?'. $redirect .'\';</script>';
exit;
}
if ($url == '') {
$url = '?' . smallHash($linkdate . $LINKSDB->getNextId());
- $title = $conf->get('general.default_note_title', 'Note: ');
+ $title = $conf->get('general.default_note_title', t('Note: '));
}
$url = escape($url);
$title = escape($title);
} else {
$conf->set('general.title', 'Shared links on '.escape(index_url($_SERVER)));
}
+ $conf->set('translation.language', escape($_POST['language']));
$conf->set('updates.check_updates', !empty($_POST['updateCheck']));
$conf->set('api.enabled', !empty($_POST['enableApi']));
$conf->set(
list($continents, $cities) = generateTimeZoneData(timezone_identifiers_list(), date_default_timezone_get());
$PAGE->assign('continents', $continents);
$PAGE->assign('cities', $cities);
+ $PAGE->assign('languages', Languages::getAvailableLanguages());
$PAGE->renderPage('install');
exit;
}