diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2013-11-12 02:09:32 -0800 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2013-11-12 02:09:32 -0800 |
commit | 67a101452b82782114143dc0b5bdba15adc0ba99 (patch) | |
tree | 9daee3807b370d02ee4c28e6df7db08731fbb9f1 /mod/dirsearch.php | |
parent | b23f3fc03b6bc751aab67fe2258a21f7c65bab8e (diff) | |
parent | 7cb4c2f8ad813336aafdec05e40f3a8eb1808d00 (diff) | |
download | volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.tar.gz volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.tar.bz2 volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.zip |
Merge pull request #4 from friendica/master
Fork aligned to red master
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r-- | mod/dirsearch.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php index 115bc2235..dcacef651 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -43,9 +43,10 @@ function dirsearch_content(&$a) { $kw = ((x($_REQUEST,'kw')) ? intval($_REQUEST['kw']) : 0 ); // by default use a safe search - $safe = ((x($_REQUEST,'safe')) ? intval($_REQUEST['safe']) : 1 ); - - + $safe = ((x($_REQUEST,'safe'))); // ? intval($_REQUEST['safe']) : 1 ); + if ($safe === false) + $safe = 1; + if(array_key_exists('sync',$_REQUEST)) { if($_REQUEST['sync']) $sync = datetime_convert('UTC','UTC',$_REQUEST['sync']); @@ -131,12 +132,12 @@ function dirsearch_content(&$a) { } - if($sort_order == 'date') - $order = " order by xchan_name_date desc "; + if($sort_order == 'normal') + $order = " order by xchan_name asc "; elseif($sort_order == 'reverse') $order = " order by xchan_name desc "; else - $order = " order by xchan_name asc "; + $order = " order by xchan_name_date desc "; if($sync) { @@ -181,8 +182,8 @@ function dirsearch_content(&$a) { $entry['name'] = $rr['xchan_name']; $entry['hash'] = $rr['xchan_hash']; - $entry['updated'] = (($rr['ud_date']) ? $rr['ud_date'] : '0000-00-00 00:00:00'); - $entry['update_guid'] = (($rr['ud_guid']) ? $rr['ud_guid'] : ''); +// $entry['updated'] = (($rr['ud_date']) ? $rr['ud_date'] : '0000-00-00 00:00:00'); +// $entry['update_guid'] = (($rr['ud_guid']) ? $rr['ud_guid'] : ''); $entry['url'] = $rr['xchan_url']; $entry['photo'] = $rr['xchan_photo_m']; $entry['address'] = $rr['xchan_addr']; @@ -242,7 +243,7 @@ function list_public_sites() { else $register = 'closed'; - $ret['sites'][] = array('url' => $rr['site_url'], 'access' => $access, 'register' => $register, 'sellpage' => $rr['site_sellpage']); + $ret['sites'][] = array('url' => $rr['site_url'], 'access' => $access, 'register' => $register, 'sellpage' => $rr['site_sellpage'], 'location' => $rr['site_location']); } } return $ret; |