Fix saving of modified content.

A bug caused text to be saved only if links were added by smart mode
algorithm, not by normal algorithm.
This commit is contained in:
Daniel Kraus
2014-06-10 13:56:40 +02:00
parent 34720765da
commit 4ca1225fd0

View File

@ -252,7 +252,7 @@
break;
};
};
$text = implode( '', $arr );
$newText = implode( '', $arr );
// If smart mode is turned on, the extension will perform a second
// pass on the page and add links with aliases where the case does
@ -297,7 +297,7 @@
};
}
$arr = preg_split( $delimiter, $text, -1, PREG_SPLIT_DELIM_CAPTURE );
$arr = preg_split( $delimiter, $newText, -1, PREG_SPLIT_DELIM_CAPTURE );
for ( $i = 0; $i < count( $arr ); $i+=2 ) {
// even indexes will point to text that is not enclosed by brackets