Browse Source

minor - fixed some questionable code - partial CT#401

Cristian Fasanando 15 years ago
parent
commit
12a88ce8e8
2 changed files with 5 additions and 5 deletions
  1. 3 3
      main/wiki/diff.inc.php
  2. 2 2
      main/wiki/wiki.inc.php

+ 3 - 3
main/wiki/diff.inc.php

@@ -116,15 +116,15 @@
     {
         $content = array();
 
-        if ( strpos( $str, "\r\n" ) !== false )
+        if ( api_strpos( $str, "\r\n" ) !== false )
         {
             $content = explode("\r\n", $str );
         }
-        elseif ( strpos( $str, "\n" ) !== false )
+        elseif ( api_strpos( $str, "\n" ) !== false )
         {
             $content = explode( "\n", $str );
         }
-        elseif ( strpos( $str, "\r" ) !== false )
+        elseif ( api_strpos( $str, "\r" ) !== false )
         {
             $content = explode( "\r", $str );
         }

+ 2 - 2
main/wiki/wiki.inc.php

@@ -97,7 +97,7 @@ function links_to($input)
 		if ($input_array[$key-1]=='[[' AND $input_array[$key+1]==']]')
 		{
 
-		    if (strpos($value, "|") != false)
+		    if (api_strpos($value, "|") !== false)
 			{
 			 	$full_link_array=explode("|", $value);
 				$link=trim($full_link_array[0]);
@@ -241,7 +241,7 @@ function make_wiki_link_clickable($input)
 		/////////
 
 			//now full wikilink
-			if (strpos($value, "|") != false)
+			if (api_strpos($value, "|") !== false)
 			 {
 			 	$full_link_array=explode("|", $value);
 				$link=trim($full_link_array[0]);