use Friendica\Database\DBStructure;
use Friendica\Model\Contact;
use Friendica\Model\User;
+use Friendica\Module\Login;
require_once 'include/enotify.php';
require_once 'include/text.php';
return;
}
- // urls
+ $return_path = 'admin';
if ($a->argc > 1) {
switch ($a->argv[1]) {
case 'site':
$func($a);
}
}
- goaway('admin/plugins/' . $a->argv[2]);
- return; // NOTREACHED
+ $return_path = 'admin/plugins/' . $a->argv[2];
break;
case 'themes':
if ($a->argc < 2) {
$theme = $a->argv[2];
if (is_file("view/theme/$theme/config.php")) {
-
- function __call_theme_admin_post(App $a, $theme)
- {
- $orig_theme = $a->theme;
- $orig_page = $a->page;
- $orig_session_theme = $_SESSION['theme'];
- require_once("view/theme/$theme/theme.php");
- require_once("view/theme/$theme/config.php");
- $_SESSION['theme'] = $theme;
-
-
- $init = $theme . "_init";
- if (function_exists($init)) {
- $init($a);
- }
- if (function_exists("theme_admin_post")) {
- $admin_form = theme_admin_post($a);
- }
-
- $_SESSION['theme'] = $orig_session_theme;
- $a->theme = $orig_theme;
- $a->page = $orig_page;
- return $admin_form;
+ $orig_theme = $a->theme;
+ $orig_page = $a->page;
+ $orig_session_theme = $_SESSION['theme'];
+ require_once "view/theme/$theme/theme.php";
+ require_once "view/theme/$theme/config.php";
+ $_SESSION['theme'] = $theme;
+
+ $init = $theme . '_init';
+ if (function_exists($init)) {
+ $init($a);
}
- __call_theme_admin_post($a, $theme);
+ if (function_exists('theme_admin_post')) {
+ theme_admin_post($a);
+ }
+
+ $_SESSION['theme'] = $orig_session_theme;
+ $a->theme = $orig_theme;
+ $a->page = $orig_page;
}
+
info(t('Theme settings updated.'));
if (is_ajax()) {
return;
}
- goaway('admin/themes/' . $theme);
- return;
+ $return_path = 'admin/themes/' . $theme;
break;
case 'features':
admin_page_features_post($a);
case 'logs':
admin_page_logs_post($a);
break;
- case 'dbsync':
- admin_page_dbsync_post($a);
- break;
case 'contactblock':
admin_page_contactblock_post($a);
break;
}
}
- goaway('admin');
+ goaway($return_path);
return; // NOTREACHED
}
function admin_content(App $a)
{
if (!is_site_admin()) {
- return login(false);
+ return Login::form();
}
if (x($_SESSION, 'submanage') && intval($_SESSION['submanage'])) {
'$autoactive' => Config::get('system', 'poco_completion'),
'$counts' => $counts,
'$version' => FRIENDICA_VERSION,
- '$legendtext' => sprintf(t('Currently this node is aware of %d nodes with %d registered users from the following platforms:'), $total, $users),
+ '$legendtext' => t('Currently this node is aware of %d nodes with %d registered users from the following platforms:', $total, $users),
'$baseurl' => System::baseUrl(),
));
}
return replace_macros($t, array(
'$title' => t('Administration'),
'$page' => t('Inspect Queue'),
- '$count' => sizeof($r),
+ '$count' => count($r),
'id_header' => t('ID'),
'$to_header' => t('Recipient Name'),
'$url_header' => t('Recipient Profile'),
$warningtext = array();
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 scripts/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');
+ $warningtext[] = 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 scripts/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 if github.com/friendica/master/VERSION is higher then
// the local version of Friendica. Check is opt-in, source may be master or devel branch
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[] = 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);
+ $warningtext[] = 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;
}
}
$warningtext[] = t('The worker was never executed. Please check your database structure!');
} elseif ((strtotime(datetime_convert()) - strtotime($last_worker_call)) > 60 * 60) {
$showwarning = true;
- $warningtext[] = sprintf(t('The last worker execution was on %s UTC. This is older than one hour. Please check your crontab settings.'), $last_worker_call);
+ $warningtext[] = t('The last worker execution was on %s UTC. This is older than one hour. Please check your crontab settings.', $last_worker_call);
}
$r = q("SELECT `page-flags`, COUNT(`uid`) AS `count` FROM `user` GROUP BY `page-flags`");
$new_url = rtrim($new_url, "/");
$parsed = @parse_url($new_url);
- if (!$parsed || (!x($parsed, 'host') || !x($parsed, 'scheme'))) {
+ if (!is_array($parsed) || !x($parsed, 'host') || !x($parsed, 'scheme')) {
notice(t("Can not parse base url. Must have at least <scheme>://<domain>"));
goaway('admin/site');
}
$upds = implode(", ", $upd);
-
-
- $q = sprintf("UPDATE %s SET %s;", $table_name, $upds);
- $r = q($q);
- if (!$r) {
+ $r = q("UPDATE %s SET %s;", $table_name, $upds);
+ if (!DBM::is_result($r)) {
notice("Failed updating '$table_name': " . dba::errorMessage());
goaway('admin/site');
}
$allowed_sites = ((x($_POST,'allowed_sites')) ? notags(trim($_POST['allowed_sites'])) : '');
$allowed_email = ((x($_POST,'allowed_email')) ? notags(trim($_POST['allowed_email'])) : '');
+ $no_oembed_rich_content = x($_POST,'no_oembed_rich_content');
+ $allowed_oembed = ((x($_POST,'allowed_oembed')) ? notags(trim($_POST['allowed_oembed'])) : '');
$block_public = ((x($_POST,'block_public')) ? True : False);
$force_publish = ((x($_POST,'publish_all')) ? True : False);
$global_directory = ((x($_POST,'directory')) ? notags(trim($_POST['directory'])) : '');
Config::set('config', 'register_text', $register_text);
Config::set('system', 'allowed_sites', $allowed_sites);
Config::set('system', 'allowed_email', $allowed_email);
+ Config::set('system', 'no_oembed_rich_content', $no_oembed_rich_content);
+ Config::set('system', 'allowed_oembed', $allowed_oembed);
Config::set('system', 'block_public', $block_public);
Config::set('system', 'publish_all', $force_publish);
Config::set('system', 'newuser_private', $newuser_private);
$theme_choices_mobile = array();
$theme_choices_mobile["---"] = t("No special theme for mobile devices");
$files = glob('view/theme/*');
- if ($files) {
-
+ if (is_array($files)) {
$allowed_theme_list = Config::get('system', 'allowed_themes');
foreach ($files as $file) {
CP_USERS_AND_GLOBAL => t("Public postings from local users and the federated network")
);
- /* OStatus conversation poll choices */
- $ostatus_poll_choices = array(
- "-2" => t("Never"),
- "-1" => t("At post arrival"),
- "0" => t("Frequently"),
- "60" => t("Hourly"),
- "720" => t("Twice daily"),
- "1440" => t("Daily")
- );
-
$poco_discovery_choices = array(
"0" => t("Disabled"),
"1" => t("Users"),
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
'$shortcut_icon' => array('shortcut_icon', t("Shortcut icon"), Config::get('system','shortcut_icon'), t("Link to an icon that will be used for browsers.")),
'$touch_icon' => array('touch_icon', t("Touch icon"), Config::get('system','touch_icon'), t("Link to an icon that will be used for tablets and mobiles.")),
- '$info' => array('info', t('Additional Info'), $info, sprintf(t('For public servers: you can add additional information here that will be listed at %s/servers.'), get_server())),
+ '$info' => array('info', t('Additional Info'), $info, t('For public servers: you can add additional information here that will be listed at %s/servers.', get_server())),
'$language' => array('language', t("System language"), Config::get('system','language'), "", $lang_choices),
'$theme' => array('theme', t("System theme"), Config::get('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices),
'$theme_mobile' => array('theme_mobile', t("Mobile system theme"), Config::get('system', 'mobile-theme', '---'), t("Theme for mobile devices"), $theme_choices_mobile),
'$abandon_days' => array('abandon_days', t('Accounts abandoned after x days'), Config::get('system','account_abandon_days'), t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')),
'$allowed_sites' => array('allowed_sites', t("Allowed friend domains"), Config::get('system','allowed_sites'), t("Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains")),
'$allowed_email' => array('allowed_email', t("Allowed email domains"), Config::get('system','allowed_email'), t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")),
+ '$no_oembed_rich_content' => array('no_oembed_rich_content', t("No OEmbed rich content"), Config::get('system','no_oembed_rich_content'), t("Don't show the rich content (e.g. embedded PDF), except from the domains listed below.")),
+ '$allowed_oembed' => array('allowed_oembed', t("Allowed OEmbed domains"), Config::get('system','allowed_oembed'), t("Comma separated list of domains which oembed content is allowed to be displayed. Wildcards are accepted.")),
'$block_public' => array('block_public', t("Block public"), Config::get('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")),
'$force_publish' => array('publish_all', t("Force publish"), Config::get('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")),
'$global_directory' => array('directory', t("Global directory URL"), Config::get('system','directory'), t("URL to the global directory. If this is not set, the global directory is completely unavailable to the application.")),
'$worker_queues' => array('worker_queues', t("Maximum number of parallel workers"), Config::get('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"), Config::get('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 worker calls in your crontab.")),
'$worker_fastlane' => array('worker_fastlane', t("Enable fastlane"), Config::get('system','worker_fastlane'), t("When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.")),
- '$worker_frontend' => array('worker_frontend', t('Enable frontend worker'), Config::get('system','frontend_worker'), sprintf(t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.'), System::baseUrl())),
+ '$worker_frontend' => array('worker_frontend', t('Enable frontend worker'), Config::get('system','frontend_worker'), t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.', System::baseUrl())),
'$form_security_token' => get_form_security_token("admin_site")
));
if (($a->argc > 2) && (intval($a->argv[2]) || ($a->argv[2] === 'check'))) {
$retval = DBStructure::update(false, true);
- if (!$retval) {
- $o .= sprintf(t("Database structure update %s was successfully applied."), DB_UPDATE_VERSION) . "<br />";
+ if ($retval === '') {
+ $o .= t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "<br />";
Config::set('database', 'dbupdate_' . DB_UPDATE_VERSION, 'success');
} else {
- $o .= sprintf(t("Executing of database structure update %s failed with error: %s"), DB_UPDATE_VERSION, $retval) . "<br />";
+ $o .= t("Executing of database structure update %s failed with error: %s", DB_UPDATE_VERSION, $retval) . "<br />";
}
if ($a->argv[2] === 'check') {
return $o;
if (function_exists($func)) {
$retval = $func();
if ($retval === UPDATE_FAILED) {
- $o .= sprintf(t("Executing %s failed with error: %s"), $func, $retval);
+ $o .= t("Executing %s failed with error: %s", $func, $retval);
} elseif ($retval === UPDATE_SUCCESS) {
- $o .= sprintf(t('Update %s was successfully applied.', $func));
+ $o .= t('Update %s was successfully applied.', $func);
Config::set('database', $func, 'success');
} else {
- $o .= sprintf(t('Update %s did not return a status. Unknown if it succeeded.'), $func);
+ $o .= t('Update %s did not return a status. Unknown if it succeeded.', $func);
}
} else {
- $o .= sprintf(t('There was no additional update function %s that needed to be called.'), $func) . "<br />";
+ $o .= t('There was no additional update function %s that needed to be called.', $func) . "<br />";
Config::set('database', $func, 'success');
}
return $o;
*/
function admin_page_users_post(App $a)
{
- $pending = (x($_POST, 'pending') ? $_POST['pending'] : array());
- $users = (x($_POST, 'user') ? $_POST['user'] : array());
- $nu_name = (x($_POST, 'new_user_name') ? $_POST['new_user_name'] : '');
- $nu_nickname = (x($_POST, 'new_user_nickname') ? $_POST['new_user_nickname'] : '');
- $nu_email = (x($_POST, 'new_user_email') ? $_POST['new_user_email'] : '');
+ $pending = defaults($_POST, 'pending' , array());
+ $users = defaults($_POST, 'user' , array());
+ $nu_name = defaults($_POST, 'new_user_name' , '');
+ $nu_nickname = defaults($_POST, 'new_user_nickname', '');
+ $nu_email = defaults($_POST, 'new_user_email' , '');
$nu_language = Config::get('system', 'language');
check_form_security_token_redirectOnErr('/admin/users', 'admin_users');
notification(array(
'type' => SYSTEM_EMAIL,
'to_email' => $user['email'],
- 'subject' => sprintf(t('Registration details for %s'), $a->config['sitename']),
+ 'subject' => t('Registration details for %s', $a->config['sitename']),
'preamble' => $preamble,
'body' => $body));
}
q("UPDATE `user` SET `blocked` = 1-`blocked` WHERE `uid` = %s", intval($uid)
);
}
- notice(sprintf(tt("%s user blocked/unblocked", "%s users blocked/unblocked", count($users)), count($users)));
+ notice(tt("%s user blocked/unblocked", "%s users blocked/unblocked", count($users)));
}
if (x($_POST, 'page_users_delete')) {
foreach ($users as $uid) {
User::remove($uid);
}
- notice(sprintf(tt("%s user deleted", "%s users deleted", count($users)), count($users)));
+ notice(tt("%s user deleted", "%s users deleted", count($users)));
}
if (x($_POST, 'page_users_approve')) {
- require_once("mod/regmod.php");
+ require_once "mod/regmod.php";
foreach ($pending as $hash) {
user_allow($hash);
}
}
if (x($_POST, 'page_users_deny')) {
- require_once("mod/regmod.php");
+ require_once "mod/regmod.php";
foreach ($pending as $hash) {
user_deny($hash);
}
{
if ($a->argc > 2) {
$uid = $a->argv[3];
- $user = q("SELECT `username`, `blocked` FROM `user` WHERE `uid` = %d", intval($uid));
- if (count($user) == 0) {
+ $user = dba::selectOne('user', ['username', 'blocked'], ['uid' => $uid]);
+ if (DBM::is_result($user)) {
notice('User not found' . EOL);
goaway('admin/users');
return ''; // NOTREACHED
// delete user
User::remove($uid);
- notice(sprintf(t("User '%s' deleted"), $user[0]['username']) . EOL);
+ notice(t("User '%s' deleted", $user['username']) . EOL);
break;
case "block":
check_form_security_token_redirectOnErr('/admin/users', 'admin_users', 't');
- q("UPDATE `user` SET `blocked` = %d WHERE `uid` = %s", intval(1 - $user[0]['blocked']), intval($uid)
+ q("UPDATE `user` SET `blocked` = %d WHERE `uid` = %s",
+ intval(1 - $user['blocked']),
+ intval($uid)
);
- notice(sprintf(($user[0]['blocked'] ? t("User '%s' unblocked") : t("User '%s' blocked")), $user[0]['username']) . EOL);
+ notice(sprintf(($user['blocked'] ? t("User '%s' unblocked") : t("User '%s' blocked")), $user['username']) . EOL);
break;
}
goaway('admin/users');
if (in_array($new_order, $valid_orders)) {
$order = $new_order;
}
- if (x($_GET, 'd')) {
- $new_direction = $_GET['d'];
- }
}
$sql_order = "`" . str_replace('.', '`.`', $order) . "`";
$sql_order_direction = ($order_direction === "+") ? "ASC" : "DESC";
if ($idx !== false) {
unset($a->plugins[$idx]);
uninstall_plugin($plugin);
- info(sprintf(t("Plugin %s disabled."), $plugin));
+ info(t("Plugin %s disabled.", $plugin));
} else {
$a->plugins[] = $plugin;
install_plugin($plugin);
- info(sprintf(t("Plugin %s enabled."), $plugin));
+ info(t("Plugin %s enabled.", $plugin));
}
Config::set("system", "addon", implode(", ", $a->plugins));
goaway('admin/plugins');
}
// display plugin details
- require_once('library/markdown.php');
-
if (in_array($plugin, $a->plugins)) {
$status = "on";
$action = t("Disable");
$readme = Null;
if (is_file("addon/$plugin/README.md")) {
+ require_once 'library/markdown.php';
$readme = file_get_contents("addon/$plugin/README.md");
$readme = Markdown($readme, false);
} elseif (is_file("addon/$plugin/README")) {
}
$admin_form = "";
- if (is_array($a->plugins_admin) && in_array($plugin, $a->plugins_admin)) {
+ if (in_array($plugin, $a->plugins_admin)) {
@require_once("addon/$plugin/$plugin.php");
$func = $plugin . '_plugin_admin';
$func($a, $admin_form);
$plugins = array();
$files = glob("addon/*/");
- if ($files) {
+ if (is_array($files)) {
foreach ($files as $file) {
if (is_dir($file)) {
list($tmp, $id) = array_map("trim", explode("/", $file));
'$function' => 'plugins',
'$plugins' => $plugins,
'$pcount' => count($plugins),
- '$noplugshint' => sprintf(t('There are currently no plugins available on your node. You can find the official plugin repository at %1$s and might find other interesting plugins in the open plugin registry at %2$s'), 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'),
+ '$noplugshint' => t('There are currently no plugins available on your node. You can find the official plugin repository at %1$s and might find other interesting plugins in the open plugin registry at %2$s', 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'),
'$form_security_token' => get_form_security_token("admin_themes"),
));
}
*/
function toggle_theme(&$themes, $th, &$result)
{
- for ($x = 0; $x < count($themes); $x ++) {
+ $count = count($themes);
+ for ($x = 0; $x < $count; $x ++) {
if ($themes[$x]['name'] === $th) {
if ($themes[$x]['allowed']) {
$themes[$x]['allowed'] = 0;
*/
function theme_status($themes, $th)
{
- for ($x = 0; $x < count($themes); $x ++) {
+ $count = count($themes);
+ for ($x = 0; $x < $count; $x ++) {
if ($themes[$x]['name'] === $th) {
if ($themes[$x]['allowed']) {
return 1;
$themes = array();
$files = glob('view/theme/*');
- if ($files) {
+ if (is_array($files)) {
foreach ($files as $file) {
$f = basename($file);
}
// display theme details
- require_once 'library/markdown.php';
-
if (theme_status($themes, $theme)) {
$status = "on";
$action = t("Disable");
$action = t("Enable");
}
- $readme = Null;
+ $readme = null;
if (is_file("view/theme/$theme/README.md")) {
+ require_once 'library/markdown.php';
$readme = file_get_contents("view/theme/$theme/README.md");
$readme = Markdown($readme, false);
} elseif (is_file("view/theme/$theme/README")) {
$readme = "<pre>" . file_get_contents("view/theme/$theme/README") . "</pre>";
}
- $admin_form = "";
+ $admin_form = '';
if (is_file("view/theme/$theme/config.php")) {
+ $orig_theme = $a->theme;
+ $orig_page = $a->page;
+ $orig_session_theme = $_SESSION['theme'];
+ require_once "view/theme/$theme/theme.php";
+ require_once "view/theme/$theme/config.php";
+ $_SESSION['theme'] = $theme;
+
+ $init = $theme . "_init";
+ if (function_exists($init)) {
+ $init($a);
+ }
- function __get_theme_admin_form(App $a, $theme)
- {
- $orig_theme = $a->theme;
- $orig_page = $a->page;
- $orig_session_theme = $_SESSION['theme'];
- require_once("view/theme/$theme/theme.php");
- require_once("view/theme/$theme/config.php");
- $_SESSION['theme'] = $theme;
-
-
- $init = $theme . "_init";
- if (function_exists($init)) {
- $init($a);
- }
- if (function_exists("theme_admin")) {
- $admin_form = theme_admin($a);
- }
-
- $_SESSION['theme'] = $orig_session_theme;
- $a->theme = $orig_theme;
- $a->page = $orig_page;
- return $admin_form;
+ if (function_exists('theme_admin')) {
+ $admin_form = theme_admin($a);
}
- $admin_form = __get_theme_admin_form($a, $theme);
+
+ $_SESSION['theme'] = $orig_session_theme;
+ $a->theme = $orig_theme;
+ $a->page = $orig_page;
}
$screenshot = array(get_theme_screenshot($theme), t('Screenshot'));
// reload active themes
if (x($_GET, "a") && $_GET['a'] == "r") {
check_form_security_token_redirectOnErr(System::baseUrl() . '/admin/themes', 'admin_themes', 't');
- if ($themes) {
- foreach ($themes as $th) {
- if ($th['allowed']) {
- uninstall_theme($th['name']);
- install_theme($th['name']);
- }
+ foreach ($themes as $th) {
+ if ($th['allowed']) {
+ uninstall_theme($th['name']);
+ install_theme($th['name']);
}
}
info("Themes reloaded");
* List themes
*/
- $xthemes = array();
- if ($themes) {
- foreach ($themes as $th) {
- $xthemes[] = array($th['name'], (($th['allowed']) ? "on" : "off"), get_theme_info($th['name']));
- }
+ $plugins = array();
+ foreach ($themes as $th) {
+ $plugins[] = array($th['name'], (($th['allowed']) ? "on" : "off"), get_theme_info($th['name']));
}
$t = get_markup_template('admin/plugins.tpl');
'$reload' => t('Reload active themes'),
'$baseurl' => System::baseUrl(true),
'$function' => 'themes',
- '$plugins' => $xthemes,
+ '$plugins' => $plugins,
'$pcount' => count($themes),
- '$noplugshint' => sprintf(t('No themes found on the system. They should be paced in %1$s'),'<code>/view/themes</code>'),
+ '$noplugshint' => t('No themes found on the system. They should be placed in %1$s', '<code>/view/themes</code>'),
'$experimental' => t('[Experimental]'),
'$unsupported' => t('[Unsupported]'),
'$form_security_token' => get_form_security_token("admin_themes"),
logger('postvars: ' . print_r($_POST, true), LOGGER_DATA);
- $arr = array();
$features = Feature::get(false);
foreach ($features as $fname => $fdata) {
$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')))
+ array('featurelock_' . $f[0], t('Lock feature %s', $f[1]), (($f[4] !== false) ? "1" : ''), '', array(t('Off'), t('On')))
);
}
}
$tpl = get_markup_template('admin/settings_features.tpl');
- $o .= replace_macros($tpl, array(
+ $o = replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("admin_manage_features"),
'$title' => t('Manage Additional Features'),
'$features' => $arr,