*) Display login link on Status.html

See: http://www.yacy-forum.de/viewtopic.php?p=15183&highlight=#15183

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1379 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 90b940e90e
commit 83328ed712

@ -107,7 +107,13 @@ To switch online-mode, press one of the following buttons:
</table> </table>
<!-- </td></tr></table> --> <!-- </td></tr></table> -->
</p> </p>
<p>
#(showPrivateTable)#
Click <a href="Status.html?login=">here</a> to log in as administrator.
::
#(/showPrivateTable)#
#%[privateStatusTable]%# #%[privateStatusTable]%#
</p>
<p><font size="-3"><i>Last Refresh:</i> #[date]#</font></p> <p><font size="-3"><i>Last Refresh:</i> #[date]#</font></p>
#%env/templates/footer.template%# #%env/templates/footer.template%#

@ -71,6 +71,13 @@ public class Status {
final serverObjects prop = new serverObjects(); final serverObjects prop = new serverObjects();
if (post != null) { if (post != null) {
if (post.containsKey("login")) {
if (((plasmaSwitchboard) env).adminAuthenticated(header) < 2) {
prop.put("AUTHENTICATE","log-in");
} else {
prop.put("LOCATION","");
}
} else {
if (post.containsKey("pausecrawlqueue")) { if (post.containsKey("pausecrawlqueue")) {
((plasmaSwitchboard)env).pauseCrawling(); ((plasmaSwitchboard)env).pauseCrawling();
} else if (post.containsKey("continuecrawlqueue")) { } else if (post.containsKey("continuecrawlqueue")) {
@ -80,6 +87,7 @@ public class Status {
httpdByteCountOutputStream.resetCount(); httpdByteCountOutputStream.resetCount();
} }
prop.put("LOCATION",""); prop.put("LOCATION","");
}
return prop; return prop;
} }
@ -91,8 +99,10 @@ public class Status {
yacyCore.peerActions.updateMySeed(); yacyCore.peerActions.updateMySeed();
if (((plasmaSwitchboard) env).adminAuthenticated(header) >= 2) { if (((plasmaSwitchboard) env).adminAuthenticated(header) >= 2) {
prop.put("showPrivateTable",1);
prop.put("privateStatusTable", "Status_p.inc"); prop.put("privateStatusTable", "Status_p.inc");
} else { } else {
prop.put("showPrivateTable",0);
prop.put("privateStatusTable", ""); prop.put("privateStatusTable", "");
} }

Loading…
Cancel
Save