use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Worker;
+use Friendica\Core\L10n;
// Get options
-$shortopts = 'sc';
-$longopts = ['spawn', 'cron'];
+$shortopts = 'sn';
+$longopts = ['spawn', 'no_cron'];
$options = getopt($shortopts, $longopts);
// Ensure that worker.php is executed from the base path of the installation
Config::load();
+$lang = L10n::getBrowserLanguage();
+L10n::loadTranslationTable($lang);
+
// Check the database structure and possibly fixes it
check_db(true);
return;
}
-$a->set_baseurl(Config::get('system', 'url'));
+$a->setBaseURL(Config::get('system', 'url'));
Addon::loadHooks();
killme();
}
-$run_cron = array_key_exists('c', $options) || array_key_exists('cron', $options);
+$run_cron = !array_key_exists('n', $options) && !array_key_exists('no_cron', $options);
Worker::processQueue($run_cron);