Continued with code convention:
- added more curly braces - added space betweent if/foreach and brace - added spaces for beautification - converted some " to ' (mixed usage) Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
ad20c5504d
commit
d82ed5d1b4
4 changed files with 111 additions and 96 deletions
|
@ -94,19 +94,19 @@ function fbrowser_content($a){
|
|||
$tpl = get_markup_template($template_file);
|
||||
|
||||
$o = replace_macros($tpl, array(
|
||||
'$type' => 'image',
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$path' => $path,
|
||||
'$folders' => $albums,
|
||||
'$files' =>$files,
|
||||
'$cancel' => t('Cancel'),
|
||||
'$type' => 'image',
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$path' => $path,
|
||||
'$folders' => $albums,
|
||||
'$files' => $files,
|
||||
'$cancel' => t('Cancel'),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
));
|
||||
|
||||
|
||||
break;
|
||||
case "file":
|
||||
if ($a->argc==2){
|
||||
if ($a->argc==2) {
|
||||
$files = q("SELECT `id`, `filename`, `filetype` FROM `attach` WHERE `uid` = %d ",
|
||||
intval(local_user())
|
||||
);
|
||||
|
@ -116,10 +116,9 @@ function fbrowser_content($a){
|
|||
list($m1,$m2) = explode("/",$rr['filetype']);
|
||||
$filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip");
|
||||
|
||||
if($a->theme['template_engine'] === 'internal') {
|
||||
if ($a->theme['template_engine'] === 'internal') {
|
||||
$filename_e = template_escape($rr['filename']);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$filename_e = $rr['filename'];
|
||||
}
|
||||
|
||||
|
@ -130,12 +129,12 @@ function fbrowser_content($a){
|
|||
|
||||
$tpl = get_markup_template($template_file);
|
||||
$o = replace_macros($tpl, array(
|
||||
'$type' => 'file',
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$path' => array( array( "", t("Files")) ),
|
||||
'$folders' => false,
|
||||
'$files' =>$files,
|
||||
'$cancel' => t('Cancel'),
|
||||
'$type' => 'file',
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$path' => array( array( "", t("Files")) ),
|
||||
'$folders' => false,
|
||||
'$files' =>$files,
|
||||
'$cancel' => t('Cancel'),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
));
|
||||
|
||||
|
|
|
@ -21,21 +21,24 @@ function ostatus_subscribe_content(&$a) {
|
|||
|
||||
if (get_pconfig($uid, "ostatus", "legacy_friends") == "") {
|
||||
|
||||
if ($_REQUEST["url"] == "")
|
||||
if ($_REQUEST["url"] == "") {
|
||||
return $o.t("No contact provided.");
|
||||
}
|
||||
|
||||
$contact = probe_url($_REQUEST["url"]);
|
||||
|
||||
if (!$contact)
|
||||
if (!$contact) {
|
||||
return $o.t("Couldn't fetch information for contact.");
|
||||
}
|
||||
|
||||
$api = $contact["baseurl"]."/api/";
|
||||
|
||||
// Fetching friends
|
||||
$data = z_fetch_url($api."statuses/friends.json?screen_name=".$contact["nick"]);
|
||||
|
||||
if (!$data["success"])
|
||||
if (!$data["success"]) {
|
||||
return $o.t("Couldn't fetch friends for contact.");
|
||||
}
|
||||
|
||||
set_pconfig($uid, "ostatus", "legacy_friends", $data["body"]);
|
||||
}
|
||||
|
@ -61,12 +64,14 @@ function ostatus_subscribe_content(&$a) {
|
|||
$data = probe_url($url);
|
||||
if ($data["network"] == NETWORK_OSTATUS) {
|
||||
$result = new_contact($uid,$url,true);
|
||||
if ($result["success"])
|
||||
if ($result["success"]) {
|
||||
$o .= " - ".t("success");
|
||||
else
|
||||
} else {
|
||||
$o .= " - ".t("failed");
|
||||
} else
|
||||
}
|
||||
} else {
|
||||
$o .= " - ".t("ignored");
|
||||
}
|
||||
|
||||
$o .= "</p>";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue