diff --git a/wp-fdroid/wp-fdroid.php b/wp-fdroid/wp-fdroid.php index 2319aa25..fc18f6d3 100644 --- a/wp-fdroid/wp-fdroid.php +++ b/wp-fdroid/wp-fdroid.php @@ -144,6 +144,8 @@ class FDroid case "web": $web=$el; break; + case "antifeatures"; + $antifeatures=$el; case "package": $thisapk=array(); foreach($el->children() as $pel) { @@ -204,6 +206,15 @@ class FDroid $out.="
".$desc."
"; + if(isset($antifeatures)) { + $antifeaturesArray = explode(',',$antifeatures); + foreach($antifeaturesArray as $antifeature) { + $antifeatureDesctiption = $this->get_antifeature_description($antifeature); + $out.=''.$antifeatureDesctiption['name'].'
';
+ $out.=$antifeatureDesctiption['description'].'
License: ".$license."
"; $out.=""; @@ -390,6 +401,23 @@ class FDroid return round($size,max(0,$i-1)).' '.$si_prefix[$i]; } + private function get_antifeature_description($antifeature) { + // Anti feature names and descriptions + $antifeatureDesctiption['ads']['name'] = 'Advertising'; + $antifeatureDesctiption['ads']['description'] = 'This application contains advertising'; + $antifeatureDesctiption['tracking']['name'] = 'Tracks You'; + $antifeatureDesctiption['tracking']['description'] = 'This application tracks and reports your activity to somewhere'; + $antifeatureDesctiption['nonfreenet']['name'] = 'Non-Free Network Services'; + $antifeatureDesctiption['nonfreenet']['description'] = 'This application promotes a non-Free network service'; + $antifeatureDesctiption['nonfreeadd']['name'] = 'Non-Free Addons'; + $antifeatureDesctiption['nonfreeadd']['description'] = 'This application promotes non-Free add-ons'; + $antifeatureDesctiption['nonfreedep']['name'] = 'Non-Free Dependencies'; + $antifeatureDesctiption['nonfreedep']['description'] = 'This application depends on another non-Free application'; + + return $antifeatureDesctiption[strtolower($antifeature)]; + } + + function get_apps($query_vars) { $xml = simplexml_load_file($this->site_path."/repo/index.xml");