Kaydet (Commit) 7dbd88a0 authored tarafından rbuj's avatar rbuj Kaydeden (comit) Noel Grandin

mediawiki: use contains to check if a string contains a substring

Change-Id: Ic98d295bb56c5466a388930b6cea403d6307b850
Reviewed-on: https://gerrit.libreoffice.org/11298Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst add27e4e
...@@ -107,7 +107,7 @@ public class EditPageParser extends HTMLEditorKit.ParserCallback ...@@ -107,7 +107,7 @@ public class EditPageParser extends HTMLEditorKit.ParserCallback
// get the main URL from the first header-link with index.php // get the main URL from the first header-link with index.php
// the link with "action=edit" inside is preferable // the link with "action=edit" inside is preferable
if ( nIndexStart>= 0 if ( nIndexStart>= 0
&& ( m_sMainURL.length() == 0 || sName.indexOf( "action=edit" ) >= 0 ) ) && ( m_sMainURL.length() == 0 || sName.contains("action=edit") ) )
{ {
m_sMainURL = sName.substring( 0, nIndexStart ); m_sMainURL = sName.substring( 0, nIndexStart );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment