dirsearch and pubsites - force non-SSL sites to float to the bottom of the list
This commit is contained in:
parent
cad483e80b
commit
bf709d49ba
@ -227,6 +227,8 @@ function list_public_sites() {
|
|||||||
if($r) {
|
if($r) {
|
||||||
$ret['success'] = true;
|
$ret['success'] = true;
|
||||||
$ret['sites'] = array();
|
$ret['sites'] = array();
|
||||||
|
$insecure = array();
|
||||||
|
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
|
|
||||||
if($rr['site_access'] == ACCESS_FREE)
|
if($rr['site_access'] == ACCESS_FREE)
|
||||||
@ -245,7 +247,13 @@ function list_public_sites() {
|
|||||||
else
|
else
|
||||||
$register = 'closed';
|
$register = 'closed';
|
||||||
|
|
||||||
|
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']);
|
$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;
|
return $ret;
|
||||||
|
@ -22,7 +22,7 @@ function pubsites_content(&$a) {
|
|||||||
$o .= '<h1>' . t('Public Sites') . '</h1>';
|
$o .= '<h1>' . t('Public Sites') . '</h1>';
|
||||||
|
|
||||||
$o .= '<div class="descriptive-text">' .
|
$o .= '<div class="descriptive-text">' .
|
||||||
t('The listed sites allow public registration into the Red Matrix. All sites in the matrix are interlinked so membership on any of them conveys membership in the matrix as a whole. Some sites may require subscription or provide tiered service plans. The provider links may provide additional details.') . '</div>' . EOL;
|
t('The listed sites allow public registration into the Red Matrix. All sites in the matrix are interlinked so membership on any of them conveys membership in the matrix as a whole. Some sites may require subscription or provide tiered service plans. The provider links <strong>may</strong> provide additional details.') . '</div>' . EOL;
|
||||||
|
|
||||||
$ret = z_fetch_url($url);
|
$ret = z_fetch_url($url);
|
||||||
if($ret['success']) {
|
if($ret['success']) {
|
||||||
|
Reference in New Issue
Block a user