aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ItemObject.php2
-rw-r--r--include/cli_startup.php3
-rw-r--r--include/features.php3
-rw-r--r--include/identity.php5
-rw-r--r--include/nav.php19
-rw-r--r--include/widgets.php1
-rw-r--r--include/zot.php6
7 files changed, 25 insertions, 14 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 4bc280e73..2be7e3ac9 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -681,7 +681,7 @@ class Item extends BaseObject {
$qc = ((local_channel()) ? get_pconfig(local_channel(),'system','qcomment') : null);
$qcomment = (($qc) ? explode("\n",$qc) : null);
- $arr = array('comment_buttons' => '');
+ $arr = array('comment_buttons' => '','id' => $this->get_id());
call_hooks('comment_buttons',$arr);
$comment_buttons = $arr['comment_buttons'];
diff --git a/include/cli_startup.php b/include/cli_startup.php
index 027d62953..70ab1a24a 100644
--- a/include/cli_startup.php
+++ b/include/cli_startup.php
@@ -15,6 +15,9 @@ function cli_startup() {
if(is_null($db)) {
@include(".htconfig.php");
+ if(! defined('UNO'))
+ define('UNO', 0);
+
$a->timezone = ((x($default_timezone)) ? $default_timezone : 'UTC');
date_default_timezone_set($a->timezone);
diff --git a/include/features.php b/include/features.php
index 4d8d162fa..d6a223089 100644
--- a/include/features.php
+++ b/include/features.php
@@ -38,6 +38,9 @@ function get_feature_default($feature) {
function get_features($filtered = true) {
+ if(UNO)
+ return array();
+
$arr = array(
// General
diff --git a/include/identity.php b/include/identity.php
index 4f58d7dc5..0b9842caf 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -484,7 +484,7 @@ function identity_basic_export($channel_id, $items = false) {
// use constants here as otherwise we will have no idea if we can import from a site
// with a non-standard platform and version.
- $ret['compatibility'] = array('project' => PLATFORM_NAME, 'version' => RED_VERSION, 'database' => DB_UPDATE_VERSION);
+ $ret['compatibility'] = array('project' => PLATFORM_NAME, 'version' => RED_VERSION, 'database' => DB_UPDATE_VERSION, 'server_role' => UNO );
$r = q("select * from channel where channel_id = %d limit 1",
intval($channel_id)
@@ -928,9 +928,6 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
$block = true;
}
- if($block && intval(get_config('system','block_public_blackout')))
- return $o;
-
if((! is_array($profile)) && (! count($profile)))
return $o;
diff --git a/include/nav.php b/include/nav.php
index 1630c4731..5f630745c 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -76,7 +76,7 @@ EOT;
if(local_channel()) {
- if($chans && count($chans) > 1 && feature_enabled(local_channel(),'nav_channel_select'))
+ if($chans && count($chans) > 1 && feature_enabled(local_channel(),'nav_channel_select') && (! UNO))
$nav['channels'] = $chans;
$nav['logout'] = Array('logout',t('Logout'), "", t('End this session'),'logout_nav_btn');
@@ -84,7 +84,7 @@ EOT;
// user menu
$nav['usermenu'][] = Array('channel/' . $channel['channel_address'], t('Home'), "", t('Your posts and conversations'),'channel_nav_btn');
$nav['usermenu'][] = Array('profile/' . $channel['channel_address'], t('View Profile'), "", t('Your profile page'),'profile_nav_btn');
- if(feature_enabled(local_channel(),'multi_profiles'))
+ if(feature_enabled(local_channel(),'multi_profiles') && (! UNO))
$nav['usermenu'][] = Array('profiles', t('Edit Profiles'),"", t('Manage/Edit profiles'),'profiles_nav_btn');
else
$nav['usermenu'][] = Array('profiles/' . $prof[0]['id'], t('Edit Profile'),"", t('Edit your profile'),'profiles_nav_btn');
@@ -94,16 +94,17 @@ EOT;
require_once('include/chat.php');
$has_chats = chatroom_list_count(local_channel());
- $nav['usermenu'][] = Array('chat/' . $channel['channel_address'] . (($has_chats) ? '' : '/new'), t('Chat'),"",t('Your chatrooms'),'chat_nav_btn');
+ if(! UNO)
+ $nav['usermenu'][] = Array('chat/' . $channel['channel_address'] . (($has_chats) ? '' : '/new'), t('Chat'),"",t('Your chatrooms'),'chat_nav_btn');
require_once('include/menu.php');
$has_bookmarks = menu_list_count(local_channel(),'',MENU_BOOKMARK) + menu_list_count(local_channel(),'',MENU_SYSTEM|MENU_BOOKMARK);
- if($has_bookmarks) {
+ if(($has_bookmarks) && (! UNO)) {
$nav['usermenu'][] = Array('bookmarks', t('Bookmarks'), "", t('Your bookmarks'),'bookmarks_nav_btn');
}
- if(feature_enabled($channel['channel_id'],'webpages'))
+ if(feature_enabled($channel['channel_id'],'webpages') && (! UNO))
$nav['usermenu'][] = Array('webpages/' . $channel['channel_address'],t('Webpages'),"",t('Your webpages'),'webpages_nav_btn');
}
else {
@@ -154,7 +155,8 @@ EOT;
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'),'help_nav_btn');
- $nav['apps'] = array('apps', t('Apps'), "", t('Applications, utilities, links, games'),'apps_nav_btn');
+ if(! UNO)
+ $nav['apps'] = array('apps', t('Apps'), "", t('Applications, utilities, links, games'),'apps_nav_btn');
$nav['search'] = array('search', t('Search'), "", t('Search site @name, #tag, ?docs, content'));
@@ -196,8 +198,9 @@ EOT;
$nav['all_events'] = array('events', t('Events'), "", t('Event Calendar'),'events_nav_btn');
$nav['all_events']['all']=array('events', t('See all events'), "", "");
$nav['all_events']['mark'] = array('', t('Mark all events seen'), '','');
-
- $nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage Your Channels'),'manage_nav_btn');
+
+ if(! UNO)
+ $nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage Your Channels'),'manage_nav_btn');
$nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'),'settings_nav_btn');
diff --git a/include/widgets.php b/include/widgets.php
index 011e3a8d7..8073058c6 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -527,7 +527,6 @@ function widget_settings_menu($arr) {
'selected' => ''
);
-
if($role === false || $role === 'custom') {
$tabs[] = array(
'label' => t('Connection Default Permissions'),
diff --git a/include/zot.php b/include/zot.php
index 0210f3f4a..e9335769e 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2868,6 +2868,9 @@ function import_site($arr, $pubkey) {
*/
function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
+ if(UNO)
+ return;
+
$a = get_app();
logger('build_sync_packet');
@@ -2997,6 +3000,9 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
*/
function process_channel_sync_delivery($sender, $arr, $deliveries) {
+ if(UNO)
+ return;
+
require_once('include/import.php');
/** @FIXME this will sync red structures (channel, pconfig and abook). Eventually we need to make this application agnostic. */