mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 05:35:12 +00:00
Merge branch 'master' of https://github.com/friendica/red
This commit is contained in:
commit
ed09513bb2
6 changed files with 12 additions and 7 deletions
|
@ -56,11 +56,10 @@ function onedirsync_run($argv, $argc){
|
|||
dbesc($r[0]['ud_addr'])
|
||||
);
|
||||
if(($h) && ($h[0]['hubloc_status'] & HUBLOC_OFFLINE)) {
|
||||
$y = q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 and ud_date < '%s' ",
|
||||
$y = q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 ",
|
||||
intval(UPDATE_FLAGS_UPDATED),
|
||||
dbesc($r[0]['ud_addr']),
|
||||
intval(UPDATE_FLAGS_UPDATED),
|
||||
dbesc($x[0]['ud_date'])
|
||||
intval(UPDATE_FLAGS_UPDATED)
|
||||
);
|
||||
|
||||
return;
|
||||
|
|
|
@ -13,6 +13,7 @@ CREATE TABLE IF NOT EXISTS `abook` (
|
|||
`abook_their_perms` int(11) NOT NULL DEFAULT '0',
|
||||
`abook_closeness` tinyint(3) unsigned NOT NULL DEFAULT '99',
|
||||
`abook_rating` int(11) NOT NULL DEFAULT '0',
|
||||
`abook_rating_text` TEXT NOT NULL DEFAULT '',
|
||||
`abook_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`abook_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`abook_connected` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
|
@ -1529,6 +1530,7 @@ CREATE TABLE IF NOT EXISTS `xlink` (
|
|||
`xlink_xchan` char(255) NOT NULL DEFAULT '',
|
||||
`xlink_link` char(255) NOT NULL DEFAULT '',
|
||||
`xlink_rating` int(11) NOT NULL DEFAULT '0',
|
||||
`xlink_rating_text` TEXT NOT NULL DEFAULT '',
|
||||
`xlink_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
PRIMARY KEY (`xlink_id`),
|
||||
KEY `xlink_xchan` (`xlink_xchan`),
|
||||
|
|
|
@ -7,6 +7,7 @@ CREATE TABLE "abook" (
|
|||
"abook_their_perms" bigint NOT NULL DEFAULT '0',
|
||||
"abook_closeness" numeric(3) NOT NULL DEFAULT '99',
|
||||
"abook_rating" bigint NOT NULL DEFAULT '0',
|
||||
"abook_rating_text" TEXT NOT NULL DEFAULT '',
|
||||
"abook_created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||
"abook_updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||
"abook_connected" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||
|
@ -1142,6 +1143,7 @@ CREATE TABLE "xlink" (
|
|||
"xlink_xchan" text NOT NULL DEFAULT '',
|
||||
"xlink_link" text NOT NULL DEFAULT '',
|
||||
"xlink_rating" bigint NOT NULL DEFAULT '0',
|
||||
"xlink_rating_text" TEXT NOT NULL DEFAULT '',
|
||||
"xlink_updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||
PRIMARY KEY ("xlink_id")
|
||||
);
|
||||
|
|
|
@ -1515,7 +1515,7 @@ function update_r1133() {
|
|||
xp_client varchar( 20 ) NOT NULL DEFAULT '',
|
||||
xp_channel bigint NOT NULL DEFAULT '0',
|
||||
xp_perm varchar( 64 ) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (\"xp_id\") ");
|
||||
PRIMARY KEY (\"xp_id\") )");
|
||||
$r2 = q("create index \"xp_client\" on xperm (\"xp_client\",
|
||||
create index \"xp_channel\" on xperm (\"xp_channel\"),
|
||||
create index \"xp_perm\" on xperm (\"xp_perm\") ");
|
||||
|
|
|
@ -355,14 +355,15 @@ function dir_parse_query($s) {
|
|||
|
||||
function list_public_sites() {
|
||||
|
||||
$rand = db_getfunc('rand');
|
||||
$realm = get_directory_realm();
|
||||
if($realm == DIRECTORY_REALM) {
|
||||
$r = q("select * from site where site_access != 0 and site_register !=0 and ( site_realm = '%s' or site_realm = '') order by rand()",
|
||||
$r = q("select * from site where site_access != 0 and site_register !=0 and ( site_realm = '%s' or site_realm = '') order by $rand",
|
||||
dbesc($realm)
|
||||
);
|
||||
}
|
||||
else {
|
||||
$r = q("select * from site where site_access != 0 and site_register !=0 and site_realm = '%s' order by rand()",
|
||||
$r = q("select * from site where site_access != 0 and site_register !=0 and site_realm = '%s' order by $rand",
|
||||
dbesc($realm)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -9,8 +9,9 @@ function sitelist_init(&$a) {
|
|||
|
||||
|
||||
$sql_order = " order by site_url ";
|
||||
$rand = db_getfunc('rand');
|
||||
if($order == 'random')
|
||||
$sql_order = " order by rand() ";
|
||||
$sql_order = " order by $rand ";
|
||||
|
||||
$sql_limit = " limit $start, $limit ";
|
||||
|
||||
|
|
Loading…
Reference in a new issue