Minor fixes, including overzealous replacement of app -> App

This commit is contained in:
Hypolite Petovan 2017-04-30 08:08:05 -04:00
parent ce866ad39b
commit 70563e0324
3 changed files with 6 additions and 12 deletions

View File

@ -884,8 +884,8 @@ class dfrn {
xml::add_element($doc, $entry, "dfrn:bookmark", "true");
}
if ($item['App']) {
xml::add_element($doc, $entry, "statusnet:notice_info", "", array("local_id" => $item['id'], "source" => $item['App']));
if ($item['app']) {
xml::add_element($doc, $entry, "statusnet:notice_info", "", array("local_id" => $item['id'], "source" => $item['app']));
}
xml::add_element($doc, $entry, "dfrn:diaspora_guid", $item["guid"]);
@ -2331,7 +2331,7 @@ class dfrn {
if ($notice_info AND ($notice_info->length > 0)) {
foreach ($notice_info->item(0)->attributes AS $attributes) {
if ($attributes->name == "source") {
$item["App"] = strip_tags($attributes->textContent);
$item["app"] = strip_tags($attributes->textContent);
}
}
}

View File

@ -5,8 +5,8 @@ use Friendica\App;
function apps_content(App $a) {
$privateaddons = get_config('config', 'private_addons');
if ($privateaddons === "1") {
if ((!(local_user()))) {
info(t("You must be logged in to use addons. "));
if (! local_user()) {
info(t('You must be logged in to use addons. '));
return;
};
}
@ -17,7 +17,7 @@ function apps_content(App $a) {
notice(t('No installed applications.') . EOL);
}
$tpl = get_markup_template("apps.tpl");
$tpl = get_markup_template('apps.tpl');
return replace_macros($tpl, array(
'$title' => $title,
'$apps' => $a->apps,

View File

@ -11,7 +11,6 @@ function uexport_init(App $a) {
settings_init($a);
}
/// @TODO Change space -> tab where wanted
function uexport_content(App $a) {
if ($a->argc > 1) {
@ -151,11 +150,6 @@ function uexport_all(App $a) {
intval($x),
intval(500)
);
/* if (dbm::is_result($r)) {
foreach($r as $rr)
foreach($rr as $k => $v)
$item[][$k] = $v;
} */
$output = array('item' => $r);
echo json_encode($output) . "\n";