summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/comment/comment.module2
-rw-r--r--modules/filter/filter.admin.inc4
-rw-r--r--modules/node/node.module4
-rw-r--r--modules/system/system.api.php2
4 files changed, 6 insertions, 6 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 313b163b7..13e272ecd 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2221,7 +2221,7 @@ function comment_unpublish_by_keyword_action_submit($form, $form_state) {
*/
function comment_unpublish_by_keyword_action($comment, $context) {
foreach ($context['keywords'] as $keyword) {
- if (strstr($comment->comment, $keyword) || strstr($comment->subject, $keyword)) {
+ if (strpos($comment->comment, $keyword) !== FALSE || strpos($comment->subject, $keyword) !== FALSE) {
db_update('comment')
->fields(array('status' => COMMENT_NOT_PUBLISHED,))
->condition('cid', $comment->cid)
diff --git a/modules/filter/filter.admin.inc b/modules/filter/filter.admin.inc
index 337609b2b..246c1d787 100644
--- a/modules/filter/filter.admin.inc
+++ b/modules/filter/filter.admin.inc
@@ -24,7 +24,7 @@ function filter_admin_overview() {
$roles = array();
foreach (user_roles() as $rid => $name) {
// Prepare a roles array with roles that may access the filter.
- if (strstr($format->roles, ",$rid,")) {
+ if (strpos($format->roles, ",$rid,") !== FALSE) {
$roles[] = $name;
}
}
@@ -132,7 +132,7 @@ function filter_admin_format_form(&$form_state, $format) {
);
foreach (user_roles() as $rid => $name) {
- $checked = strstr($format->roles, ",$rid,");
+ $checked = strpos($format->roles, ",$rid,") !== FALSE;
$form['roles'][$rid] = array('#type' => 'checkbox',
'#title' => $name,
'#default_value' => ($default || $checked),
diff --git a/modules/node/node.module b/modules/node/node.module
index 468819e43..9cb3589fb 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2011,7 +2011,7 @@ function node_feed($nids = FALSE, $channel = array()) {
$item->body = $content;
unset($item->teaser);
}
-
+
// Allow modules to modify the fully-built node.
node_invoke_node($item, 'alter', $teaser, FALSE);
}
@@ -3188,7 +3188,7 @@ function node_unpublish_by_keyword_action_submit($form, $form_state) {
*/
function node_unpublish_by_keyword_action($node, $context) {
foreach ($context['keywords'] as $keyword) {
- if (strstr(drupal_render(node_build(clone $node)), $keyword) || strstr($node->title, $keyword)) {
+ if (strpos(drupal_render(node_build(clone $node)), $keyword) !== FALSE || strpos($node->title, $keyword) !== FALSE) {
$node->status = 0;
watchdog('action', 'Set @type %title to unpublished.', array('@type' => node_get_types('name', $node), '%title' => $node->title));
break;
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 608879d5e..17667959f 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -462,7 +462,7 @@ function hook_link($type, $object, $teaser = FALSE) {
*/
function hook_link_alter(array &$links, $node) {
foreach ($links as $module => $link) {
- if (strstr($module, 'taxonomy_term')) {
+ if (strpos($module, 'taxonomy_term') !== FALSE) {
// Link back to the forum and not the taxonomy term page
$links[$module]['href'] = str_replace('taxonomy/term', 'forum', $link['href']);
}