Index: ProtectSection.php
===================================================================
RCS file: /cvsroot/wikipedia/extensions/ProtectSection/ProtectSection.php,v
retrieving revision 1.1
diff -u -r1.1 ProtectSection.php
--- ProtectSection.php 10 Jan 2006 20:00:19 -0000 1.1
+++ ProtectSection.php 5 Mar 2006 14:48:59 -0000
@@ -64,8 +64,8 @@
*/
function stripProtectTags ( &$parser , &$text, &$x ) {
- $text = str_replace( '', '', $text );
- $text = str_replace( '', '', $text );
+ $text = preg_replace("//i","",$text);
+ $text = preg_replace("/<\/protect>/i","",$text);
return true;
}
@@ -86,8 +86,8 @@
$text1 = $editpage->mArticle->getContent(true);
$text2 = $textbox1 ;
- preg_match_all( "/(.*?)<\/protect>/im", $text1, $list1, PREG_SET_ORDER );
- preg_match_all( "/(.*?)<\/protect>/im", $text2, $list2, PREG_SET_ORDER );
+ preg_match_all( "/(.*?)<\/protect>/msi", $text1, $list1, PREG_SET_ORDER );
+ preg_match_all( "/(.*?)<\/protect>/msi", $text2, $list2, PREG_SET_ORDER );
if( count($list1) != count($list2)) {
$msg = wfMsg( 'add_remove_protected_section');
$modifyProtect = true;