Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding phpSapi to Wiki.java

  • Loading branch information...
commit 56d350e0f8621c481b64ee48fca0ccef90341fae 1 parent ad05c94
Tom Morris authored
7 src/org/tommorris/jmediawiki/Wiki.java
View
@@ -37,6 +37,7 @@
private String version;
private String gitHash;
private String phpVersion;
+ private String phpSapi;
private ArrayList<Namespace> namespaces;
private boolean loadedSiteInfo = false;
@@ -51,6 +52,7 @@ private void loadSiteInfo() throws ParsingException, IOException {
this.version = generalElement.getAttributeValue("generator");
this.gitHash = generalElement.getAttributeValue("git-hash");
this.phpVersion = generalElement.getAttributeValue("phpversion");
+ this.phpSapi = generalElement.getAttributeValue("phpsapi");
// This overrides the site name with a more accurate description.
this.setName(generalElement.getAttributeValue("sitename"));
@@ -85,6 +87,11 @@ public String getPhpVersion() throws ParsingException, IOException {
return this.phpVersion;
}
+ public String getPhpSapi() throws ParsingException, IOException {
+ this.loadSiteInfo();
+ return this.phpSapi;
+ }
+
public ArrayList<Namespace> getNamespaces() throws ParsingException, IOException {
this.loadSiteInfo();
return this.namespaces;
1  src/org/tommorris/jmediawiki/test/WikiTest.java
View
@@ -38,6 +38,7 @@ public void testMetadata() {
assertNotNull(local.getVersion());
assertNotNull(local.getGitHash());
assertNotNull(local.getPhpVersion());
+ assertNotNull(local.getPhpSapi());
} catch (ParsingException e) {
e.printStackTrace();
fail("threw ParsingException");
Please sign in to comment.
Something went wrong with that request. Please try again.