Commit 27a3cc53 authored by jcnventura's avatar jcnventura

Coder fixes

parent 75c6fc4c
......@@ -567,7 +567,7 @@ function _print_get_title($path) {
if (!empty($menu_item['title'])) {
return $menu_item['title'];
}
elseif (substr($menu_item['page_callback'], 0, 6) == 'views_') {
elseif (drupal_substr($menu_item['page_callback'], 0, 6) == 'views_') {
// It's a view, load the view to have access to the title
$view = views_get_view($menu_item['page_arguments']['0']);
return $view->get_title();
......
......@@ -56,7 +56,8 @@ function print_controller_html() {
* @param $path
* path of the original page
* @param array $query
* (optional) array of key/value pairs as used in the url() function for the query
* (optional) array of key/value pairs as used in the url() function for the
* query
* @param $cid
* comment ID of the individual comment to be rendered
* @param $format
......@@ -149,7 +150,8 @@ function _print_robots_meta_generator() {
* @param $node
* generated node with a printer-friendly node body
* @param array $query
* (optional) array of key/value pairs as used in the url() function for the query
* (optional) array of key/value pairs as used in the url() function for the
* query
* @param $message
* optional sender's message (used by the send email module)
* @param $cid
......@@ -236,7 +238,7 @@ function _print_var_generator($node, $query = NULL, $message = NULL, $cid = NULL
$logo_url = strip_tags($print_logo_url);
break;
}
$logo_url = preg_replace('!^'. base_path() .'!', '', $logo_url);
$logo_url = preg_replace('!^' . base_path() . '!', '', $logo_url);
$site_name = variable_get('site_name', 'Drupal');
$print['logo'] = $logo_url ? theme('image', array('path' => $logo_url, 'alt' => $site_name, 'attributes' => array('class' => 'print-logo', 'id' => 'logo'))) : '';
......@@ -495,7 +497,8 @@ function _print_url_list_enabled($node, $format = PRINT_HTML_FORMAT) {
* @param $nid
* node ID of the node to be rendered into a printer-friendly page
* @param array $query
* (optional) array of key/value pairs as used in the url() function for the query
* (optional) array of key/value pairs as used in the url() function for the
* query
* @param $cid
* comment ID of the individual comment to be rendered
* @param $format
......@@ -618,7 +621,8 @@ function _print_generate_node($nid, $query = NULL, $cid = NULL, $format = PRINT_
* @param $path
* path of the node to be rendered into a printer-friendly page
* @param array $query
* (optional) array of key/value pairs as used in the url() function for the query
* (optional) array of key/value pairs as used in the url() function for the
* query
* @param $format
* format of the page being generated
* @param $teaser
......@@ -687,7 +691,8 @@ function _print_generate_path($path, $query = NULL, $format = PRINT_HTML_FORMAT,
* @param $nid
* node ID of the node to be rendered into a printer-friendly page
* @param array $query
* (optional) array of key/value pairs as used in the url() function for the query
* (optional) array of key/value pairs as used in the url() function for the
* query
* @param $format
* format of the page being generated
* @param $teaser
......
<?php
/**
* @file
* Printer-friendly version Views integration
*
* @ingroup print
*/
/**
* Implements hook_views_data().
*/
......
<?php
/**
* @file
* Custom Views integration join for the page counters
*
* @ingroup print
*/
class print_join_page_counter extends views_join {
// PHP 4 doesn't call constructors of the base class automatically from a
// constructor of a derived class. It is your responsibility to propagate
......@@ -13,4 +21,3 @@ class print_join_page_counter extends views_join {
parent::build_join($select_query, $table, $view_query);
}
}
?>
......@@ -730,6 +730,7 @@ function print_mail_action_submit($from, $from_name, $to, $subject, $message, $n
$form_state['values'] = array(
'path' => 'node/' . $node->nid,
'cid' => NULL,
'query' => NULL,
'title' => $node->title,
'fld_from_addr' => $from,
'fld_from_name' => $from_name,
......
<?php
/**
* @file
* Send by email Views integration
*
* @ingroup print
*/
/**
* Implements hook_views_data().
*/
......
......@@ -430,7 +430,7 @@ function _print_pdf_wkhtmltopdf($print, $html, $filename = NULL) {
}
}
else {
drupal_set_message('Unable to generate PDF file.', 'error');
drupal_set_message(t('Unable to generate PDF file.'), 'error');
drupal_goto($meta['url']);
return NULL;
}
......
<?php
/**
* @file
* PDF Version Views integration
*
* @ingroup print
*/
/**
* Implements hook_views_data().
*/
......
......@@ -99,7 +99,7 @@ class PrintBasicTest extends DrupalWebTestCase {
$url[10] = '';
$rel_url[10] = '';
$abs_url[10] = $base_url .'/'. $this->getq;
$abs_url[10] = $base_url . '/' . $this->getq;
$size = count($url);
for ($i = 0; $i < $size; $i++) {
......
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