*) Trying to solve Seed-Upload-Configuration - "Error with submitted information. Nothing changed." Bug:

see: http://www.yacy-forum.de/viewtopic.php?p=3233

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@157 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 20 years ago
parent 0484c41a84
commit b625aa91fd

@ -52,11 +52,11 @@ You are now permanently <b>online</b>. After a short while you should see the ef
<b>Transparent Proxy Support is: <font color="#556699">#[isTransparentProxy]#</font></b><p>
<u>if you changed the Port, you need to restart the Proxy.</u>
::
<b>Seed Settings changed. You are now a principal peer.</b><br>
<b>Seed Settings changed.#(success)#::You are now a principal peer.#(/success)#</b><br>
::
<b>Seed Settings changed, but something is wrong.<b>
<p><b>Seed Settings changed, but something is wrong.</b></p>
Seed Uploading was deactivated automatically.
Please return to the settings page and modify the data.</b><br>
Please return to the settings page and modify the data.<br>
::
<b>The remote-proxy setting has been changed</b><br>
The new setting is effective immediately, you don't need to re-start.
@ -68,7 +68,7 @@ The settings have not been changed.
Peer names must not contain characters other than (a-z, A-Z, 0-9, '-', '_') and must not be longer than 80 characters.
The settings have not been changed.
::
The new parser settings where changed successfully.<p>
The new parser settings where changed successfully.<br>
Parsing of the following mime-types was enabled:<br>
<ul>
#{parser}#
@ -76,7 +76,9 @@ Parsing of the following mime-types was enabled:<br>
#{/parser}#
</ul>
::
Seed Upload method was changed successfully.<p>
Seed Upload method was changed successfully.
#(success)#::<br>You are now a principal peer.#(/success)#
<p>
<table>
<tr><td>Seed Upload Method:</td><td><font color="#556699">#[seedUploadMethod]#</font></td></tr>
<tr><td>Seed File URL:</td><td><a href="#[seedURL]#"><font color="#556699">#[seedURL]#</font></a></td></tr>

@ -204,7 +204,8 @@ public class SettingsAck_p {
if (post.containsKey("generalsettings")) {
String port = (String) post.get("port");
String peerName = (String) post.get("peername");
httpdProxyHandler.isTransparentProxy = post.get("isTransparentProxy", "").equals("on");
httpdProxyHandler.isTransparentProxy = post.containsKey("isTransparentProxy");
// check if peer name already exists
yacySeed oldSeed = yacyCore.seedDB.lookupByName(peerName);
@ -267,11 +268,11 @@ public class SettingsAck_p {
boolean seedUrlChanged = !oldSeedURLStr.equals(newSeedURLStr);
boolean uploadMethodChanged = !oldSeedUploadMethod.equals(newSeedUploadMethod);
if (uploadMethodChanged) {
uploadMethodChanged = yacyCore.changeSeedUploadMethod((String) post.get("seedUploadMethod"));
uploadMethodChanged = yacyCore.changeSeedUploadMethod(newSeedUploadMethod);
}
if (seedUrlChanged || uploadMethodChanged) {
env.setConfig("seedUploadMethod", (String)post.get("seedUploadMethod"));
env.setConfig("seedUploadMethod", newSeedUploadMethod);
env.setConfig("seedURL", newSeedURLStr);
boolean success = yacyCore.saveSeedList(env);
@ -281,8 +282,15 @@ public class SettingsAck_p {
} else {
prop.put("info_seedUploadMethod",newSeedUploadMethod);
prop.put("info_seedURL",newSeedURLStr);
prop.put("info_success",(newSeedUploadMethod.equalsIgnoreCase("none")?0:1));
prop.put("info", 19);
}
} else {
prop.put("info_seedUploadMethod",newSeedUploadMethod);
prop.put("info_seedURL",newSeedURLStr);
prop.put("info_success",0);
prop.put("info", 19);
}
} catch (Exception e) {
prop.put("info",14);
@ -315,19 +323,26 @@ public class SettingsAck_p {
}
}
}
if ((!nothingChanged)&&(env.getConfig("seedUploadMethod","none").equals(theUploader))) {
if (!nothingChanged) {
if (env.getConfig("seedUploadMethod","none").equals(theUploader)) {
boolean success = yacyCore.saveSeedList(env);
if (!success) {
prop.put("info", 14);
env.setConfig("seedUploadMethod","none");
} else {
prop.put("info", 13);
prop.put("info_success",1);
}
} else {
prop.put("info", 13);
prop.put("info_success",0);
}
} else {
prop.put("info", 13);
prop.put("info_success",0);
}
return prop;
}
}

Loading…
Cancel
Save