added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
cf9fa51f2f
commit
5debcbb5a6
|
@ -43,7 +43,8 @@ function wk_social_relay()
|
||||||
$tags = [];
|
$tags = [];
|
||||||
|
|
||||||
if ($scope == SR_SCOPE_TAGS) {
|
if ($scope == SR_SCOPE_TAGS) {
|
||||||
$server_tags = Config::get('system', 'relay_server_tags');
|
|
||||||
|
$server_tags = get_config('system', 'relay_server_tags');
|
||||||
$tagitems = explode(",", $server_tags);
|
$tagitems = explode(",", $server_tags);
|
||||||
|
|
||||||
/// @todo Check if it was better to use "strtolower" on the tags
|
/// @todo Check if it was better to use "strtolower" on the tags
|
||||||
|
@ -52,7 +53,7 @@ function wk_social_relay()
|
||||||
$tags[$tag] = $tag;
|
$tags[$tag] = $tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config::get('system', 'relay_user_tags')) {
|
if (get_config('system', 'relay_user_tags')) {
|
||||||
$terms = q("SELECT DISTINCT(`term`) FROM `search`");
|
$terms = q("SELECT DISTINCT(`term`) FROM `search`");
|
||||||
|
|
||||||
foreach ($terms AS $term) {
|
foreach ($terms AS $term) {
|
||||||
|
|
|
@ -2162,6 +2162,7 @@ function admin_page_themes(App $a)
|
||||||
}
|
}
|
||||||
|
|
||||||
$readme = null;
|
$readme = null;
|
||||||
|
|
||||||
if (is_file("view/theme/$theme/README.md")) {
|
if (is_file("view/theme/$theme/README.md")) {
|
||||||
$readme = Markdown::convert(file_get_contents("view/theme/$theme/README.md"), false);
|
$readme = Markdown::convert(file_get_contents("view/theme/$theme/README.md"), false);
|
||||||
} elseif (is_file("view/theme/$theme/README")) {
|
} elseif (is_file("view/theme/$theme/README")) {
|
||||||
|
|
|
@ -433,6 +433,7 @@ function events_content(App $a) {
|
||||||
if (x($_REQUEST, 'location')) {$orig_event['location'] = $_REQUEST['location'];}
|
if (x($_REQUEST, 'location')) {$orig_event['location'] = $_REQUEST['location'];}
|
||||||
if (x($_REQUEST, 'start')) {$orig_event['start'] = $_REQUEST['start'];}
|
if (x($_REQUEST, 'start')) {$orig_event['start'] = $_REQUEST['start'];}
|
||||||
if (x($_REQUEST, 'finish')) {$orig_event['finish'] = $_REQUEST['finish'];}
|
if (x($_REQUEST, 'finish')) {$orig_event['finish'] = $_REQUEST['finish'];}
|
||||||
|
if (x($_REQUEST,'finish')) $orig_event['finish'] = $_REQUEST['finish'];
|
||||||
|
|
||||||
$n_checked = ((x($orig_event) && $orig_event['nofinish']) ? ' checked="checked" ' : '');
|
$n_checked = ((x($orig_event) && $orig_event['nofinish']) ? ' checked="checked" ' : '');
|
||||||
$a_checked = ((x($orig_event) && $orig_event['adjust']) ? ' checked="checked" ' : '');
|
$a_checked = ((x($orig_event) && $orig_event['adjust']) ? ' checked="checked" ' : '');
|
||||||
|
|
|
@ -43,8 +43,8 @@ function poco_init(App $a) {
|
||||||
echo json_encode($ret);
|
echo json_encode($ret);
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($a->argc > 1 && $a->argv[1] === '@global') {
|
if ($a->argc > 1 && $a->argv[1] === '@global') {
|
||||||
// List of all profiles that this server recently had data from
|
|
||||||
$global = true;
|
$global = true;
|
||||||
$update_limit = date(DateTimeFormat::MYSQL, time() - 30 * 86400);
|
$update_limit = date(DateTimeFormat::MYSQL, time() - 30 * 86400);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,11 @@ function share_init(App $a) {
|
||||||
} else {
|
} else {
|
||||||
$o = share_header($r[0]['author-name'], $r[0]['author-link'], $r[0]['author-avatar'], $r[0]['guid'], $r[0]['created'], $r[0]['plink']);
|
$o = share_header($r[0]['author-name'], $r[0]['author-link'], $r[0]['author-avatar'], $r[0]['guid'], $r[0]['created'], $r[0]['plink']);
|
||||||
|
|
||||||
if ($r[0]['title'])
|
if ($r[0]['title']) {
|
||||||
$o .= '[b]'.$r[0]['title'].'[/b]'."\n";
|
$o .= '[b]'.$r[0]['title'].'[/b]'."\n";
|
||||||
|
}
|
||||||
$o .= $r[0]['body'];
|
$o .= $r[0]['body'];
|
||||||
$o.= "[/share]";
|
$o .= "[/share]";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $o;
|
echo $o;
|
||||||
|
@ -34,17 +35,17 @@ function share_init(App $a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function share_header($author, $profile, $avatar, $guid, $posted, $link) {
|
function share_header($author, $profile, $avatar, $guid, $posted, $link) {
|
||||||
$header = "[share author='".str_replace(["'", "[", "]"], ["'", "[", "]"], $author).
|
$header = "[share author='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $author).
|
||||||
"' profile='".str_replace(["'", "[", "]"], ["'", "[", "]"], $profile).
|
"' profile='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $profile).
|
||||||
"' avatar='".str_replace(["'", "[", "]"], ["'", "[", "]"], $avatar);
|
"' avatar='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $avatar);
|
||||||
|
|
||||||
if ($guid) {
|
if ($guid) {
|
||||||
$header .= "' guid='".str_replace(["'", "[", "]"], ["'", "[", "]"], $guid);
|
$header .= "' guid='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $guid);
|
||||||
}
|
}
|
||||||
if ($posted) {
|
if ($posted) {
|
||||||
$header .= "' posted='".str_replace(["'", "[", "]"], ["'", "[", "]"], $posted);
|
$header .= "' posted='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $posted);
|
||||||
}
|
}
|
||||||
$header .= "' link='".str_replace(["'", "[", "]"], ["'", "[", "]"], $link)."']";
|
$header .= "' link='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $link)."']";
|
||||||
|
|
||||||
return $header;
|
return $header;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue