commit
e2abc0b727
15
CHANGELOG
15
CHANGELOG
@ -1,3 +1,18 @@
|
|||||||
|
Hubzilla 4.2.1 (2019-06-17)
|
||||||
|
- Deprecate mod events
|
||||||
|
- Revisit mod cal
|
||||||
|
- Fix issues with deletion of linked items and resources
|
||||||
|
- Fix zot6 delete issue
|
||||||
|
- Fix attach sync issue
|
||||||
|
- Remove sizeRangeSuffixes in justified gallery wrapper
|
||||||
|
- Fix storageconv issue with postgres
|
||||||
|
- Fix embedphotos image size
|
||||||
|
- pubcrawl: use URI instead of object for actor url
|
||||||
|
- diaspora: adjust loglevel
|
||||||
|
- gallery: remove workaround for margin issue which has been fixed upstream
|
||||||
|
- cart: warn about unsaved changes
|
||||||
|
|
||||||
|
|
||||||
Hubzilla 4.2 (2019-06-04)
|
Hubzilla 4.2 (2019-06-04)
|
||||||
- Introduce Calendar app which deprecates Events and CalDAV apps and streamlines the featuresets
|
- Introduce Calendar app which deprecates Events and CalDAV apps and streamlines the featuresets
|
||||||
- Update mod cal to reflect changes in the calendar app
|
- Update mod cal to reflect changes in the calendar app
|
||||||
|
@ -151,7 +151,6 @@ class Activity {
|
|||||||
|
|
||||||
static function fetch_image($x) {
|
static function fetch_image($x) {
|
||||||
|
|
||||||
|
|
||||||
$ret = [
|
$ret = [
|
||||||
'type' => 'Image',
|
'type' => 'Image',
|
||||||
'id' => $x['id'],
|
'id' => $x['id'],
|
||||||
@ -1570,7 +1569,7 @@ class Activity {
|
|||||||
$s['verb'] = self::activity_decode_mapper($act->type);
|
$s['verb'] = self::activity_decode_mapper($act->type);
|
||||||
|
|
||||||
|
|
||||||
if($act->type === 'Tombstone' || $act-type === 'Delete' || ($act->type === 'Create' && $act->obj['type'] === 'Tombstone')) {
|
if($act->type === 'Tombstone' || $act->type === 'Delete' || ($act->type === 'Create' && $act->obj['type'] === 'Tombstone')) {
|
||||||
$s['item_deleted'] = 1;
|
$s['item_deleted'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2253,4 +2252,4 @@ class Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Zotlabs\Module;
|
namespace Zotlabs\Module;
|
||||||
|
|
||||||
|
|
||||||
|
use App;
|
||||||
|
use Zotlabs\Web\Controller;
|
||||||
|
|
||||||
require_once('include/conversation.php');
|
require_once('include/conversation.php');
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
require_once('include/datetime.php');
|
require_once('include/datetime.php');
|
||||||
@ -9,15 +13,13 @@ require_once('include/items.php');
|
|||||||
require_once('include/html2plain.php');
|
require_once('include/html2plain.php');
|
||||||
|
|
||||||
|
|
||||||
class Cal extends \Zotlabs\Web\Controller {
|
class Cal extends Controller {
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
if(observer_prohibited()) {
|
if(observer_prohibited()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$o = '';
|
|
||||||
|
|
||||||
if(argc() > 1) {
|
if(argc() > 1) {
|
||||||
$nick = argv(1);
|
$nick = argv(1);
|
||||||
|
|
||||||
@ -25,19 +27,21 @@ class Cal extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$channelx = channelx_by_nick($nick);
|
$channelx = channelx_by_nick($nick);
|
||||||
|
|
||||||
if(! $channelx)
|
if(! $channelx) {
|
||||||
|
notice( t('Channel not found.') . EOL);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
\App::$data['channel'] = $channelx;
|
App::$data['channel'] = $channelx;
|
||||||
|
|
||||||
$observer = \App::get_observer();
|
$observer = App::get_observer();
|
||||||
\App::$data['observer'] = $observer;
|
App::$data['observer'] = $observer;
|
||||||
|
|
||||||
$observer_xchan = (($observer) ? $observer['xchan_hash'] : '');
|
$observer_xchan = (($observer) ? $observer['xchan_hash'] : '');
|
||||||
|
|
||||||
head_set_icon(\App::$data['channel']['xchan_photo_s']);
|
head_set_icon(App::$data['channel']['xchan_photo_s']);
|
||||||
|
|
||||||
\App::$page['htmlhead'] .= "<script> var profile_uid = " . ((\App::$data['channel']) ? \App::$data['channel']['channel_id'] : 0) . "; </script>" ;
|
App::$page['htmlhead'] .= "<script> var profile_uid = " . ((App::$data['channel']) ? App::$data['channel']['channel_id'] : 0) . "; </script>" ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,18 +56,8 @@ class Cal extends \Zotlabs\Web\Controller {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$channel = null;
|
$channel = App::$data['channel'];
|
||||||
|
|
||||||
if(argc() > 1) {
|
|
||||||
$channel = channelx_by_nick(argv(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(! $channel) {
|
|
||||||
notice( t('Channel not found.') . EOL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// since we don't currently have an event permission - use the stream permission
|
// since we don't currently have an event permission - use the stream permission
|
||||||
|
|
||||||
if(! perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_stream')) {
|
if(! perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_stream')) {
|
||||||
@ -72,294 +66,152 @@ class Cal extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
nav_set_selected('Calendar');
|
nav_set_selected('Calendar');
|
||||||
|
|
||||||
|
head_add_css('/library/fullcalendar/packages/core/main.min.css');
|
||||||
|
head_add_css('/library/fullcalendar/packages/daygrid/main.min.css');
|
||||||
|
head_add_css('cdav_calendar.css');
|
||||||
|
|
||||||
|
head_add_js('/library/fullcalendar/packages/core/main.min.js');
|
||||||
|
head_add_js('/library/fullcalendar/packages/daygrid/main.min.js');
|
||||||
|
|
||||||
|
$sql_extra = permissions_sql($channel['channel_id'], get_observer_hash(), 'event');
|
||||||
|
|
||||||
|
if(! perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_contacts') || App::$profile['hide_friends'])
|
||||||
|
$sql_extra .= " and etype != 'birthday' ";
|
||||||
|
|
||||||
$sql_extra = permissions_sql($channel['channel_id'],get_observer_hash(),'event');
|
$first_day = feature_enabled($channel['channel_id'], 'cal_first_day');
|
||||||
|
|
||||||
$first_day = feature_enabled($channel['channel_id'], 'events_cal_first_day');
|
|
||||||
$first_day = (($first_day) ? $first_day : 0);
|
$first_day = (($first_day) ? $first_day : 0);
|
||||||
|
|
||||||
$htpl = get_markup_template('event_head.tpl');
|
$start = '';
|
||||||
\App::$page['htmlhead'] .= replace_macros($htpl,array(
|
$finish = '';
|
||||||
'$baseurl' => z_root(),
|
|
||||||
'$module_url' => '/cal/' . $channel['channel_address'],
|
if (argv(2) === 'json') {
|
||||||
'$modparams' => 2,
|
if (x($_GET,'start')) $start = $_GET['start'];
|
||||||
'$lang' => \App::$language,
|
if (x($_GET,'end')) $finish = $_GET['end'];
|
||||||
'$timezone' => date_default_timezone_get(),
|
|
||||||
'$first_day' => $first_day
|
|
||||||
));
|
|
||||||
|
|
||||||
$o = '';
|
|
||||||
|
|
||||||
$mode = 'view';
|
|
||||||
$y = 0;
|
|
||||||
$m = 0;
|
|
||||||
$ignored = ((x($_REQUEST,'ignored')) ? " and dismissed = " . intval($_REQUEST['ignored']) . " " : '');
|
|
||||||
|
|
||||||
// logger('args: ' . print_r(\App::$argv,true));
|
|
||||||
|
|
||||||
if(argc() > 3 && intval(argv(2)) && intval(argv(3))) {
|
|
||||||
$mode = 'view';
|
|
||||||
$y = intval(argv(2));
|
|
||||||
$m = intval(argv(3));
|
|
||||||
}
|
|
||||||
if(argc() <= 3) {
|
|
||||||
$mode = 'view';
|
|
||||||
$event_id = argv(2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($mode == 'view') {
|
$start = datetime_convert('UTC','UTC',$start);
|
||||||
|
$finish = datetime_convert('UTC','UTC',$finish);
|
||||||
/* edit/create form */
|
$adjust_start = datetime_convert('UTC', date_default_timezone_get(), $start);
|
||||||
if($event_id) {
|
$adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
|
||||||
$r = q("SELECT * FROM event WHERE event_hash = '%s' AND uid = %d LIMIT 1",
|
|
||||||
dbesc($event_id),
|
|
||||||
intval($channel['channel_id'])
|
|
||||||
);
|
|
||||||
if(count($r))
|
|
||||||
$orig_event = $r[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Passed parameters overrides anything found in the DB
|
|
||||||
if(!x($orig_event))
|
|
||||||
$orig_event = array();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$tz = date_default_timezone_get();
|
|
||||||
if(x($orig_event))
|
|
||||||
$tz = (($orig_event['adjust']) ? date_default_timezone_get() : 'UTC');
|
|
||||||
|
|
||||||
$syear = datetime_convert('UTC', $tz, $sdt, 'Y');
|
|
||||||
$smonth = datetime_convert('UTC', $tz, $sdt, 'm');
|
|
||||||
$sday = datetime_convert('UTC', $tz, $sdt, 'd');
|
|
||||||
$shour = datetime_convert('UTC', $tz, $sdt, 'H');
|
|
||||||
$sminute = datetime_convert('UTC', $tz, $sdt, 'i');
|
|
||||||
|
|
||||||
$stext = datetime_convert('UTC',$tz,$sdt);
|
|
||||||
$stext = substr($stext,0,14) . "00:00";
|
|
||||||
|
|
||||||
$fyear = datetime_convert('UTC', $tz, $fdt, 'Y');
|
|
||||||
$fmonth = datetime_convert('UTC', $tz, $fdt, 'm');
|
|
||||||
$fday = datetime_convert('UTC', $tz, $fdt, 'd');
|
|
||||||
$fhour = datetime_convert('UTC', $tz, $fdt, 'H');
|
|
||||||
$fminute = datetime_convert('UTC', $tz, $fdt, 'i');
|
|
||||||
|
|
||||||
$ftext = datetime_convert('UTC',$tz,$fdt);
|
|
||||||
$ftext = substr($ftext,0,14) . "00:00";
|
|
||||||
|
|
||||||
$type = ((x($orig_event)) ? $orig_event['etype'] : 'event');
|
|
||||||
|
|
||||||
$f = get_config('system','event_input_format');
|
|
||||||
if(! $f)
|
|
||||||
$f = 'ymd';
|
|
||||||
|
|
||||||
$catsenabled = feature_enabled($channel['channel_id'],'categories');
|
|
||||||
|
|
||||||
|
|
||||||
$show_bd = perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_contacts');
|
|
||||||
if(! $show_bd) {
|
|
||||||
$sql_extra .= " and event.etype != 'birthday' ";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$category = '';
|
|
||||||
|
|
||||||
$thisyear = datetime_convert('UTC',date_default_timezone_get(),'now','Y');
|
|
||||||
$thismonth = datetime_convert('UTC',date_default_timezone_get(),'now','m');
|
|
||||||
if(! $y)
|
|
||||||
$y = intval($thisyear);
|
|
||||||
if(! $m)
|
|
||||||
$m = intval($thismonth);
|
|
||||||
|
|
||||||
// Put some limits on dates. The PHP date functions don't seem to do so well before 1900.
|
|
||||||
// An upper limit was chosen to keep search engines from exploring links millions of years in the future.
|
|
||||||
|
|
||||||
if($y < 1901)
|
|
||||||
$y = 1900;
|
|
||||||
if($y > 2099)
|
|
||||||
$y = 2100;
|
|
||||||
|
|
||||||
$nextyear = $y;
|
|
||||||
$nextmonth = $m + 1;
|
|
||||||
if($nextmonth > 12) {
|
|
||||||
$nextmonth = 1;
|
|
||||||
$nextyear ++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$prevyear = $y;
|
|
||||||
if($m > 1)
|
|
||||||
$prevmonth = $m - 1;
|
|
||||||
else {
|
|
||||||
$prevmonth = 12;
|
|
||||||
$prevyear --;
|
|
||||||
}
|
|
||||||
|
|
||||||
$dim = get_dim($y,$m);
|
|
||||||
$start = sprintf('%d-%d-%d %d:%d:%d',$y,$m,1,0,0,0);
|
|
||||||
$finish = sprintf('%d-%d-%d %d:%d:%d',$y,$m,$dim,23,59,59);
|
|
||||||
|
|
||||||
|
|
||||||
if (argv(2) === 'json'){
|
|
||||||
if (x($_GET,'start')) $start = $_GET['start'];
|
|
||||||
if (x($_GET,'end')) $finish = $_GET['end'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$start = datetime_convert('UTC','UTC',$start);
|
|
||||||
$finish = datetime_convert('UTC','UTC',$finish);
|
|
||||||
|
|
||||||
$adjust_start = datetime_convert('UTC', date_default_timezone_get(), $start);
|
|
||||||
$adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
|
|
||||||
|
|
||||||
|
|
||||||
if(! perm_is_allowed(\App::$profile['uid'],get_observer_hash(),'view_contacts'))
|
if (x($_GET, 'id')) {
|
||||||
$sql_extra .= " and etype != 'birthday' ";
|
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan, item.id as item_id
|
||||||
|
from event left join item on item.resource_id = event.event_hash
|
||||||
|
where item.resource_type = 'event' and event.uid = %d and event.id = %d $sql_extra limit 1",
|
||||||
|
intval($channel['channel_id']),
|
||||||
|
intval($_GET['id'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// fixed an issue with "nofinish" events not showing up in the calendar.
|
||||||
|
// There's still an issue if the finish date crosses the end of month.
|
||||||
|
// Noting this for now - it will need to be fixed here and in Friendica.
|
||||||
|
// Ultimately the finish date shouldn't be involved in the query.
|
||||||
|
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan, item.id as item_id
|
||||||
|
from event left join item on event.event_hash = item.resource_id
|
||||||
|
where item.resource_type = 'event' and event.uid = %d and event.uid = item.uid
|
||||||
|
AND (( event.adjust = 0 AND ( event.dtend >= '%s' or event.nofinish = 1 ) AND event.dtstart <= '%s' )
|
||||||
|
OR ( event.adjust = 1 AND ( event.dtend >= '%s' or event.nofinish = 1 ) AND event.dtstart <= '%s' ))
|
||||||
|
$sql_extra",
|
||||||
|
intval($channel['channel_id']),
|
||||||
|
dbesc($start),
|
||||||
|
dbesc($finish),
|
||||||
|
dbesc($adjust_start),
|
||||||
|
dbesc($adjust_finish)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($r) {
|
||||||
|
xchan_query($r);
|
||||||
|
$r = fetch_post_tags($r,true);
|
||||||
|
$r = sort_by_date($r);
|
||||||
|
}
|
||||||
|
|
||||||
if (x($_GET,'id')){
|
$events = [];
|
||||||
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan, item.id as item_id
|
|
||||||
from event left join item on resource_id = event_hash where resource_type = 'event' and event.uid = %d and event.id = %d $sql_extra limit 1",
|
|
||||||
intval($channel['channel_id']),
|
|
||||||
intval($_GET['id'])
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// fixed an issue with "nofinish" events not showing up in the calendar.
|
|
||||||
// There's still an issue if the finish date crosses the end of month.
|
|
||||||
// Noting this for now - it will need to be fixed here and in Friendica.
|
|
||||||
// Ultimately the finish date shouldn't be involved in the query.
|
|
||||||
|
|
||||||
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan, item.id as item_id
|
if($r) {
|
||||||
from event left join item on event.event_hash = item.resource_id
|
|
||||||
where item.resource_type = 'event' and event.uid = %d and event.uid = item.uid $ignored
|
foreach($r as $rr) {
|
||||||
AND (( event.adjust = 0 AND ( event.dtend >= '%s' or event.nofinish = 1 ) AND event.dtstart <= '%s' )
|
|
||||||
OR ( event.adjust = 1 AND ( event.dtend >= '%s' or event.nofinish = 1 ) AND event.dtstart <= '%s' )) ",
|
$tz = get_iconfig($rr, 'event', 'timezone');
|
||||||
intval($channel['channel_id']),
|
if(! $tz)
|
||||||
dbesc($start),
|
$tz = 'UTC';
|
||||||
dbesc($finish),
|
|
||||||
dbesc($adjust_start),
|
$start = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtstart'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtstart'], 'c'));
|
||||||
dbesc($adjust_finish)
|
if ($rr['nofinish']){
|
||||||
);
|
$end = null;
|
||||||
}
|
} else {
|
||||||
|
$end = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtend'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtend'], 'c'));
|
||||||
$links = array();
|
|
||||||
|
|
||||||
if($r) {
|
|
||||||
xchan_query($r);
|
|
||||||
$r = fetch_post_tags($r,true);
|
|
||||||
|
|
||||||
$r = sort_by_date($r);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($r) {
|
|
||||||
foreach($r as $rr) {
|
|
||||||
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'j') : datetime_convert('UTC','UTC',$rr['dtstart'],'j'));
|
|
||||||
if(! x($links,$j))
|
|
||||||
$links[$j] = z_root() . '/' . \App::$cmd . '#link-' . $j;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$events=array();
|
|
||||||
|
|
||||||
$last_date = '';
|
|
||||||
$fmt = t('l, F j');
|
|
||||||
|
|
||||||
if($r) {
|
|
||||||
|
|
||||||
foreach($r as $rr) {
|
|
||||||
|
|
||||||
$tz = get_iconfig($rr, 'event', 'timezone');
|
|
||||||
|
|
||||||
if(! $tz)
|
|
||||||
$tz = 'UTC';
|
|
||||||
|
|
||||||
|
$html = '';
|
||||||
|
if (x($_GET,'id')) {
|
||||||
$rr['timezone'] = $tz;
|
$rr['timezone'] = $tz;
|
||||||
|
|
||||||
$j = (($rr['adjust']) ? datetime_convert($tz,date_default_timezone_get(),$rr['dtstart'], 'j') : datetime_convert('UTC','UTC',$rr['dtstart'],'j'));
|
|
||||||
$d = (($rr['adjust']) ? datetime_convert($tz,date_default_timezone_get(),$rr['dtstart'], $fmt) : datetime_convert('UTC','UTC',$rr['dtstart'],$fmt));
|
|
||||||
$d = day_translate($d);
|
|
||||||
|
|
||||||
$start = (($rr['adjust']) ? datetime_convert($tz,date_default_timezone_get(),$rr['dtstart'], 'c') : datetime_convert('UTC','UTC',$rr['dtstart'],'c'));
|
|
||||||
if ($rr['nofinish']){
|
|
||||||
$end = null;
|
|
||||||
} else {
|
|
||||||
$end = (($rr['adjust']) ? datetime_convert($tz,date_default_timezone_get(),$rr['dtend'], 'c') : datetime_convert('UTC','UTC',$rr['dtend'],'c'));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$is_first = ($d !== $last_date);
|
|
||||||
|
|
||||||
$last_date = $d;
|
|
||||||
|
|
||||||
$edit = false;
|
|
||||||
|
|
||||||
$drop = false;
|
|
||||||
|
|
||||||
$title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8'));
|
|
||||||
if(! $title) {
|
|
||||||
list($title, $_trash) = explode("<br",bbcode($rr['desc']),2);
|
|
||||||
$title = strip_tags(html_entity_decode($title,ENT_QUOTES,'UTF-8'));
|
|
||||||
}
|
|
||||||
$html = format_event_html($rr);
|
$html = format_event_html($rr);
|
||||||
$rr['desc'] = zidify_links(smilies(bbcode($rr['desc'])));
|
|
||||||
$rr['description'] = htmlentities(html2plain(bbcode($rr['description'])),ENT_COMPAT,'UTF-8',false);
|
|
||||||
$rr['location'] = zidify_links(smilies(bbcode($rr['location'])));
|
|
||||||
$events[] = array(
|
|
||||||
'id'=>$rr['id'],
|
|
||||||
'hash' => $rr['event_hash'],
|
|
||||||
'start'=> $start,
|
|
||||||
'end' => $end,
|
|
||||||
'drop' => $drop,
|
|
||||||
'allDay' => (($rr['adjust']) ? 0 : 1),
|
|
||||||
'title' => $title,
|
|
||||||
|
|
||||||
'j' => $j,
|
|
||||||
'd' => $d,
|
|
||||||
'edit' => $edit,
|
|
||||||
'is_first'=>$is_first,
|
|
||||||
'item'=>$rr,
|
|
||||||
'html'=>$html,
|
|
||||||
'plink' => array($rr['plink'],t('Link to Source'),'',''),
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$events[] = array(
|
||||||
|
'calendar_id' => 'channel_calendar',
|
||||||
|
'rw' => true,
|
||||||
|
'id'=>$rr['id'],
|
||||||
|
'uri' => $rr['event_hash'],
|
||||||
|
'timezone' => $tz,
|
||||||
|
'start'=> $start,
|
||||||
|
'end' => $end,
|
||||||
|
'drop' => $drop,
|
||||||
|
'allDay' => (($rr['adjust']) ? 0 : 1),
|
||||||
|
'title' => htmlentities($rr['summary'], ENT_COMPAT, 'UTF-8', false),
|
||||||
|
'editable' => $edit ? true : false,
|
||||||
|
'item' => $rr,
|
||||||
|
'plink' => [$rr['plink'], t('Link to source')],
|
||||||
|
'description' => htmlentities($rr['description'], ENT_COMPAT, 'UTF-8', false),
|
||||||
|
'location' => htmlentities($rr['location'], ENT_COMPAT, 'UTF-8', false),
|
||||||
|
'allow_cid' => expand_acl($rr['allow_cid']),
|
||||||
|
'allow_gid' => expand_acl($rr['allow_gid']),
|
||||||
|
'deny_cid' => expand_acl($rr['deny_cid']),
|
||||||
|
'deny_gid' => expand_acl($rr['deny_gid']),
|
||||||
|
'html' => $html
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argv(2) === 'json'){
|
|
||||||
echo json_encode($events); killme();
|
|
||||||
}
|
|
||||||
|
|
||||||
// links: array('href', 'text', 'extra css classes', 'title')
|
|
||||||
if (x($_GET,'id')){
|
|
||||||
$tpl = get_markup_template("event_cal.tpl");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$tpl = get_markup_template("events_cal-js.tpl");
|
|
||||||
}
|
|
||||||
|
|
||||||
$nick = $channel['channel_address'];
|
|
||||||
|
|
||||||
$o = replace_macros($tpl, array(
|
|
||||||
'$baseurl' => z_root(),
|
|
||||||
'$new_event' => array(z_root().'/cal',(($event_id) ? t('Edit Event') : t('Create Event')),'',''),
|
|
||||||
'$previus' => array(z_root()."/cal/$nick/$prevyear/$prevmonth",t('Previous'),'',''),
|
|
||||||
'$next' => array(z_root()."/cal/$nick/$nextyear/$nextmonth",t('Next'),'',''),
|
|
||||||
'$export' => array(z_root()."/cal/$nick/$y/$m/export",t('Export'),'',''),
|
|
||||||
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
|
||||||
'$events' => $events,
|
|
||||||
'$upload' => t('Import'),
|
|
||||||
'$submit' => t('Submit'),
|
|
||||||
'$prev' => t('Previous'),
|
|
||||||
'$next' => t('Next'),
|
|
||||||
'$today' => t('Today'),
|
|
||||||
'$form' => $form,
|
|
||||||
'$expandform' => ((x($_GET,'expandform')) ? true : false)
|
|
||||||
));
|
|
||||||
|
|
||||||
if (x($_GET,'id')){ echo $o; killme(); }
|
|
||||||
|
|
||||||
return $o;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argv(2) === 'json') {
|
||||||
|
echo json_encode($events);
|
||||||
|
killme();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x($_GET,'id')) {
|
||||||
|
$o = replace_macros(get_markup_template("cal_event.tpl"), [
|
||||||
|
'$events' => $events
|
||||||
|
]);
|
||||||
|
echo $o;
|
||||||
|
killme();
|
||||||
|
}
|
||||||
|
|
||||||
|
$nick = $channel['channel_address'];
|
||||||
|
|
||||||
|
$sources = '{
|
||||||
|
id: \'channel_calendar\',
|
||||||
|
url: \'/cal/' . $nick . '/json/\',
|
||||||
|
color: \'#3a87ad\'
|
||||||
|
}';
|
||||||
|
|
||||||
|
$o = replace_macros(get_markup_template("cal_calendar.tpl"), [
|
||||||
|
'$sources' => $sources,
|
||||||
|
'$lang' => App::$language,
|
||||||
|
'$timezone' => date_default_timezone_get(),
|
||||||
|
'$first_day' => $first_day,
|
||||||
|
'$prev' => t('Previous'),
|
||||||
|
'$next' => t('Next'),
|
||||||
|
'$today' => t('Today'),
|
||||||
|
'$title' => $title,
|
||||||
|
'$dtstart' => $dtstart,
|
||||||
|
'$dtend' => $dtend,
|
||||||
|
'$nick' => $nick
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $o;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,9 @@ require_once('include/html2plain.php');
|
|||||||
class Events extends \Zotlabs\Web\Controller {
|
class Events extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
function post() {
|
function post() {
|
||||||
|
|
||||||
|
// this module is deprecated
|
||||||
|
return;
|
||||||
|
|
||||||
logger('post: ' . print_r($_REQUEST,true), LOGGER_DATA);
|
logger('post: ' . print_r($_REQUEST,true), LOGGER_DATA);
|
||||||
|
|
||||||
@ -245,6 +248,9 @@ class Events extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
|
|
||||||
function get() {
|
function get() {
|
||||||
|
|
||||||
|
// this module is deprecated
|
||||||
|
return;
|
||||||
|
|
||||||
if(argc() > 2 && argv(1) == 'ical') {
|
if(argc() > 2 && argv(1) == 'ical') {
|
||||||
$event_id = argv(2);
|
$event_id = argv(2);
|
||||||
|
@ -96,11 +96,12 @@ class Item extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if we don't have a parent id belonging to the signer see if we can obtain one as a visitor that we have permission to access
|
// if we don't have a parent id belonging to the signer see if we can obtain one as a visitor that we have permission to access
|
||||||
|
// with a bias towards those items owned by channels on this site (item_wall = 1)
|
||||||
|
|
||||||
$sql_extra = item_permissions_sql(0);
|
$sql_extra = item_permissions_sql(0);
|
||||||
|
|
||||||
if (! $i) {
|
if (! $i) {
|
||||||
$i = q("select id as item_id from item where mid = '%s' $item_normal $sql_extra limit 1",
|
$i = q("select id as item_id from item where mid = '%s' $item_normal $sql_extra order by item_wall desc limit 1",
|
||||||
dbesc($r[0]['parent_mid'])
|
dbesc($r[0]['parent_mid'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -502,13 +502,17 @@ abstract class PhotoDriver {
|
|||||||
*
|
*
|
||||||
* @param array $arr
|
* @param array $arr
|
||||||
* @param scale int
|
* @param scale int
|
||||||
* @return boolean|array
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function storeThumbnail($arr, $scale = 0) {
|
public function storeThumbnail($arr, $scale = 0) {
|
||||||
|
|
||||||
|
// We only process thumbnails here
|
||||||
|
if($scale == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
$arr['imgscale'] = $scale;
|
$arr['imgscale'] = $scale;
|
||||||
|
|
||||||
if(boolval(get_config('system','filesystem_storage_thumbnails', 0)) && $scale > 0) {
|
if(boolval(get_config('system','filesystem_storage_thumbnails', 0))) {
|
||||||
$channel = channelx_by_n($arr['uid']);
|
$channel = channelx_by_n($arr['uid']);
|
||||||
$arr['os_storage'] = 1;
|
$arr['os_storage'] = 1;
|
||||||
$arr['os_syspath'] = 'store/' . $channel['channel_address'] . '/' . $arr['os_path'] . '-' . $scale;
|
$arr['os_syspath'] = 'store/' . $channel['channel_address'] . '/' . $arr['os_path'] . '-' . $scale;
|
||||||
|
2
boot.php
2
boot.php
@ -50,7 +50,7 @@ require_once('include/attach.php');
|
|||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
|
||||||
define ( 'PLATFORM_NAME', 'hubzilla' );
|
define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||||
define ( 'STD_VERSION', '4.3' );
|
define ( 'STD_VERSION', '4.3.1' );
|
||||||
define ( 'ZOT_REVISION', '6.0a' );
|
define ( 'ZOT_REVISION', '6.0a' );
|
||||||
|
|
||||||
define ( 'DB_UPDATE_VERSION', 1234 );
|
define ( 'DB_UPDATE_VERSION', 1234 );
|
||||||
|
22
composer.lock
generated
22
composer.lock
generated
@ -8,16 +8,16 @@
|
|||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "blueimp/jquery-file-upload",
|
"name": "blueimp/jquery-file-upload",
|
||||||
"version": "v9.30.0",
|
"version": "v9.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
|
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
|
||||||
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558"
|
"reference": "2485bf016e1085f0cd8308723064458cb0af5729"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/1fceec556879403e5c1ae32a7c448aa12b8c3558",
|
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/2485bf016e1085f0cd8308723064458cb0af5729",
|
||||||
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558",
|
"reference": "2485bf016e1085f0cd8308723064458cb0af5729",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
@ -59,7 +59,7 @@
|
|||||||
"upload",
|
"upload",
|
||||||
"widget"
|
"widget"
|
||||||
],
|
],
|
||||||
"time": "2019-04-22T09:21:57+00:00"
|
"time": "2019-05-24T07:59:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "bshaffer/oauth2-server-php",
|
"name": "bshaffer/oauth2-server-php",
|
||||||
@ -957,16 +957,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sabre/xml",
|
"name": "sabre/xml",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sabre-io/xml.git",
|
"url": "https://github.com/sabre-io/xml.git",
|
||||||
"reference": "59b20e5bbace9912607481634f97d05a776ffca7"
|
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sabre-io/xml/zipball/59b20e5bbace9912607481634f97d05a776ffca7",
|
"url": "https://api.github.com/repos/sabre-io/xml/zipball/a367665f1df614c3b8fefc30a54de7cd295e444e",
|
||||||
"reference": "59b20e5bbace9912607481634f97d05a776ffca7",
|
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -978,7 +978,7 @@
|
|||||||
"sabre/uri": ">=1.0,<3.0.0"
|
"sabre/uri": ">=1.0,<3.0.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "*",
|
"phpunit/phpunit": "~4.8|~5.7",
|
||||||
"sabre/cs": "~1.0.0"
|
"sabre/cs": "~1.0.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
@ -1016,7 +1016,7 @@
|
|||||||
"dom",
|
"dom",
|
||||||
"xml"
|
"xml"
|
||||||
],
|
],
|
||||||
"time": "2016-10-09T22:57:52+00:00"
|
"time": "2019-01-09T13:51:57+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "simplepie/simplepie",
|
"name": "simplepie/simplepie",
|
||||||
|
@ -280,20 +280,6 @@ function get_features($filtered = true, $level = (-1)) {
|
|||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'events' => [
|
|
||||||
|
|
||||||
t('Events'),
|
|
||||||
|
|
||||||
[
|
|
||||||
'events_cal_first_day',
|
|
||||||
t('Start calendar week on Monday'),
|
|
||||||
t('Default is Sunday'),
|
|
||||||
false,
|
|
||||||
get_config('feature_lock','events_cal_first_day')
|
|
||||||
]
|
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
'manage' => [
|
'manage' => [
|
||||||
|
|
||||||
t('Manage'),
|
t('Manage'),
|
||||||
|
@ -390,7 +390,7 @@ function photo_upload($channel, $observer, $args) {
|
|||||||
'edited' => $p['edited'],
|
'edited' => $p['edited'],
|
||||||
'id' => z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash,
|
'id' => z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash,
|
||||||
'link' => $link,
|
'link' => $link,
|
||||||
'body' => $obj_body
|
'body' => $summary
|
||||||
);
|
);
|
||||||
|
|
||||||
$target = array(
|
$target = array(
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,127 +0,0 @@
|
|||||||
|
|
||||||
## Reporting Bugs
|
|
||||||
|
|
||||||
Each bug report MUST have a [JSFiddle/JSBin] recreation before any work can begin. [further instructions »](http://fullcalendar.io/wiki/Reporting-Bugs/)
|
|
||||||
|
|
||||||
|
|
||||||
## Requesting Features
|
|
||||||
|
|
||||||
Please search the [Issue Tracker] to see if your feature has already been requested, and if so, subscribe to it. Otherwise, read these [further instructions »](http://fullcalendar.io/wiki/Requesting-Features/)
|
|
||||||
|
|
||||||
|
|
||||||
## Contributing Features
|
|
||||||
|
|
||||||
The FullCalendar project welcomes [Pull Requests][Using Pull Requests] for new features, but because there are so many feature requests (over 100), and because every new feature requires refinement and maintenance, each PR will be prioritized against the project's other demands and might take a while to make it to an official release.
|
|
||||||
|
|
||||||
Furthermore, each new feature should be designed as robustly as possible and be useful beyond the immediate usecase it was initially designed for. Feel free to start a ticket discussing the feature's specs before coding.
|
|
||||||
|
|
||||||
|
|
||||||
## Contributing Bugfixes
|
|
||||||
|
|
||||||
In the description of your [Pull Request][Using Pull Requests], please include recreation steps for the bug as well as a [JSFiddle/JSBin] demo. Communicating the buggy behavior is a requirement before a merge can happen.
|
|
||||||
|
|
||||||
|
|
||||||
## Contributing Locales
|
|
||||||
|
|
||||||
Please edit the original files in the `locale/` directory. DO NOT edit anything in the `dist/` directory. The build system will responsible for merging FullCalendar's `locale/` data with the [MomentJS locale data].
|
|
||||||
|
|
||||||
|
|
||||||
## Other Ways to Contribute
|
|
||||||
|
|
||||||
[Read about other ways to contribute »](http://fullcalendar.io/wiki/Contributing/)
|
|
||||||
|
|
||||||
|
|
||||||
## Getting Set Up
|
|
||||||
|
|
||||||
You will need [Git][git], [Node][node], and NPM installed. For clarification, please view the [jQuery readme][jq-readme], which requires a similar setup.
|
|
||||||
|
|
||||||
Also, you will need the [gulp-cli][gulp-cli] package installed globally (`-g`) on your system:
|
|
||||||
|
|
||||||
npm install -g gulp-cli
|
|
||||||
|
|
||||||
Then, clone FullCalendar's git repo:
|
|
||||||
|
|
||||||
git clone git://github.com/fullcalendar/fullcalendar.git
|
|
||||||
|
|
||||||
Enter the directory and install FullCalendar's dependencies:
|
|
||||||
|
|
||||||
cd fullcalendar
|
|
||||||
npm install
|
|
||||||
|
|
||||||
|
|
||||||
## What to edit
|
|
||||||
|
|
||||||
When modifying files, please do not edit the generated or minified files in the `dist/` directory. Please edit the original `src/` files.
|
|
||||||
|
|
||||||
|
|
||||||
## Development Workflow
|
|
||||||
|
|
||||||
After you make code changes, you'll want to compile the JS/CSS so that it can be previewed from the tests and demos. You can either manually rebuild each time you make a change:
|
|
||||||
|
|
||||||
gulp dev
|
|
||||||
|
|
||||||
Or, you can run a script that automatically rebuilds whenever you save a source file:
|
|
||||||
|
|
||||||
gulp watch
|
|
||||||
|
|
||||||
When you are finished, run the following command to write the distributable files into the `./dist/` directory:
|
|
||||||
|
|
||||||
gulp dist
|
|
||||||
|
|
||||||
If you want to clean up the generated files, run:
|
|
||||||
|
|
||||||
gulp clean
|
|
||||||
|
|
||||||
|
|
||||||
## Style Guide
|
|
||||||
|
|
||||||
Please follow the [Google JavaScript Style Guide] as closely as possible. With the following exceptions:
|
|
||||||
|
|
||||||
```js
|
|
||||||
if (true) {
|
|
||||||
}
|
|
||||||
else { // please put else, else if, and catch on a separate line
|
|
||||||
}
|
|
||||||
|
|
||||||
// please write one-line array literals with a one-space padding inside
|
|
||||||
var a = [ 1, 2, 3 ];
|
|
||||||
|
|
||||||
// please write one-line object literals with a one-space padding inside
|
|
||||||
var o = { a: 1, b: 2, c: 3 };
|
|
||||||
```
|
|
||||||
|
|
||||||
Other exceptions:
|
|
||||||
|
|
||||||
- please ignore anything about Google Closure Compiler or the `goog` library
|
|
||||||
- please do not write JSDoc comments
|
|
||||||
|
|
||||||
Notes about whitespace:
|
|
||||||
|
|
||||||
- **use *tabs* instead of spaces**
|
|
||||||
- separate functions with *2* blank lines
|
|
||||||
- separate logical blocks within functions with *1* blank line
|
|
||||||
|
|
||||||
Run the command line tool to automatically check your style:
|
|
||||||
|
|
||||||
gulp lint
|
|
||||||
|
|
||||||
|
|
||||||
## Before Submitting your Code
|
|
||||||
|
|
||||||
If you have edited code (including **tests** and **translations**) and would like to submit a pull request, please make sure you have done the following:
|
|
||||||
|
|
||||||
1. Conformed to the style guide (successfully run `gulp lint`)
|
|
||||||
|
|
||||||
2. Written automated tests. View the [Automated Test Readme]
|
|
||||||
|
|
||||||
|
|
||||||
[JSFiddle/JSBin]: http://fullcalendar.io/wiki/Reporting-Bugs/
|
|
||||||
[Issue Tracker]: https://github.com/fullcalendar/fullcalendar/issues
|
|
||||||
[Using Pull Requests]: https://help.github.com/articles/using-pull-requests/
|
|
||||||
[MomentJS locale data]: https://github.com/moment/moment/tree/develop/locale
|
|
||||||
[git]: http://git-scm.com/
|
|
||||||
[node]: http://nodejs.org/
|
|
||||||
[gulp-cli]: https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md
|
|
||||||
[jq-readme]: https://github.com/jquery/jquery/blob/master/README.md#what-you-need-to-build-your-own-jquery
|
|
||||||
[Google JavaScript Style Guide]: http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
|
|
||||||
[Automated Test Readme]: https://github.com/fullcalendar/fullcalendar/wiki/Automated-Tests
|
|
@ -1,20 +0,0 @@
|
|||||||
Copyright (c) 2015 Adam Shaw
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
10
library/fullcalendar.old/fullcalendar.min.js
vendored
10
library/fullcalendar.old/fullcalendar.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,208 +0,0 @@
|
|||||||
/*!
|
|
||||||
* FullCalendar v3.2.0 Print Stylesheet
|
|
||||||
* Docs & License: https://fullcalendar.io/
|
|
||||||
* (c) 2017 Adam Shaw
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Include this stylesheet on your page to get a more printer-friendly calendar.
|
|
||||||
* When including this stylesheet, use the media='print' attribute of the <link> tag.
|
|
||||||
* Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.fc {
|
|
||||||
max-width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Global Event Restyling
|
|
||||||
--------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
.fc-event {
|
|
||||||
background: #fff !important;
|
|
||||||
color: #000 !important;
|
|
||||||
page-break-inside: avoid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc-event .fc-resizer {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Table & Day-Row Restyling
|
|
||||||
--------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
.fc th,
|
|
||||||
.fc td,
|
|
||||||
.fc hr,
|
|
||||||
.fc thead,
|
|
||||||
.fc tbody,
|
|
||||||
.fc-row {
|
|
||||||
border-color: #ccc !important;
|
|
||||||
background: #fff !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* kill the overlaid, absolutely-positioned components */
|
|
||||||
/* common... */
|
|
||||||
.fc-bg,
|
|
||||||
.fc-bgevent-skeleton,
|
|
||||||
.fc-highlight-skeleton,
|
|
||||||
.fc-helper-skeleton,
|
|
||||||
/* for timegrid. within cells within table skeletons... */
|
|
||||||
.fc-bgevent-container,
|
|
||||||
.fc-business-container,
|
|
||||||
.fc-highlight-container,
|
|
||||||
.fc-helper-container {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* don't force a min-height on rows (for DayGrid) */
|
|
||||||
.fc tbody .fc-row {
|
|
||||||
height: auto !important; /* undo height that JS set in distributeHeight */
|
|
||||||
min-height: 0 !important; /* undo the min-height from each view's specific stylesheet */
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc tbody .fc-row .fc-content-skeleton {
|
|
||||||
position: static; /* undo .fc-rigid */
|
|
||||||
padding-bottom: 0 !important; /* use a more border-friendly method for this... */
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td { /* only works in newer browsers */
|
|
||||||
padding-bottom: 1em; /* ...gives space within the skeleton. also ensures min height in a way */
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc tbody .fc-row .fc-content-skeleton table {
|
|
||||||
/* provides a min-height for the row, but only effective for IE, which exaggerates this value,
|
|
||||||
making it look more like 3em. for other browers, it will already be this tall */
|
|
||||||
height: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Undo month-view event limiting. Display all events and hide the "more" links
|
|
||||||
--------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
.fc-more-cell,
|
|
||||||
.fc-more {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc tr.fc-limited {
|
|
||||||
display: table-row !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc td.fc-limited {
|
|
||||||
display: table-cell !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc-popover {
|
|
||||||
display: none; /* never display the "more.." popover in print mode */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* TimeGrid Restyling
|
|
||||||
--------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* undo the min-height 100% trick used to fill the container's height */
|
|
||||||
.fc-time-grid {
|
|
||||||
min-height: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* don't display the side axis at all ("all-day" and time cells) */
|
|
||||||
.fc-agenda-view .fc-axis {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* don't display the horizontal lines */
|
|
||||||
.fc-slats,
|
|
||||||
.fc-time-grid hr { /* this hr is used when height is underused and needs to be filled */
|
|
||||||
display: none !important; /* important overrides inline declaration */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* let the container that holds the events be naturally positioned and create real height */
|
|
||||||
.fc-time-grid .fc-content-skeleton {
|
|
||||||
position: static;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* in case there are no events, we still want some height */
|
|
||||||
.fc-time-grid .fc-content-skeleton table {
|
|
||||||
height: 4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* kill the horizontal spacing made by the event container. event margins will be done below */
|
|
||||||
.fc-time-grid .fc-event-container {
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* TimeGrid *Event* Restyling
|
|
||||||
--------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* naturally position events, vertically stacking them */
|
|
||||||
.fc-time-grid .fc-event {
|
|
||||||
position: static !important;
|
|
||||||
margin: 3px 2px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* for events that continue to a future day, give the bottom border back */
|
|
||||||
.fc-time-grid .fc-event.fc-not-end {
|
|
||||||
border-bottom-width: 1px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* indicate the event continues via "..." text */
|
|
||||||
.fc-time-grid .fc-event.fc-not-end:after {
|
|
||||||
content: "...";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* for events that are continuations from previous days, give the top border back */
|
|
||||||
.fc-time-grid .fc-event.fc-not-start {
|
|
||||||
border-top-width: 1px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* indicate the event is a continuation via "..." text */
|
|
||||||
.fc-time-grid .fc-event.fc-not-start:before {
|
|
||||||
content: "...";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* time */
|
|
||||||
|
|
||||||
/* undo a previous declaration and let the time text span to a second line */
|
|
||||||
.fc-time-grid .fc-event .fc-time {
|
|
||||||
white-space: normal !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* hide the the time that is normally displayed... */
|
|
||||||
.fc-time-grid .fc-event .fc-time span {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */
|
|
||||||
.fc-time-grid .fc-event .fc-time:after {
|
|
||||||
content: attr(data-full);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Vertical Scroller & Containers
|
|
||||||
--------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* kill the scrollbars and allow natural height */
|
|
||||||
.fc-scroller,
|
|
||||||
.fc-day-grid-container, /* these divs might be assigned height, which we need to cleared */
|
|
||||||
.fc-time-grid-container { /* */
|
|
||||||
overflow: visible !important;
|
|
||||||
height: auto !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* kill the horizontal border/padding used to compensate for scrollbars */
|
|
||||||
.fc-row {
|
|
||||||
border: 0 !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Button Controls
|
|
||||||
--------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
.fc-button-group,
|
|
||||||
.fc button {
|
|
||||||
display: none; /* don't display any button-related controls */
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
/*!
|
|
||||||
* FullCalendar v3.2.0 Print Stylesheet
|
|
||||||
* Docs & License: https://fullcalendar.io/
|
|
||||||
* (c) 2017 Adam Shaw
|
|
||||||
*/.fc-bg,.fc-bgevent-container,.fc-bgevent-skeleton,.fc-business-container,.fc-event .fc-resizer,.fc-helper-container,.fc-helper-skeleton,.fc-highlight-container,.fc-highlight-skeleton{display:none}.fc tbody .fc-row,.fc-time-grid{min-height:0!important}.fc-time-grid .fc-event.fc-not-end:after,.fc-time-grid .fc-event.fc-not-start:before{content:"..."}.fc{max-width:100%!important}.fc-event{background:#fff!important;color:#000!important;page-break-inside:avoid}.fc hr,.fc tbody,.fc td,.fc th,.fc thead,.fc-row{border-color:#ccc!important;background:#fff!important}.fc tbody .fc-row{height:auto!important}.fc tbody .fc-row .fc-content-skeleton{position:static;padding-bottom:0!important}.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td{padding-bottom:1em}.fc tbody .fc-row .fc-content-skeleton table{height:1em}.fc-more,.fc-more-cell{display:none!important}.fc tr.fc-limited{display:table-row!important}.fc td.fc-limited{display:table-cell!important}.fc-agenda-view .fc-axis,.fc-popover{display:none}.fc-slats,.fc-time-grid hr{display:none!important}.fc button,.fc-button-group,.fc-time-grid .fc-event .fc-time span{display:none}.fc-time-grid .fc-content-skeleton{position:static}.fc-time-grid .fc-content-skeleton table{height:4em}.fc-time-grid .fc-event-container{margin:0!important}.fc-time-grid .fc-event{position:static!important;margin:3px 2px!important}.fc-time-grid .fc-event.fc-not-end{border-bottom-width:1px!important}.fc-time-grid .fc-event.fc-not-start{border-top-width:1px!important}.fc-time-grid .fc-event .fc-time{white-space:normal!important}.fc-time-grid .fc-event .fc-time:after{content:attr(data-full)}.fc-day-grid-container,.fc-scroller,.fc-time-grid-container{overflow:visible!important;height:auto!important}.fc-row{border:0!important;margin:0!important}
|
|
@ -1,180 +0,0 @@
|
|||||||
/*!
|
|
||||||
* FullCalendar v3.2.0 Google Calendar Plugin
|
|
||||||
* Docs & License: https://fullcalendar.io/
|
|
||||||
* (c) 2017 Adam Shaw
|
|
||||||
*/
|
|
||||||
|
|
||||||
(function(factory) {
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define([ 'jquery' ], factory);
|
|
||||||
}
|
|
||||||
else if (typeof exports === 'object') { // Node/CommonJS
|
|
||||||
module.exports = factory(require('jquery'));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
factory(jQuery);
|
|
||||||
}
|
|
||||||
})(function($) {
|
|
||||||
|
|
||||||
|
|
||||||
var API_BASE = 'https://www.googleapis.com/calendar/v3/calendars';
|
|
||||||
var FC = $.fullCalendar;
|
|
||||||
var applyAll = FC.applyAll;
|
|
||||||
|
|
||||||
|
|
||||||
FC.sourceNormalizers.push(function(sourceOptions) {
|
|
||||||
var googleCalendarId = sourceOptions.googleCalendarId;
|
|
||||||
var url = sourceOptions.url;
|
|
||||||
var match;
|
|
||||||
|
|
||||||
// if the Google Calendar ID hasn't been explicitly defined
|
|
||||||
if (!googleCalendarId && url) {
|
|
||||||
|
|
||||||
// detect if the ID was specified as a single string.
|
|
||||||
// will match calendars like "asdf1234@calendar.google.com" in addition to person email calendars.
|
|
||||||
if (/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(url)) {
|
|
||||||
googleCalendarId = url;
|
|
||||||
}
|
|
||||||
// try to scrape it out of a V1 or V3 API feed URL
|
|
||||||
else if (
|
|
||||||
(match = /^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(url)) ||
|
|
||||||
(match = /^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(url))
|
|
||||||
) {
|
|
||||||
googleCalendarId = decodeURIComponent(match[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (googleCalendarId) {
|
|
||||||
sourceOptions.googleCalendarId = googleCalendarId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (googleCalendarId) { // is this a Google Calendar?
|
|
||||||
|
|
||||||
// make each Google Calendar source uneditable by default
|
|
||||||
if (sourceOptions.editable == null) {
|
|
||||||
sourceOptions.editable = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We want removeEventSource to work, but it won't know about the googleCalendarId primitive.
|
|
||||||
// Shoehorn it into the url, which will function as the unique primitive. Won't cause side effects.
|
|
||||||
// This hack is obsolete since 2.2.3, but keep it so this plugin file is compatible with old versions.
|
|
||||||
sourceOptions.url = googleCalendarId;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
FC.sourceFetchers.push(function(sourceOptions, start, end, timezone) {
|
|
||||||
if (sourceOptions.googleCalendarId) {
|
|
||||||
return transformOptions(sourceOptions, start, end, timezone, this); // `this` is the calendar
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
function transformOptions(sourceOptions, start, end, timezone, calendar) {
|
|
||||||
var url = API_BASE + '/' + encodeURIComponent(sourceOptions.googleCalendarId) + '/events?callback=?'; // jsonp
|
|
||||||
var apiKey = sourceOptions.googleCalendarApiKey || calendar.options.googleCalendarApiKey;
|
|
||||||
var success = sourceOptions.success;
|
|
||||||
var data;
|
|
||||||
var timezoneArg; // populated when a specific timezone. escaped to Google's liking
|
|
||||||
|
|
||||||
function reportError(message, apiErrorObjs) {
|
|
||||||
var errorObjs = apiErrorObjs || [ { message: message } ]; // to be passed into error handlers
|
|
||||||
|
|
||||||
// call error handlers
|
|
||||||
(sourceOptions.googleCalendarError || $.noop).apply(calendar, errorObjs);
|
|
||||||
(calendar.options.googleCalendarError || $.noop).apply(calendar, errorObjs);
|
|
||||||
|
|
||||||
// print error to debug console
|
|
||||||
FC.warn.apply(null, [ message ].concat(apiErrorObjs || []));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!apiKey) {
|
|
||||||
reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/");
|
|
||||||
return {}; // an empty source to use instead. won't fetch anything.
|
|
||||||
}
|
|
||||||
|
|
||||||
// The API expects an ISO8601 datetime with a time and timezone part.
|
|
||||||
// Since the calendar's timezone offset isn't always known, request the date in UTC and pad it by a day on each
|
|
||||||
// side, guaranteeing we will receive all events in the desired range, albeit a superset.
|
|
||||||
// .utc() will set a zone and give it a 00:00:00 time.
|
|
||||||
if (!start.hasZone()) {
|
|
||||||
start = start.clone().utc().add(-1, 'day');
|
|
||||||
}
|
|
||||||
if (!end.hasZone()) {
|
|
||||||
end = end.clone().utc().add(1, 'day');
|
|
||||||
}
|
|
||||||
|
|
||||||
// when sending timezone names to Google, only accepts underscores, not spaces
|
|
||||||
if (timezone && timezone != 'local') {
|
|
||||||
timezoneArg = timezone.replace(' ', '_');
|
|
||||||
}
|
|
||||||
|
|
||||||
data = $.extend({}, sourceOptions.data || {}, {
|
|
||||||
key: apiKey,
|
|
||||||
timeMin: start.format(),
|
|
||||||
timeMax: end.format(),
|
|
||||||
timeZone: timezoneArg,
|
|
||||||
singleEvents: true,
|
|
||||||
maxResults: 9999
|
|
||||||
});
|
|
||||||
|
|
||||||
return $.extend({}, sourceOptions, {
|
|
||||||
googleCalendarId: null, // prevents source-normalizing from happening again
|
|
||||||
url: url,
|
|
||||||
data: data,
|
|
||||||
startParam: false, // `false` omits this parameter. we already included it above
|
|
||||||
endParam: false, // same
|
|
||||||
timezoneParam: false, // same
|
|
||||||
success: function(data) {
|
|
||||||
var events = [];
|
|
||||||
var successArgs;
|
|
||||||
var successRes;
|
|
||||||
|
|
||||||
if (data.error) {
|
|
||||||
reportError('Google Calendar API: ' + data.error.message, data.error.errors);
|
|
||||||
}
|
|
||||||
else if (data.items) {
|
|
||||||
$.each(data.items, function(i, entry) {
|
|
||||||
var url = entry.htmlLink || null;
|
|
||||||
|
|
||||||
// make the URLs for each event show times in the correct timezone
|
|
||||||
if (timezoneArg && url !== null) {
|
|
||||||
url = injectQsComponent(url, 'ctz=' + timezoneArg);
|
|
||||||
}
|
|
||||||
|
|
||||||
events.push({
|
|
||||||
id: entry.id,
|
|
||||||
title: entry.summary,
|
|
||||||
start: entry.start.dateTime || entry.start.date, // try timed. will fall back to all-day
|
|
||||||
end: entry.end.dateTime || entry.end.date, // same
|
|
||||||
url: url,
|
|
||||||
location: entry.location,
|
|
||||||
description: entry.description
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// call the success handler(s) and allow it to return a new events array
|
|
||||||
successArgs = [ events ].concat(Array.prototype.slice.call(arguments, 1)); // forward other jq args
|
|
||||||
successRes = applyAll(success, this, successArgs);
|
|
||||||
if ($.isArray(successRes)) {
|
|
||||||
return successRes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return events;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Injects a string like "arg=value" into the querystring of a URL
|
|
||||||
function injectQsComponent(url, component) {
|
|
||||||
// inject it after the querystring but before the fragment
|
|
||||||
return url.replace(/(\?.*?)?(#|$)/, function(whole, qs, hash) {
|
|
||||||
return (qs ? qs + '&' : '?') + component + hash;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
6
library/fullcalendar.old/gcal.min.js
vendored
6
library/fullcalendar.old/gcal.min.js
vendored
@ -1,6 +0,0 @@
|
|||||||
/*!
|
|
||||||
* FullCalendar v3.2.0 Google Calendar Plugin
|
|
||||||
* Docs & License: https://fullcalendar.io/
|
|
||||||
* (c) 2017 Adam Shaw
|
|
||||||
*/
|
|
||||||
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){function a(a,t,d,c,i){function s(o,r){var l=r||[{message:o}];(a.googleCalendarError||e.noop).apply(i,l),(i.options.googleCalendarError||e.noop).apply(i,l),n.warn.apply(null,[o].concat(r||[]))}var u,g,p=r+"/"+encodeURIComponent(a.googleCalendarId)+"/events?callback=?",m=a.googleCalendarApiKey||i.options.googleCalendarApiKey,f=a.success;return m?(t.hasZone()||(t=t.clone().utc().add(-1,"day")),d.hasZone()||(d=d.clone().utc().add(1,"day")),c&&"local"!=c&&(g=c.replace(" ","_")),u=e.extend({},a.data||{},{key:m,timeMin:t.format(),timeMax:d.format(),timeZone:g,singleEvents:!0,maxResults:9999}),e.extend({},a,{googleCalendarId:null,url:p,data:u,startParam:!1,endParam:!1,timezoneParam:!1,success:function(a){var r,n,t=[];if(a.error)s("Google Calendar API: "+a.error.message,a.error.errors);else if(a.items&&(e.each(a.items,function(e,a){var r=a.htmlLink||null;g&&null!==r&&(r=o(r,"ctz="+g)),t.push({id:a.id,title:a.summary,start:a.start.dateTime||a.start.date,end:a.end.dateTime||a.end.date,url:r,location:a.location,description:a.description})}),r=[t].concat(Array.prototype.slice.call(arguments,1)),n=l(f,this,r),e.isArray(n)))return n;return t}})):(s("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),{})}function o(e,a){return e.replace(/(\?.*?)?(#|$)/,function(e,o,r){return(o?o+"&":"?")+a+r})}var r="https://www.googleapis.com/calendar/v3/calendars",n=e.fullCalendar,l=n.applyAll;n.sourceNormalizers.push(function(e){var a,o=e.googleCalendarId,r=e.url;!o&&r&&(/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(r)?o=r:((a=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(r))||(a=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(r)))&&(o=decodeURIComponent(a[1])),o&&(e.googleCalendarId=o)),o&&(null==e.editable&&(e.editable=!1),e.url=o)}),n.sourceFetchers.push(function(e,o,r,n){if(e.googleCalendarId)return a(e,o,r,n,this)})});
|
|
File diff suppressed because one or more lines are too long
2
vendor/blueimp/jquery-file-upload/bower.json
vendored
2
vendor/blueimp/jquery-file-upload/bower.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "blueimp-file-upload",
|
"name": "blueimp-file-upload",
|
||||||
"version": "9.30.0",
|
"version": "9.31.0",
|
||||||
"title": "jQuery File Upload",
|
"title": "jQuery File Upload",
|
||||||
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images.",
|
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "blueimp-file-upload",
|
"name": "blueimp-file-upload",
|
||||||
"version": "9.30.0",
|
"version": "9.31.0",
|
||||||
"title": "jQuery File Upload",
|
"title": "jQuery File Upload",
|
||||||
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.",
|
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -43,9 +43,9 @@ class UploadHandler
|
|||||||
const IMAGETYPE_PNG = 3;
|
const IMAGETYPE_PNG = 3;
|
||||||
|
|
||||||
protected $image_objects = array();
|
protected $image_objects = array();
|
||||||
|
protected $response = array();
|
||||||
|
|
||||||
public function __construct($options = null, $initialize = true, $error_messages = null) {
|
public function __construct($options = null, $initialize = true, $error_messages = null) {
|
||||||
$this->response = array();
|
|
||||||
$this->options = array(
|
$this->options = array(
|
||||||
'script_url' => $this->get_full_url().'/'.$this->basename($this->get_server_var('SCRIPT_NAME')),
|
'script_url' => $this->get_full_url().'/'.$this->basename($this->get_server_var('SCRIPT_NAME')),
|
||||||
'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/files/',
|
'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/files/',
|
||||||
@ -75,12 +75,12 @@ class UploadHandler
|
|||||||
),
|
),
|
||||||
// By default, allow redirects to the referer protocol+host:
|
// By default, allow redirects to the referer protocol+host:
|
||||||
'redirect_allow_target' => '/^'.preg_quote(
|
'redirect_allow_target' => '/^'.preg_quote(
|
||||||
parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_SCHEME)
|
parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_SCHEME)
|
||||||
.'://'
|
.'://'
|
||||||
.parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_HOST)
|
.parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_HOST)
|
||||||
.'/', // Trailing slash to not match subdomains by mistake
|
.'/', // Trailing slash to not match subdomains by mistake
|
||||||
'/' // preg_quote delimiter param
|
'/' // preg_quote delimiter param
|
||||||
).'/',
|
).'/',
|
||||||
// Enable to provide file downloads via GET requests to the PHP script:
|
// Enable to provide file downloads via GET requests to the PHP script:
|
||||||
// 1. Set to 1 to download files via readfile method through PHP
|
// 1. Set to 1 to download files via readfile method through PHP
|
||||||
// 2. Set to 2 to send a X-Sendfile header for lighttpd/Apache
|
// 2. Set to 2 to send a X-Sendfile header for lighttpd/Apache
|
||||||
@ -151,21 +151,21 @@ class UploadHandler
|
|||||||
'identify_bin' => 'identify',
|
'identify_bin' => 'identify',
|
||||||
'image_versions' => array(
|
'image_versions' => array(
|
||||||
// The empty image version key defines options for the original image.
|
// The empty image version key defines options for the original image.
|
||||||
// Keep in mind: these image manipulations are inherited by all other image versions from this point onwards.
|
// Keep in mind: these image manipulations are inherited by all other image versions from this point onwards.
|
||||||
// Also note that the property 'no_cache' is not inherited, since it's not a manipulation.
|
// Also note that the property 'no_cache' is not inherited, since it's not a manipulation.
|
||||||
'' => array(
|
'' => array(
|
||||||
// Automatically rotate images based on EXIF meta data:
|
// Automatically rotate images based on EXIF meta data:
|
||||||
'auto_orient' => true
|
'auto_orient' => true
|
||||||
),
|
),
|
||||||
// You can add arrays to generate different versions.
|
// You can add arrays to generate different versions.
|
||||||
// The name of the key is the name of the version (example: 'medium').
|
// The name of the key is the name of the version (example: 'medium').
|
||||||
// the array contains the options to apply.
|
// the array contains the options to apply.
|
||||||
/*
|
/*
|
||||||
'medium' => array(
|
'medium' => array(
|
||||||
'max_width' => 800,
|
'max_width' => 800,
|
||||||
'max_height' => 600
|
'max_height' => 600
|
||||||
),
|
),
|
||||||
*/
|
*/
|
||||||
'thumbnail' => array(
|
'thumbnail' => array(
|
||||||
// Uncomment the following to use a defined directory for the thumbnails
|
// Uncomment the following to use a defined directory for the thumbnails
|
||||||
// instead of a subdirectory based on the version identifier.
|
// instead of a subdirectory based on the version identifier.
|
||||||
@ -223,13 +223,13 @@ class UploadHandler
|
|||||||
protected function get_full_url() {
|
protected function get_full_url() {
|
||||||
$https = !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'on') === 0 ||
|
$https = !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'on') === 0 ||
|
||||||
!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
|
!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
|
||||||
strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0;
|
strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0;
|
||||||
return
|
return
|
||||||
($https ? 'https://' : 'http://').
|
($https ? 'https://' : 'http://').
|
||||||
(!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : '').
|
(!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : '').
|
||||||
(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME'].
|
(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME'].
|
||||||
($https && $_SERVER['SERVER_PORT'] === 443 ||
|
($https && $_SERVER['SERVER_PORT'] === 443 ||
|
||||||
$_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))).
|
$_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))).
|
||||||
substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/'));
|
substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,7 +377,11 @@ class UploadHandler
|
|||||||
public function get_config_bytes($val) {
|
public function get_config_bytes($val) {
|
||||||
$val = trim($val);
|
$val = trim($val);
|
||||||
$last = strtolower($val[strlen($val)-1]);
|
$last = strtolower($val[strlen($val)-1]);
|
||||||
$val = (int)$val;
|
if (is_numeric($val)) {
|
||||||
|
$val = (int)$val;
|
||||||
|
} else {
|
||||||
|
$val = (int)substr($val, 0, -1);
|
||||||
|
}
|
||||||
switch ($last) {
|
switch ($last) {
|
||||||
case 'g':
|
case 'g':
|
||||||
$val *= 1024;
|
$val *= 1024;
|
||||||
@ -414,7 +418,7 @@ class UploadHandler
|
|||||||
if ($this->options['max_file_size'] && (
|
if ($this->options['max_file_size'] && (
|
||||||
$file_size > $this->options['max_file_size'] ||
|
$file_size > $this->options['max_file_size'] ||
|
||||||
$file->size > $this->options['max_file_size'])
|
$file->size > $this->options['max_file_size'])
|
||||||
) {
|
) {
|
||||||
$file->error = $this->get_error_message('max_file_size');
|
$file->error = $this->get_error_message('max_file_size');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -424,9 +428,9 @@ class UploadHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (is_int($this->options['max_number_of_files']) &&
|
if (is_int($this->options['max_number_of_files']) &&
|
||||||
($this->count_file_objects() >= $this->options['max_number_of_files']) &&
|
($this->count_file_objects() >= $this->options['max_number_of_files']) &&
|
||||||
// Ignore additional chunks of existing files:
|
// Ignore additional chunks of existing files:
|
||||||
!is_file($this->get_upload_path($file->name))) {
|
!is_file($this->get_upload_path($file->name))) {
|
||||||
$file->error = $this->get_error_message('max_number_of_files');
|
$file->error = $this->get_error_message('max_number_of_files');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -451,7 +455,7 @@ class UploadHandler
|
|||||||
unset($tmp);
|
unset($tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($img_width)) {
|
if (!empty($img_width) && !empty($img_height)) {
|
||||||
if ($max_width && $img_width > $max_width) {
|
if ($max_width && $img_width > $max_width) {
|
||||||
$file->error = $this->get_error_message('max_width');
|
$file->error = $this->get_error_message('max_width');
|
||||||
return false;
|
return false;
|
||||||
@ -488,7 +492,7 @@ class UploadHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function get_unique_filename($file_path, $name, $size, $type, $error,
|
protected function get_unique_filename($file_path, $name, $size, $type, $error,
|
||||||
$index, $content_range) {
|
$index, $content_range) {
|
||||||
while(is_dir($this->get_upload_path($name))) {
|
while(is_dir($this->get_upload_path($name))) {
|
||||||
$name = $this->upcount_name($name);
|
$name = $this->upcount_name($name);
|
||||||
}
|
}
|
||||||
@ -505,10 +509,10 @@ class UploadHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function fix_file_extension($file_path, $name, $size, $type, $error,
|
protected function fix_file_extension($file_path, $name, $size, $type, $error,
|
||||||
$index, $content_range) {
|
$index, $content_range) {
|
||||||
// Add missing file extension for known image types:
|
// Add missing file extension for known image types:
|
||||||
if (strpos($name, '.') === false &&
|
if (strpos($name, '.') === false &&
|
||||||
preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) {
|
preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) {
|
||||||
$name .= '.'.$matches[1];
|
$name .= '.'.$matches[1];
|
||||||
}
|
}
|
||||||
if ($this->options['correct_image_extensions']) {
|
if ($this->options['correct_image_extensions']) {
|
||||||
@ -538,7 +542,7 @@ class UploadHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function trim_file_name($file_path, $name, $size, $type, $error,
|
protected function trim_file_name($file_path, $name, $size, $type, $error,
|
||||||
$index, $content_range) {
|
$index, $content_range) {
|
||||||
// Remove path information and dots around the filename, to prevent uploading
|
// Remove path information and dots around the filename, to prevent uploading
|
||||||
// into different directories or replacing hidden system files.
|
// into different directories or replacing hidden system files.
|
||||||
// Also remove control characters and spaces (\x00..\x20) around the filename:
|
// Also remove control characters and spaces (\x00..\x20) around the filename:
|
||||||
@ -561,7 +565,7 @@ class UploadHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function get_file_name($file_path, $name, $size, $type, $error,
|
protected function get_file_name($file_path, $name, $size, $type, $error,
|
||||||
$index, $content_range) {
|
$index, $content_range) {
|
||||||
$name = $this->trim_file_name($file_path, $name, $size, $type, $error,
|
$name = $this->trim_file_name($file_path, $name, $size, $type, $error,
|
||||||
$index, $content_range);
|
$index, $content_range);
|
||||||
return $this->get_unique_filename(
|
return $this->get_unique_filename(
|
||||||
@ -795,25 +799,26 @@ class UploadHandler
|
|||||||
// Handle transparency in GIF and PNG images:
|
// Handle transparency in GIF and PNG images:
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'gif':
|
case 'gif':
|
||||||
|
imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0));
|
||||||
|
break;
|
||||||
case 'png':
|
case 'png':
|
||||||
imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0));
|
imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0));
|
||||||
case 'png':
|
|
||||||
imagealphablending($new_img, false);
|
imagealphablending($new_img, false);
|
||||||
imagesavealpha($new_img, true);
|
imagesavealpha($new_img, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$success = imagecopyresampled(
|
$success = imagecopyresampled(
|
||||||
$new_img,
|
$new_img,
|
||||||
$src_img,
|
$src_img,
|
||||||
$dst_x,
|
$dst_x,
|
||||||
$dst_y,
|
$dst_y,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
$new_width,
|
$new_width,
|
||||||
$new_height,
|
$new_height,
|
||||||
$img_width,
|
$img_width,
|
||||||
$img_height
|
$img_height
|
||||||
) && $write_func($new_img, $new_file_path, $image_quality);
|
) && $write_func($new_img, $new_file_path, $image_quality);
|
||||||
$this->gd_set_image_object($file_path, $new_img);
|
$this->gd_set_image_object($file_path, $new_img);
|
||||||
return $success;
|
return $success;
|
||||||
}
|
}
|
||||||
@ -827,7 +832,12 @@ class UploadHandler
|
|||||||
$image->setResourceLimit($type, $limit);
|
$image->setResourceLimit($type, $limit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$image->readImage($file_path);
|
try {
|
||||||
|
$image->readImage($file_path);
|
||||||
|
} catch (ImagickException $e) {
|
||||||
|
error_log($e->getMessage());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$this->image_objects[$file_path] = $image;
|
$this->image_objects[$file_path] = $image;
|
||||||
}
|
}
|
||||||
return $this->image_objects[$file_path];
|
return $this->image_objects[$file_path];
|
||||||
@ -884,6 +894,7 @@ class UploadHandler
|
|||||||
$file_path,
|
$file_path,
|
||||||
!empty($options['crop']) || !empty($options['no_cache'])
|
!empty($options['crop']) || !empty($options['no_cache'])
|
||||||
);
|
);
|
||||||
|
if (is_null($image)) return false;
|
||||||
if ($image->getImageFormat() === 'GIF') {
|
if ($image->getImageFormat() === 'GIF') {
|
||||||
// Handle animated GIFs:
|
// Handle animated GIFs:
|
||||||
$images = $image->coalesceImages();
|
$images = $image->coalesceImages();
|
||||||
@ -896,32 +907,28 @@ class UploadHandler
|
|||||||
$image_oriented = false;
|
$image_oriented = false;
|
||||||
if (!empty($options['auto_orient'])) {
|
if (!empty($options['auto_orient'])) {
|
||||||
$image_oriented = $this->imagick_orient_image($image);
|
$image_oriented = $this->imagick_orient_image($image);
|
||||||
}
|
}
|
||||||
|
$image_resize = false;
|
||||||
$image_resize = false;
|
|
||||||
$new_width = $max_width = $img_width = $image->getImageWidth();
|
$new_width = $max_width = $img_width = $image->getImageWidth();
|
||||||
$new_height = $max_height = $img_height = $image->getImageHeight();
|
$new_height = $max_height = $img_height = $image->getImageHeight();
|
||||||
|
|
||||||
// use isset(). User might be setting max_width = 0 (auto in regular resizing). Value 0 would be considered empty when you use empty()
|
// use isset(). User might be setting max_width = 0 (auto in regular resizing). Value 0 would be considered empty when you use empty()
|
||||||
if (isset($options['max_width'])) {
|
if (isset($options['max_width'])) {
|
||||||
$image_resize = true;
|
$image_resize = true;
|
||||||
$new_width = $max_width = $options['max_width'];
|
$new_width = $max_width = $options['max_width'];
|
||||||
}
|
}
|
||||||
if (isset($options['max_height'])) {
|
if (isset($options['max_height'])) {
|
||||||
$image_resize = true;
|
$image_resize = true;
|
||||||
$new_height = $max_height = $options['max_height'];
|
$new_height = $max_height = $options['max_height'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$image_strip = (isset($options['strip']) ? $options['strip'] : false);
|
$image_strip = (isset($options['strip']) ? $options['strip'] : false);
|
||||||
|
if ( !$image_oriented && ($max_width >= $img_width) && ($max_height >= $img_height) && !$image_strip && empty($options["jpeg_quality"]) ) {
|
||||||
if ( !$image_oriented && ($max_width >= $img_width) && ($max_height >= $img_height) && !$image_strip && empty($options["jpeg_quality"]) ) {
|
|
||||||
if ($file_path !== $new_file_path) {
|
if ($file_path !== $new_file_path) {
|
||||||
return copy($file_path, $new_file_path);
|
return copy($file_path, $new_file_path);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$crop = (isset($options['crop']) ? $options['crop'] : false);
|
$crop = (isset($options['crop']) ? $options['crop'] : false);
|
||||||
|
|
||||||
if ($crop) {
|
if ($crop) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
$y = 0;
|
$y = 0;
|
||||||
@ -1111,14 +1118,14 @@ class UploadHandler
|
|||||||
}
|
}
|
||||||
if (count($failed_versions)) {
|
if (count($failed_versions)) {
|
||||||
$file->error = $this->get_error_message('image_resize')
|
$file->error = $this->get_error_message('image_resize')
|
||||||
.' ('.implode($failed_versions, ', ').')';
|
.' ('.implode($failed_versions, ', ').')';
|
||||||
}
|
}
|
||||||
// Free memory:
|
// Free memory:
|
||||||
$this->destroy_image_object($file_path);
|
$this->destroy_image_object($file_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function handle_file_upload($uploaded_file, $name, $size, $type, $error,
|
protected function handle_file_upload($uploaded_file, $name, $size, $type, $error,
|
||||||
$index = null, $content_range = null) {
|
$index = null, $content_range = null) {
|
||||||
$file = new \stdClass();
|
$file = new \stdClass();
|
||||||
$file->name = $this->get_file_name($uploaded_file, $name, $size, $type, $error,
|
$file->name = $this->get_file_name($uploaded_file, $name, $size, $type, $error,
|
||||||
$index, $content_range);
|
$index, $content_range);
|
||||||
@ -1319,8 +1326,7 @@ class UploadHandler
|
|||||||
$json = json_encode($content);
|
$json = json_encode($content);
|
||||||
$redirect = stripslashes($this->get_post_param('redirect'));
|
$redirect = stripslashes($this->get_post_param('redirect'));
|
||||||
if ($redirect && preg_match($this->options['redirect_allow_target'], $redirect)) {
|
if ($redirect && preg_match($this->options['redirect_allow_target'], $redirect)) {
|
||||||
$this->header('Location: '.sprintf($redirect, rawurlencode($json)));
|
return $this->header('Location: '.sprintf($redirect, rawurlencode($json)));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
$this->head();
|
$this->head();
|
||||||
if ($this->get_server_var('HTTP_CONTENT_RANGE')) {
|
if ($this->get_server_var('HTTP_CONTENT_RANGE')) {
|
||||||
@ -1411,11 +1417,11 @@ class UploadHandler
|
|||||||
$files[] = $this->handle_file_upload(
|
$files[] = $this->handle_file_upload(
|
||||||
isset($upload['tmp_name']) ? $upload['tmp_name'] : null,
|
isset($upload['tmp_name']) ? $upload['tmp_name'] : null,
|
||||||
$file_name ? $file_name : (isset($upload['name']) ?
|
$file_name ? $file_name : (isset($upload['name']) ?
|
||||||
$upload['name'] : null),
|
$upload['name'] : null),
|
||||||
$size ? $size : (isset($upload['size']) ?
|
$size ? $size : (isset($upload['size']) ?
|
||||||
$upload['size'] : $this->get_server_var('CONTENT_LENGTH')),
|
$upload['size'] : $this->get_server_var('CONTENT_LENGTH')),
|
||||||
isset($upload['type']) ?
|
isset($upload['type']) ?
|
||||||
$upload['type'] : $this->get_server_var('CONTENT_TYPE'),
|
$upload['type'] : $this->get_server_var('CONTENT_TYPE'),
|
||||||
isset($upload['error']) ? $upload['error'] : null,
|
isset($upload['error']) ? $upload['error'] : null,
|
||||||
null,
|
null,
|
||||||
$content_range
|
$content_range
|
||||||
|
26
vendor/composer/installed.json
vendored
26
vendor/composer/installed.json
vendored
@ -1,20 +1,20 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "blueimp/jquery-file-upload",
|
"name": "blueimp/jquery-file-upload",
|
||||||
"version": "v9.30.0",
|
"version": "v9.31.0",
|
||||||
"version_normalized": "9.30.0.0",
|
"version_normalized": "9.31.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
|
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
|
||||||
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558"
|
"reference": "2485bf016e1085f0cd8308723064458cb0af5729"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/1fceec556879403e5c1ae32a7c448aa12b8c3558",
|
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/2485bf016e1085f0cd8308723064458cb0af5729",
|
||||||
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558",
|
"reference": "2485bf016e1085f0cd8308723064458cb0af5729",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"time": "2019-04-22T09:21:57+00:00",
|
"time": "2019-05-24T07:59:46+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -984,17 +984,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sabre/xml",
|
"name": "sabre/xml",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"version_normalized": "1.5.0.0",
|
"version_normalized": "1.5.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sabre-io/xml.git",
|
"url": "https://github.com/sabre-io/xml.git",
|
||||||
"reference": "59b20e5bbace9912607481634f97d05a776ffca7"
|
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sabre-io/xml/zipball/59b20e5bbace9912607481634f97d05a776ffca7",
|
"url": "https://api.github.com/repos/sabre-io/xml/zipball/a367665f1df614c3b8fefc30a54de7cd295e444e",
|
||||||
"reference": "59b20e5bbace9912607481634f97d05a776ffca7",
|
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1006,10 +1006,10 @@
|
|||||||
"sabre/uri": ">=1.0,<3.0.0"
|
"sabre/uri": ">=1.0,<3.0.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "*",
|
"phpunit/phpunit": "~4.8|~5.7",
|
||||||
"sabre/cs": "~1.0.0"
|
"sabre/cs": "~1.0.0"
|
||||||
},
|
},
|
||||||
"time": "2016-10-09T22:57:52+00:00",
|
"time": "2019-01-09T13:51:57+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
6
vendor/sabre/xml/CHANGELOG.md
vendored
6
vendor/sabre/xml/CHANGELOG.md
vendored
@ -1,6 +1,12 @@
|
|||||||
ChangeLog
|
ChangeLog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
1.5.1 (2019-01-09)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
* #161: Prevent infinite loop on empty xml elements
|
||||||
|
|
||||||
|
|
||||||
1.5.0 (2016-10-09)
|
1.5.0 (2016-10-09)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
2
vendor/sabre/xml/composer.json
vendored
2
vendor/sabre/xml/composer.json
vendored
@ -45,7 +45,7 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"sabre/cs": "~1.0.0",
|
"sabre/cs": "~1.0.0",
|
||||||
"phpunit/phpunit" : "*"
|
"phpunit/phpunit" : "~4.8|~5.7"
|
||||||
},
|
},
|
||||||
"config" : {
|
"config" : {
|
||||||
"bin-dir" : "bin/"
|
"bin-dir" : "bin/"
|
||||||
|
33
vendor/sabre/xml/lib/Deserializer/functions.php
vendored
33
vendor/sabre/xml/lib/Deserializer/functions.php
vendored
@ -66,9 +66,20 @@ function keyValue(Reader $reader, $namespace = null) {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$reader->read()) {
|
||||||
|
$reader->next();
|
||||||
|
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Reader::END_ELEMENT === $reader->nodeType) {
|
||||||
|
$reader->next();
|
||||||
|
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
$values = [];
|
$values = [];
|
||||||
|
|
||||||
$reader->read();
|
|
||||||
do {
|
do {
|
||||||
|
|
||||||
if ($reader->nodeType === Reader::ELEMENT) {
|
if ($reader->nodeType === Reader::ELEMENT) {
|
||||||
@ -79,7 +90,9 @@ function keyValue(Reader $reader, $namespace = null) {
|
|||||||
$values[$clark] = $reader->parseCurrentElement()['value'];
|
$values[$clark] = $reader->parseCurrentElement()['value'];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$reader->read();
|
if (!$reader->read()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} while ($reader->nodeType !== Reader::END_ELEMENT);
|
} while ($reader->nodeType !== Reader::END_ELEMENT);
|
||||||
|
|
||||||
@ -144,7 +157,17 @@ function enum(Reader $reader, $namespace = null) {
|
|||||||
$reader->next();
|
$reader->next();
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
$reader->read();
|
if (!$reader->read()) {
|
||||||
|
$reader->next();
|
||||||
|
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Reader::END_ELEMENT === $reader->nodeType) {
|
||||||
|
$reader->next();
|
||||||
|
|
||||||
|
return [];
|
||||||
|
}
|
||||||
$currentDepth = $reader->depth;
|
$currentDepth = $reader->depth;
|
||||||
|
|
||||||
$values = [];
|
$values = [];
|
||||||
@ -204,7 +227,9 @@ function valueObject(Reader $reader, $className, $namespace) {
|
|||||||
$reader->next();
|
$reader->next();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$reader->read();
|
if (!$reader->read()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} while ($reader->nodeType !== Reader::END_ELEMENT);
|
} while ($reader->nodeType !== Reader::END_ELEMENT);
|
||||||
|
|
||||||
|
3
vendor/sabre/xml/lib/Service.php
vendored
3
vendor/sabre/xml/lib/Service.php
vendored
@ -138,7 +138,8 @@ class Service {
|
|||||||
* @param string|string[] $rootElementName
|
* @param string|string[] $rootElementName
|
||||||
* @param string|resource $input
|
* @param string|resource $input
|
||||||
* @param string|null $contextUri
|
* @param string|null $contextUri
|
||||||
* @return void
|
* @throws ParseException
|
||||||
|
* @return array|object|string
|
||||||
*/
|
*/
|
||||||
function expect($rootElementName, $input, $contextUri = null) {
|
function expect($rootElementName, $input, $contextUri = null) {
|
||||||
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
[region=aside]
|
|
||||||
[widget=eventstools][/widget]
|
|
||||||
[widget=tasklist][/widget]
|
|
||||||
[/region]
|
|
||||||
[region=right_aside]
|
|
||||||
[widget=notifications][/widget]
|
|
||||||
[widget=newmember][/widget]
|
|
||||||
[/region]
|
|
105
view/tpl/cal_calendar.tpl
Executable file
105
view/tpl/cal_calendar.tpl
Executable file
@ -0,0 +1,105 @@
|
|||||||
|
<script>
|
||||||
|
var calendar;
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
var calendarEl = document.getElementById('calendar');
|
||||||
|
calendar = new FullCalendar.Calendar(calendarEl, {
|
||||||
|
plugins: [ 'dayGrid' ],
|
||||||
|
eventSources: [ {{$sources}} ],
|
||||||
|
|
||||||
|
timeZone: '{{$timezone}}',
|
||||||
|
|
||||||
|
locale: '{{$lang}}',
|
||||||
|
|
||||||
|
eventTextColor: 'white',
|
||||||
|
header: false,
|
||||||
|
|
||||||
|
height: 'auto',
|
||||||
|
|
||||||
|
firstDay: {{$first_day}},
|
||||||
|
|
||||||
|
monthNames: aStr['monthNames'],
|
||||||
|
monthNamesShort: aStr['monthNamesShort'],
|
||||||
|
dayNames: aStr['dayNames'],
|
||||||
|
dayNamesShort: aStr['dayNamesShort'],
|
||||||
|
allDayText: aStr['allday'],
|
||||||
|
|
||||||
|
eventClick: function(info) {
|
||||||
|
var event_id = info.event._def.extendedProps.item.id;
|
||||||
|
showEvent(event_id);
|
||||||
|
},
|
||||||
|
|
||||||
|
loading: function(isLoading, view) {
|
||||||
|
$('#events-spinner').show();
|
||||||
|
$('#today-btn > i').hide();
|
||||||
|
if(!isLoading) {
|
||||||
|
$('#events-spinner').hide();
|
||||||
|
$('#today-btn > i').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
calendar.render();
|
||||||
|
|
||||||
|
$('#title').text(calendar.view.title);
|
||||||
|
|
||||||
|
$('#today-btn').on('click', function() {
|
||||||
|
calendar.today();
|
||||||
|
$('#title').text(calendar.view.title);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#prev-btn').on('click', function() {
|
||||||
|
calendar.prev();
|
||||||
|
$('#title').text(calendar.view.title);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#next-btn').on('click', function() {
|
||||||
|
calendar.next();
|
||||||
|
$('#title').text(calendar.view.title);
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click','#fullscreen-btn', updateSize);
|
||||||
|
$(document).on('click','#inline-btn', updateSize);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function showEvent(event_id) {
|
||||||
|
$.get(
|
||||||
|
'cal/{{$nick}}?id='+event_id,
|
||||||
|
function(data){
|
||||||
|
$.colorbox({ scrolling: false, html: data, onComplete: function() { $.colorbox.resize(); }});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeView(action, viewName) {
|
||||||
|
calendar.changeView(viewName);
|
||||||
|
$('#title').text(calendar.view.title);
|
||||||
|
$('#view_selector').html(views[calendar.view.type]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateSize() {
|
||||||
|
calendar.updateSize();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="generic-content-wrapper">
|
||||||
|
<div class="section-title-wrapper">
|
||||||
|
<div class="float-right">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button id="prev-btn" class="btn btn-outline-secondary btn-sm" title="{{$prev}}"><i class="fa fa-backward"></i></button>
|
||||||
|
<button id="today-btn" class="btn btn-outline-secondary btn-sm" title="{{$today}}"><div id="events-spinner" class="spinner s"></div><i class="fa fa-bullseye" style="display: none; width: 1rem;"></i></button>
|
||||||
|
<button id="next-btn" class="btn btn-outline-secondary btn-sm" title="{{$next}}"><i class="fa fa-forward"></i></button>
|
||||||
|
</div>
|
||||||
|
<button id="fullscreen-btn" type="button" class="btn btn-outline-secondary btn-sm" onclick="makeFullScreen();"><i class="fa fa-expand"></i></button>
|
||||||
|
<button id="inline-btn" type="button" class="btn btn-outline-secondary btn-sm" onclick="makeFullScreen(false);"><i class="fa fa-compress"></i></button>
|
||||||
|
</div>
|
||||||
|
<h2 id="title"></h2>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content-wrapper-np">
|
||||||
|
<div id="calendar"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
Reference in New Issue
Block a user