chiark / gitweb /
create path variables
authorDavid Sterry <david@sterryit.com>
Tue, 21 Dec 2010 00:16:56 +0000 (16:16 -0800)
committerDavid Sterry <david@sterryit.com>
Tue, 21 Dec 2010 00:16:56 +0000 (16:16 -0800)
wp-fdroid/wp-fdroid.php

index 17d5141c00c30237b5dd98111632066d72f84d78..79de6eabfdbbd4e9707693c090ee9e57585df346 100644 (file)
@@ -18,6 +18,9 @@ class FDroid
        // Our text domain, for internationalisation\r
        var $textdom='wp-fdroid';\r
 \r
+        var $site_url = "http://localhost/fdroid";\r
+        var $site_path = "/var/www/fdroid";\r
+\r
        // Constructor\r
        function FDroid() {\r
                // Add filters etc here!\r
@@ -96,7 +99,7 @@ class FDroid
 \r
        function get_app($id) {\r
 \r
-               $xml = simplexml_load_file("/home/fdroid/public_html/repo/index.xml");\r
+               $xml = simplexml_load_file($this->site_path."/repo/index.xml");\r
                foreach($xml->children() as $app) {\r
 \r
                        $attrs=$app->attributes();\r
@@ -209,7 +212,7 @@ class FDroid
                $got=0;\r
                $total=0;\r
 \r
-               $xml = simplexml_load_file("/home/fdroid/public_html/repo/index.xml");\r
+               $xml = simplexml_load_file($this->site_path."/repo/index.xml");\r
                foreach($xml->children() as $app) {\r
 \r
                        $attrs=$app->attributes();\r