New from rebase
more adjustments after rebase
This commit is contained in:
parent
9622dedaeb
commit
1eb2e541f6
2 changed files with 16 additions and 4 deletions
|
@ -1054,15 +1054,23 @@ class GlobalContact
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getRandomUrl() {
|
/**
|
||||||
$r = q("SELECT `url` FROM `gcontact` WHERE `network` = '%s'
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getRandomUrl()
|
||||||
|
{
|
||||||
|
$r = q(
|
||||||
|
"SELECT `url` FROM `gcontact` WHERE `network` = '%s'
|
||||||
AND `last_contact` >= `last_failure`
|
AND `last_contact` >= `last_failure`
|
||||||
AND `updated` > UTC_TIMESTAMP - INTERVAL 1 MONTH
|
AND `updated` > UTC_TIMESTAMP - INTERVAL 1 MONTH
|
||||||
ORDER BY rand() LIMIT 1",
|
ORDER BY rand() LIMIT 1",
|
||||||
dbesc(NETWORK_DFRN));
|
dbesc(NETWORK_DFRN)
|
||||||
|
);
|
||||||
|
|
||||||
if (DBM::is_result($r))
|
if (DBM::is_result($r)) {
|
||||||
return dirname($r[0]['url']);
|
return dirname($r[0]['url']);
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,10 @@ require_once 'plugin.php';
|
||||||
*/
|
*/
|
||||||
class User
|
class User
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param object $uid user to remove
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function remove($uid)
|
public static function remove($uid)
|
||||||
{
|
{
|
||||||
if (!$uid) {
|
if (!$uid) {
|
||||||
|
|
Loading…
Reference in a new issue