Fix formatting all around
This commit is contained in:
parent
669c7dea59
commit
fe89e7760e
7 changed files with 29 additions and 25 deletions
|
@ -5,36 +5,38 @@ use Friendica\Database\DBM;
|
|||
|
||||
require_once('include/group.php');
|
||||
|
||||
function contactgroup_content(App $a) {
|
||||
if (! local_user()) {
|
||||
function contactgroup_content(App $a)
|
||||
{
|
||||
if (!local_user()) {
|
||||
killme();
|
||||
}
|
||||
|
||||
if(($a->argc > 2) && intval($a->argv[1]) && intval($a->argv[2])) {
|
||||
if (($a->argc > 2) && intval($a->argv[1]) && intval($a->argv[2])) {
|
||||
$r = q("SELECT `id` FROM `contact` WHERE `id` = %d AND `uid` = %d and `self` = 0 and `blocked` = 0 AND `pending` = 0 LIMIT 1",
|
||||
intval($a->argv[2]),
|
||||
intval(local_user())
|
||||
);
|
||||
if (DBM::is_result($r))
|
||||
if (DBM::is_result($r)) {
|
||||
$change = intval($a->argv[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if(($a->argc > 1) && (intval($a->argv[1]))) {
|
||||
|
||||
if (($a->argc > 1) && (intval($a->argv[1]))) {
|
||||
$r = q("SELECT * FROM `group` WHERE `id` = %d AND `uid` = %d AND `deleted` = 0 LIMIT 1",
|
||||
intval($a->argv[1]),
|
||||
intval(local_user())
|
||||
);
|
||||
if (! DBM::is_result($r)) {
|
||||
if (!DBM::is_result($r)) {
|
||||
killme();
|
||||
}
|
||||
|
||||
$group = $r[0];
|
||||
$members = group_get_members($group['id']);
|
||||
$preselected = array();
|
||||
if(count($members)) {
|
||||
foreach($members as $member)
|
||||
if (count($members)) {
|
||||
foreach ($members as $member) {
|
||||
$preselected[] = $member['id'];
|
||||
}
|
||||
}
|
||||
|
||||
if($change) {
|
||||
|
|
|
@ -508,7 +508,6 @@ function dfrn_confirm_post(App $a, $handsfree = null) {
|
|||
|
||||
// Let's send our user to the contact editor in case they want to
|
||||
// do anything special with this new friend.
|
||||
|
||||
if ($handsfree === null) {
|
||||
goaway(System::baseUrl() . '/contacts/' . intval($contact_id));
|
||||
} else {
|
||||
|
|
|
@ -194,8 +194,9 @@ function dfrn_request_post(App $a) {
|
|||
if(intval($def_gid))
|
||||
group_add_member(local_user(), '', $r[0]['id'], $def_gid);
|
||||
|
||||
if (isset($photo))
|
||||
if (isset($photo)) {
|
||||
Contact::updateAvatar($photo, local_user(), $r[0]["id"], true);
|
||||
}
|
||||
|
||||
$forwardurl = System::baseUrl()."/contacts/".$r[0]['id'];
|
||||
} else {
|
||||
|
|
|
@ -5,19 +5,18 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
require_once("mod/display.php");
|
||||
require_once("include/group.php");
|
||||
require_once "mod/display.php";
|
||||
|
||||
function update_display_content(App $a) {
|
||||
|
||||
function update_display_content(App $a)
|
||||
{
|
||||
$profile_uid = intval($_GET["p"]);
|
||||
|
||||
header("Content-type: text/html");
|
||||
echo "<!DOCTYPE html><html><body>\r\n";
|
||||
echo "<section>";
|
||||
|
||||
|
||||
$text = display_content($a,$profile_uid);
|
||||
$text = display_content($a, $profile_uid);
|
||||
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
|
||||
$replace = "<img\${1} dst=\"\${2}\"";
|
||||
$text = preg_replace($pattern, $replace, $text);
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
require_once("mod/network.php");
|
||||
require_once("include/group.php");
|
||||
require_once "mod/network.php";
|
||||
|
||||
function update_network_content(App $a) {
|
||||
|
||||
function update_network_content(App $a)
|
||||
{
|
||||
$profile_uid = intval($_GET["p"]);
|
||||
|
||||
header("Content-type: text/html");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue