Commit 7d112578 authored by jcnventura's avatar jcnventura

Replace old 'use PHP for link visibility' permission with core's 'use PHP for settings'

parent b658d760
......@@ -224,7 +224,7 @@ function print_html_settings() {
'#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
);
$access = user_access('use PHP for link visibility');
$access = user_access('use PHP for settings');
if ($form['settings']['adv_link']['print_html_node_link_visibility']['#default_value'] == 2 && !$access) {
$form['settings']['adv_link']['print_html_node_link_visibility'] = array('#type' => 'value', '#value' => 2);
......
......@@ -67,10 +67,6 @@ function print_perm() {
'title' => t('Node-specific configuration'),
'description' => t('Enable access to the per-node settings.'),
),
'use PHP for link visibility' => array(
'title' => t('Use PHP for link visibility'),
'description' => t('Enables the use of PHP code to configure the link visibility.'),
),
);
}
......
......@@ -73,7 +73,7 @@ function print_mail_settings() {
'#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
);
$access = user_access('use PHP for link visibility');
$access = user_access('use PHP for settings');
if ($form['settings']['adv_link']['print_mail_node_link_visibility']['#default_value'] == 2 && !$access) {
$form['settings']['adv_link']['print_mail_node_link_visibility'] = array('#type' => 'value', '#value' => 2);
......
......@@ -85,7 +85,7 @@ function print_pdf_settings() {
'#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
);
$access = user_access('use PHP for link visibility');
$access = user_access('use PHP for settings');
if ($form['settings']['adv_link']['print_pdf_node_link_visibility']['#default_value'] == 2 && !$access) {
$form['settings']['adv_link']['print_pdf_node_link_visibility'] = array('#type' => 'value', '#value' => 2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment