aboutsummaryrefslogtreecommitdiffstats
path: root/mod/siteinfo.php
diff options
context:
space:
mode:
authortuscanhobbit <tuscanhobbit@users.noreply.github.com>2014-10-01 19:26:21 +0200
committertuscanhobbit <tuscanhobbit@users.noreply.github.com>2014-10-01 19:26:21 +0200
commit9cce852ac71fcd12970e985f1f61697333849172 (patch)
treec40ce5543c412035ca03188f7bd9e565efb62117 /mod/siteinfo.php
parenta548f644d05f330a2b70c87df821bce05007c979 (diff)
parentf19d718631675d38efca1741f46bf0916af72a65 (diff)
downloadvolse-hubzilla-9cce852ac71fcd12970e985f1f61697333849172.tar.gz
volse-hubzilla-9cce852ac71fcd12970e985f1f61697333849172.tar.bz2
volse-hubzilla-9cce852ac71fcd12970e985f1f61697333849172.zip
Merge from upstream
Diffstat (limited to 'mod/siteinfo.php')
-rw-r--r--mod/siteinfo.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/mod/siteinfo.php b/mod/siteinfo.php
index bdae14edb..eab52e41e 100644
--- a/mod/siteinfo.php
+++ b/mod/siteinfo.php
@@ -4,7 +4,8 @@ function siteinfo_init(&$a) {
if ($a->argv[1]=="json"){
$register_policy = Array('REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN');
-
+ $directory_mode = Array('DIRECTORY_MODE_NORMAL', 'DIRECTORY_MODE_SECONDARY','DIRECTORY_MODE_PRIMARY', 'DIRECTORY_MODE_STANDALONE');
+
$sql_extra = '';
$r = q("select * from channel left join account on account_id = channel_account_id where ( account_roles & 4096 ) and account_default_channel = channel_id");
@@ -54,7 +55,7 @@ function siteinfo_init(&$a) {
$r = q("select count(channel_id) as channels_total from channel left join account on account_id = channel_account_id
where account_flags = 0 ");
if($r)
- $channels_total = $r[0]['channels_total'];
+ $channels_total = intval($r[0]['channels_total']);
$r = q("select channel_id from channel left join account on account_id = channel_account_id
where account_flags = 0 and account_lastlog > UTC_TIMESTAMP - INTERVAL 6 MONTH");
@@ -92,7 +93,7 @@ function siteinfo_init(&$a) {
intval(ITEM_WALL)
);
if (is_array($posts))
- $local_posts = $posts[0]["local_posts"];
+ $local_posts = intval($posts[0]["local_posts"]);
$data = Array(
'version' => RED_VERSION,
@@ -100,6 +101,7 @@ function siteinfo_init(&$a) {
'url' => z_root(),
'plugins' => $visible_plugins,
'register_policy' => $register_policy[$a->config['system']['register_policy']],
+ 'directory_mode' => $directory_mode[$a->config['system']['directory_mode']],
'diaspora_emulation' => get_config('system','diaspora_enabled'),
'rss_connections' => get_config('system','feed_contacts'),
'default_service_restrictions' => $service_class,