Permalink
Browse files

More update system progress.

  • Loading branch information...
1 parent b06528b commit b685df859cb964343fce17f2d4e4efec5ba2c3cd @sharkiller committed Jul 10, 2012
View
2 pom.xml
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.sectorgamer.sharkiller</groupId>
<artifactId>milkAdmin</artifactId>
- <version>1.9-07.08</version>
+ <version>2.00-dev</version>
<name>milkAdmin</name>
<url>http://www.sectorgamer.com</url>
View
5 src/main/java/com/sectorgamer/sharkiller/milkAdmin/WebServer.java
@@ -866,12 +866,11 @@ else if( url.equals("/server/console")) {
print(readConsole(), "text/plain");
}
else if( url.startsWith("/server/properties_edit")) {
- // TODO: Change properties automatically in the server.
String property = getParam("property", param);
String value = getParam("value", param);
if(property.length() > 0 && value.length() > 0){
- BukkitProperties.setString(property, value);
- json = "ok:editedproperty";
+ BukkitProperties.setString(property, value);
+ json = "ok:editedproperty";
}else{
json = "error:badparameters";
}
View
14 src/main/java/com/sectorgamer/sharkiller/milkAdmin/objects/PluginUpdates.java
@@ -3,6 +3,7 @@
import java.net.URL;
import java.text.ParseException;
import java.text.SimpleDateFormat;
+import java.util.Date;
import org.w3c.dom.*;
import javax.xml.parsers.*;
@@ -38,18 +39,23 @@ public String getLatest(String plugin){
public String RSS2JSON(NodeList rss){
Element element = (Element)rss.item(0);
- SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
- String date;
+ SimpleDateFormat format = new SimpleDateFormat("dd MMM yyyy");//Sun, 08 Jul 2012 10:11:31 +0000
+ SimpleDateFormat format2 = new SimpleDateFormat("dd/MM/yyyy");
+ Date dateparse;
+ String date="";
try {
- date = format.parse(getElementValue(element,"pubDate")).toString();
+ format.setLenient(true);
+ date = getElementValue(element,"pubDate").substring(5,16);
+ dateparse = format.parse(date);
+ date = format2.format(dateparse);
} catch (ParseException e) {
date = "????";
}
String json = "[";
json = json + "{\"title\":\""+getElementValue(element,"title")+"\"," +
"\"link\":\""+getElementValue(element,"link")+"\"," +
- "\"pubDate\":"+date+"}";
+ "\"pubDate\":\""+date+"\"}";
json = json + "]";
return json;
View
2 src/main/resources/plugin.yml
@@ -1,7 +1,7 @@
name: milkAdmin
main: com.sectorgamer.sharkiller.milkAdmin.MilkAdmin
author: Sharkiller
-version: 1.9-07.08
+version: 2.0-dev
website: http://www.sectorgamer.com/comunidad/
description: WebAdministrator of Minecraft Servers for Bukkit.

0 comments on commit b685df8

Please sign in to comment.