aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirsearch.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-14 18:36:09 -0800
committerfriendica <info@friendica.com>2013-11-14 18:36:09 -0800
commitbf709d49bac7a1075736c052066e5d44d9dfe7eb (patch)
treea2bebc8158133369922d95f863139f1bc0feee53 /mod/dirsearch.php
parentcad483e80bd41dd068d820858bfe059f136d1281 (diff)
downloadvolse-hubzilla-bf709d49bac7a1075736c052066e5d44d9dfe7eb.tar.gz
volse-hubzilla-bf709d49bac7a1075736c052066e5d44d9dfe7eb.tar.bz2
volse-hubzilla-bf709d49bac7a1075736c052066e5d44d9dfe7eb.zip
dirsearch and pubsites - force non-SSL sites to float to the bottom of the list
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r--mod/dirsearch.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index 3e385a6d1..6315cae31 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -227,6 +227,8 @@ function list_public_sites() {
if($r) {
$ret['success'] = true;
$ret['sites'] = array();
+ $insecure = array();
+
foreach($r as $rr) {
if($rr['site_access'] == ACCESS_FREE)
@@ -245,7 +247,13 @@ function list_public_sites() {
else
$register = 'closed';
- $ret['sites'][] = array('url' => $rr['site_url'], 'access' => $access, 'register' => $register, 'sellpage' => $rr['site_sellpage'], 'location' => $rr['site_location']);
+ if(strpos($rr['site_url'],'https://') !== false)
+ $ret['sites'][] = array('url' => $rr['site_url'], 'access' => $access, 'register' => $register, 'sellpage' => $rr['site_sellpage'], 'location' => $rr['site_location']);
+ else
+ $insecure[] = array('url' => $rr['site_url'], 'access' => $access, 'register' => $register, 'sellpage' => $rr['site_sellpage'], 'location' => $rr['site_location']);
+ }
+ if($insecure) {
+ $ret['sites'] = array_merge($ret['sites'],$insecure);
}
}
return $ret;