mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Merge commit 'refs/merge-requests/1' of git://gitorious.org/f-droid/fdroidserver into integration
This commit is contained in:
commit
88be9b9fc4
@ -18,6 +18,8 @@ class FDroid
|
|||||||
// Our text domain, for internationalisation
|
// Our text domain, for internationalisation
|
||||||
var $textdom='wp-fdroid';
|
var $textdom='wp-fdroid';
|
||||||
|
|
||||||
|
var $site_path = "/var/www/fdroid";
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
function FDroid() {
|
function FDroid() {
|
||||||
// Add filters etc here!
|
// Add filters etc here!
|
||||||
@ -96,7 +98,7 @@ class FDroid
|
|||||||
|
|
||||||
function get_app($id) {
|
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) {
|
foreach($xml->children() as $app) {
|
||||||
|
|
||||||
$attrs=$app->attributes();
|
$attrs=$app->attributes();
|
||||||
@ -170,13 +172,13 @@ class FDroid
|
|||||||
|
|
||||||
$out.="<p><b>License:</b> ".$license."</p>";
|
$out.="<p><b>License:</b> ".$license."</p>";
|
||||||
|
|
||||||
$out.="<p><b>Links:</b> ";
|
$out.="<p>";
|
||||||
if(strlen($web)>0)
|
if(strlen($web)>0)
|
||||||
$out.='<a href="'.$web.'">Website</a> ';
|
$out.='<b>Website:</b> <a href="'.$web.'">'.$web.'</a><br />';
|
||||||
if(strlen($issues)>0)
|
if(strlen($issues)>0)
|
||||||
$out.='<a href="'.$issues.'">Issue Tracker</a> ';
|
$out.='<b>Issue Tracker:</b> <a href="'.$issues.'">'.$issues.'</a><br />';
|
||||||
if(strlen($source)>0)
|
if(strlen($source)>0)
|
||||||
$out.='<a href="'.$source.'">Source Code</a>';
|
$out.='<b>Source Code:</b> <a href="'.$source.'">'.$source.'</a><br />';
|
||||||
$out.="</p>";
|
$out.="</p>";
|
||||||
|
|
||||||
$out.="<h3>Packages</h3>";
|
$out.="<h3>Packages</h3>";
|
||||||
@ -204,14 +206,15 @@ class FDroid
|
|||||||
$out="<p>Applications matching ".$filter;
|
$out="<p>Applications matching ".$filter;
|
||||||
$out.="</p>";
|
$out.="</p>";
|
||||||
|
|
||||||
$perpage=10;
|
$perpage=30;
|
||||||
$skipped=0;
|
$skipped=0;
|
||||||
$got=0;
|
$got=0;
|
||||||
$total=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) {
|
foreach($xml->children() as $app) {
|
||||||
|
|
||||||
|
if($app->getName() == 'repo') continue;
|
||||||
$attrs=$app->attributes();
|
$attrs=$app->attributes();
|
||||||
$id=$attrs['id'];
|
$id=$attrs['id'];
|
||||||
foreach($app->children() as $el) {
|
foreach($app->children() as $el) {
|
||||||
@ -236,22 +239,22 @@ class FDroid
|
|||||||
$skipped++;
|
$skipped++;
|
||||||
} else if($got<$perpage) {
|
} else if($got<$perpage) {
|
||||||
|
|
||||||
$out.="<hr>";
|
$out.="<hr>\n";
|
||||||
$out.='<div id="appheader">';
|
$out.='<div id="appheader">';
|
||||||
|
|
||||||
$out.='<div style="float:left;padding-right:10px;"><img src="http://f-droid.org/repo/icons/'.$icon.'" width=48></div>';
|
$out.='<div style="float:left;padding-right:10px;"><img src="http://f-droid.org/repo/icons/'.$icon.'" style="width:48px;"></div>';
|
||||||
|
|
||||||
$out.='<div style="float:right;">';
|
$out.='<div style="float:right;">';
|
||||||
$out.='<p><a href="';
|
$out.='<p><a href="';
|
||||||
$out.=$this->makelink("fdid=".$id);
|
$out.=$this->makelink("fdid=".$id);
|
||||||
$out.='">Details...</a>';
|
$out.='">Details...</a>';
|
||||||
$out.="</p>";
|
$out.="</p>";
|
||||||
$out.="</div>";
|
$out.="</div>\n";
|
||||||
|
|
||||||
$out.='<p><span style="font-size:20px">'.$name."</span>";
|
$out.='<p><span style="font-size:20px">'.$name."</span>";
|
||||||
$out.="<br>".$summary."</p>";
|
$out.="<br>".$summary."</p>\n";
|
||||||
|
|
||||||
$out.="</div>";
|
$out.="</div>\n";
|
||||||
|
|
||||||
$got++;
|
$got++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user