aboutsummaryrefslogtreecommitdiff
path: root/www/commonist/files/patch-Main.java
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-07-19 17:12:46 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-07-19 17:12:46 +0000
commit1421c610ab84e70c8012e85b9d17e095e1b282ef (patch)
treea3c7c89075c179d470707d4f89898de61d8c499b /www/commonist/files/patch-Main.java
parent8d9582086cb7b38d3bb10cce45af85398de7aaa5 (diff)
downloadports-1421c610ab84e70c8012e85b9d17e095e1b282ef.tar.gz
ports-1421c610ab84e70c8012e85b9d17e095e1b282ef.zip
Commonist is a free Java program for easy uploads of large numbers of
images to Wikimedia Commons and other Mediawiki installations. WWW: http://commons.wikimedia.org/wiki/Commons:Tools/Commonist PR: ports/124771 Submitted by: Marcin Cieslak <saper at SYSTEM.PL>
Notes
Notes: svn path=/head/; revision=217127
Diffstat (limited to 'www/commonist/files/patch-Main.java')
-rw-r--r--www/commonist/files/patch-Main.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/www/commonist/files/patch-Main.java b/www/commonist/files/patch-Main.java
new file mode 100644
index 000000000000..eff175ca3f22
--- /dev/null
+++ b/www/commonist/files/patch-Main.java
@@ -0,0 +1,38 @@
+--- src/net/psammead/commonist/Main.java.orig 2007-11-28 16:35:58.000000000 +0100
++++ src/net/psammead/commonist/Main.java 2008-06-20 00:35:52.532632590 +0200
+@@ -58,14 +58,14 @@
+ private ChangeDirectoryTask changeDirectoryTask;
+ private UploadFilesTask uploadFilesTask;
+
+- public Main(Image programIcon, String programHeading) {
++ public Main(Image programIcon, String programHeading) throws ConfigException {
+ settingsDir = new File(new File(System.getProperty("user.home")), ".commonist");
+ settingsDir.mkdirs();
+
+ // HACK: running from webstart or load from the Filesystem
+ // boolean fromWebStart = !(new File("etc/licenses.txt").exists());
+
+- File projectDir = new File(new File(System.getProperty("user.dir")), "etc");
++ File projectDir = new File("%%ETCDIR%%");
+
+ loader = new Loader(settingsDir, projectDir, "/etc/");
+
+@@ -77,8 +77,7 @@
+ try { licenses = initLicenses(); }
+ catch (IOException e) { throw new Error("cannot load licenses.txt"); }
+
+- try { mw = new MediaWiki(); }
+- catch (ConfigException e) { throw new Error("cannot instantiate MediaWiki"); }
++ mw = new MediaWiki();
+ mw.setLog(System.err);
+ mw.setupProxy();
+
+@@ -226,7 +225,7 @@
+ if (!file.getName().endsWith(".family")) continue;
+ log.info("loading family: " + file);
+ try {
+- mw.loadFamily(file.toURL());
++ mw.loadFamily(file.toURI().toURL());
+ }
+ catch (ConfigException e) {
+ log.error("could not load family from: " + file, e);