summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--print.module6
-rw-r--r--print.pages.inc8
-rw-r--r--print_mail/print_mail.module2
-rw-r--r--print_pdf/print_pdf.module2
4 files changed, 9 insertions, 9 deletions
diff --git a/print.module b/print.module
index e69d522..4c7f77d 100644
--- a/print.module
+++ b/print.module
@@ -245,7 +245,7 @@ function print_block_view($delta = '') {
switch ($delta) {
case 'print-links':
$nid = preg_replace('!^node/!', '', $_GET['q']);
- if (is_numeric($nid)) {
+ if (ctype_digit($nid)) {
$node = node_load($nid);
}
else {
@@ -551,7 +551,7 @@ function _print_set_node_fields(&$node) {
function _print_get_title($path) {
$path = drupal_get_normal_path($path);
$nid = preg_replace('!^node/!', '', $path);
- if (is_numeric($nid)) {
+ if (ctype_digit($nid)) {
$res = db_query("SELECT title FROM {node} WHERE nid = :nid", array(':nid' => $nid))
->fetchField();
}
@@ -800,7 +800,7 @@ function print_link_allowed($args) {
}
if (!empty($args['path'])) {
$nid = preg_replace('!^node/!', '', drupal_get_normal_path($args['path']));
- if (is_numeric($nid)) {
+ if (ctype_digit($nid)) {
$args['node'] = node_load($nid);
}
}
diff --git a/print.pages.inc b/print.pages.inc
index 88c4942..7e11f17 100644
--- a/print.pages.inc
+++ b/print.pages.inc
@@ -74,7 +74,7 @@ function print_controller($path, $cid = NULL, $format = PRINT_HTML_FORMAT, $teas
$path = '';
}
}
- if (!is_numeric($path)) {
+ if (!ctype_digit($path)) {
// Indirect call with print/alias
// If there is a path alias with these arguments, generate a printer-friendly version for it
$path = drupal_get_normal_path($path);
@@ -84,7 +84,7 @@ function print_controller($path, $cid = NULL, $format = PRINT_HTML_FORMAT, $teas
}
}
$parts = explode('/', $path);
- if (is_numeric($parts[0]) && (count($parts) == 1)) {
+ if (ctype_digit($parts[0]) && (count($parts) == 1)) {
$print = _print_generate_node($path, $cid, $format, $teaser, $message);
}
else {
@@ -345,7 +345,7 @@ function _print_rewrite_urls($matches) {
$path = explode('/', $_GET['q']);
unset($path[0]);
$path = implode('/', $path);
- if (is_numeric($path)) {
+ if (ctype_digit($path)) {
$path = "node/$path";
}
// Printer-friendly URLs is on, so we need to make it absolute
@@ -585,7 +585,7 @@ function _print_generate_path($path, $format = PRINT_HTML_FORMAT, $teaser = FALS
// Handle node tabs
$parts = explode('/', $path);
- if (is_numeric($parts[0]) && (count($parts) > 1)) {
+ if (ctype_digit($parts[0]) && (count($parts) > 1)) {
$path = 'node/' . $path;
}
diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module
index f641c68..bf1fca5 100644
--- a/print_mail/print_mail.module
+++ b/print_mail/print_mail.module
@@ -485,7 +485,7 @@ function print_mail_link_allowed($args) {
}
if (!empty($args['path'])) {
$nid = preg_replace('!^node/!', '', drupal_get_normal_path($args['path']));
- if (is_numeric($nid)) {
+ if (ctype_digit($nid)) {
$args['node'] = node_load($nid);
}
}
diff --git a/print_pdf/print_pdf.module b/print_pdf/print_pdf.module
index f60e0cd..46cee93 100644
--- a/print_pdf/print_pdf.module
+++ b/print_pdf/print_pdf.module
@@ -544,7 +544,7 @@ function print_pdf_link_allowed($args) {
}
if (!empty($args['path'])) {
$nid = preg_replace('!^node/!', '', drupal_get_normal_path($args['path']));
- if (is_numeric($nid)) {
+ if (ctype_digit($nid)) {
$args['node'] = node_load($nid);
}
}