Commit 306a9842 authored by jcnventura's avatar jcnventura

Issue #1221824: fix non-links area links.

parent 955664da
......@@ -796,7 +796,7 @@ function _print_page_match($visibility, $path, $pages) {
function print_link_allowed($args) {
$view_mode = isset($args['view_mode']) ? $args['view_mode'] : '';
if ((($view_mode == 'teaser') && !variable_get('print_html_link_teaser', PRINT_HTML_LINK_TEASER_DEFAULT))
|| !in_array($view_mode, array('full', 'teaser')) || !user_access('access print')) {
|| !in_array($view_mode, array('full', 'teaser', '')) || !user_access('access print')) {
// If the teaser link is disabled or the user is not allowed
return FALSE;
}
......
......@@ -483,7 +483,7 @@ function print_mail_insert_link($path = NULL, $node = NULL) {
function print_mail_link_allowed($args) {
$view_mode = isset($args['view_mode']) ? $args['view_mode'] : '';
if ((($view_mode == 'teaser') && !variable_get('print_mail_link_teaser', PRINT_MAIL_LINK_TEASER_DEFAULT))
|| !in_array($view_mode, array('full', 'teaser')) || !user_access('access send to friend')) {
|| !in_array($view_mode, array('full', 'teaser', '')) || !user_access('access send to friend')) {
// If the teaser link is disabled or the user is not allowed
return FALSE;
}
......
......@@ -551,7 +551,7 @@ function print_pdf_link_allowed($args) {
$view_mode = isset($args['view_mode']) ? $args['view_mode'] : '';
$print_pdf_pdf_tool = variable_get('print_pdf_pdf_tool', PRINT_PDF_PDF_TOOL_DEFAULT);
if ((($view_mode == 'teaser') && !variable_get('print_pdf_link_teaser', PRINT_PDF_LINK_TEASER_DEFAULT))
|| !in_array($view_mode, array('full', 'teaser')) || !user_access('access PDF version') || (empty($print_pdf_pdf_tool))) {
|| !in_array($view_mode, array('full', 'teaser', '')) || !user_access('access PDF version') || (empty($print_pdf_pdf_tool))) {
// If the teaser link is disabled or the user is not allowed
return FALSE;
}
......
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