Merge branch 'dev'
This commit is contained in:
commit
2cb52f8875
@ -3,7 +3,6 @@
|
||||
namespace Zotlabs\Daemon;
|
||||
|
||||
if(array_search( __file__ , get_included_files()) === 0) {
|
||||
|
||||
require_once('include/cli_startup.php');
|
||||
array_shift($argv);
|
||||
$argc = count($argv);
|
||||
@ -17,14 +16,127 @@ if(array_search( __file__ , get_included_files()) === 0) {
|
||||
|
||||
class Master {
|
||||
|
||||
static public $queueworker = null;
|
||||
|
||||
static public function Summon($arr) {
|
||||
proc_run('php','Zotlabs/Daemon/Master.php',$arr);
|
||||
}
|
||||
|
||||
static public function Release($argc,$argv) {
|
||||
cli_startup();
|
||||
logger('Master: release: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG);
|
||||
$cls = '\\Zotlabs\\Daemon\\' . $argv[0];
|
||||
$cls::run($argc,$argv);
|
||||
|
||||
$maxworkers = get_config('system','max_queue_workers');
|
||||
|
||||
if (!$maxworkers || $maxworkers == 0) {
|
||||
logger('Master: release: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG);
|
||||
$cls = '\\Zotlabs\\Daemon\\' . $argv[0];
|
||||
$cls::run($argc,$argv);
|
||||
self::ClearQueue();
|
||||
} else {
|
||||
logger('Master: enqueue: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG);
|
||||
$workinfo = ['argc'=>$argc,'argv'=>$argv];
|
||||
q("insert into config (cat,k,v) values ('queuework','%s','%s')",
|
||||
dbesc(uniqid('workitem:',true)),
|
||||
dbesc(serialize($workinfo)));
|
||||
self::Process();
|
||||
}
|
||||
}
|
||||
|
||||
static public function GetWorkerID() {
|
||||
$maxworkers = get_config('system','max_queue_workers');
|
||||
$maxworkers = ($maxworkers) ? $maxworkers : 3;
|
||||
|
||||
$workermaxage = get_config('system','max_queue_worker_age');
|
||||
$workermaxage = ($workermaxage) ? $workermaxage : 300;
|
||||
|
||||
$workers = q("select * from config where cat='queueworkers' and k like '%s'", 'workerstarted_%');
|
||||
|
||||
if (count($workers) > $maxworkers) {
|
||||
foreach ($workers as $idx => $worker) {
|
||||
$curtime = time();
|
||||
if (($time - $worker['v']) > $workermaxage) {
|
||||
$k = explode('_',$worker['k']);
|
||||
q("delete from config where cat='queueworkers' and k='%s'",
|
||||
'workerstarted_'.$k[1]);
|
||||
q("update config set k='workitem' where cat='queuework' and k='%s'",
|
||||
'workitem_'.$k[1]);
|
||||
unset($workers[$idx]);
|
||||
}
|
||||
}
|
||||
if (count($workers) > $maxworkers) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return uniqid();
|
||||
|
||||
}
|
||||
|
||||
static public function Process() {
|
||||
|
||||
self::$queueworker = self::GetWorkerID();
|
||||
|
||||
if (!self::$queueworker) {
|
||||
logger('Master: unable to obtain worker ID.');
|
||||
killme();
|
||||
}
|
||||
|
||||
set_config('queueworkers','workerstarted_'.self::$queueworker,time());
|
||||
|
||||
$workersleep = get_config('system','queue_worker_sleep');
|
||||
$workersleep = ($workersleep) ? $workersleep : 5;
|
||||
cli_startup();
|
||||
|
||||
$work = q("update config set k='%s' where cat='queuework' and k like '%s' limit 1",
|
||||
'workitem_'.self::$queueworker,
|
||||
dbesc('workitem:%'));
|
||||
$jobs = 0;
|
||||
while ($work) {
|
||||
$workitem = q("select * from config where cat='queuework' and k='%s'",
|
||||
'workitem_'.self::$queueworker);
|
||||
|
||||
if (isset($workitem[0])) {
|
||||
$jobs++;
|
||||
$workinfo = unserialize($workitem[0]['v']);
|
||||
$argc = $workinfo['argc'];
|
||||
$argv = $workinfo['argv'];
|
||||
logger('Master: process: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG);
|
||||
$cls = '\\Zotlabs\\Daemon\\' . $argv[0];
|
||||
$cls::run($argc,$argv);
|
||||
|
||||
//Right now we assume that if we get a return, everything is OK.
|
||||
//At some point we may want to test whether the run returns true/false
|
||||
// and requeue the work to be tried again. But we probably want
|
||||
// to implement some sort of "retry interval" first.
|
||||
|
||||
q("delete from config where cat='queuework' and k='%s'",
|
||||
'workitem_'.self::$queueworker);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
sleep ($workersleep);
|
||||
$work = q("update config set k='%s' where cat='queuework' and k like '%s' limit 1",
|
||||
'workitem_'.self::$queueworker,
|
||||
dbesc('workitem:%'));
|
||||
|
||||
}
|
||||
logger('Master: Worker Thread: queue items processed:' . $jobs);
|
||||
q("delete from config where cat='queueworkers' and k='%s'",
|
||||
'workerstarted_'.self::$queueworker);
|
||||
}
|
||||
|
||||
static public function ClearQueue() {
|
||||
$work = q("select * from config where cat='queuework' and k like '%s'",
|
||||
dbesc('workitem%'));
|
||||
foreach ($work as $workitem) {
|
||||
$workinfo = unserialize($workitem['v']);
|
||||
$argc = $workinfo['argc'];
|
||||
$argv = $workinfo['argv'];
|
||||
logger('Master: process: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG);
|
||||
$cls = '\\Zotlabs\\Daemon\\' . $argv[0];
|
||||
$cls::run($argc,$argv);
|
||||
}
|
||||
$work = q("delete from config where cat='queuework' and k like '%s'",
|
||||
dbesc('workitem%'));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -59,8 +59,7 @@ class Apps {
|
||||
static public function get_base_apps() {
|
||||
return get_config('system','base_apps',[
|
||||
'Connections',
|
||||
'Suggest Channels',
|
||||
'Grid',
|
||||
'Network',
|
||||
'Settings',
|
||||
'Files',
|
||||
'Channel Home',
|
||||
@ -75,8 +74,6 @@ class Apps {
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static public function import_system_apps() {
|
||||
if(! local_channel())
|
||||
return;
|
||||
@ -306,14 +303,14 @@ class Apps {
|
||||
'Cards' => t('Cards'),
|
||||
'Admin' => t('Site Admin'),
|
||||
'Report Bug' => t('Report Bug'),
|
||||
'View Bookmarks' => t('View Bookmarks'),
|
||||
'Bookmarks' => t('Bookmarks'),
|
||||
'Chatrooms' => t('Chatrooms'),
|
||||
'Connections' => t('Connections'),
|
||||
'Remote Diagnostics' => t('Remote Diagnostics'),
|
||||
'Suggest Channels' => t('Suggest Channels'),
|
||||
'Login' => t('Login'),
|
||||
'Channel Manager' => t('Channel Manager'),
|
||||
'Grid' => t('Activity'),
|
||||
'Network' => t('Stream'),
|
||||
'Settings' => t('Settings'),
|
||||
'Files' => t('Files'),
|
||||
'Webpages' => t('Webpages'),
|
||||
@ -345,7 +342,6 @@ class Apps {
|
||||
'CalDAV' => t('CalDAV'),
|
||||
'CardDAV' => t('CardDAV'),
|
||||
'Channel Sources' => t('Channel Sources'),
|
||||
'Gallery' => t('Gallery'),
|
||||
'Guest Access' => t('Guest Access'),
|
||||
'Notes' => t('Notes'),
|
||||
'OAuth Apps Manager' => t('OAuth Apps Manager'),
|
||||
@ -354,7 +350,8 @@ class Apps {
|
||||
'Permission Categories' => t('Permission Categories'),
|
||||
'Premium Channel' => t('Premium Channel'),
|
||||
'Public Stream' => t('Public Stream'),
|
||||
'My Chatrooms' => t('My Chatrooms')
|
||||
'My Chatrooms' => t('My Chatrooms'),
|
||||
'Channel Export' => t('Channel Export')
|
||||
);
|
||||
|
||||
if(array_key_exists('name',$arr)) {
|
||||
|
@ -26,7 +26,8 @@ class NativeWiki {
|
||||
|
||||
$w['rawName'] = get_iconfig($w, 'wiki', 'rawName');
|
||||
$w['htmlName'] = escape_tags($w['rawName']);
|
||||
$w['urlName'] = urlencode(urlencode($w['rawName']));
|
||||
//$w['urlName'] = urlencode(urlencode($w['rawName']));
|
||||
$w['urlName'] = self::name_encode($w['rawName']);
|
||||
$w['mimeType'] = get_iconfig($w, 'wiki', 'mimeType');
|
||||
$w['typelock'] = get_iconfig($w, 'wiki', 'typelock');
|
||||
$w['lockstate'] = (($w['allow_cid'] || $w['allow_gid'] || $w['deny_cid'] || $w['deny_gid']) ? 'lock' : 'unlock');
|
||||
@ -233,7 +234,8 @@ class NativeWiki {
|
||||
'wiki' => $w,
|
||||
'rawName' => $rawName,
|
||||
'htmlName' => escape_tags($rawName),
|
||||
'urlName' => urlencode(urlencode($rawName)),
|
||||
//'urlName' => urlencode(urlencode($rawName)),
|
||||
'urlName' => self::name_encode($rawName),
|
||||
'mimeType' => $mimeType,
|
||||
'typelock' => $typelock
|
||||
);
|
||||
@ -249,7 +251,8 @@ class NativeWiki {
|
||||
WHERE resource_type = '%s' AND iconfig.v = '%s' AND uid = %d
|
||||
AND item_deleted = 0 $sql_extra limit 1",
|
||||
dbesc(NWIKI_ITEM_RESOURCE_TYPE),
|
||||
dbesc(urldecode($urlName)),
|
||||
//dbesc(urldecode($urlName)),
|
||||
dbesc($urlName),
|
||||
intval($uid)
|
||||
);
|
||||
|
||||
@ -286,4 +289,32 @@ class NativeWiki {
|
||||
return array('read' => true, 'write' => $write, 'success' => true);
|
||||
}
|
||||
}
|
||||
|
||||
public static function name_encode ($string) {
|
||||
|
||||
$string = html_entity_decode($string);
|
||||
$encoding = mb_internal_encoding();
|
||||
mb_internal_encoding("UTF-8");
|
||||
$ret = mb_ereg_replace_callback ('[^A-Za-z0-9\-\_\.\~]',function ($char) {
|
||||
$charhex = unpack('H*',$char[0]);
|
||||
$ret = '('.$charhex[1].')';
|
||||
return $ret;
|
||||
}
|
||||
,$string);
|
||||
mb_internal_encoding($encoding);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public static function name_decode ($string) {
|
||||
|
||||
$encoding = mb_internal_encoding();
|
||||
mb_internal_encoding("UTF-8");
|
||||
$ret = mb_ereg_replace_callback ('(\(([0-9a-f]+)\))',function ($chars) {
|
||||
return pack('H*',$chars[2]);
|
||||
}
|
||||
,$string);
|
||||
mb_internal_encoding($encoding);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -44,7 +44,8 @@ class NativeWikiPage {
|
||||
$pages[] = [
|
||||
'resource_id' => $resource_id,
|
||||
'title' => escape_tags($title),
|
||||
'url' => str_replace('%2F','/',urlencode(str_replace('%2F','/',urlencode($title)))),
|
||||
//'url' => str_replace('%2F','/',urlencode(str_replace('%2F','/',urlencode($title)))),
|
||||
'url' => Zlib\NativeWiki::name_encode($title),
|
||||
'link_id' => 'id_' . substr($resource_id, 0, 10) . '_' . $page_item['id']
|
||||
];
|
||||
}
|
||||
@ -98,7 +99,8 @@ class NativeWikiPage {
|
||||
$page = [
|
||||
'rawName' => $name,
|
||||
'htmlName' => escape_tags($name),
|
||||
'urlName' => urlencode($name),
|
||||
//'urlName' => urlencode($name),
|
||||
'urlName' => Zlib\NativeWiki::name_encode($name)
|
||||
|
||||
];
|
||||
|
||||
@ -154,7 +156,8 @@ class NativeWikiPage {
|
||||
$page = [
|
||||
'rawName' => $pageNewName,
|
||||
'htmlName' => escape_tags($pageNewName),
|
||||
'urlName' => urlencode(escape_tags($pageNewName))
|
||||
//'urlName' => urlencode(escape_tags($pageNewName))
|
||||
Zlib\NativeWiki::name_encode($pageNewName)
|
||||
];
|
||||
|
||||
return [ 'success' => true, 'page' => $page ];
|
||||
@ -365,7 +368,6 @@ class NativeWikiPage {
|
||||
|
||||
unset($item['id']);
|
||||
unset($item['author']);
|
||||
|
||||
$item['parent'] = 0;
|
||||
$item['body'] = $content;
|
||||
$item['author_xchan'] = $observer_hash;
|
||||
@ -527,7 +529,8 @@ class NativeWikiPage {
|
||||
$pages = $pageURLs = array();
|
||||
foreach ($match[1] as $m) {
|
||||
// TODO: Why do we need to double urlencode for this to work?
|
||||
$pageURLs[] = urlencode(urlencode(escape_tags($m)));
|
||||
//$pageURLs[] = urlencode(urlencode(escape_tags($m)));
|
||||
$pageURLs[] = Zlib\NativeWiki::name_encode(escape_tags($m));
|
||||
$pages[] = $m;
|
||||
}
|
||||
$idx = 0;
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Zotlabs\Lib;
|
||||
|
||||
use Zotlabs\Lib\Apps;
|
||||
|
||||
require_once('include/text.php');
|
||||
|
||||
/**
|
||||
@ -272,7 +274,7 @@ class ThreadItem {
|
||||
}
|
||||
|
||||
$has_bookmarks = false;
|
||||
if(is_array($item['term'])) {
|
||||
if(Apps::system_app_installed(local_channel(), 'Bookmarks') && is_array($item['term'])) {
|
||||
foreach($item['term'] as $t) {
|
||||
if(($t['ttype'] == TERM_BOOKMARK))
|
||||
$has_bookmarks = true;
|
||||
|
@ -311,7 +311,7 @@ class Site {
|
||||
'$access_policy' => array('access_policy', t("Which best describes the types of account offered by this hub?"), get_config('system','access_policy'), t("This is displayed on the public server site list."), $access_choices),
|
||||
'$register_text' => array('register_text', t("Register text"), htmlspecialchars(get_config('system','register_text'), ENT_QUOTES, 'UTF-8'), t("Will be displayed prominently on the registration page.")),
|
||||
'$role' => $role,
|
||||
'$frontpage' => array('frontpage', t("Site homepage to show visitors (default: login box)"), get_config('system','frontpage'), t("example: 'public' to show public stream, 'page/sys/home' to show a system webpage called 'home' or 'include:home.html' to include a file.")),
|
||||
'$frontpage' => array('frontpage', t("Site homepage to show visitors (default: login box)"), get_config('system','frontpage'), t("example: 'pubstream' to show public stream, 'page/sys/home' to show a system webpage called 'home' or 'include:home.html' to include a file.")),
|
||||
'$mirror_frontpage' => array('mirror_frontpage', t("Preserve site homepage URL"), get_config('system','mirror_frontpage'), t('Present the site homepage in a frame at the original location instead of redirecting')),
|
||||
'$abandon_days' => array('abandon_days', t('Accounts abandoned after x days'), get_config('system','account_abandon_days'), t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')),
|
||||
'$allowed_sites' => array('allowed_sites', t("Allowed friend domains"), get_config('system','allowed_sites'), t("Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains")),
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use App;
|
||||
use Zotlabs\Lib\Apps;
|
||||
|
||||
|
||||
class Bookmarks extends \Zotlabs\Web\Controller {
|
||||
|
||||
@ -8,7 +11,10 @@ class Bookmarks extends \Zotlabs\Web\Controller {
|
||||
if(! local_channel())
|
||||
return;
|
||||
|
||||
nav_set_selected('View Bookmarks');
|
||||
if(! Apps::system_app_installed(local_channel(), 'Bookmarks'))
|
||||
return;
|
||||
|
||||
nav_set_selected('Bookmarks');
|
||||
|
||||
$item_id = intval($_REQUEST['item']);
|
||||
$burl = trim($_REQUEST['burl']);
|
||||
@ -64,7 +70,15 @@ class Bookmarks extends \Zotlabs\Web\Controller {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(! Apps::system_app_installed(local_channel(), 'Bookmarks')) {
|
||||
//Do not display any associated widgets at this point
|
||||
App::$pdl = '';
|
||||
|
||||
$o = '<b>' . t('Bookmarks App') . ' (' . t('Not Installed') . '):</b><br>';
|
||||
$o .= t('Bookmark links from posts and manage them');
|
||||
return $o;
|
||||
}
|
||||
|
||||
require_once('include/menu.php');
|
||||
require_once('include/conversation.php');
|
||||
|
@ -426,7 +426,7 @@ class Import extends \Zotlabs\Web\Controller {
|
||||
unset($group['id']);
|
||||
$group['uid'] = $channel['channel_id'];
|
||||
|
||||
create_table_from_array('groups', $group);
|
||||
create_table_from_array('pgrp', $group);
|
||||
}
|
||||
$r = q("select * from pgrp where uid = %d",
|
||||
intval($channel['channel_id'])
|
||||
@ -448,7 +448,7 @@ class Import extends \Zotlabs\Web\Controller {
|
||||
if($x['old'] == $group_member['gid'])
|
||||
$group_member['gid'] = $x['new'];
|
||||
}
|
||||
create_table_from_array('group_member', $group_member);
|
||||
create_table_from_array('pgrp_member', $group_member);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
));
|
||||
}
|
||||
|
||||
nav_set_selected('Grid');
|
||||
nav_set_selected('Network');
|
||||
|
||||
$channel_acl = array(
|
||||
'allow_cid' => $channel['channel_allow_cid'],
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use Zotlabs\Lib\Apps;
|
||||
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
/**
|
||||
@ -147,9 +149,12 @@ class Ping extends \Zotlabs\Web\Controller {
|
||||
if(! ($vnotify & VNOTIFY_LIKE))
|
||||
$sql_extra = " AND verb NOT IN ('" . dbesc(ACTIVITY_LIKE) . "', '" . dbesc(ACTIVITY_DISLIKE) . "') ";
|
||||
|
||||
$discover_tab_on = can_view_public_stream();
|
||||
|
||||
$notify_pubs = ((local_channel()) ? ($vnotify & VNOTIFY_PUBS) && $discover_tab_on : $discover_tab_on);
|
||||
if(local_channel()) {
|
||||
$notify_pubs = ($vnotify & VNOTIFY_PUBS) && can_view_public_stream() && Apps::system_app_installed(local_channel(), 'Public Stream');
|
||||
}
|
||||
else {
|
||||
$notify_pubs = can_view_public_stream();
|
||||
}
|
||||
|
||||
if($notify_pubs) {
|
||||
$sys = get_sys_channel();
|
||||
|
@ -1,16 +1,29 @@
|
||||
<?php
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
require_once('include/zot.php');
|
||||
use App;
|
||||
use Zotlabs\Lib\Apps;
|
||||
|
||||
require_once('include/zot.php');
|
||||
|
||||
class Probe extends \Zotlabs\Web\Controller {
|
||||
|
||||
function get() {
|
||||
|
||||
if(local_channel()) {
|
||||
if(! Apps::system_app_installed(local_channel(), 'Remote Diagnostics')) {
|
||||
//Do not display any associated widgets at this point
|
||||
App::$pdl = '';
|
||||
|
||||
$o = '<b>' . t('Remote Diagnostics App') . ' (' . t('Not Installed') . '):</b><br>';
|
||||
$o .= t('Perform diagnostics on remote channels');
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
|
||||
nav_set_selected('Remote Diagnostics');
|
||||
|
||||
$o .= '<h3>Probe Diagnostic</h3>';
|
||||
$o .= '<h3>Remote Diagnostics</h3>';
|
||||
|
||||
$o .= '<form action="probe" method="get">';
|
||||
$o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . $_GET['addr'] .'" />';
|
||||
@ -19,7 +32,7 @@ class Probe extends \Zotlabs\Web\Controller {
|
||||
$o .= '<br /><br />';
|
||||
|
||||
if(x($_GET,'addr')) {
|
||||
$channel = \App::get_channel();
|
||||
$channel = App::get_channel();
|
||||
$addr = trim($_GET['addr']);
|
||||
$do_import = ((intval($_GET['import']) && is_site_admin()) ? true : false);
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use App;
|
||||
use Zotlabs\Lib\Apps;
|
||||
|
||||
require_once('include/conversation.php');
|
||||
require_once('include/acl_selectors.php');
|
||||
|
||||
@ -9,6 +12,17 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
|
||||
function get($update = 0, $load = false) {
|
||||
|
||||
if(local_channel()) {
|
||||
if(! Apps::system_app_installed(local_channel(), 'Public Stream')) {
|
||||
//Do not display any associated widgets at this point
|
||||
App::$pdl = '';
|
||||
|
||||
$o = '<b>' . t('Public Stream App') . ' (' . t('Not Installed') . '):</b><br>';
|
||||
$o .= t('The unmoderated public stream of this hub');
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
|
||||
if($load)
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
<?php
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
|
||||
use App;
|
||||
use Zotlabs\Lib\Apps;
|
||||
|
||||
class Randprof extends \Zotlabs\Web\Controller {
|
||||
|
||||
function init() {
|
||||
if(local_channel()) {
|
||||
if(! Apps::system_app_installed(local_channel(), 'Random Channel'))
|
||||
return;
|
||||
}
|
||||
|
||||
$x = random_profile();
|
||||
if($x)
|
||||
goaway(chanlink_hash($x));
|
||||
@ -13,5 +19,19 @@ class Randprof extends \Zotlabs\Web\Controller {
|
||||
/** FIXME this doesn't work at the moment as a fallback */
|
||||
goaway(z_root() . '/profile');
|
||||
}
|
||||
|
||||
function get() {
|
||||
if(local_channel()) {
|
||||
if(! Apps::system_app_installed(local_channel(), 'Random Channel')) {
|
||||
//Do not display any associated widgets at this point
|
||||
App::$pdl = '';
|
||||
|
||||
$o = '<b>' . t('Random Channel App') . ' (' . t('Not Installed') . '):</b><br>';
|
||||
$o .= t('Visit a random channel in the $Projectname network');
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -135,8 +135,6 @@ class Channel {
|
||||
$photo_path = ((x($_POST,'photo_path')) ? escape_tags(trim($_POST['photo_path'])) : '');
|
||||
$attach_path = ((x($_POST,'attach_path')) ? escape_tags(trim($_POST['attach_path'])) : '');
|
||||
|
||||
$channel_menu = ((x($_POST['channel_menu'])) ? htmlspecialchars_decode(trim($_POST['channel_menu']),ENT_QUOTES) : '');
|
||||
|
||||
$expire_items = ((x($_POST,'expire_items')) ? intval($_POST['expire_items']) : 0);
|
||||
$expire_starred = ((x($_POST,'expire_starred')) ? intval($_POST['expire_starred']) : 0);
|
||||
$expire_photos = ((x($_POST,'expire_photos'))? intval($_POST['expire_photos']) : 0);
|
||||
@ -157,8 +155,6 @@ class Channel {
|
||||
$defpermcat = ((x($_POST,'defpermcat')) ? notags(trim($_POST['defpermcat'])) : 'default');
|
||||
|
||||
$mailhost = ((array_key_exists('mailhost',$_POST)) ? notags(trim($_POST['mailhost'])) : '');
|
||||
$profile_assign = ((x($_POST,'profile_assign')) ? notags(trim($_POST['profile_assign'])) : '');
|
||||
|
||||
|
||||
$pageflags = $channel['channel_pageflags'];
|
||||
$existing_adult = (($pageflags & PAGE_ADULT) ? 1 : 0);
|
||||
@ -246,7 +242,6 @@ class Channel {
|
||||
set_pconfig(local_channel(),'system','post_joingroup', $post_joingroup);
|
||||
set_pconfig(local_channel(),'system','post_profilechange', $post_profilechange);
|
||||
set_pconfig(local_channel(),'system','blocktags',$blocktags);
|
||||
set_pconfig(local_channel(),'system','channel_menu',$channel_menu);
|
||||
set_pconfig(local_channel(),'system','vnotify',$vnotify);
|
||||
set_pconfig(local_channel(),'system','always_show_in_notices',$always_show_in_notices);
|
||||
set_pconfig(local_channel(),'system','evdays',$evdays);
|
||||
@ -254,7 +249,6 @@ class Channel {
|
||||
set_pconfig(local_channel(),'system','attach_path',$attach_path);
|
||||
set_pconfig(local_channel(),'system','default_permcat',$defpermcat);
|
||||
set_pconfig(local_channel(),'system','email_notify_host',$mailhost);
|
||||
set_pconfig(local_channel(),'system','profile_assign',$profile_assign);
|
||||
set_pconfig(local_channel(),'system','autoperms',$autoperms);
|
||||
|
||||
$r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d $set_perms where channel_id = %d",
|
||||
@ -460,18 +454,6 @@ class Channel {
|
||||
require_once('include/group.php');
|
||||
$group_select = mini_group_select(local_channel(),$channel['channel_default_group']);
|
||||
|
||||
require_once('include/menu.php');
|
||||
$m1 = menu_list(local_channel());
|
||||
$menu = false;
|
||||
if($m1) {
|
||||
$menu = array();
|
||||
$current = get_pconfig(local_channel(),'system','channel_menu');
|
||||
$menu[] = array('name' => '', 'selected' => ((! $current) ? true : false));
|
||||
foreach($m1 as $m) {
|
||||
$menu[] = array('name' => htmlspecialchars($m['menu_name'],ENT_COMPAT,'UTF-8'), 'selected' => (($m['menu_name'] === $current) ? ' selected="selected" ' : false));
|
||||
}
|
||||
}
|
||||
|
||||
$evdays = get_pconfig(local_channel(),'system','evdays');
|
||||
if(! $evdays)
|
||||
$evdays = 3;
|
||||
@ -498,7 +480,7 @@ class Channel {
|
||||
if($vnotify === false)
|
||||
$vnotify = (-1);
|
||||
|
||||
$plugin = [ 'basic' => '', 'security' => '', 'notify' => '', 'misc' => '' ];
|
||||
$plugin = [ 'basic' => '', 'security' => '', 'notify' => '' ];
|
||||
call_hooks('channel_settings',$plugin);
|
||||
|
||||
$disable_discover_tab = intval(get_config('system','disable_discover_tab',1)) == 1;
|
||||
@ -543,8 +525,6 @@ class Channel {
|
||||
'$permissions' => t('Default Privacy Group'),
|
||||
'$permdesc' => t("\x28click to open/close\x29"),
|
||||
'$aclselect' => populate_acl($perm_defaults, false, \Zotlabs\Lib\PermissionDescription::fromDescription(t('Use my default audience setting for the type of object published'))),
|
||||
'$profseltxt' => t('Profile to assign new connections'),
|
||||
'$profselect' => ((feature_enabled(local_channel(),'multi_profiles')) ? contact_profile_assign(get_pconfig(local_channel(),'system','profile_assign','')) : ''),
|
||||
|
||||
'$allow_cid' => acl2json($perm_defaults['allow_cid']),
|
||||
'$allow_gid' => acl2json($perm_defaults['allow_gid']),
|
||||
@ -582,7 +562,7 @@ class Channel {
|
||||
|
||||
'$lbl_vnot' => t('Show visual notifications including:'),
|
||||
|
||||
'$vnotify1' => array('vnotify1', t('Unseen grid activity'), ($vnotify & VNOTIFY_NETWORK), VNOTIFY_NETWORK, '', $yes_no),
|
||||
'$vnotify1' => array('vnotify1', t('Unseen stream activity'), ($vnotify & VNOTIFY_NETWORK), VNOTIFY_NETWORK, '', $yes_no),
|
||||
'$vnotify2' => array('vnotify2', t('Unseen channel activity'), ($vnotify & VNOTIFY_CHANNEL), VNOTIFY_CHANNEL, '', $yes_no),
|
||||
'$vnotify3' => array('vnotify3', t('Unseen private messages'), ($vnotify & VNOTIFY_MAIL), VNOTIFY_MAIL, t('Recommended'), $yes_no),
|
||||
'$vnotify4' => array('vnotify4', t('Upcoming events'), ($vnotify & VNOTIFY_EVENT), VNOTIFY_EVENT, '', $yes_no),
|
||||
@ -594,7 +574,7 @@ class Channel {
|
||||
'$vnotify10' => array('vnotify10', t('New connections'), ($vnotify & VNOTIFY_INTRO), VNOTIFY_INTRO, t('Recommended'), $yes_no),
|
||||
'$vnotify11' => ((is_site_admin()) ? array('vnotify11', t('System Registrations'), ($vnotify & VNOTIFY_REGISTER), VNOTIFY_REGISTER, '', $yes_no) : array()),
|
||||
'$vnotify12' => array('vnotify12', t('Unseen shared files'), ($vnotify & VNOTIFY_FILES), VNOTIFY_FILES, '', $yes_no),
|
||||
'$vnotify13' => (($disable_discover_tab && !$site_firehose) ? array() : array('vnotify13', t('Unseen public activity'), ($vnotify & VNOTIFY_PUBS), VNOTIFY_PUBS, '', $yes_no)),
|
||||
'$vnotify13' => ((($disable_discover_tab && !$site_firehose) || !Apps::system_app_installed(local_channel(), 'Public Stream')) ? array() : array('vnotify13', t('Unseen public stream activity'), ($vnotify & VNOTIFY_PUBS), VNOTIFY_PUBS, '', $yes_no)),
|
||||
'$vnotify14' => array('vnotify14', t('Unseen likes and dislikes'), ($vnotify & VNOTIFY_LIKE), VNOTIFY_LIKE, '', $yes_no),
|
||||
'$vnotify15' => array('vnotify15', t('Unseen forum posts'), ($vnotify & VNOTIFY_FORUMS), VNOTIFY_FORUMS, '', $yes_no),
|
||||
'$mailhost' => [ 'mailhost', t('Email notification hub (hostname)'), get_pconfig(local_channel(),'system','email_notify_host',\App::get_hostname()), sprintf( t('If your channel is mirrored to multiple hubs, set this to your preferred location. This will prevent duplicate email notifications. Example: %s'),\App::get_hostname()) ],
|
||||
@ -604,7 +584,6 @@ class Channel {
|
||||
'$basic_addon' => $plugin['basic'],
|
||||
'$sec_addon' => $plugin['security'],
|
||||
'$notify_addon' => $plugin['notify'],
|
||||
'$misc_addon' => $plugin['misc'],
|
||||
|
||||
'$h_advn' => t('Advanced Account/Page Type Settings'),
|
||||
'$h_descadvn' => t('Change the behaviour of this account for special situations'),
|
||||
@ -612,12 +591,8 @@ class Channel {
|
||||
'$lbl_misc' => t('Miscellaneous Settings'),
|
||||
'$photo_path' => array('photo_path', t('Default photo upload folder'), get_pconfig(local_channel(),'system','photo_path'), t('%Y - current year, %m - current month')),
|
||||
'$attach_path' => array('attach_path', t('Default file upload folder'), get_pconfig(local_channel(),'system','attach_path'), t('%Y - current year, %m - current month')),
|
||||
'$menus' => $menu,
|
||||
'$menu_desc' => t('Personal menu to display in your channel pages'),
|
||||
'$removeme' => t('Remove Channel'),
|
||||
'$removechannel' => t('Remove this channel.'),
|
||||
'$firefoxshare' => t('Firefox Share $Projectname provider'),
|
||||
|
||||
));
|
||||
|
||||
call_hooks('settings_form',$o);
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Zotlabs\Module\Settings;
|
||||
|
||||
require_once('include/menu.php');
|
||||
|
||||
class Channel_home {
|
||||
|
||||
@ -18,8 +19,10 @@ class Channel_home {
|
||||
$channel_divmore_height = ((x($_POST,'channel_divmore_height')) ? intval($_POST['channel_divmore_height']) : 400);
|
||||
if($channel_divmore_height < 50)
|
||||
$channel_divmore_height = 50;
|
||||
|
||||
set_pconfig(local_channel(),'system','channel_divmore_height', $channel_divmore_height);
|
||||
|
||||
$channel_menu = ((x($_POST['channel_menu'])) ? htmlspecialchars_decode(trim($_POST['channel_menu']),ENT_QUOTES) : '');
|
||||
set_pconfig(local_channel(),'system','channel_menu',$channel_menu);
|
||||
|
||||
build_sync_packet();
|
||||
|
||||
@ -43,12 +46,37 @@ class Channel_home {
|
||||
t('Click to expand content exceeding this height')
|
||||
];
|
||||
|
||||
$menus = menu_list(local_channel());
|
||||
if($menus) {
|
||||
$current = get_pconfig(local_channel(),'system','channel_menu');
|
||||
$menu[] = '';
|
||||
foreach($menus as $m) {
|
||||
$menu[$m['menu_name']] = htmlspecialchars($m['menu_name'],ENT_COMPAT,'UTF-8');
|
||||
}
|
||||
|
||||
$menu_select = [
|
||||
'channel_menu',
|
||||
t('Personal menu to display in your channel pages'),
|
||||
$current,
|
||||
'',
|
||||
$menu
|
||||
];
|
||||
}
|
||||
|
||||
$extra_settings_html = replace_macros(get_markup_template('field_input.tpl'),
|
||||
[
|
||||
'$field' => $channel_divmore_height
|
||||
]
|
||||
);
|
||||
|
||||
if($menu) {
|
||||
$extra_settings_html .= replace_macros(get_markup_template('field_select.tpl'),
|
||||
[
|
||||
'$field' => $menu_select
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$tpl = get_markup_template("settings_module.tpl");
|
||||
|
||||
$o .= replace_macros($tpl, array(
|
||||
|
@ -55,7 +55,7 @@ class Network {
|
||||
'$rpath' => $rpath,
|
||||
'$action_url' => 'settings/' . $module,
|
||||
'$form_security_token' => get_form_security_token('settings_' . $module),
|
||||
'$title' => t('Activity Settings'),
|
||||
'$title' => t('Stream Settings'),
|
||||
'$features' => process_module_features_get(local_channel(), $features),
|
||||
'$extra_settings_html' => $extra_settings_html,
|
||||
'$submit' => t('Submit')
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Zotlabs\Module\Settings;
|
||||
|
||||
require_once('include/selectors.php');
|
||||
|
||||
class Profiles {
|
||||
|
||||
@ -14,6 +15,9 @@ class Profiles {
|
||||
$features = get_module_features($module);
|
||||
|
||||
process_module_features_post(local_channel(), $features, $_POST);
|
||||
|
||||
$profile_assign = ((x($_POST,'profile_assign')) ? notags(trim($_POST['profile_assign'])) : '');
|
||||
set_pconfig(local_channel(),'system','profile_assign',$profile_assign);
|
||||
|
||||
build_sync_packet();
|
||||
|
||||
@ -30,6 +34,10 @@ class Profiles {
|
||||
$features = get_module_features($module);
|
||||
$rpath = (($_GET['rpath']) ? $_GET['rpath'] : '');
|
||||
|
||||
$extra_settings_html = '';
|
||||
if(feature_enabled(local_channel(),'multi_profiles'))
|
||||
$extra_settings_html = contact_profile_assign(get_pconfig(local_channel(),'system','profile_assign',''));
|
||||
|
||||
$tpl = get_markup_template("settings_module.tpl");
|
||||
|
||||
$o .= replace_macros($tpl, array(
|
||||
@ -37,8 +45,9 @@ class Profiles {
|
||||
'$action_url' => 'settings/' . $module,
|
||||
'$form_security_token' => get_form_security_token('settings_' . $module),
|
||||
'$title' => t('Profiles Settings'),
|
||||
'$features' => process_module_features_get(local_channel(), $features),
|
||||
'$submit' => t('Submit')
|
||||
'$features' => process_module_features_get(local_channel(), $features),
|
||||
'$extra_settings_html' => $extra_settings_html,
|
||||
'$submit' => t('Submit')
|
||||
));
|
||||
|
||||
return $o;
|
||||
|
@ -32,7 +32,7 @@ class Siteinfo extends \Zotlabs\Web\Controller {
|
||||
'$transport_link' => '<a href="https://zotlabs.com">https://zotlabs.com</a>',
|
||||
|
||||
'$additional_text' => t('Additional federated transport protocols:'),
|
||||
'$additional_fed' => implode(', ',array_unique($federated)),
|
||||
'$additional_fed' => implode(', ', $federated),
|
||||
'$prj_version' => ((get_config('system','hidden_version_siteinfo')) ? '' : sprintf( t('Version %s'), \Zotlabs\Lib\System::get_project_version())),
|
||||
'$prj_linktxt' => t('Project homepage'),
|
||||
'$prj_srctxt' => t('Developer homepage'),
|
||||
|
@ -1,15 +1,20 @@
|
||||
<?php
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use App;
|
||||
use Zotlabs\Lib\Apps;
|
||||
|
||||
require_once('include/socgraph.php');
|
||||
require_once('include/contact_widgets.php');
|
||||
|
||||
|
||||
class Suggest extends \Zotlabs\Web\Controller {
|
||||
|
||||
function init() {
|
||||
if(! local_channel())
|
||||
return;
|
||||
|
||||
if(! Apps::system_app_installed(local_channel(), 'Suggest Channels'))
|
||||
return;
|
||||
|
||||
if(x($_GET,'ignore')) {
|
||||
q("insert into xign ( uid, xchan ) values ( %d, '%s' ) ",
|
||||
@ -22,13 +27,23 @@ class Suggest extends \Zotlabs\Web\Controller {
|
||||
|
||||
|
||||
function get() {
|
||||
|
||||
$o = '';
|
||||
|
||||
if(! local_channel()) {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
if(! Apps::system_app_installed(local_channel(), 'Suggest Channels')) {
|
||||
//Do not display any associated widgets at this point
|
||||
App::$pdl = '';
|
||||
|
||||
$o = '<b>' . t('Suggest Channels App') . ' (' . t('Not Installed') . '):</b><br>';
|
||||
$o .= t('Suggestions for channels in the $Projectname network you might be interested in');
|
||||
return $o;
|
||||
}
|
||||
|
||||
$o = '';
|
||||
|
||||
nav_set_selected('Suggest Channels');
|
||||
|
||||
$_SESSION['return_url'] = z_root() . '/' . \App::$cmd;
|
||||
|
@ -237,7 +237,8 @@ class Wiki extends Controller {
|
||||
|
||||
// /wiki/channel/wiki -> No page was specified, so redirect to Home.md
|
||||
|
||||
$wikiUrlName = urlencode(argv(2));
|
||||
//$wikiUrlName = urlencode(argv(2));
|
||||
$wikiUrlName = NativeWiki::name_encode(argv(2));
|
||||
goaway(z_root() . '/' . argv(0) . '/' . argv(1) . '/' . $wikiUrlName . '/Home');
|
||||
|
||||
case 4:
|
||||
@ -246,7 +247,8 @@ class Wiki extends Controller {
|
||||
// GET /wiki/channel/wiki/page
|
||||
// Fetch the wiki info and determine observer permissions
|
||||
|
||||
$wikiUrlName = urldecode(argv(2));
|
||||
//$wikiUrlName = urldecode(argv(2));
|
||||
$wikiUrlName = NativeWiki::name_decode(argv(2));
|
||||
|
||||
$page_name = '';
|
||||
$ignore_language = false;
|
||||
@ -262,8 +264,9 @@ class Wiki extends Controller {
|
||||
$page_name .= argv($x);
|
||||
}
|
||||
|
||||
$pageUrlName = urldecode($page_name);
|
||||
$langPageUrlName = urldecode(\App::$language . '/' . $page_name);
|
||||
//$pageUrlName = urldecode($page_name);
|
||||
$pageUrlName = NativeWiki::name_decode($page_name);
|
||||
$langPageUrlName = \App::$language . '/' . $pageUrlName;
|
||||
|
||||
$w = NativeWiki::exists_by_name($owner['channel_id'], $wikiUrlName);
|
||||
|
||||
@ -289,8 +292,10 @@ class Wiki extends Controller {
|
||||
$wiki_editor = true;
|
||||
}
|
||||
|
||||
$wikiheaderName = urldecode($wikiUrlName);
|
||||
$wikiheaderPage = urldecode($pageUrlName);
|
||||
//$wikiheaderName = urldecode($wikiUrlName);
|
||||
$wikiheaderName = $wikiUrlName;
|
||||
//$wikiheaderPage = urldecode($pageUrlName);
|
||||
$wikiheaderPage = $pageUrlName;
|
||||
|
||||
$renamePage = (($wikiheaderPage === 'Home') ? '' : t('Rename page'));
|
||||
$sharePage = t('Share');
|
||||
@ -315,7 +320,7 @@ class Wiki extends Controller {
|
||||
//json_return_and_die(array('pages' => $page_list_html, 'message' => '', 'success' => true));
|
||||
notice( t('Error retrieving page content') . EOL);
|
||||
//goaway(z_root() . '/' . argv(0) . '/' . argv(1) );
|
||||
$renderedContent = NativeWikiPage::convert_links($html, argv(0) . '/' . argv(1) . '/' . $wikiUrlName);
|
||||
$renderedContent = NativeWikiPage::convert_links($html, argv(0) . '/' . argv(1) . '/' . NativeWiki::name_encode($wikiUrlName));
|
||||
$showPageControls = $wiki_editor;
|
||||
}
|
||||
else {
|
||||
@ -329,21 +334,25 @@ class Wiki extends Controller {
|
||||
|
||||
// Render the Markdown-formatted page content in HTML
|
||||
if($mimeType == 'text/bbcode') {
|
||||
$renderedContent = NativeWikiPage::convert_links(zidify_links(smilies(bbcode($content))), argv(0) . '/' . argv(1) . '/' . $wikiUrlName);
|
||||
$renderedContent = NativeWikiPage::convert_links($content,argv(0) . '/' . argv(1) . '/' . NativeWiki::name_encode($wikiUrlName));
|
||||
$renderedContent = zidify_links(smilies(bbcode($renderedContent)));
|
||||
//$renderedContent = NativeWikiPage::convert_links(zidify_links(smilies(bbcode($content))), argv(0) . '/' . argv(1) . '/' . $wikiUrlName);
|
||||
}
|
||||
elseif($mimeType === 'text/plain') {
|
||||
$renderedContent = str_replace(["\n",' ',"\t"],[EOL,' ',' '],htmlentities($content,ENT_COMPAT,'UTF-8',false));
|
||||
}
|
||||
elseif($mimeType === 'text/markdown') {
|
||||
$content = MarkdownSoap::unescape($content);
|
||||
$html = NativeWikiPage::generate_toc(zidify_text(MarkdownExtra::defaultTransform(NativeWikiPage::bbcode($content))));
|
||||
$renderedContent = NativeWikiPage::convert_links($html, argv(0) . '/' . argv(1) . '/' . $wikiUrlName);
|
||||
//$html = NativeWikiPage::generate_toc(zidify_text(MarkdownExtra::defaultTransform(NativeWikiPage::bbcode($content))));
|
||||
//$renderedContent = NativeWikiPage::convert_links($html, argv(0) . '/' . argv(1) . '/' . $wikiUrlName);
|
||||
$html = NativeWikiPage::convert_links($content, argv(0) . '/' . argv(1) . '/' . NativeWiki::name_encode($wikiUrlName));
|
||||
$renderedContent = NativeWikiPage::generate_toc(zidify_text(MarkdownExtra::defaultTransform(NativeWikiPage::bbcode($html))));
|
||||
}
|
||||
$showPageControls = $wiki_editor;
|
||||
}
|
||||
break;
|
||||
// default: // Strip the extraneous URL components
|
||||
// goaway('/' . argv(0) . '/' . argv(1) . '/' . $wikiUrlName . '/' . $pageUrlName);
|
||||
// goaway('/' . argv(0) . '/' . argv(1) . '/' . NativeWiki::name_encode($wikiUrlName) . '/' . $pageUrlName);
|
||||
}
|
||||
|
||||
|
||||
@ -360,13 +369,14 @@ class Wiki extends Controller {
|
||||
$currenttype = $types[$mimeType];
|
||||
|
||||
$placeholder = t('Short description of your changes (optional)');
|
||||
|
||||
|
||||
$zrl = urlencode( z_root() . '/wiki/' . argv(1) . '/' . NativeWiki::name_encode($wikiUrlName) . '/' . NativeWiki::name_encode($pageUrlName) );
|
||||
$o .= replace_macros(get_markup_template('wiki.tpl'),array(
|
||||
'$wikiheaderName' => $wikiheaderName,
|
||||
'$wikiheaderPage' => $wikiheaderPage,
|
||||
'$renamePage' => $renamePage,
|
||||
'$sharePage' => $sharePage,
|
||||
'$shareLink' => urlencode('#^[zrl=' . z_root() . '/wiki/' . argv(1) . '/' . $wikiUrlName . '/' . $pageUrlName . ']' . '[ ' . $owner['channel_name'] . ' ] ' . $wikiheaderName . ' - ' . $wikiheaderPage . '[/zrl]'),
|
||||
'$shareLink' => '#^[zrl=' . $zrl . ']' . '[ ' . $owner['channel_name'] . ' ] ' . $wikiheaderName . ' - ' . $wikiheaderPage . '[/zrl]',
|
||||
'$showPageControls' => $showPageControls,
|
||||
'$editOrSourceLabel' => (($showPageControls) ? t('Edit') : t('Source')),
|
||||
'$tools_label' => 'Page Tools',
|
||||
@ -429,16 +439,17 @@ class Wiki extends Controller {
|
||||
$mimeType = $_POST['mimetype'];
|
||||
|
||||
if($mimeType === 'text/bbcode') {
|
||||
$html = NativeWikiPage::convert_links(zidify_links(smilies(bbcode($content))),$wikiURL);
|
||||
$linkconverted = NativeWikiPage::convert_links($content,$wikiURL);
|
||||
$html = zidify_links(smilies(bbcode($linkconverted)));
|
||||
}
|
||||
elseif($mimeType === 'text/markdown') {
|
||||
$bb = NativeWikiPage::bbcode($content);
|
||||
$linkconverted = NativeWikiPage::convert_links($content,$wikiURL);
|
||||
$bb = NativeWikiPage::bbcode($linkconverted);
|
||||
$x = new MarkdownSoap($bb);
|
||||
$md = $x->clean();
|
||||
$md = MarkdownSoap::unescape($md);
|
||||
$html = MarkdownExtra::defaultTransform($md);
|
||||
$html = NativeWikiPage::generate_toc(zidify_text($html));
|
||||
$html = NativeWikiPage::convert_links($html,$wikiURL);
|
||||
}
|
||||
elseif($mimeType === 'text/plain') {
|
||||
$html = str_replace(["\n",' ',"\t"],[EOL,' ',' '],htmlentities($content,ENT_COMPAT,'UTF-8',false));
|
||||
@ -465,7 +476,8 @@ class Wiki extends Controller {
|
||||
$wiki['postVisible'] = ((intval($_POST['postVisible'])) ? 1 : 0);
|
||||
$wiki['rawName'] = $name;
|
||||
$wiki['htmlName'] = escape_tags($name);
|
||||
$wiki['urlName'] = urlencode(urlencode($name));
|
||||
//$wiki['urlName'] = urlencode(urlencode($name));
|
||||
$wiki['urlName'] = NativeWiki::name_encode($name);
|
||||
$wiki['mimeType'] = $_POST['mimeType'];
|
||||
$wiki['typelock'] = $_POST['typelock'];
|
||||
|
||||
@ -491,10 +503,10 @@ class Wiki extends Controller {
|
||||
$homePage = NativeWikiPage::create_page($owner['channel_id'],$observer_hash,'Home', $r['item']['resource_id'], $wiki['mimeType']);
|
||||
if(! $homePage['success']) {
|
||||
notice( t('Wiki created, but error creating Home page.'));
|
||||
goaway(z_root() . '/wiki/' . $nick . '/' . $wiki['urlName']);
|
||||
goaway(z_root() . '/wiki/' . $nick . '/' . NativeWiki::name_encode($wiki['urlName']));
|
||||
}
|
||||
NativeWiki::sync_a_wiki_item($owner['channel_id'],$homePage['item_id'],$r['item']['resource_id']);
|
||||
goaway(z_root() . '/wiki/' . $nick . '/' . $wiki['urlName'] . '/' . $homePage['page']['urlName']);
|
||||
goaway(z_root() . '/wiki/' . $nick . '/' . NativeWiki::name_encode($wiki['urlName']) . '/' . NativeWiki::name_encode($homePage['page']['urlName']));
|
||||
}
|
||||
else {
|
||||
notice( t('Error creating wiki'));
|
||||
@ -514,7 +526,8 @@ class Wiki extends Controller {
|
||||
|
||||
$arr = [];
|
||||
|
||||
$arr['urlName'] = urlencode(urlencode($_POST['origRawName']));
|
||||
//$arr['urlName'] = urlencode(urlencode($_POST['origRawName']));
|
||||
$arr['urlName'] = NativeWiki::name_encode($_POST['origRawName']);
|
||||
|
||||
if($_POST['updateRawName'])
|
||||
$arr['updateRawName'] = $_POST['updateRawName'];
|
||||
@ -525,7 +538,7 @@ class Wiki extends Controller {
|
||||
return; //not reached
|
||||
}
|
||||
|
||||
$wiki = NativeWiki::exists_by_name($owner['channel_id'], urldecode($arr['urlName']));
|
||||
$wiki = NativeWiki::exists_by_name($owner['channel_id'], $arr['urlName']);
|
||||
|
||||
if($wiki['resource_id']) {
|
||||
|
||||
@ -585,12 +598,12 @@ class Wiki extends Controller {
|
||||
json_return_and_die(array('success' => false));
|
||||
}
|
||||
|
||||
$name = $_POST['pageName']; //Get new page name
|
||||
$name = isset($_POST['pageName']) ? $_POST['pageName'] : $_POST['missingPageName']; //Get new page name
|
||||
|
||||
// backslashes won't work well in the javascript functions
|
||||
$name = str_replace('\\','',$name);
|
||||
|
||||
if(urlencode(escape_tags($name)) === '') {
|
||||
if(NativeWiki::name_encode(escape_tags($name)) === '') {
|
||||
json_return_and_die(array('message' => 'Error creating page. Invalid name (' . print_r($_POST,true) . ').', 'success' => false));
|
||||
}
|
||||
|
||||
@ -607,10 +620,11 @@ class Wiki extends Controller {
|
||||
|
||||
if($commit['success']) {
|
||||
NativeWiki::sync_a_wiki_item($owner['channel_id'],$commit['item_id'],$resource_id);
|
||||
json_return_and_die(array('url' => '/' . argv(0) . '/' . argv(1) . '/' . urlencode($page['wiki']['urlName']) . '/' . urlencode($page['page']['urlName']), 'success' => true));
|
||||
//json_return_and_die(array('url' => '/' . argv(0) . '/' . argv(1) . '/' . urlencode($page['wiki']['urlName']) . '/' . urlencode($page['page']['urlName']), 'success' => true));
|
||||
json_return_and_die(array('url' => '/' . argv(0) . '/' . argv(1) . '/' . $page['wiki']['urlName'] . '/' . $page['page']['urlName'], 'success' => true));
|
||||
}
|
||||
else {
|
||||
json_return_and_die(array('message' => 'Error making git commit','url' => '/' . argv(0) . '/' . argv(1) . '/' . urlencode($page['wiki']['urlName']) . '/' . urlencode($page['page']['urlName']),'success' => false));
|
||||
json_return_and_die(array('message' => 'Error making git commit','url' => '/' . argv(0) . '/' . argv(1) . '/' . NativeWiki::name_encode($page['wiki']['urlName']) . '/' . NativeWiki::name_encode($page['page']['urlName']),'success' => false));
|
||||
}
|
||||
|
||||
|
||||
@ -677,7 +691,7 @@ class Wiki extends Controller {
|
||||
|
||||
if($commit['success']) {
|
||||
NativeWiki::sync_a_wiki_item($owner['channel_id'],$commit['item_id'],$resource_id);
|
||||
json_return_and_die(array('message' => 'Wiki git repo commit made', 'success' => true));
|
||||
json_return_and_die(array('message' => 'Wiki git repo commit made', 'success' => true , 'content' => $content));
|
||||
}
|
||||
else {
|
||||
json_return_and_die(array('message' => 'Error making git commit','success' => false));
|
||||
@ -798,7 +812,7 @@ class Wiki extends Controller {
|
||||
if ($pageUrlName === 'Home') {
|
||||
json_return_and_die(array('message' => 'Cannot rename Home','success' => false));
|
||||
}
|
||||
if(urlencode(escape_tags($pageNewName)) === '') {
|
||||
if(NativeWiki::encode_name(escape_tags($pageNewName)) === '') {
|
||||
json_return_and_die(array('message' => 'Error renaming page. Invalid name.', 'success' => false));
|
||||
}
|
||||
// Determine if observer has permission to rename pages
|
||||
@ -814,7 +828,7 @@ class Wiki extends Controller {
|
||||
if($renamed['success']) {
|
||||
$commit = NativeWikiPage::commit(array(
|
||||
'channel_id' => $owner['channel_id'],
|
||||
'commit_msg' => 'Renamed ' . urldecode($pageUrlName) . ' to ' . $renamed['page']['htmlName'],
|
||||
'commit_msg' => 'Renamed ' . NativeWiki::name_decode($pageUrlName) . ' to ' . $renamed['page']['htmlName'],
|
||||
'resource_id' => $resource_id,
|
||||
'observer_hash' => $observer_hash,
|
||||
'pageUrlName' => $pageNewName
|
||||
|
23
Zotlabs/Update/_1222.php
Normal file
23
Zotlabs/Update/_1222.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Update;
|
||||
|
||||
class _1222 {
|
||||
|
||||
function run() {
|
||||
|
||||
q("START TRANSACTION");
|
||||
|
||||
$r1 = q("DELETE FROM app WHERE app_name = 'Grid' and app_system = 1");
|
||||
|
||||
if($r1) {
|
||||
q("COMMIT");
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
q("ROLLBACK");
|
||||
return UPDATE_FAILED;
|
||||
|
||||
}
|
||||
|
||||
}
|
23
Zotlabs/Update/_1223.php
Normal file
23
Zotlabs/Update/_1223.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Update;
|
||||
|
||||
class _1223 {
|
||||
|
||||
function run() {
|
||||
|
||||
q("START TRANSACTION");
|
||||
|
||||
$r1 = q("DELETE FROM app WHERE app_name = 'View Bookmarks' and app_system = 1");
|
||||
|
||||
if($r1) {
|
||||
q("COMMIT");
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
q("ROLLBACK");
|
||||
return UPDATE_FAILED;
|
||||
|
||||
}
|
||||
|
||||
}
|
28
Zotlabs/Update/_1224.php
Normal file
28
Zotlabs/Update/_1224.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Update;
|
||||
|
||||
class _1224 {
|
||||
|
||||
function run() {
|
||||
if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
|
||||
q("START TRANSACTION");
|
||||
|
||||
$r1 = q("ALTER TABLE hubloc ALTER hubloc_id_url SET DEFAULT ''");
|
||||
$r2 = q("ALTER TABLE hubloc ALTER hubloc_site_id SET DEFAULT ''");
|
||||
|
||||
if($r1 && $r2) {
|
||||
q("COMMIT");
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
q("ROLLBACK");
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -192,7 +192,7 @@ class Activity_filter {
|
||||
]);
|
||||
|
||||
$o .= replace_macros(get_markup_template('activity_filter_widget.tpl'), [
|
||||
'$title' => t('Activity Filters'),
|
||||
'$title' => t('Stream Filters'),
|
||||
'$reset' => $reset,
|
||||
'$content' => $content,
|
||||
'$name' => $name
|
||||
|
@ -120,7 +120,7 @@ class Activity_order {
|
||||
]);
|
||||
|
||||
$o = replace_macros(get_markup_template('common_widget.tpl'), [
|
||||
'$title' => t('Activity Order'),
|
||||
'$title' => t('Stream Order'),
|
||||
'$content' => $content,
|
||||
]);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Zotlabs\Widget;
|
||||
|
||||
use Zotlabs\Lib\NativeWiki;
|
||||
|
||||
class Wiki_pages {
|
||||
|
||||
@ -10,7 +11,7 @@ class Wiki_pages {
|
||||
return;
|
||||
|
||||
$c = channelx_by_nick(argv(1));
|
||||
$w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],urldecode(argv(2)));
|
||||
$w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],NativeWiki::name_decode(argv(2)));
|
||||
$arr = array(
|
||||
'resource_id' => $w['resource_id'],
|
||||
'channel_id' => $c['channel_id'],
|
||||
@ -21,8 +22,9 @@ class Wiki_pages {
|
||||
$can_create = perm_is_allowed(\App::$profile['uid'],get_observer_hash(),'write_wiki');
|
||||
|
||||
$can_delete = ((local_channel() && (local_channel() == \App::$profile['uid'])) ? true : false);
|
||||
$pageName = addslashes(escape_tags(urldecode(argv(3))));
|
||||
$pageName = NativeWiki::name_decode(escape_tags(argv(3)));
|
||||
|
||||
$wikiname = $w['urlName'];
|
||||
return replace_macros(get_markup_template('wiki_page_not_found.tpl'), array(
|
||||
'$resource_id' => $arr['resource_id'],
|
||||
'$channel_address' => $arr['channel_address'],
|
||||
@ -48,7 +50,7 @@ class Wiki_pages {
|
||||
|
||||
if(! $arr['resource_id']) {
|
||||
$c = channelx_by_nick(argv(1));
|
||||
$w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],urldecode(argv(2)));
|
||||
$w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],NativeWiki::name_decode(argv(2)));
|
||||
$arr = array(
|
||||
'resource_id' => $w['resource_id'],
|
||||
'channel_id' => $c['channel_id'],
|
||||
|
@ -1,6 +0,0 @@
|
||||
version: 1
|
||||
url: $baseurl/admin
|
||||
requires: admin
|
||||
name: Admin
|
||||
photo: icon:wrench
|
||||
categories: nav_featured_app
|
@ -1,6 +1,6 @@
|
||||
version: 1
|
||||
version: 1.1
|
||||
url: $baseurl/bookmarks
|
||||
requires: local_channel
|
||||
name: View Bookmarks
|
||||
name: Bookmarks
|
||||
photo: icon:bookmark
|
||||
categories: Productivity
|
||||
|
@ -1,6 +1,6 @@
|
||||
version: 1.2
|
||||
version: 1
|
||||
url: $baseurl/network, $baseurl/settings/network
|
||||
requires: local_channel
|
||||
name: Grid
|
||||
name: Network
|
||||
photo: icon:th
|
||||
categories: nav_featured_app, Networking
|
@ -1,6 +1,6 @@
|
||||
version: 1
|
||||
version: 1.1
|
||||
url: $baseurl/probe
|
||||
requires: local_channel
|
||||
name: Remote Diagnostics
|
||||
photo: icon:user-md
|
||||
categories: System
|
||||
categories: Developer
|
||||
|
5
boot.php
5
boot.php
@ -50,11 +50,11 @@ require_once('include/attach.php');
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||
define ( 'STD_VERSION', '3.7.4' );
|
||||
define ( 'STD_VERSION', '3.9' );
|
||||
define ( 'ZOT_REVISION', '6.0a' );
|
||||
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1221 );
|
||||
define ( 'DB_UPDATE_VERSION', 1224 );
|
||||
|
||||
define ( 'PROJECT_BASE', __DIR__ );
|
||||
|
||||
@ -1056,7 +1056,6 @@ class App {
|
||||
self::$observer = $xchan;
|
||||
}
|
||||
|
||||
|
||||
public static function get_observer() {
|
||||
return self::$observer;
|
||||
}
|
||||
|
@ -16,8 +16,8 @@
|
||||
[tr][td][zrl=[baseurl]/help/database/db_config]config[/zrl][/td][td]main configuration storage[/td][/tr]
|
||||
[tr][td][zrl=[baseurl]/help/database/db_conv]conv[/zrl][/td][td]Diaspora private messages meta conversation structure[/td][/tr]
|
||||
[tr][td][zrl=[baseurl]/help/database/db_event]event[/zrl][/td][td]Events[/td][/tr]
|
||||
[tr][td][zrl=[baseurl]/help/database/db_group_member]group_member[/zrl][/td][td]privacy groups (collections), group info[/td][/tr]
|
||||
[tr][td][zrl=[baseurl]/help/database/db_groups]groups[/zrl][/td][td]privacy groups (collections), member info[/td][/tr]
|
||||
[tr][td][zrl=[baseurl]/help/database/db_pgrp_member]pgrp_member[/zrl][/td][td]privacy groups (collections), group info[/td][/tr]
|
||||
[tr][td][zrl=[baseurl]/help/database/db_pgrp]pgrp[/zrl][/td][td]privacy groups (collections), member info[/td][/tr]
|
||||
[tr][td][zrl=[baseurl]/help/database/db_hook]hook[/zrl][/td][td]plugin hook registry[/td][/tr]
|
||||
[tr][td][zrl=[baseurl]/help/database/db_hubloc]hubloc[/zrl][/td][td]xchan location storage, ties a hub location to an xchan[/td][/tr]
|
||||
[tr][td][zrl=[baseurl]/help/database/db_iconfig]iconfig[/zrl][/td][td]extensible arbitrary storage for items[/td][/tr]
|
||||
|
@ -55,8 +55,8 @@
|
||||
[li]ffinder - friend suggestion stuff[/li]
|
||||
[li]fserver - obsolete[/li]
|
||||
[li]fsuggest - friend suggestion stuff[/li]
|
||||
[li]groups - privacy groups[/li]
|
||||
[li]group_member - privacy groups[/li]
|
||||
[li]pgrp - privacy groups[/li]
|
||||
[li]pgrp_member - privacy groups[/li]
|
||||
[li]hook - plugin hook registry[/li]
|
||||
[li]hubloc - Red location storage, ties a location to an xchan[/li]
|
||||
[li]item - posts[/li]
|
||||
|
@ -229,6 +229,11 @@ function nav($template = 'default') {
|
||||
set_pconfig(local_channel(), 'system','import_system_apps', datetime_convert('UTC','UTC','now','Y-m-d'));
|
||||
}
|
||||
|
||||
if(get_pconfig(local_channel(), 'system','force_import_system_apps') !== STD_VERSION) {
|
||||
Apps::import_system_apps();
|
||||
set_pconfig(local_channel(), 'system','force_import_system_apps', STD_VERSION);
|
||||
}
|
||||
|
||||
$syslist = array();
|
||||
$list = Apps::app_list(local_channel(), false, ['nav_featured_app', 'nav_pinned_app']);
|
||||
if($list) {
|
||||
|
@ -1075,8 +1075,9 @@ function get_markup_template($s, $root = '') {
|
||||
$newroot .= '/';
|
||||
}
|
||||
$template = $t->get_markup_template($s, $newroot);
|
||||
}
|
||||
$template = $t->get_markup_template($s, $root);
|
||||
} else {
|
||||
$template = $t->get_markup_template($s, $root);
|
||||
}
|
||||
return $template;
|
||||
}
|
||||
}
|
||||
|
@ -3,21 +3,32 @@
|
||||
|
||||
function contact_profile_assign($current) {
|
||||
|
||||
$o = '';
|
||||
|
||||
$o .= "<select id=\"contact-profile-selector\" name=\"profile_assign\" class=\"form-control\"/>\r\n";
|
||||
|
||||
$r = q("SELECT profile_guid, profile_name FROM profile WHERE uid = %d",
|
||||
intval($_SESSION['uid']));
|
||||
intval($_SESSION['uid'])
|
||||
);
|
||||
|
||||
if($r) {
|
||||
foreach($r as $rr) {
|
||||
$selected = (($rr['profile_guid'] == $current) ? " selected=\"selected\" " : "");
|
||||
$o .= "<option value=\"{$rr['profile_guid']}\" $selected >{$rr['profile_name']}</option>\r\n";
|
||||
$options[$rr['profile_guid']] = $rr['profile_name'];
|
||||
}
|
||||
}
|
||||
$o .= "</select>\r\n";
|
||||
|
||||
$select = [
|
||||
'profile_assign',
|
||||
t('Profile to assign new connections'),
|
||||
$current,
|
||||
'',
|
||||
$options
|
||||
];
|
||||
|
||||
$o = replace_macros(get_markup_template('field_select.tpl'),
|
||||
[
|
||||
'$field' => $select
|
||||
]
|
||||
);
|
||||
|
||||
return $o;
|
||||
|
||||
}
|
||||
|
||||
function contact_poll_interval($current, $disabled = false) {
|
||||
|
@ -2965,7 +2965,9 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') {
|
||||
json_url_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['target']);
|
||||
}
|
||||
|
||||
if(string_replace($old,$new,$item['body'])) {
|
||||
$x = preg_replace("/".preg_quote($old,'/')."\/(search|\w+\/".$channel['channel_address'].")/", $new.'/${1}', $item['body']);
|
||||
if($x) {
|
||||
$item['body'] = $x;
|
||||
$item['sig'] = base64url_encode(rsa_sign($item['body'],$channel['channel_prvkey']));
|
||||
$item['item_verified'] = 1;
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ CREATE TABLE IF NOT EXISTS `hubloc` (
|
||||
`hubloc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`hubloc_guid` char(191) NOT NULL DEFAULT '',
|
||||
`hubloc_guid_sig` text NOT NULL,
|
||||
`hubloc_id_url` char(191) NOT NULL DEFAULT '0',
|
||||
`hubloc_id_url` char(191) NOT NULL DEFAULT '',
|
||||
`hubloc_hash` char(191) NOT NULL DEFAULT '',
|
||||
`hubloc_addr` char(191) NOT NULL DEFAULT '',
|
||||
`hubloc_network` char(32) NOT NULL DEFAULT '',
|
||||
|
5497
util/hmessages.po
5497
util/hmessages.po
File diff suppressed because it is too large
Load Diff
21
vendor/composer/autoload_classmap.php
vendored
21
vendor/composer/autoload_classmap.php
vendored
@ -984,6 +984,8 @@ return array(
|
||||
'Zotlabs\\Module\\Notifications' => $baseDir . '/Zotlabs/Module/Notifications.php',
|
||||
'Zotlabs\\Module\\Notify' => $baseDir . '/Zotlabs/Module/Notify.php',
|
||||
'Zotlabs\\Module\\OAuth2TestVehicle' => $baseDir . '/Zotlabs/Module/Oauth2testvehicle.php',
|
||||
'Zotlabs\\Module\\Oauth' => $baseDir . '/Zotlabs/Module/Oauth.php',
|
||||
'Zotlabs\\Module\\Oauth2' => $baseDir . '/Zotlabs/Module/Oauth2.php',
|
||||
'Zotlabs\\Module\\Oauthinfo' => $baseDir . '/Zotlabs/Module/Oauthinfo.php',
|
||||
'Zotlabs\\Module\\Ochannel' => $baseDir . '/Zotlabs/Module/Ochannel.php',
|
||||
'Zotlabs\\Module\\Oembed' => $baseDir . '/Zotlabs/Module/Oembed.php',
|
||||
@ -996,6 +998,7 @@ return array(
|
||||
'Zotlabs\\Module\\Pconfig' => $baseDir . '/Zotlabs/Module/Pconfig.php',
|
||||
'Zotlabs\\Module\\Pdledit' => $baseDir . '/Zotlabs/Module/Pdledit.php',
|
||||
'Zotlabs\\Module\\Permcat' => $baseDir . '/Zotlabs/Module/Permcat.php',
|
||||
'Zotlabs\\Module\\Permcats' => $baseDir . '/Zotlabs/Module/Permcats.php',
|
||||
'Zotlabs\\Module\\Photo' => $baseDir . '/Zotlabs/Module/Photo.php',
|
||||
'Zotlabs\\Module\\Photos' => $baseDir . '/Zotlabs/Module/Photos.php',
|
||||
'Zotlabs\\Module\\Ping' => $baseDir . '/Zotlabs/Module/Ping.php',
|
||||
@ -1030,14 +1033,21 @@ return array(
|
||||
'Zotlabs\\Module\\Service_limits' => $baseDir . '/Zotlabs/Module/Service_limits.php',
|
||||
'Zotlabs\\Module\\Settings' => $baseDir . '/Zotlabs/Module/Settings.php',
|
||||
'Zotlabs\\Module\\Settings\\Account' => $baseDir . '/Zotlabs/Module/Settings/Account.php',
|
||||
'Zotlabs\\Module\\Settings\\Calendar' => $baseDir . '/Zotlabs/Module/Settings/Calendar.php',
|
||||
'Zotlabs\\Module\\Settings\\Channel' => $baseDir . '/Zotlabs/Module/Settings/Channel.php',
|
||||
'Zotlabs\\Module\\Settings\\Channel_home' => $baseDir . '/Zotlabs/Module/Settings/Channel_home.php',
|
||||
'Zotlabs\\Module\\Settings\\Connections' => $baseDir . '/Zotlabs/Module/Settings/Connections.php',
|
||||
'Zotlabs\\Module\\Settings\\Conversation' => $baseDir . '/Zotlabs/Module/Settings/Conversation.php',
|
||||
'Zotlabs\\Module\\Settings\\Directory' => $baseDir . '/Zotlabs/Module/Settings/Directory.php',
|
||||
'Zotlabs\\Module\\Settings\\Display' => $baseDir . '/Zotlabs/Module/Settings/Display.php',
|
||||
'Zotlabs\\Module\\Settings\\Editor' => $baseDir . '/Zotlabs/Module/Settings/Editor.php',
|
||||
'Zotlabs\\Module\\Settings\\Events' => $baseDir . '/Zotlabs/Module/Settings/Events.php',
|
||||
'Zotlabs\\Module\\Settings\\Featured' => $baseDir . '/Zotlabs/Module/Settings/Featured.php',
|
||||
'Zotlabs\\Module\\Settings\\Features' => $baseDir . '/Zotlabs/Module/Settings/Features.php',
|
||||
'Zotlabs\\Module\\Settings\\Oauth' => $baseDir . '/Zotlabs/Module/Settings/Oauth.php',
|
||||
'Zotlabs\\Module\\Settings\\Oauth2' => $baseDir . '/Zotlabs/Module/Settings/Oauth2.php',
|
||||
'Zotlabs\\Module\\Settings\\Permcats' => $baseDir . '/Zotlabs/Module/Settings/Permcats.php',
|
||||
'Zotlabs\\Module\\Settings\\Tokens' => $baseDir . '/Zotlabs/Module/Settings/Tokens.php',
|
||||
'Zotlabs\\Module\\Settings\\Manage' => $baseDir . '/Zotlabs/Module/Settings/Manage.php',
|
||||
'Zotlabs\\Module\\Settings\\Network' => $baseDir . '/Zotlabs/Module/Settings/Network.php',
|
||||
'Zotlabs\\Module\\Settings\\Photos' => $baseDir . '/Zotlabs/Module/Settings/Photos.php',
|
||||
'Zotlabs\\Module\\Settings\\Profiles' => $baseDir . '/Zotlabs/Module/Settings/Profiles.php',
|
||||
'Zotlabs\\Module\\Setup' => $baseDir . '/Zotlabs/Module/Setup.php',
|
||||
'Zotlabs\\Module\\Share' => $baseDir . '/Zotlabs/Module/Share.php',
|
||||
'Zotlabs\\Module\\Sharedwithme' => $baseDir . '/Zotlabs/Module/Sharedwithme.php',
|
||||
@ -1058,6 +1068,7 @@ return array(
|
||||
'Zotlabs\\Module\\Toggle_mobile' => $baseDir . '/Zotlabs/Module/Toggle_mobile.php',
|
||||
'Zotlabs\\Module\\Toggle_safesearch' => $baseDir . '/Zotlabs/Module/Toggle_safesearch.php',
|
||||
'Zotlabs\\Module\\Token' => $baseDir . '/Zotlabs/Module/Token.php',
|
||||
'Zotlabs\\Module\\Tokens' => $baseDir . '/Zotlabs/Module/Tokens.php',
|
||||
'Zotlabs\\Module\\Uexport' => $baseDir . '/Zotlabs/Module/Uexport.php',
|
||||
'Zotlabs\\Module\\Update' => $baseDir . '/Zotlabs/Module/Update.php',
|
||||
'Zotlabs\\Module\\Userinfo' => $baseDir . '/Zotlabs/Module/Userinfo.php',
|
||||
@ -1319,6 +1330,8 @@ return array(
|
||||
'Zotlabs\\Update\\_1217' => $baseDir . '/Zotlabs/Update/_1217.php',
|
||||
'Zotlabs\\Update\\_1218' => $baseDir . '/Zotlabs/Update/_1218.php',
|
||||
'Zotlabs\\Update\\_1219' => $baseDir . '/Zotlabs/Update/_1219.php',
|
||||
'Zotlabs\\Update\\_1220' => $baseDir . '/Zotlabs/Update/_1220.php',
|
||||
'Zotlabs\\Update\\_1221' => $baseDir . '/Zotlabs/Update/_1221.php',
|
||||
'Zotlabs\\Web\\CheckJS' => $baseDir . '/Zotlabs/Web/CheckJS.php',
|
||||
'Zotlabs\\Web\\Controller' => $baseDir . '/Zotlabs/Web/Controller.php',
|
||||
'Zotlabs\\Web\\HTTPHeaders' => $baseDir . '/Zotlabs/Web/HTTPHeaders.php',
|
||||
|
21
vendor/composer/autoload_static.php
vendored
21
vendor/composer/autoload_static.php
vendored
@ -1152,6 +1152,8 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'Zotlabs\\Module\\Notifications' => __DIR__ . '/../..' . '/Zotlabs/Module/Notifications.php',
|
||||
'Zotlabs\\Module\\Notify' => __DIR__ . '/../..' . '/Zotlabs/Module/Notify.php',
|
||||
'Zotlabs\\Module\\OAuth2TestVehicle' => __DIR__ . '/../..' . '/Zotlabs/Module/Oauth2testvehicle.php',
|
||||
'Zotlabs\\Module\\Oauth' => __DIR__ . '/../..' . '/Zotlabs/Module/Oauth.php',
|
||||
'Zotlabs\\Module\\Oauth2' => __DIR__ . '/../..' . '/Zotlabs/Module/Oauth2.php',
|
||||
'Zotlabs\\Module\\Oauthinfo' => __DIR__ . '/../..' . '/Zotlabs/Module/Oauthinfo.php',
|
||||
'Zotlabs\\Module\\Ochannel' => __DIR__ . '/../..' . '/Zotlabs/Module/Ochannel.php',
|
||||
'Zotlabs\\Module\\Oembed' => __DIR__ . '/../..' . '/Zotlabs/Module/Oembed.php',
|
||||
@ -1164,6 +1166,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'Zotlabs\\Module\\Pconfig' => __DIR__ . '/../..' . '/Zotlabs/Module/Pconfig.php',
|
||||
'Zotlabs\\Module\\Pdledit' => __DIR__ . '/../..' . '/Zotlabs/Module/Pdledit.php',
|
||||
'Zotlabs\\Module\\Permcat' => __DIR__ . '/../..' . '/Zotlabs/Module/Permcat.php',
|
||||
'Zotlabs\\Module\\Permcats' => __DIR__ . '/../..' . '/Zotlabs/Module/Permcats.php',
|
||||
'Zotlabs\\Module\\Photo' => __DIR__ . '/../..' . '/Zotlabs/Module/Photo.php',
|
||||
'Zotlabs\\Module\\Photos' => __DIR__ . '/../..' . '/Zotlabs/Module/Photos.php',
|
||||
'Zotlabs\\Module\\Ping' => __DIR__ . '/../..' . '/Zotlabs/Module/Ping.php',
|
||||
@ -1198,14 +1201,21 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'Zotlabs\\Module\\Service_limits' => __DIR__ . '/../..' . '/Zotlabs/Module/Service_limits.php',
|
||||
'Zotlabs\\Module\\Settings' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings.php',
|
||||
'Zotlabs\\Module\\Settings\\Account' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Account.php',
|
||||
'Zotlabs\\Module\\Settings\\Calendar' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Calendar.php',
|
||||
'Zotlabs\\Module\\Settings\\Channel' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Channel.php',
|
||||
'Zotlabs\\Module\\Settings\\Channel_home' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Channel_home.php',
|
||||
'Zotlabs\\Module\\Settings\\Connections' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Connections.php',
|
||||
'Zotlabs\\Module\\Settings\\Conversation' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Conversation.php',
|
||||
'Zotlabs\\Module\\Settings\\Directory' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Directory.php',
|
||||
'Zotlabs\\Module\\Settings\\Display' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Display.php',
|
||||
'Zotlabs\\Module\\Settings\\Editor' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Editor.php',
|
||||
'Zotlabs\\Module\\Settings\\Events' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Events.php',
|
||||
'Zotlabs\\Module\\Settings\\Featured' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Featured.php',
|
||||
'Zotlabs\\Module\\Settings\\Features' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Features.php',
|
||||
'Zotlabs\\Module\\Settings\\Oauth' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Oauth.php',
|
||||
'Zotlabs\\Module\\Settings\\Oauth2' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Oauth2.php',
|
||||
'Zotlabs\\Module\\Settings\\Permcats' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Permcats.php',
|
||||
'Zotlabs\\Module\\Settings\\Tokens' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Tokens.php',
|
||||
'Zotlabs\\Module\\Settings\\Manage' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Manage.php',
|
||||
'Zotlabs\\Module\\Settings\\Network' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Network.php',
|
||||
'Zotlabs\\Module\\Settings\\Photos' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Photos.php',
|
||||
'Zotlabs\\Module\\Settings\\Profiles' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Profiles.php',
|
||||
'Zotlabs\\Module\\Setup' => __DIR__ . '/../..' . '/Zotlabs/Module/Setup.php',
|
||||
'Zotlabs\\Module\\Share' => __DIR__ . '/../..' . '/Zotlabs/Module/Share.php',
|
||||
'Zotlabs\\Module\\Sharedwithme' => __DIR__ . '/../..' . '/Zotlabs/Module/Sharedwithme.php',
|
||||
@ -1226,6 +1236,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'Zotlabs\\Module\\Toggle_mobile' => __DIR__ . '/../..' . '/Zotlabs/Module/Toggle_mobile.php',
|
||||
'Zotlabs\\Module\\Toggle_safesearch' => __DIR__ . '/../..' . '/Zotlabs/Module/Toggle_safesearch.php',
|
||||
'Zotlabs\\Module\\Token' => __DIR__ . '/../..' . '/Zotlabs/Module/Token.php',
|
||||
'Zotlabs\\Module\\Tokens' => __DIR__ . '/../..' . '/Zotlabs/Module/Tokens.php',
|
||||
'Zotlabs\\Module\\Uexport' => __DIR__ . '/../..' . '/Zotlabs/Module/Uexport.php',
|
||||
'Zotlabs\\Module\\Update' => __DIR__ . '/../..' . '/Zotlabs/Module/Update.php',
|
||||
'Zotlabs\\Module\\Userinfo' => __DIR__ . '/../..' . '/Zotlabs/Module/Userinfo.php',
|
||||
@ -1487,6 +1498,8 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'Zotlabs\\Update\\_1217' => __DIR__ . '/../..' . '/Zotlabs/Update/_1217.php',
|
||||
'Zotlabs\\Update\\_1218' => __DIR__ . '/../..' . '/Zotlabs/Update/_1218.php',
|
||||
'Zotlabs\\Update\\_1219' => __DIR__ . '/../..' . '/Zotlabs/Update/_1219.php',
|
||||
'Zotlabs\\Update\\_1220' => __DIR__ . '/../..' . '/Zotlabs/Update/_1220.php',
|
||||
'Zotlabs\\Update\\_1221' => __DIR__ . '/../..' . '/Zotlabs/Update/_1221.php',
|
||||
'Zotlabs\\Web\\CheckJS' => __DIR__ . '/../..' . '/Zotlabs/Web/CheckJS.php',
|
||||
'Zotlabs\\Web\\Controller' => __DIR__ . '/../..' . '/Zotlabs/Web/Controller.php',
|
||||
'Zotlabs\\Web\\HTTPHeaders' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPHeaders.php',
|
||||
|
@ -1,9 +1,12 @@
|
||||
.app-container {
|
||||
float: left;
|
||||
width: 148px;
|
||||
margin: 20px;
|
||||
width: 177px;
|
||||
margin: 35px;
|
||||
}
|
||||
|
||||
.app-name {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
27253
view/ru/hmessages.po
27253
view/ru/hmessages.po
File diff suppressed because it is too large
Load Diff
6116
view/ru/hstrings.php
6116
view/ru/hstrings.php
File diff suppressed because it is too large
Load Diff
@ -3,5 +3,5 @@
|
||||
<select class="form-control" name="{{$field.0}}" id="id_{{$field.0}}">
|
||||
{{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}}
|
||||
</select>
|
||||
<small class="form-text text-muted">{{$field.3}}</small>
|
||||
<small class="form-text text-muted">{{$field.3}}</small >
|
||||
</div>
|
||||
|
@ -161,42 +161,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="section-subtitle-wrapper" role="tab" id="miscellaneous-settings">
|
||||
<h3>
|
||||
<a data-toggle="collapse" data-target="#miscellaneous-settings-collapse" href="#" aria-expanded="true" aria-controls="miscellaneous-settings-collapse">
|
||||
{{$lbl_misc}}
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="miscellaneous-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="miscellaneous-settings" data-parent="#settings" >
|
||||
<div class="section-content-tools-wrapper">
|
||||
<div class="form-group">
|
||||
{{if $profselect}}
|
||||
<label for="contact-profile-selector">{{$profseltxt}}</label>
|
||||
{{$profselect}}
|
||||
{{/if}}
|
||||
{{if $menus}}
|
||||
<div class="form-group channel-menu">
|
||||
<label for="channel_menu">{{$menu_desc}}</label>
|
||||
<select name="channel_menu" class="form-control">
|
||||
{{foreach $menus as $menu }}
|
||||
<option value="{{$menu.name}}" {{$menu.selected}}>{{$menu.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $misc_addon}}
|
||||
{{$misc_addon}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="settings-submit-wrapper" >
|
||||
<button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{{$aclselect}}
|
||||
|
@ -262,7 +262,8 @@
|
||||
if (data.success) {
|
||||
window.saved = true;
|
||||
window.console.log('Page saved successfully.');
|
||||
window.wiki_page_content = currentContent;
|
||||
//window.wiki_page_content = currentContent;
|
||||
window.wiki_page_content = data.content;
|
||||
$('#id_commitMsg').val(''); // Clear the commit message box
|
||||
$('#save-page').addClass('disabled'); // Disable the save button
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<h3>Page does not exist</h3>
|
||||
<br /><br /><br />
|
||||
{{if $canadd}}
|
||||
<form id="new-page-form" action="wiki/{{$channel_address}}/create/page" method="post" >
|
||||
<form id="new-page-form" action="/wiki/{{$channel_address}}/create/page" method="post" >
|
||||
<input type="hidden" name="resource_id" value="{{$resource_id}}">
|
||||
{{include file="field_input.tpl" field=$pageName}}
|
||||
{{if $typelock}}
|
||||
|
Reference in New Issue
Block a user