mirror of
https://github.com/friendica/friendica
synced 2025-04-27 13:10:10 +00:00
Merge remote-tracking branch 'friendica/develop' into bug/fix-diaspora-people-links
# Conflicts: # include/follow.php
This commit is contained in:
commit
e8e1f9253d
148 changed files with 12178 additions and 11976 deletions
|
@ -208,7 +208,7 @@
|
|||
dbesc(trim($user)),
|
||||
dbesc($encrypted)
|
||||
);
|
||||
if(count($r))
|
||||
if (dbm::is_result($r))
|
||||
$record = $r[0];
|
||||
}
|
||||
|
||||
|
@ -408,13 +408,13 @@
|
|||
if (is_null($user_info)) $user_info = api_get_user($a);
|
||||
$arr['$user'] = $user_info;
|
||||
$arr['$rss'] = array(
|
||||
'alternate' => $user_info['url'],
|
||||
'self' => App::get_baseurl(). "/". $a->query_string,
|
||||
'base' => App::get_baseurl(),
|
||||
'updated' => api_date(null),
|
||||
'alternate' => $user_info['url'],
|
||||
'self' => App::get_baseurl(). "/". $a->query_string,
|
||||
'base' => App::get_baseurl(),
|
||||
'updated' => api_date(null),
|
||||
'atom_updated' => datetime_convert('UTC','UTC','now',ATOM_TIME),
|
||||
'language' => $user_info['language'],
|
||||
'logo' => App::get_baseurl()."/images/friendica-32.png",
|
||||
'language' => $user_info['language'],
|
||||
'logo' => App::get_baseurl()."/images/friendica-32.png",
|
||||
);
|
||||
|
||||
return $arr;
|
||||
|
@ -1326,10 +1326,10 @@
|
|||
|
||||
if (isset($_GET["q"])) {
|
||||
$r = q("SELECT id FROM `contact` WHERE `uid` = 0 AND `name` = '%s'", dbesc($_GET["q"]));
|
||||
if (!count($r))
|
||||
if (!dbm::is_result($r))
|
||||
$r = q("SELECT `id` FROM `contact` WHERE `uid` = 0 AND `nick` = '%s'", dbesc($_GET["q"]));
|
||||
|
||||
if (count($r)) {
|
||||
if (dbm::is_result($r)) {
|
||||
$k = 0;
|
||||
foreach ($r AS $user) {
|
||||
$user_info = api_get_user($a, $user["id"], "json");
|
||||
|
@ -2755,7 +2755,7 @@
|
|||
intval(api_user())
|
||||
);
|
||||
|
||||
if(!dbm::is_result($r))
|
||||
if (!dbm::is_result($r))
|
||||
return;
|
||||
|
||||
$ids = array();
|
||||
|
@ -3174,7 +3174,7 @@
|
|||
intval(api_user())
|
||||
);
|
||||
|
||||
if ((! count($r)) || ($r[0]['network'] !== NETWORK_DFRN))
|
||||
if ((! dbm::is_result($r)) || ($r[0]['network'] !== NETWORK_DFRN))
|
||||
throw new BadRequestException("Unknown contact");
|
||||
|
||||
$cid = $r[0]['id'];
|
||||
|
@ -3526,7 +3526,7 @@
|
|||
intval($uid),
|
||||
intval($gid));
|
||||
// error message if specified gid is not in database
|
||||
if (count($r) == 0)
|
||||
if (!dbm::is_result($r))
|
||||
throw new BadRequestException("gid not available");
|
||||
}
|
||||
else
|
||||
|
@ -3581,7 +3581,7 @@
|
|||
intval($uid),
|
||||
intval($gid));
|
||||
// error message if specified gid is not in database
|
||||
if (count($r) == 0)
|
||||
if (!dbm::is_result($r))
|
||||
throw new BadRequestException('gid not available');
|
||||
|
||||
// get data of the specified group id and group name
|
||||
|
@ -3919,7 +3919,9 @@
|
|||
|
||||
$profile_url = $user_info["url"];
|
||||
// message if nothing was found
|
||||
if (count($r) == 0)
|
||||
if (!dbm::is_result($r))
|
||||
$success = array('success' => false, 'search_results' => 'problem with query');
|
||||
else if (count($r) == 0)
|
||||
$success = array('success' => false, 'search_results' => 'nothing found');
|
||||
else {
|
||||
$ret = Array();
|
||||
|
@ -3941,7 +3943,6 @@
|
|||
}
|
||||
api_register_func('api/friendica/direct_messages_search', 'api_friendica_direct_messages_search', true);
|
||||
|
||||
|
||||
/**
|
||||
* @brief return data of all the profiles a user has to the client
|
||||
*
|
||||
|
@ -3966,7 +3967,7 @@
|
|||
intval(api_user()),
|
||||
intval($profileid));
|
||||
// error message if specified gid is not in database
|
||||
if (count($r) == 0)
|
||||
if (!dbm::is_result($r))
|
||||
throw new BadRequestException("profile_id not available");
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue