diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-05-06 14:50:16 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-05-06 14:50:16 +0000 |
commit | 7a456c003812534bbec937bce192cd94355f47ba (patch) | |
tree | 3c9036a87dd5368624def4df5eb5bda70e4d2979 | |
parent | f9fef426a220079258a8d81f5debebe21318f3f3 (diff) |
INTEGRATION: CWS wikiext03 (1.25.4); FILE MERGED
2008/05/02 11:58:16 mav 1.25.4.1: #i88649# not all servers allow access the ShortURL directly
-rw-r--r-- | swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java b/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java index e5216df5fdfc..d192b9e8c07c 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java @@ -8,7 +8,7 @@ * * $RCSfile: WikiEditSettingDialog.java,v $ * - * $Revision: 1.25 $ + * $Revision: 1.26 $ * * This file is part of OpenOffice.org. * @@ -213,6 +213,7 @@ public class WikiEditSettingDialog extends WikiDialog HostConfiguration aHostConfig = new HostConfiguration(); boolean bInitHost = true; + boolean bAllowIndex = true; do { @@ -293,14 +294,24 @@ public class WikiEditSettingDialog extends WikiDialog } else if ( sRedirectURL == null || sRedirectURL.length() == 0 ) { - // URL invalid - // show error - Helper.ShowError( m_xContext, - m_xDialog, - Helper.DLG_MEDIAWIKI_TITLE, - Helper.INVALIDURL_ERROR, - null, - false ); + if ( sURL.length() > 0 && !sURL.endsWith( "index.php" ) && bAllowIndex ) + { + // the used MainURL is not alwais directly accessible + // add the suffix as workaround, but only once + sRedirectURL = sURL + "/index.php"; + bAllowIndex = false; + } + else + { + // URL invalid + // show error + Helper.ShowError( m_xContext, + m_xDialog, + Helper.DLG_MEDIAWIKI_TITLE, + Helper.INVALIDURL_ERROR, + null, + false ); + } } } else |