From 4087807afe3cf1795c63d92202b82b032a4a07b1 Mon Sep 17 00:00:00 2001 From: David Sterry Date: Mon, 20 Dec 2010 16:16:56 -0800 Subject: [PATCH] create path variables --- wp-fdroid/wp-fdroid.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-fdroid/wp-fdroid.php b/wp-fdroid/wp-fdroid.php index 17d5141c..79de6eab 100644 --- a/wp-fdroid/wp-fdroid.php +++ b/wp-fdroid/wp-fdroid.php @@ -18,6 +18,9 @@ class FDroid // Our text domain, for internationalisation var $textdom='wp-fdroid'; + var $site_url = "http://localhost/fdroid"; + var $site_path = "/var/www/fdroid"; + // Constructor function FDroid() { // Add filters etc here! @@ -96,7 +99,7 @@ class FDroid function get_app($id) { - $xml = simplexml_load_file("/home/fdroid/public_html/repo/index.xml"); + $xml = simplexml_load_file($this->site_path."/repo/index.xml"); foreach($xml->children() as $app) { $attrs=$app->attributes(); @@ -209,7 +212,7 @@ class FDroid $got=0; $total=0; - $xml = simplexml_load_file("/home/fdroid/public_html/repo/index.xml"); + $xml = simplexml_load_file($this->site_path."/repo/index.xml"); foreach($xml->children() as $app) { $attrs=$app->attributes();