aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-11-28 16:26:24 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-11-28 16:26:24 +0100
commit17907f11a350536bbcac248e6b81b63eecee964d (patch)
tree93f8413b78c6fb12fde059ecc8f8831e9996731a /include
parentcb7df797e1d5a87ff8b6dbb6c07faf68e3e725f7 (diff)
parent122d7281f7d4b55ef8adf8791bdab51b4b797ba8 (diff)
downloadvolse-hubzilla-17907f11a350536bbcac248e6b81b63eecee964d.tar.gz
volse-hubzilla-17907f11a350536bbcac248e6b81b63eecee964d.tar.bz2
volse-hubzilla-17907f11a350536bbcac248e6b81b63eecee964d.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: include/datetime.php include/text.php mod/events.php version.inc view/css/mod_events.css view/theme/redbasic/css/style.css view/tpl/event_head.tpl view/tpl/events-js.tpl view/tpl/jot.tpl
Diffstat (limited to 'include')
-rw-r--r--include/datetime.php4
-rw-r--r--include/dir_fns.php2
-rw-r--r--include/js_strings.php1
-rw-r--r--include/taxonomy.php4
-rw-r--r--include/text.php38
-rw-r--r--include/widgets.php16
-rw-r--r--include/zot.php3
7 files changed, 62 insertions, 6 deletions
diff --git a/include/datetime.php b/include/datetime.php
index f7df70a36..952151a00 100644
--- a/include/datetime.php
+++ b/include/datetime.php
@@ -235,7 +235,11 @@ function datetimesel($format, $min, $max, $default, $label, $id = 'datetimepicke
$o .= replace_macros($tpl,array(
'$field' => array($id, $label, $input_text, (($required) ? t('Required') : ''), (($required) ? '*' : ''), 'placeholder="' . $readable_format . '"'),
));
+<<<<<<< HEAD
$o .= "<script>\$(function () {var picker = \$('#id_$id').datetimepicker({step:5,format:'$dateformat' $minjs $maxjs $pickers $defaultdatejs,dayOfWeekStart:$first_day}); $extra_js})</script>";
+=======
+ $o .= "<script>\$(function () {var picker = \$('#id_$id').datetimepicker({step:15,format:'$dateformat' $minjs $maxjs $pickers $defaultdatejs,dayOfWeekStart:$first_day}); $extra_js})</script>";
+>>>>>>> upstream/master
return $o;
}
diff --git a/include/dir_fns.php b/include/dir_fns.php
index b9f221bd1..fd2a5835d 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -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 = '';
}
}
diff --git a/include/js_strings.php b/include/js_strings.php
index a21461a52..b1817f373 100644
--- a/include/js_strings.php
+++ b/include/js_strings.php
@@ -22,6 +22,7 @@ function js_strings() {
'$submit' => t('Submit'),
'$linkurl' => t('Please enter a link URL'),
'$leavethispage' => t('Unsaved changes. Are you sure you wish to leave this page?'),
+ '$location' => t('Location'),
'$t01' => ((t('timeago.prefixAgo') != 'timeago.prefixAgo') ? t('timeago.prefixAgo') : ''),
'$t02' => ((t('timeago.prefixFromNow') != 'timeago.prefixFromNow') ? t('timeago.prefixFromNow') : ''),
diff --git a/include/taxonomy.php b/include/taxonomy.php
index b396d53f1..0bf89a7c1 100644
--- a/include/taxonomy.php
+++ b/include/taxonomy.php
@@ -117,6 +117,8 @@ function tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $re
if(! perm_is_allowed($uid,get_observer_hash(),'view_stream'))
return array();
+
+ $item_normal = item_normal();
$sql_options = item_permissions_sql($uid);
$count = intval($count);
@@ -142,7 +144,7 @@ function tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $re
$r = q("select term, count(term) as total from term left join item on term.oid = item.id
where term.uid = %d and term.type = %d
and otype = %d and item_type = %d and item_private = 0
- $sql_options
+ $sql_options $item_normal
group by term order by total desc %s",
intval($uid),
intval($type),
diff --git a/include/text.php b/include/text.php
index f40d67f23..99c73ebee 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1381,7 +1381,37 @@ function generate_named_map($location) {
return (($arr['html']) ? $arr['html'] : $location);
}
+function format_event($jobject) {
+ $event = array();
+
+ $object = json_decode($jobject,true);
+
+ //ensure compatibility with older items - this check can be removed at a later point
+ if(array_key_exists('description', $object)) {
+
+ $bd_format = t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8:01 AM
+
+ $event['header'] = replace_macros(get_markup_template('event_item_header.tpl'),array(
+ '$title' => bbcode($object['title']),
+ '$dtstart_label' => t('Starts:'),
+ '$dtstart_title' => datetime_convert('UTC', 'UTC', $object['start'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )),
+ '$dtstart_dt' => (($object['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $object['start'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $object['start'] , $bd_format))),
+ '$finish' => (($object['nofinish']) ? false : true),
+ '$dtend_label' => t('Finishes:'),
+ '$dtend_title' => datetime_convert('UTC','UTC',$object['finish'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )),
+ '$dtend_dt' => (($object['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $object['finish'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $object['finish'] , $bd_format )))
+ ));
+
+ $event['content'] = replace_macros(get_markup_template('event_item_content.tpl'),array(
+ '$description' => bbcode($object['description']),
+ '$location_label' => t('Location:'),
+ '$location' => bbcode($object['location'])
+ ));
+
+ }
+ return $event;
+}
function prepare_body(&$item,$attach = false) {
require_once('include/identity.php');
@@ -1414,6 +1444,7 @@ function prepare_body(&$item,$attach = false) {
}
}
+<<<<<<< HEAD
$event = array();
$is_event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? true : false);
@@ -1462,6 +1493,13 @@ function prepare_body(&$item,$attach = false) {
$prep_arr = array(
'item' => $item,
'html' => $is_event ? $event['content'] : $s,
+=======
+ $event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event($item['object']) : false);
+
+ $prep_arr = array(
+ 'item' => $item,
+ 'html' => $event ? $event['content'] : $s,
+>>>>>>> upstream/master
'event' => $event['header'],
'photo' => $photo
);
diff --git a/include/widgets.php b/include/widgets.php
index a3f7444ec..d4f3d32e1 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -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>';
diff --git a/include/zot.php b/include/zot.php
index 2366c1d2d..c0d537eb9 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3951,9 +3951,6 @@ function delivery_report_is_storable($dr) {
return false;
-
-
-
// is the recipient one of our connections, or do we want to store every report?
$r = explode(' ', $dr['recipient']);