Merge https://github.com/redmatrix/hubzilla into pending_merge
This commit is contained in:
commit
4bfd34b479
@ -28,3 +28,4 @@ AddType audio/ogg .oga
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.*)$ index.php?q=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
|
||||
</IfModule>
|
||||
|
||||
|
@ -22,7 +22,7 @@ function find_upstream_directory($dirmode) {
|
||||
$r = q("select * from site where site_url = '%s' limit 1",
|
||||
dbesc($preferred)
|
||||
);
|
||||
if(($r) && ($r[0]['site_flags'] & DIRECTORY_MODE_STADALONE)) {
|
||||
if(($r) && ($r[0]['site_flags'] & DIRECTORY_MODE_STANDALONE)) {
|
||||
$preferred = '';
|
||||
}
|
||||
}
|
||||
|
@ -666,7 +666,7 @@ function widget_eventsmenu($arr) {
|
||||
if (! local_channel())
|
||||
return;
|
||||
|
||||
return replace_macros(get_markup_template('events_side.tpl'), array(
|
||||
return replace_macros(get_markup_template('events_menu_side.tpl'), array(
|
||||
'$title' => t('Events Menu'),
|
||||
'$day' => t('Day View'),
|
||||
'$week' => t('Week View'),
|
||||
@ -677,6 +677,18 @@ function widget_eventsmenu($arr) {
|
||||
));
|
||||
}
|
||||
|
||||
function widget_eventstools($arr) {
|
||||
if (! local_channel())
|
||||
return;
|
||||
|
||||
return replace_macros(get_markup_template('events_tools_side.tpl'), array(
|
||||
'$title' => t('Events Tools'),
|
||||
'$export' => t('Export Calendar'),
|
||||
'$import' => t('Import Calendar'),
|
||||
'$submit' => t('Submit')
|
||||
));
|
||||
}
|
||||
|
||||
function widget_design_tools($arr) {
|
||||
$a = get_app();
|
||||
|
||||
@ -1147,6 +1159,8 @@ function widget_forums($arr) {
|
||||
|
||||
function widget_tasklist($arr) {
|
||||
|
||||
if (! local_channel())
|
||||
return;
|
||||
|
||||
require_once('include/event.php');
|
||||
$o .= '<script>var tasksShowAll = 0; $(document).ready(function() { tasksFetch(); $("#tasklist-new-form").submit(function(event) { event.preventDefault(); $.post( "tasks/new", $("#tasklist-new-form").serialize(), function(data) { tasksFetch(); $("#tasklist-new-summary").val(""); } ); return false; } )});</script>';
|
||||
|
@ -341,3 +341,44 @@ This is obvious as soon as you notice that the cron uses proc_open to
|
||||
execute php-scripts that also use proc_open, but it took me quite some time to
|
||||
find that out. I hope this saves some time for other people using suhosin with
|
||||
function blacklists.
|
||||
|
||||
#####################################################################
|
||||
- Apache processes hanging, using as much CPU as they can
|
||||
#####################################################################
|
||||
|
||||
This seems to happen sometimes if you use mpm_prefork and the PHP process
|
||||
started by Apache cannot get database access.
|
||||
|
||||
Consider the following settings:
|
||||
|
||||
In /etc/apache2/mods-enabled/mpm_prefork.conf (Debian, path and file name
|
||||
may vary depending on your OS and distribution), set
|
||||
|
||||
GracefulShutdownTimeout 300
|
||||
|
||||
This makes sure that Apache processes that are running wild will not do so
|
||||
forever, but will be killed if they didn't stop five minutes after a
|
||||
shutdown command was sent to the process.
|
||||
|
||||
If you expect high load on your server (public servers, e.g.), also make
|
||||
sure that Apache will not spawn more processes than MySQL will accept
|
||||
connections.
|
||||
|
||||
In the default Debian configuration, in
|
||||
/etc/apache2/mods-enabled/mpm_prefork.conf the maximum number of workers
|
||||
is set to 150:
|
||||
|
||||
MaxRequestWorkers 150
|
||||
|
||||
However, in /etc/mysql/my.cnf the maximum number of connection is set to
|
||||
100:
|
||||
|
||||
max_connections = 100
|
||||
|
||||
150 workers are a lot and probably too much for small servers. However you
|
||||
set those values, make sure that the number of Apache workers is smaller
|
||||
than the number of connections MySQL accepts, leaving some room for other
|
||||
stuff on your server that might access MySQL, and Hubzilla's poller which
|
||||
needs MySQL access, too. A good setting for a medium-sized hub might be to
|
||||
keep MySQL's max_connections at 100 and set mpm_prefork's
|
||||
MaxRequestWorkers to 70.
|
||||
|
@ -90,7 +90,7 @@ function events_post(&$a) {
|
||||
linkify_tags($a, $desc, local_channel());
|
||||
linkify_tags($a, $location, local_channel());
|
||||
|
||||
$action = ($event_hash == '') ? 'new' : "event/" . $event_hash;
|
||||
//$action = ($event_hash == '') ? 'new' : "event/" . $event_hash;
|
||||
|
||||
//fixme: this url gives a wsod if there is a linebreak detected in one of the variables ($desc or $location)
|
||||
//$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type";
|
||||
@ -376,39 +376,24 @@ function events_content(&$a) {
|
||||
if(x($orig_event))
|
||||
$tz = (($orig_event['adjust']) ? date_default_timezone_get() : 'UTC');
|
||||
|
||||
// $syear = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'Y') : '0000');
|
||||
// $smonth = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'm') : '00');
|
||||
// $sday = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'd') : '00');
|
||||
|
||||
$syear = datetime_convert('UTC', $tz, $sdt, 'Y');
|
||||
$smonth = datetime_convert('UTC', $tz, $sdt, 'm');
|
||||
$sday = datetime_convert('UTC', $tz, $sdt, 'd');
|
||||
|
||||
// $shour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'H') : '00');
|
||||
// $sminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'i') : '00');
|
||||
|
||||
$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 = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'Y') : '0000');
|
||||
// $fmonth = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'm') : '00');
|
||||
// $fday = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'd') : '00');
|
||||
|
||||
$fyear = datetime_convert('UTC', $tz, $fdt, 'Y');
|
||||
$fmonth = datetime_convert('UTC', $tz, $fdt, 'm');
|
||||
$fday = datetime_convert('UTC', $tz, $fdt, 'd');
|
||||
|
||||
// $fhour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'H') : '00');
|
||||
// $fminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'i') : '00');
|
||||
|
||||
$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['type'] : 'event');
|
||||
|
||||
$f = get_config('system','event_input_format');
|
||||
@ -608,7 +593,7 @@ function events_content(&$a) {
|
||||
|
||||
$last_date = $d;
|
||||
|
||||
$edit = array($a->get_baseurl().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'','');
|
||||
$edit = ((local_channel() && $rr['author_xchan'] == get_observer_hash()) ? array($a->get_baseurl().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'','') : false);
|
||||
|
||||
$drop = array($a->get_baseurl().'/events/drop/'.$rr['event_hash'],t('Delete event'),'','');
|
||||
|
||||
|
3
view/css/bootstrap-red.css
vendored
3
view/css/bootstrap-red.css
vendored
@ -57,7 +57,8 @@ nav .navbar-toggle {
|
||||
/* nav overrides end */
|
||||
|
||||
|
||||
aside .nav-pills > li > a {
|
||||
aside .nav-pills > li > a,
|
||||
.response-list .nav-pills > li > a {
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,21 @@
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.fc-unthemed th,
|
||||
.fc-unthemed td,
|
||||
.fc-unthemed thead,
|
||||
.fc-unthemed tbody,
|
||||
.fc-unthemed .fc-divider,
|
||||
.fc-unthemed .fc-row,
|
||||
.fc-unthemed .fc-popover {
|
||||
border-color: #ccc !important;
|
||||
}
|
||||
|
||||
#events-spinner .spinner {
|
||||
margin-top: 9px;
|
||||
margin-bottom: -9px;
|
||||
}
|
||||
|
||||
.bootstrap-tagsinput {
|
||||
width: 100%;
|
||||
padding: 6px 12px;
|
||||
@ -14,3 +29,24 @@
|
||||
height: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.event-owner {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.event-owner img {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.event-buttons,
|
||||
.event-description {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#event-upload-form {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#event-upload-choose {
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
[region=aside]
|
||||
[widget=eventsmenu][/widget]
|
||||
[widget=eventstools][/widget]
|
||||
[widget=tasklist][/widget]
|
||||
[/region]
|
||||
|
@ -241,7 +241,8 @@ footer {
|
||||
padding-right: 3em;
|
||||
}
|
||||
|
||||
.birthday-today, .event-today {
|
||||
.birthday-today,
|
||||
.event-today {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@ -847,68 +848,6 @@ nav .acpopup {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fc-unthemed th,
|
||||
.fc-unthemed td,
|
||||
.fc-unthemed thead,
|
||||
.fc-unthemed tbody,
|
||||
.fc-unthemed .fc-divider,
|
||||
.fc-unthemed .fc-row,
|
||||
.fc-unthemed .fc-popover {
|
||||
border-color: #ccc !important;
|
||||
}
|
||||
|
||||
.wall-event-item {
|
||||
padding: 10px;
|
||||
color: #fff;
|
||||
background-color: #3A87AD; /* should reflect calendar color */
|
||||
border-top-left-radius: $radiuspx;
|
||||
border-top-right-radius: $radiuspx;
|
||||
}
|
||||
|
||||
.vevent .event-end {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#event-summary-text {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
|
||||
#new-event-link {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit-event-link, .plink-event-link, .drop-event-link {
|
||||
float: left;
|
||||
margin-top: 4px;
|
||||
margin-right: 4px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.event-owner img {
|
||||
padding-bottom: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.event-buttons {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.event-list-date {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.prevcal, .nextcal {
|
||||
float: left;
|
||||
margin-left: 32px;
|
||||
margin-right: 32px;
|
||||
margin-top: 64px;
|
||||
}
|
||||
.event-calendar-end {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
#cboxOverlay {
|
||||
z-index: 1050;
|
||||
}
|
||||
@ -1562,8 +1501,12 @@ img.mail-conv-sender-photo {
|
||||
padding: 0.5em 10px;
|
||||
}
|
||||
|
||||
.wall-photo-item {
|
||||
/*padding: 0.5em 10px;*/
|
||||
.wall-event-item {
|
||||
padding: 10px;
|
||||
color: #fff;
|
||||
background-color: #3A87AD; /* should reflect calendar color */
|
||||
border-top-left-radius: $radiuspx;
|
||||
border-top-right-radius: $radiuspx;
|
||||
}
|
||||
|
||||
.wall-photo-item img {
|
||||
@ -2252,8 +2195,3 @@ nav .badge.mail-update:hover {
|
||||
.help-searchlist a {
|
||||
font-size: 130%;
|
||||
}
|
||||
|
||||
.response-list ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,11 @@
|
||||
showEvent(calEvent.id);
|
||||
},
|
||||
loading: function(isLoading, view) {
|
||||
$('#events-spinner').spin('tiny');
|
||||
$('#events-spinner > i').css('color', 'transparent');
|
||||
if(!isLoading) {
|
||||
$('#events-spinner').spin(false);
|
||||
$('#events-spinner > i').css('color', '');
|
||||
$('td.fc-day').dblclick(function() {
|
||||
openMenu('form');
|
||||
//window.location.href='/events/new?start='+$(this).data('date');
|
||||
|
@ -1,12 +1,10 @@
|
||||
<div class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper">
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-default btn-xs" onclick="openClose('event-tools'); closeMenu('form');"><i class="icon-cog"></i></button>
|
||||
<button class="btn btn-success btn-xs" onclick="openClose('form'); closeMenu('event-tools');">{{$new_event.1}}</button>
|
||||
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="icon-backward"></i></button>
|
||||
<button class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="icon-bullseye"></i></button>
|
||||
<button id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="icon-bullseye"></i></button>
|
||||
<button class="btn btn-default btn-xs" onclick="changeView('next', false);" title="{{$next}}"><i class="icon-forward"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@ -16,19 +14,6 @@
|
||||
<div id="form" class="section-content-tools-wrapper"{{if !$expandform}} style="display:none;"{{/if}}>
|
||||
{{$form}}
|
||||
</div>
|
||||
<div id="event-tools" class="section-content-tools-wrapper" style="display:none;">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary btn-xs" onclick="exportDate(); return false;"><i class="icon-download"></i> {{$export.1}}</button>
|
||||
<button class="btn btn-primary btn-xs" onclick="openClose('event-upload-form');"><i class="icon-upload"></i> {{$upload}}</button>
|
||||
</div>
|
||||
<div id="event-upload-form" style="display:none;">
|
||||
<form action="events" enctype="multipart/form-data" method="post" name="event-upload-form" id="event-upload-form">
|
||||
<button id="dbtn-submit" class="btn btn-primary btn-sm pull-right" type="submit" name="submit" >{{$submit}}</button>
|
||||
<input id="event-upload-choose" type="file" name="userfile" />
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="section-content-wrapper-np">
|
||||
<div id="events-calendar"></div>
|
||||
|
15
view/tpl/events_tools_side.tpl
Executable file
15
view/tpl/events_tools_side.tpl
Executable file
@ -0,0 +1,15 @@
|
||||
<div class="widget">
|
||||
<h3>{{$title}}</h3>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#" onclick="exportDate(); return false;"><i class="icon-download"></i> {{$export}}</a></li>
|
||||
<li><a href="#" onclick="openClose('event-upload-form'); return false;"><i class="icon-upload"></i> {{$import}}</a></li>
|
||||
</ul>
|
||||
<div id="event-upload-form" style="display: none;">
|
||||
<form action="events" enctype="multipart/form-data" method="post" name="event-upload-form" id="event-upload-form">
|
||||
<div class="form-group">
|
||||
<input id="event-upload-choose" type="file" name="userfile" />
|
||||
</div>
|
||||
<button id="dbtn-submit" class="btn btn-primary btn-xs" type="submit" name="submit" >{{$submit}}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user