Merge remote-tracking branch 'upstream/dev' into wiki
This commit is contained in:
commit
0630609d6e
@ -41,7 +41,6 @@ class Cron {
|
||||
require_once('include/sharedwithme.php');
|
||||
apply_updates();
|
||||
|
||||
|
||||
// expire any expired mail
|
||||
|
||||
q("delete from mail where expires != '%s' and expires < %s ",
|
||||
@ -93,6 +92,18 @@ class Cron {
|
||||
intval($rr['id'])
|
||||
);
|
||||
if($x) {
|
||||
$z = q("select * from item where id = %d",
|
||||
intval($message_id)
|
||||
);
|
||||
if($z) {
|
||||
xchan_query($z);
|
||||
$sync_item = fetch_post_tags($z);
|
||||
build_sync_packet($sync_item[0]['uid'],
|
||||
[
|
||||
'item' => [ encode_item($sync_item[0],true) ]
|
||||
]
|
||||
);
|
||||
}
|
||||
Master::Summon(array('Notifier','wall-new',$rr['id']));
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ class Cron_weekly {
|
||||
|
||||
call_hooks('cron_weekly',datetime_convert());
|
||||
|
||||
|
||||
z_check_cert();
|
||||
|
||||
require_once('include/hubloc.php');
|
||||
|
@ -33,8 +33,9 @@ class Apps {
|
||||
$files = glob('addon/*/*.apd');
|
||||
if($files) {
|
||||
foreach($files as $f) {
|
||||
$n = basename($f,'.apd');
|
||||
if(plugin_is_installed($n)) {
|
||||
$path = explode('/',$f);
|
||||
$plugin = $path[1];
|
||||
if(plugin_is_installed($plugin)) {
|
||||
$x = self::parse_app_description($f,$translate);
|
||||
if($x) {
|
||||
$ret[] = $x;
|
||||
|
@ -668,8 +668,10 @@ class Events extends \Zotlabs\Web\Controller {
|
||||
'$export' => array(z_root()."/events/$y/$m/export",t('Export'),'',''),
|
||||
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
||||
'$events' => $events,
|
||||
'$upload' => t('Import'),
|
||||
'$submit' => t('Submit'),
|
||||
'$view_label' => t('View'),
|
||||
'$month' => t('Month'),
|
||||
'$week' => t('Week'),
|
||||
'$day' => t('Day'),
|
||||
'$prev' => t('Previous'),
|
||||
'$next' => t('Next'),
|
||||
'$today' => t('Today'),
|
||||
|
@ -78,6 +78,8 @@ class Import_items extends \Zotlabs\Web\Controller {
|
||||
// logger('import: data: ' . print_r($data,true));
|
||||
// print_r($data);
|
||||
|
||||
if(! is_array($data))
|
||||
return;
|
||||
|
||||
if(array_key_exists('compatibility',$data) && array_key_exists('database',$data['compatibility'])) {
|
||||
$v1 = substr($data['compatibility']['database'],-4);
|
||||
|
@ -30,7 +30,20 @@ class Starred extends \Zotlabs\Web\Controller {
|
||||
intval(local_channel()),
|
||||
intval($message_id)
|
||||
);
|
||||
|
||||
|
||||
$r = q("select * from item where id = %d",
|
||||
intval($message_id)
|
||||
);
|
||||
if($r) {
|
||||
xchan_query($r);
|
||||
$sync_item = fetch_post_tags($r);
|
||||
build_sync_packet(local_channel(),[
|
||||
'item' => [
|
||||
encode_item($sync_item[0],true)
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
header('Content-type: application/json');
|
||||
echo json_encode(array('result' => $item_starred));
|
||||
killme();
|
||||
|
@ -29,6 +29,11 @@ class Wiki extends \Zotlabs\Web\Controller {
|
||||
if(observer_prohibited(true)) {
|
||||
return login();
|
||||
}
|
||||
|
||||
if(! feature_enabled(\App::$profile_uid,'wiki')) {
|
||||
notice( t('Not found') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
$tab = 'wiki';
|
||||
|
||||
|
9
boot.php
9
boot.php
@ -2457,6 +2457,15 @@ function check_cron_broken() {
|
||||
set_config('system','lastcroncheck',datetime_convert());
|
||||
return;
|
||||
}
|
||||
$t = get_config('system','lastcroncheck');
|
||||
if($t === false) {
|
||||
// This is serious. Config storage isn't working.
|
||||
// We just set lastcroncheck. The system is horked.
|
||||
// However don't add insult to injury by sending an email
|
||||
// to the admin every time a page is accessed.
|
||||
// just quietly
|
||||
return;
|
||||
}
|
||||
|
||||
if($t > datetime_convert('UTC','UTC','now - 3 days')) {
|
||||
// Wait for 3 days before we do anything so as not to swamp the admin with messages
|
||||
|
@ -575,12 +575,20 @@ function import_items($channel,$items,$sync = false,$relocate = null) {
|
||||
if(! $item)
|
||||
continue;
|
||||
|
||||
if($relocate && $item['mid'] === $item['parent_mid']) {
|
||||
item_url_replace($channel,$item,$relocate['url'],z_root(),$relocate['channel_address']);
|
||||
}
|
||||
|
||||
$r = q("select id, edited from item where mid = '%s' and uid = %d limit 1",
|
||||
dbesc($item['mid']),
|
||||
intval($channel['channel_id'])
|
||||
);
|
||||
if($r) {
|
||||
if($item['edited'] > $r[0]['edited']) {
|
||||
|
||||
// flags may have changed and we are probably relocating the post,
|
||||
// so force an update even if we have the same timestamp
|
||||
|
||||
if($item['edited'] >= $r[0]['edited']) {
|
||||
$item['id'] = $r[0]['id'];
|
||||
$item['uid'] = $channel['channel_id'];
|
||||
$item_result = item_store_update($item,$allow_code,$deliver);
|
||||
@ -595,24 +603,7 @@ function import_items($channel,$items,$sync = false,$relocate = null) {
|
||||
if($sync && $item['item_wall']) {
|
||||
// deliver singletons if we have any
|
||||
if($item_result && $item_result['success']) {
|
||||
Zotlabs\Daemon\Master::Summon(array('Notifier','single_activity',$item_result['item_id']));
|
||||
}
|
||||
}
|
||||
if($relocate && $item_result['item_id']) {
|
||||
$item = $item_result['item'];
|
||||
if($item['mid'] === $item['parent_mid']) {
|
||||
item_url_replace($channel,$item,$relocate['url'],z_root(),$relocate['channel_address']);
|
||||
dbesc_array($item);
|
||||
$item_id = $item_result['item_id'];
|
||||
unset($item['id']);
|
||||
$str = '';
|
||||
foreach($item as $k => $v) {
|
||||
if($str)
|
||||
$str .= ",";
|
||||
$str .= " `" . $k . "` = '" . $v . "' ";
|
||||
}
|
||||
|
||||
$r = dbq("update `item` set " . $str . " where id = " . $item_id );
|
||||
Zotlabs\Daemon\Master::Summon( [ 'Notifier','single_activity',$item_result['item_id'] ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -743,21 +743,6 @@ function widget_conversations($arr) {
|
||||
return $o;
|
||||
}
|
||||
|
||||
function widget_eventsmenu($arr) {
|
||||
if (! local_channel())
|
||||
return;
|
||||
|
||||
return replace_macros(get_markup_template('events_menu_side.tpl'), array(
|
||||
'$title' => t('Events Menu'),
|
||||
'$day' => t('Day View'),
|
||||
'$week' => t('Week View'),
|
||||
'$month' => t('Month View'),
|
||||
'$export' => t('Export'),
|
||||
'$upload' => t('Import'),
|
||||
'$submit' => t('Submit')
|
||||
));
|
||||
}
|
||||
|
||||
function widget_eventstools($arr) {
|
||||
if (! local_channel())
|
||||
return;
|
||||
|
8878
util/hmessages.po
8878
util/hmessages.po
File diff suppressed because it is too large
Load Diff
@ -19,15 +19,10 @@ function enableDisableFinishDate() {
|
||||
}
|
||||
|
||||
function on_fullscreen() {
|
||||
var view = $('#events-calendar').fullCalendar('getView');
|
||||
if(view.type === 'month') {
|
||||
$('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (top and bottom) of .generic-content-wrapper
|
||||
}
|
||||
$('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (.generic-content-wrapper top and bottom) of .generic-content-wrapper
|
||||
}
|
||||
|
||||
function on_inline() {
|
||||
var view = $('#events-calendar').fullCalendar('getView');
|
||||
if(view.type === 'month') {
|
||||
$('#events-calendar').fullCalendar('option', 'height', '');
|
||||
}
|
||||
((view.type === 'month') ? $('#events-calendar').fullCalendar('option', 'height', '') : $('#events-calendar').fullCalendar('option', 'height', 'auto'));
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
[region=aside]
|
||||
[widget=eventsmenu][/widget]
|
||||
[widget=eventstools][/widget]
|
||||
[widget=tasklist][/widget]
|
||||
[/region]
|
||||
|
@ -30,18 +30,18 @@
|
||||
function changeView(action, viewName) {
|
||||
$('#events-calendar').fullCalendar(action, viewName);
|
||||
var view = $('#events-calendar').fullCalendar('getView');
|
||||
if(view.type === 'agendaDay' || view.type === 'agendaWeek') {
|
||||
|
||||
if(view.type !== 'month' && !$('main').hasClass('fullscreen')) {
|
||||
$('#events-calendar').fullCalendar('option', 'height', 'auto');
|
||||
}
|
||||
else {
|
||||
if($('main').hasClass('fullscreen')) {
|
||||
$('#calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (.generic-content-wrapper top and bottom) of .generic-content-wrapper
|
||||
|
||||
}
|
||||
else {
|
||||
$('#calendar').fullCalendar('option', 'height', '');
|
||||
}
|
||||
$('#events-calendar').fullCalendar('option', 'height', '');
|
||||
}
|
||||
|
||||
if($('main').hasClass('fullscreen')) {
|
||||
$('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (.generic-content-wrapper top and bottom) of .generic-content-wrapper
|
||||
}
|
||||
|
||||
$('#title').text(view.title);
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,21 @@
|
||||
<div class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper">
|
||||
<div class="pull-right">
|
||||
<button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen();"><i class="fa fa-expand"></i></button>
|
||||
<button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);"><i class="fa fa-compress"></i></button>
|
||||
<button class="btn btn-success btn-xs" onclick="openClose('form');">{{$new_event.1}}</button>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="fa fa-backward"></i></button>
|
||||
<button id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="fa fa-bullseye"></i></button>
|
||||
<button class="btn btn-default btn-xs" onclick="changeView('next', false);" title="{{$next}}"><i class="fa fa-forward"></i></button>
|
||||
<div class="dropdown">
|
||||
<button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen();"><i class="fa fa-expand"></i></button>
|
||||
<button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);"><i class="fa fa-compress"></i></button>
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><i class="fa fa-caret-down"></i> {{$view_label}}</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" onclick="changeView('changeView', 'month'); return false;">{{$month}}</a></li>
|
||||
<li><a href="#" onclick="changeView('changeView', 'agendaWeek'); return false;">{{$week}}</a></li>
|
||||
<li><a href="#" onclick="changeView('changeView', 'agendaDay'); return false;">{{$day}}</a></li>
|
||||
</ul>
|
||||
<button class="btn btn-success btn-xs" onclick="openClose('form');">{{$new_event.1}}</button>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="fa fa-backward"></i></button>
|
||||
<button id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="fa fa-bullseye"></i></button>
|
||||
<button class="btn btn-default btn-xs" onclick="changeView('next', false);" title="{{$next}}"><i class="fa fa-forward"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="title"></h2>
|
||||
|
Reference in New Issue
Block a user