From 50b92e53779700aaba7e78b4e7ac64ea7ef00945 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Sat, 22 Jan 2011 13:45:18 +0000 Subject: [PATCH] Donate links (for apps that have them) into the index, and on the web site --- metadata.py | 2 +- update.py | 2 ++ wp-fdroid/wp-fdroid.php | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/metadata.py b/metadata.py index acc4a162..2d3d3cf4 100644 --- a/metadata.py +++ b/metadata.py @@ -34,7 +34,7 @@ def read_metadata(): thisinfo['web'] = '' thisinfo['source'] = '' thisinfo['tracker'] = '' - thisinfo['donate'] = '' + thisinfo['donate'] = None thisinfo['disabled'] = None thisinfo['antifeatures'] = None thisinfo['marketversion'] = '' diff --git a/update.py b/update.py index a2fb8c23..58825815 100644 --- a/update.py +++ b/update.py @@ -255,6 +255,8 @@ for app in apps: addElement('web', app['web'], doc, apel) addElement('source', app['source'], doc, apel) addElement('tracker', app['tracker'], doc, apel) + if app['donate'] != None: + addElement('donate', app['donate'], doc, apel) addElement('marketversion', app['marketversion'], doc, apel) addElement('marketvercode', app['marketvercode'], doc, apel) if not (app['antifeatures'] is None): diff --git a/wp-fdroid/wp-fdroid.php b/wp-fdroid/wp-fdroid.php index 7cb186ee..d6c556f3 100644 --- a/wp-fdroid/wp-fdroid.php +++ b/wp-fdroid/wp-fdroid.php @@ -18,7 +18,7 @@ class FDroid // Our text domain, for internationalisation var $textdom='wp-fdroid'; - var $site_path = "/var/www/fdroid"; + var $site_path = "/home/fdroid/public_html"; // Constructor function FDroid() { @@ -127,6 +127,9 @@ class FDroid case "tracker": $issues=$el; break; + case "donate": + $donate=$el; + break; case "web": $web=$el; break; @@ -179,6 +182,8 @@ class FDroid $out.='Issue Tracker: '.$issues.'
'; if(strlen($source)>0) $out.='Source Code: '.$source.'
'; + if($donate && strlen($donate)>0) + $out.='Donate: '.$donate.'
'; $out.="

"; $out.="

Packages

";