mirror of
https://github.com/friendica/friendica
synced 2024-11-17 20:23:40 +00:00
start on contact page sort order
This commit is contained in:
parent
9bd8ee1aae
commit
1270243d80
2 changed files with 21 additions and 6 deletions
6
boot.php
6
boot.php
|
@ -2,12 +2,16 @@
|
|||
|
||||
set_time_limit(0);
|
||||
|
||||
define('EOL', '<br />');
|
||||
define('EOL', "<br />\r\n");
|
||||
|
||||
define('REGISTER_CLOSED', 0);
|
||||
define('REGISTER_APPROVE', 1);
|
||||
define('REGISTER_OPEN', 2);
|
||||
|
||||
define ( 'DIRECTION_ANY', 0);
|
||||
define ( 'DIRECTION_IN', 1);
|
||||
define ( 'DIRECTION_OUT', 2);
|
||||
define ( 'DIRECTION_BOTH', 3);
|
||||
|
||||
if(! class_exists('App')) {
|
||||
class App {
|
||||
|
|
|
@ -91,14 +91,25 @@ function contacts_content(&$a) {
|
|||
'$hide_text' => ((strlen($sql_extra)) ? 'Show Blocked Connections' : 'Hide Blocked Connections')
|
||||
));
|
||||
|
||||
switch($sort_type) {
|
||||
case DIRECTION_BOTH :
|
||||
$sql_extra = " AND `dfrn-id` != '' AND `ret-id` != '' ";
|
||||
break;
|
||||
case DIRECTION_IN :
|
||||
$sql_extra = " AND `dfrn-id` != '' AND `ret-id` = '' ";
|
||||
break;
|
||||
case DIRECTION_OUT :
|
||||
$sql_extra = " AND `dfrn-id` = '' AND `ret-id` != '' ";
|
||||
break;
|
||||
case DIRECTION_ANY :
|
||||
default:
|
||||
$sql_extra = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$r = q("SELECT * FROM `contact` WHERE `uid` = %d",
|
||||
$r = q("SELECT * FROM `contact` WHERE `uid` = %d $sql_extra",
|
||||
intval($_SESSION['uid']));
|
||||
|
||||
define ( 'DIRECTION_IN', 0);
|
||||
define ( 'DIRECTION_OUT', 1);
|
||||
define ( 'DIRECTION_BOTH', 2);
|
||||
|
||||
if(count($r)) {
|
||||
|
||||
$tpl = file_get_contents("view/contact_template.tpl");
|
||||
|
|
Loading…
Reference in a new issue